You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
1.8 MiB

/*! For license information please see bundle.modals.3cca01cb.js.LICENSE.txt */
(window.webpackETJsonp=window.webpackETJsonp||[]).push([[6],Array(507).concat([function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=s(n(3)),i=s(n(40)),l=s(n(809));n(810);var u=["tip","ripple","className","children","forwardedRef"];function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e){var t=function(){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}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=function(e){!function(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&&y(e,t)}(i,e);var t,n,r,a=g(i);function i(){return h(this,i),a.apply(this,arguments)}return t=i,n=[{key:"render",value:function(){var e=this.props,t=e.tip,n=e.ripple,r=e.className,a=e.children,i=e.forwardedRef,s=p(e,u),c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"button",className:"et-common-button ".concat(r)},s);return""!==t&&(c["data-tip"]=t),o.default.createElement("button",d({ref:i},c),a,n&&o.default.createElement(l.default,null))}}],n&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.PureComponent);_(w,"propTypes",{tip:a.default.string,ripple:a.default.bool,className:a.default.string,forwardedRef:a.default.func}),_(w,"defaultProps",{tip:"",ripple:!0,className:"",forwardedRef:i.default});var O=o.default.forwardRef((function(e,t){return o.default.createElement(w,d({},e,{forwardedRef:t}))}));t.default=O},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setArgs=t.setArg=t.rmArg=t.isJquerySrc=t.getUrlFileName=t.getArgs=t.getArg=t.default=t.clearArgs=void 0;var r=k(n(333)),o=k(n(196)),a=k(n(508)),i=k(n(397)),l=k(n(393)),u=k(n(361)),s=k(n(402)),c=k(n(786)),d=k(n(796)),f=k(n(817)),p=k(n(818)),h=k(n(461)),m=k(n(797)),y=k(n(798)),g=k(n(787)),b=k(n(799)),v=k(n(37)),_=k(n(7)),w=k(n(9)),O=n(819);function k(e){return e&&e.__esModule?e:{default:e}}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P=[],T=(0,o.default)((0,d.default)("&"),(0,c.default)((0,d.default)("=")),f.default),M=(0,o.default)((function(e){return(0,h.default)(e,"/")}),u.default,(0,l.default)("?"),i.default);t.clearArgs=M;var j=(0,o.default)(p.default,(0,y.default)((0,o.default)((0,b.default)(g.default),u.default)),(0,c.default)((0,l.default)("=")),(0,l.default)("&"),s.default,(0,l.default)("?"),i.default);t.getArgs=j;var x=(0,r.default)((function(e,t){return(0,a.default)(e,j(t))}));t.getArg=x;var D=(0,r.default)((function(e,t){return"".concat(M(t),"?").concat(T(C(C({},j(t)),e)))}));t.setArgs=D;var N=(0,r.default)((function(e,t,n){return D(E({},e,t),n)}));t.setArg=N;var L=(0,r.default)((function(e,t){return D((0,m.default)(e,j(t)),M(t))}));t.rmArg=L;var R=function(e){return(0,v.default)(e)?e.split("/").pop().split("?").shift():""};t.getUrlFileName=R;var A=function(e){if(!(0,v.default)(e))return!1;var t=R(e).toLowerCase();return-1!==t.indexOf("jquery")&&((0,g.default)(P)&&(P=["jquery.js","jquery.min.js"],(0,w.default)(O.versions,(function(e){P.push("jquery-".concat(e,".js")),P.push("jquery-".concat(e,".min.js"))}))),(0,_.default)(P,t))};t.isJquerySrc=A;var I={getArgs:j,getArg:x,clearArgs:M,setArgs:D,setArg:N,rmArg:L,getUrlFileName:R,isJquerySrc:A};t.default=I},function(e,t,n){var r=n(54)("map",n(31));r.placeholder=n(48),e.exports=r},function(e,t,n){var r=n(54)("isEmpty",n(5),n(130));r.placeholder=n(48),e.exports=r},,,,,,,,function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(40)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=s(n(3)),l=n(67);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){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}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){!function(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&&f(e,t)}(i,e);var t,n,r,o=p(i);function i(){var e;c(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return g(m(e=o.call.apply(o,[this].concat(n))),"getDefaultStyle",(function(){return{size:e.props.scale,opacity:0}})),g(m(e),"getStyle",(function(){return{size:e.props.enabled?(0,l.spring)(1,{stiffness:300,damping:20}):1,opacity:e.props.enabled?(0,l.spring)(1,{stiffness:300,damping:20}):1}})),e}return t=i,(n=[{key:"render",value:function(){var e=this;return a.default.createElement(l.Motion,{defaultStyle:this.getDefaultStyle(),style:this.getStyle(),onRest:this.props.onRest},(function(t){return e.props.children({opacity:t.opacity,transform:"scale(".concat(t.size,")")})}))}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.Component);g(b,"propTypes",{enabled:i.default.bool,scale:i.default.number,children:i.default.func.isRequired,onRest:i.default.func}),g(b,"defaultProps",{enabled:!0,scale:.5,onRest:o.default});var v=b;t.default=v},function(e,t,n){var r=n(54)("join",n(336));r.placeholder=n(48),e.exports=r},function(e,t,n){var r=n(54)("omit",n(135));r.placeholder=n(48),e.exports=r},function(e,t,n){var r=n(54)("filter",n(65));r.placeholder=n(48),e.exports=r},function(e,t,n){var r=n(54)("negate",n(308),n(130));r.placeholder=n(48),e.exports=r},,,,,,,,,,function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(o,i,u):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=(o=n(513))&&o.__esModule?o:{default:o};function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function d(e){var t=function(){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}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var h={width:"200%",height:"200%",top:"-50%",left:"-50%"},m=function(e){!function(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&&c(e,t)}(l,e);var t,n,r,o=d(l);function l(){return u(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"render",value:function(){return a.default.createElement(i.default,{radius:150,duration:1200,background:!1,options:{background:!1},style:h})}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(a.PureComponent),y=m;t.default=y},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(n(0)),a=l(n(37)),i=["_ref"];function l(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){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}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var y=function(e){var t,n,r,l,h=(0,a.default)(e)?e:e.displayName;return t=function(t){!function(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&&f(e,t)}(h,t);var n,r,a,l=p(h);function h(){return c(this,h),l.apply(this,arguments)}return n=h,(r=[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(){var t=this.props,n=t._ref,r=s(t,i);return o.default.createElement(e,u({ref:n},r))}}])&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),h}(o.default.Component),n=t,r="displayName",l="withOneRender(".concat(h,")"),r in n?Object.defineProperty(n,r,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[r]=l,t};t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(3));function a(e){return e&&e.__esModule?e:{default:e}}n(813);var i=function(e){var t=e.progress,n=e.estimate,o=Math.ceil(Math.max(0,Math.min(100,t)));return r.default.createElement("div",{className:"et-common-progress-bar"},r.default.createElement("div",{className:"et-common-progress-bar__background"},r.default.createElement("div",{className:"et-common-progress-bar__bar",style:{width:"".concat(o,"%")}},r.default.createElement("div",{className:"et-common-progress-bar__value"},"".concat(o,"%")))),n&&r.default.createElement("div",{className:"et-common-progress-bar__estimate"},n))};i.propTypes={progress:o.default.number.isRequired,estimate:o.default.string},i.defaultProps={estimate:""};var l=r.default.memo(i);t.default=l},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=c(n(3)),i=c(n(8)),l=c(n(65)),u=c(n(126)),s=n(404);function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(815);var _=function(e){!function(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&&h(e,t)}(a,e);var t,n,r,o=m(a);function a(){var e;f(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v(g(e=o.call.apply(o,[this].concat(n))),"toggleBodyClass",(function(){var t=(0,i.default)("body"),n=(0,i.default)(window),r=t.hasClass("rtl"),o=e.getLocks().length>0,a="et-common-scroll-lock--added-margin",l=parseInt(t.attr("data-et-common-scroll-lock-offset"))||0,u=t.find("#wpadminbar");if(o&&(0,s.windowHasScrollbar)(window)){var c=(0,s.getScrollbarWidth)();t.addClass(a),t.css("margin".concat(r?"Left":"Right"),"".concat(c,"px")),u.length>0&&u.css("width","calc(100% - ".concat(c,"px)"))}!o&&t.hasClass(a)&&(t.removeClass(a),t.css("margin".concat(r?"Left":"Right"),""),u.length>0&&u.css("width","")),o&&0===l?t.attr("data-et-common-scroll-lock-offset",n.scrollTop()):o||0===l||(n.scrollTop(parseInt(t.attr("data-et-common-scroll-lock-offset"))||0),t.removeAttr("data-et-common-scroll-lock-offset")),t.toggleClass("et-common-scroll-lock",o)})),v(g(e),"getLocks",(function(){return(0,l.default)(((0,i.default)("body").attr("data-et-common-scroll-locks")||"").split(","),(function(e){return!!e}))})),v(g(e),"setLocks",(function(e){(0,i.default)("body").attr("data-et-common-scroll-locks",e.join(","))})),v(g(e),"addLock",(function(t){var n=e.getLocks();n.push(t),e.setLocks((0,u.default)(n))})),v(g(e),"removeLock",(function(t){var n=e.getLocks();e.setLocks((0,l.default)(n,(function(e){return e!==t})))})),e}return t=a,(n=[{key:"componentDidMount",value:function(){this.addLock(this.props.lockId),this.toggleBodyClass()}},{key:"componentDidUpdate",value:function(e){this.removeLock(e.lockId),this.addLock(this.props.lockId),this.toggleBodyClass()}},{key:"componentWillUnmount",value:function(){this.removeLock(this.props.lockId),this.toggleBodyClass()}},{key:"render",value:function(){return null}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.PureComponent);v(_,"propTypes",{lockId:a.default.string.isRequired});var w=_;t.default=w},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(!document.documentMode&&!window.StyleMedia&&!r)return new window.File(e,t,n);var o=new Blob(e,n);return o.lastModified=Date.now(),o.name=t,o};var r=navigator.userAgent.indexOf("Safari")>-1&&-1===navigator.userAgent.indexOf("Chrome")},function(e,t,n){var r=n(54)("toPairs",n(459),n(130));r.placeholder=n(48),e.exports=r},function(e,t,n){var r=n(54)("fromPairs",n(366));r.placeholder=n(48),e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.versions=t.default=void 0;var r=["1.12.4","1.12.3","1.12.2","1.12.1","1.12.0","1.11.3","1.11.2","1.11.1","1.11.0","1.10.2","1.10.1","1.10.0","1.9.1","1.9.0","1.8.3","1.8.2","1.8.1","1.8.0","1.7.2","1.7.1","1.7.0","1.7.0","1.6.4","1.6.3","1.6.2","1.6.1","1.6.0","1.5.2","1.5.1","1.5.0","1.4.4","1.4.3","1.4.2","1.4.1","1.4.0","1.3.2","1.3.1","1.3.0","1.2.6","1.2.5","1.2.4","1.2.3","1.2.2","1.2.1","1.2.0","1.1.4","1.1.3","1.1.2","1.1.1","1.1.0","1.0.4","1.0.3","1.0.2","1.0.1","1.0.0","2.2.4","2.2.3","2.2.2","2.2.1","2.2.0","2.1.4","2.1.3","2.1.2","2.1.1","2.1.0","2.0.3","2.0.2","2.0.1","2.0.0","3.4.1","3.4.0","3.3.1","3.3.0","3.2.1","3.2.0","3.1.1","3.1.0","3.0.0"];t.versions=r;var o={versions:r};t.default=o},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=q(n(0)),a=H(n(3)),i=H(n(13)),l=q(n(27)),u=n(67),s=H(n(200)),c=H(n(31)),d=H(n(11)),f=H(n(65)),p=(H(n(9)),H(n(5))),h=H(n(42)),m=H(n(184)),y=H(n(41)),g=H(n(214)),b=H(n(7)),v=H(n(10)),_=H(n(40)),w=H(n(1)),O=(H(n(369)),H(n(127))),k=H(n(146)),S=H(n(162)),C=H(n(126)),E=H(n(163)),P=H(n(1889)),T=H(n(1566)),M=H(n(59)),j=H(n(22)),x=H(n(283)),D=H(n(43)),N=H(n(1902)),L=H(n(1903)),R=H(n(6)),A=H(n(1920)),I=H(n(2)),B=n(1570);n(1922);H(n(784));var F=H(n(63)),W=(H(n(1491)),H(n(303)),H(n(457))),V=n(284),U=H(n(1923)),G=H(n(1925));function H(e){return e&&e.__esModule?e:{default:e}}function z(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(z=function(e){return e?n:t})(e)}function q(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=z(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y.apply(this,arguments)}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function Q(e){var t=function(){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}}();return function(){var n,r=te(e);if(t){var o=te(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Z(this,n)}}function Z(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ee(e)}function ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function te(e){return te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},te(e)}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=ETBuilderBackend.i18n.tooltips,oe=ETBuilderBackend.i18n,ae=I.default.isBFB(),ie=I.default.isTB(),le={active:a.default.bool,actionType:a.default.string,active_tab:a.default.string,tooltipTitle:a.default.string,specialtyModal:a.default.bool,preloadingItems:a.default.bool,_closeFunction:a.default.func,modalPosition:a.default.object,classNames:a.default.object,children:a.default.node,modalHeight:a.default.number,modalWidth:a.default.oneOfType([a.default.number,a.default.string]),ignorePosition:a.default.bool,forceFixedPosition:a.default.bool},ue={active:!1,_closeFunction:_.default,classNames:{},ignorePosition:!1,forceFixedPosition:!1,enableContextMenu:!1},se=function(t){!function(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&&J(e,t)}(z,t);var n,r,a,H=Q(z);function z(t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,z),ne(ee(n=H.call(this,t)),"_onDroploadUpdate",(function(){"portability"===n.props.actionType&&(R.default.getDroploaderPayloadPortability()&&n.setState({active_tab:"modules_library"}))})),ne(ee(n),"_onCloudUpdate",(function(e){n.setState({cloudStatus:e})})),ne(ee(n),"tabClassName",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={"et-fb-settings-options-tab":!0,"et-fb-all-modules":!0,"et-fb-modules-list":!t,"et-fb-settings-options":!0};return r["et-fb-settings-options-tab-"+e]=!0,e===n.state.active_tab&&(r["et-fb-settings-options-tab--active"]=!0),(0,i.default)(r)})),ne(ee(n),"_onLibraryDoneLoading",(function(){R.default.setProductTourElementReady("selectLayoutPack"),n.setState({library_loading:!1})})),ne(ee(n),"_onClickLibraryBackButton",(function(){n.setState({libraryBackToLayouts:!0})})),ne(ee(n),"_onClickLibraryPortability",(function(){n.setState({libraryPortabilityActive:!n.state.libraryPortabilityActive})})),ne(ee(n),"closeLibraryPortability",(function(){n.setState({libraryPortabilityActive:!1})})),ne(ee(n),"_onLibraryPageChanged",(function(t,r){var o={libraryBackToLayouts:!1,pageTitle:r};(n.state.hasBackButton&&!t||t&&!n.state.hasBackButton)&&(o.hasBackButton=t),n.setState(o),t&&R.default.isProductTourActive()&&(R.default.setProductTourElementReady("loadLayoutItem"),e("body").trigger("et_fb_product_tour_element_clicked"))})),ne(ee(n),"onPortabilityProgressBarChange",(function(e,t){n.setState({hasProgressBar:t})})),ne(ee(n),"renderLibraryBackButton",(function(){var e={position:(0,u.spring)(-12,{stiffness:300,damping:20}),opacity:(0,u.spring)(1,{stiffness:300,damping:20})},t=n.state.pageTitle?n.state.pageTitle:"layoutDetails",r=(0,w.default)(re,t,t);return o.default.createElement(u.Motion,{defaultStyle:{position:-40,opacity:0},style:e},(function(e){return o.default.createElement("div",null,o.default.createElement(F.default,{className:"et-fb-settings-button--back",buttonName:M.default.LIBRARY_MODAL_BACK_BUTTON,_onClick:n._onClickLibraryBackButton,primary:!0,style:{opacity:e.opacity,transform:"translateX( ".concat(e.position,"% )")}},o.default.createElement(D.default,{size:"14",icon:"back",color:"#FFFFFF"})),r)}))})),ne(ee(n),"_renderTabs",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var a=(0,c.default)(t,(function(e){return o.default.createElement("li",{key:e.name,className:n.tabNavClassName(e.className)},o.default.createElement("a",{href:"#",className:e.className,onClick:n.handle_tab_click},(0,w.default)(oe,e.name,e.name)))}));return o.default.createElement("ul",{className:"et-fb-settings-tabs-nav",ref:"settingsTabsNav"},a)})),ne(ee(n),"renderPortabilityButton",(function(){var e="modules_library"===n.state.active_tab&&"add_module"===n.props.actionType;return!(!n.isLibrary()&&!e)&&o.default.createElement(F.default,{className:"et-fb-settings-button--library-portability",buttonName:M.default.OPEN_PORTABILITY_TOOLTIP,_onClick:n._onClickLibraryPortability,primary:!0},o.default.createElement(D.default,{size:"14",icon:"portability",color:"#FFFFFF"}))})),ne(ee(n),"_renderRequestInProgressPrompt",(function(){if(n.state.isPromptOpen)return o.default.createElement(G.default,{closePrompt:n._closePrompt,closeLibraryModal:n._closePromptAndModal})})),n.state={active_tab:t.activeTab||"modules_all",library_category:"all",filterByTitle:"",helpModalMoved:!1,library_modules_updated:R.default.getLastRetrievedLayoutType(),selectedItemIndex:0,selectedItemUpdated:!1,currentTourElement:"",move:!1,library_loading:!0,hasBackButton:!1,libraryBackToLayouts:!1,applyTransitionAnimation:!1,appWindowScrollTopOnload:I.default.$appWindow().scrollTop(),hasProgressBar:!1,libraryPortabilityActive:!1,isFolderView:!1,folderName:"",isPromptOpen:!1},n.maxItemIndex={modules_all:0,modules_library:0},n.isLibrary=n.isLibrary.bind(ee(n)),n._onClose=n._onClose.bind(ee(n)),n._preventRightClick=n._preventRightClick.bind(ee(n)),n.getModuleType=n.getModuleType.bind(ee(n)),n.tabNavClassName=n.tabNavClassName.bind(ee(n)),n.setMaxItemIndex=n.setMaxItemIndex.bind(ee(n)),n._onModuleItemMouseLeave=n._onModuleItemMouseLeave.bind(ee(n)),n._onModuleItemMouseEnter=n._onModuleItemMouseEnter.bind(ee(n)),n._onKeyDownEvent=n._onKeyDownEvent.bind(ee(n)),n.centerizeSelectedItem=n.centerizeSelectedItem.bind(ee(n)),n.isAddingIntoGlobal=n.isAddingIntoGlobal.bind(ee(n)),n.insertLayout=n.insertLayout.bind(ee(n)),n.handle_tab_click=n.handle_tab_click.bind(ee(n)),n.generateAddModuleContent=n.generateAddModuleContent.bind(ee(n)),n._onInput=n._onInput.bind(ee(n)),n.setModalPosition=n.setModalPosition.bind(ee(n)),n._onLibraryLoaded=n._onLibraryLoaded.bind(ee(n)),n.loadLibraryModules=n.loadLibraryModules.bind(ee(n)),n.isPreloadingItems=n.isPreloadingItems.bind(ee(n)),n._handleStartMovement=n._handleStartMovement.bind(ee(n)),n._handleEndMovement=n._handleEndMovement.bind(ee(n)),n._handleMove=n._handleMove.bind(ee(n)),n._onProductTourElementChange=n._onProductTourElementChange.bind(ee(n)),n.modal=(0,o.createRef)(),n.debouncedSetInputFocus=(0,y.default)(n.setInputFocus,1e3),n.onFolderClick=n.onFolderClick.bind(ee(n)),n.shouldModuleBeSkipped=n.shouldModuleBeSkipped.bind(ee(n)),n.onClickModulesFilteredListBackBtn=n.onClickModulesFilteredListBackBtn.bind(ee(n)),n._openPrompt=n._openPrompt.bind(ee(n)),n._closePrompt=n._closePrompt.bind(ee(n)),n._closePromptAndModal=n._closePromptAndModal.bind(ee(n)),n}return n=z,r=[{key:"isLibrary",value:function(){return"load_layout"===this.props.actionType}},{key:"isExpandedIconPicker",value:function(){return"expanded_icon_picker"===this.props.actionType}},{key:"componentDidMount",value:function(){var e=this,t=(0,b.default)(["phone","tablet"],(0,w.default)(this,"props.previewMode")),n=this.isLibrary();this.windowScrolled=!1,this.is_mounted=!0,this.shortThrottleReset=(0,m.default)((function(){return e.is_mounted&&e.setState({helpModalMoved:e.props.helpModalActive,resetModalStyles:(0,s.default)(),modalPositionData:e.setModalPosition()})}),100,{leading:!1}),this.mediumThrottleReset=(0,m.default)((function(){return e.is_mounted&&e.setState({helpModalMoved:e.props.helpModalActive,resetModalStyles:(0,s.default)(),modalPositionData:e.setModalPosition(),applyTransitionAnimation:"fast"})}),100,{leading:!1}),this.longThrottleReset=(0,m.default)((function(){e.is_mounted&&(e.windowScrolled=!0,e.setState({helpModalMoved:e.props.helpModalActive,resetModalStyles:(0,s.default)(),modalPositionData:e.setModalPosition()}))}),1e3,{leading:!1}),R.default.addModuleLibraryLoadedListener(this._onLibraryLoaded),R.default.addProductTourChangeElementListener(this._onProductTourElementChange),R.default.addCloudStatusListener(this._onCloudUpdate),R.default.addDroploaderPayloadPortabilityListener(this._onDroploadUpdate),R.default.getDroploaderPayloadPortability()&&this.setState({active_tab:"modules_library"});var r=I.default.getEventsTarget(t);this.props.movable&&(r.addEventListener("mousemove",this._handleStartMovement,{capture:!0}),r.addEventListener("mouseup",this._handleEndMovement,{capture:!0})),"custom_content"!==this.props.actionType&&(I.default.getScrollEventTarget().addEventListener("scroll",this.mediumThrottleReset),n?r.addEventListener("resize",this.shortThrottleReset):r.addEventListener("resize",this.longThrottleReset),this.setInputFocus()),this.timer=setTimeout((function(){var t=e.getModalContentHeight();e.setState({modalPositionData:e.setModalPosition(t),autoHeight:t})}),80),"portability"===this.props.actionType&&R.default.addTogglePortabilityProgressBarListener(this.onPortabilityProgressBarChange)}},{key:"componentWillUnmount",value:function(){this.is_mounted=!1,clearTimeout(this.timer),this.shortThrottleReset.cancel(),this.mediumThrottleReset.cancel(),this.longThrottleReset.cancel();var e=this.isLibrary(),t=(0,b.default)(["phone","tablet"],(0,w.default)(this,"props.previewMode"));R.default.removeModuleLibraryLoadedListener(this._onLibraryLoaded),R.default.removeProductTourChangeElementListener(this._onProductTourElementChange),R.default.removeDroploaderPayloadPortabilityListener(this._onDroploadUpdate);var n=I.default.getEventsTarget(t);"custom_content"!==this.props.actionType&&(I.default.getScrollEventTarget().removeEventListener("scroll",this.mediumThrottleReset),e?n.removeEventListener("resize",this.shortThrottleReset):n.removeEventListener("resize",this.longThrottleReset)),this.props.movable&&(n.removeEventListener("mousemove",this._handleStartMovement),n.removeEventListener("mouseup",this._handleEndMovement)),"portability"===this.props.actionType&&R.default.removeTogglePortabilityProgressBarListener(this.onPortabilityProgressBarChange),R.default.removeCloudStatusListener(this._onCloudUpdate)}},{key:"UNSAFE_componentWillUpdate",value:function(e){e.active&&this.props.currentTourElement===e.currentTourElement||this.setState({modalPositionData:{}});var t=this.props.modalMoving!==e.modalMoving;("load_layout"===this.props.actionType||this.isExpandedIconPicker())&&!this.state.helpModalMoved&&this.props.helpModalActive&&t&&this.setState({helpModalMoved:!0,resetModalStyles:(0,s.default)(),modalPositionData:this.setModalPosition()}),this.props.helpModalActive===e.helpModalActive||e.helpModalActive||this.setState({helpModalMoved:!1})}},{key:"componentDidUpdate",value:function(t,n){if("add_module"!==this.props.actionType||R.default.isProductTourActive()||this.loadLibraryModules(),e(l.default.findDOMNode(this)),t.active!==this.props.active||n.active_tab!==this.state.active_tab||t.actionType!==this.props.actionType||t.specialtyModal!==this.props.specialtyModal||!(0,h.default)(t.modalPosition,this.props.modalPosition)||t.preloadingItems!==this.props.preloadingItems){this.props.active?t.actionType!==this.props.actionType&&this.setState({active_tab:"modules_all",hasBackButton:!1}):(this.setState({resetModalStyles:!1,active_tab:"modules_all",filterByTitle:"",library_category:"all",importBackUp:"off",importFile:"",importError:"",applyTransitionAnimation:"no",hasBackButton:!1}),this.windowScrolled=!1),this.props.actionType!==t.actionType&&this._onDroploadUpdate(),this.debouncedSetInputFocus();var r=e(l.default.findDOMNode(this.refs.settingsTabsNav)),o=r.children().length,a=100/o,i=R.default.getModuleAddAfter();2===o&&r.children().css({maxWidth:"".concat(a,"%")});var u=this.getModalContentHeight(),c=this.setModalPosition(u),f=(0,w.default)(c,"style.position"),p=(0,w.default)(n.modalPositionData,"style.position"),m=f!==p&&!(0,d.default)(p);this.setState({selectedItemIndex:I.default.hasValue(this.state.filterByTitle)?1:0,modalPositionData:{},autoHeight:u,applyTransitionAnimation:"add_module"===this.props.actionType&&(0,w.default)(i,"autoAddModule")||m?"no":"normal"})}this.state.selectedItemUpdated&&(this.centerizeSelectedItem(),this.setState({selectedItemUpdated:!1}));var y=this.props.helpModalActive!==t.helpModalActive;this.isExpandedIconPicker()&&y&&this.setState({resetModalStyles:(0,s.default)(),modalPositionData:this.setModalPosition()});var g=this.props.modalMoving!==t.modalMoving;this.isExpandedIconPicker()&&this.props.helpModalActive&&g&&this.setState({resetModalStyles:(0,s.default)(),modalPositionData:this.setModalPosition()}),"portability"!==t.actionType&&"portability"===this.props.actionType&&R.default.addTogglePortabilityProgressBarListener(this.onPortabilityProgressBarChange),"portability"===t.actionType&&"portability"!==this.props.actionType&&R.default.removeTogglePortabilityProgressBarListener(this.onPortabilityProgressBarChange)}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,h.default)(this.state,t)||!(0,h.default)(this.props,e)}},{key:"getModalContentHeight",value:function(){var t=e(l.default.findDOMNode(this)),n="modules_library"===this.state.active_tab&&"add_module"===this.props.actionType&&""===t.find(".et-fb-settings-options .et-fb-settings-options-tab-modules_library ul").text()?300:0,r=".et-fb-settings-options",o=t.find(".et-fb-settings-tabs-nav").length>0?100:60,a=0,i=t.find(".et-fb-save-library-button").length>0?40:0;return t.find(r).length>0&&(!(0,d.default)(this.props.modalWidth)&&this.props.modalWidth&&t.find(r).width(this.props.modalWidth),a=0===n?t.find(r).innerHeight():n,!(0,d.default)(this.props.modalWidth)&&this.props.modalWidth&&t.find(r).width("auto")),ae||"portability"!==this.props.actionType||(i=40),a+i+o}},{key:"setInputFocus",value:function(){var e=I.default.$appWindow(this.modal.current),t=(0,w.default)(e.find(".et-fb-settings-options-wrap").offset(),"top",0),n=(0,w.default)(e.find(".et-fb-settings-options-tab--active").offset(),"top",0)-t;if(e.trigger("focus").find('input[type="text"]:visible').first().trigger("focus"),n<0&&e.find(".et-fb-settings-options-tab").length){var r=parseInt(e.find(".et-fb-settings-options").css("paddingTop")),o=Math.abs(n)+r;e.find(".et-fb-settings-options-wrap").scrollTop(o),setTimeout((function(){e.find(".et-fb-settings-options-wrap").scrollTop(o)}),0)}}},{key:"_handleStartMovement",value:function(e){if(!this.state.move)return!1;var t=this.state.modalPositionData,n="absolute"===t.style.position?e.pageX:e.pageX-I.default.$topWindow().scrollLeft(),r="absolute"===t.style.position?e.pageY:e.pageY-I.default.$topWindow().scrollTop();return n-=this.state.reactive.x,r-=this.state.reactive.y,t.style.top=r,t.style.left=n,this.setState({resetModalStyles:(0,s.default)(),modalPositionData:t})}},{key:"_handleMove",value:function(t){if(this.props.movable){var n="absolute"===this.state.modalPositionData.style.position?e((0,l.findDOMNode)(this)).position():e((0,l.findDOMNode)(this)).offset();this.setState({reactive:{x:t.pageX-n.left,y:t.pageY-n.top},move:!this.state.move})}}},{key:"_handleEndMovement",value:function(t){if(this.state.move){var n=e("#et-fb-app").offset(),r=I.default.topViewportWidth(),o=I.default.$topWindow().height(),a=this.state.modalPositionData;if("absolute"!==a.style.position&&(a.style.top+400>o||a.style.top<0)||"absolute"===a.style.position&&a.style.top<0&&Math.abs(a.style.top)>n.top){var i=50;"absolute"===a.style.position&&a.style.top<0&&Math.abs(a.style.top)>n.top&&(i+=a.style.top+(Math.abs(a.style.top)-n.top)),a.style.top=a.style.top<0?i:o-400}if("absolute"!==a.style.position&&a.style.left<0||a.style.left+400>r||"absolute"===a.style.position&&a.style.left<0&&Math.abs(a.style.left)>n.left){var l=50;"absolute"===a.style.position&&a.style.left<0&&Math.abs(a.style.left)>n.left&&(l+=a.style.left+(Math.abs(a.style.left)-n.left)),a.style.left=a.style.left<0?l:r-400}return this.setState({move:!1,modalPositionData:a})}}},{key:"_onProductTourElementChange",value:function(){this.setState({currentTourElement:R.default.getActiveProductTourElement()})}},{key:"_onModuleItemMouseEnter",value:function(e){this.setState({selectedItemIndex:e})}},{key:"_onModuleItemMouseLeave",value:function(){this.setState({selectedItemIndex:0})}},{key:"setMaxItemIndex",value:function(e,t){this.maxItemIndex[t]=e}},{key:"tabNavClassName",value:function(e){var t={};return t["et-fb-settings-options_tab_"+e]=!0,t["et-fb-settings-tabs-nav-item"]=!0,e===this.state.active_tab&&(t["et-fb-settings-tabs-nav-item--active"]=!0),(0,i.default)(t)}},{key:"centerizeSelectedItem",value:function(){var t=e(l.default.findDOMNode(this)),n=t.find(".et-fb-settings-options-wrap"),r=t.find(".et-fb-settings-options-tab:visible .et-fb-selected-item");if(r.length){var o=r.offset(),a=r.parent().offset();n.stop().animate({scrollTop:o.top-a.top})}}},{key:"_onKeyDownEvent",value:function(t){if(!R.default.isProductTourActive()){var n,r,o=this,a=e(l.default.findDOMNode(this)),i=this.state.selectedItemIndex,u=t.keyCode;if(13===u&&(a.find(".et-fb-selected-item:visible").trigger("click"),"change_structure"===this.props.actionType&&j.default.cancelTooltip()),(0,b.default)([38,39,40,37],u))if((0,b.default)([38,40],u)&&t.preventDefault(),"change_structure"===this.props.actionType?(a.find(".et-fb-module-settings"),r=(n=a.find(".et-fb-columns-layout")).find(".et-fb-selected-item")):(a.find(".et-fb-settings-options-wrap"),r=(n=a.find(".et-fb-settings-options-tab:visible")).find(".et-fb-selected-item")),r.length){var s=n.width(),c=r.width(),d=Math.floor(s/c),f=0;switch(u){case 38:f=i-d;break;case 39:f=i+1;break;case 40:f=i+d;break;case 37:f=i-1}f>0&&f<=this.maxItemIndex[this.state.active_tab]&&this.setState({selectedItemIndex:f,selectedItemUpdated:!0})}else this.setState({selectedItemIndex:1,selectedItemUpdated:!0});if(27===u&&(this.isLibrary()&&window.ETCloudApp?window.ETCloudApp.emitSignal({signal:"checkCloudItemProgress",data:{}}):j.default.cancelTooltip()),9===u&&!a.closest(".et-fb-modal-settings--library")&&!e(t.target).is("input:focus, button:focus")){var p="modules_all"===this.state.active_tab?"modules_library":"modules_all",h=a.find(".et-fb-columns-layout");if(this.setState({active_tab:p}),h.length&&"change_structure"===this.props.actionType){var m=h.find(".et-fb-column-layout--selected"),y=m;(y=t.shiftKey?m.prev().length?m.prev():h.find("li").last():m.next().length?m.next():h.find("li").first()).trigger("click"),setTimeout((function(){o.setState({selectedItemIndex:y.index()+1})}),0)}return t.preventDefault(),!1}}}},{key:"getModuleType",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.isLibrary())return"layout";var t="et_pb_",n=R.default.getModuleAddAfter(),r=["section","row","row_inner"],o=(0,g.default)(n.type,"et_pb_",""),a="";if(n.is_parent)switch(o){case"section":o="yes"===n.fullwidth?"module":"row";break;case"column":n.is_inner_row?(o="row",a="_inner"):o="module"}return"row_inner"===o&&(o="row",a="_inner"),(0,b.default)(r,o)||(o="module"),e&&(o="".concat(t).concat(o).concat(a)),o}},{key:"isAddingIntoGlobal",value:function(){return R.default.getModuleAddAfter().is_global}},{key:"_preventRightClick",value:function(t){this.props.enableContextMenu||e(t.target).is("input:focus")||t.preventDefault()}},{key:"getAdditionalFolders",value:function(e){e.map((function(e){var t=e.replace("et_pb_","");return t=t.replace(/_/g," "),that.maxItemIndex.modules_all++,o.default.createElement(N.default,{label:e,title:t,fbSupport:"off",key:e,itemIndex:that.maxItemIndex.modules_all,selectedItemIndex:that.state.selectedItemIndex,icon:"",iconSvg:"",onMouseEnter:that._onModuleItemMouseEnter,classnames:{et_pb_folder:!0},onClickAction:function(){return that.onClick(e)}})}))}},{key:"shouldModuleBeSkipped",value:function(e){return this.state.isFolderView?e.folder_name!==this.state.folderName:""===this.state.filterByTitle&&!(0,p.default)(e.folder_name)}},{key:"generateAddModuleContent",value:function(){var e=this,t=(0,f.default)(ETBuilderBackend.modules,{is_parent:"on"}),n=R.default.getModuleAddAfter(),r=n.type,a=this.props.specialtyModal,i=n.is_specialty_placeholder,l=!e.state.isFolderView&&""===e.state.filterByTitle,u=(0,c.default)(t,"folder_name"),s=(0,S.default)(u);s=(0,C.default)(s);var d="",p={allModulesList:{},mainTabTitle:"",modalTitle:"",moduleType:"",settingsModalClass:[]},h=[];if(this.maxItemIndex.modules_all=0,p.mainTabTitle=re.newModule,p.modalTitle=re.insertModule,!0===a){var m=0;p.modalTitle=re.insertColumn,this.maxItemIndex.modules_all=0,d=(0,c.default)([["1_2,1_2","1,0"],["1_2,1_2","0,1"],["1_4,3_4","0,1"],["3_4,1_4","1,0"],["1_4,1_2,1_4","0,1,0"],["1_2,1_4,1_4","1,0,0"],["1_4,1_4,1_2","0,0,1"],["1_3,2_3","0,1"],["2_3,1_3","1,0"]],(function(t,n){var r=t[0].split(","),a={layoutType:t[1],layoutFormat:t[0],columns:r,specialtyColumns:3};return m++,e.maxItemIndex.modules_all++,o.default.createElement(N.default,{label:t[0],title:t[0],key:m,specialtyLayout:a,itemIndex:e.maxItemIndex.modules_all,selectedItemIndex:e.state.selectedItemIndex,onMouseEnter:e._onModuleItemMouseEnter,isProcessingPlaceholder:i})})),p.allModulesList=o.default.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},d)}else if("et_pb_section"!==r&&"et_pb_row"!==r&&"et_pb_row_inner"!==r&&!n.is_inner_row||"et_pb_section"===r&&"yes"===n.fullwidth&&n.is_parent)d=(0,c.default)(t,(function(t){if(!(0,b.default)(["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column","et_pb_column_inner"],t.label)&&!e.shouldModuleBeSkipped(t)){var n=void 0!==t.fullwidth_only&&"on"===t.fullwidth_only,r=R.default.getModuleAddAfter(),a=R.default.getProductTourModuleName(),i=r.fullwidth,l={};if(!("yes"===i&&!n||"no"===i&&n||""!==e.state.filterByTitle&&-1===t.title.toLowerCase().indexOf(e.state.filterByTitle.toLowerCase()))){if((0,V.isPostContentModule)(t.label)){if(ETBuilderBackend.postType!==ETBuilderBackend.themeBuilder.bodyLayoutPostType&&!r.is_theme_builder_body_area)return;if((0,O.default)(ETBuilderBackend.themeBuilder.postContentModules,(function(e,t){return e+R.default.getModuleCount(t)}),0)>0)return}return"selectModule"===e.state.currentTourElement&&a===t.label&&(l["et-fb-product-tour-element"]=!0),e.maxItemIndex.modules_all++,o.default.createElement(N.default,{label:t.label,title:t.title,fbSupport:t.vb_support,key:t.label,itemIndex:e.maxItemIndex.modules_all,selectedItemIndex:e.state.selectedItemIndex,icon:(0,w.default)(t,"icon",""),iconSvg:(0,w.default)(t,"icon_svg",""),onMouseEnter:e._onModuleItemMouseEnter,classnames:l})}}})),l?(h=s.map((function(t){var n=t.replace("et_pb_","");return n=n.replace(/_/g," "),e.maxItemIndex.modules_all++,o.default.createElement(N.default,{label:t,title:n,fbSupport:"off",key:t,itemIndex:e.maxItemIndex.modules_all,selectedItemIndex:e.state.selectedItemIndex,icon:"",iconSvg:"",onMouseEnter:e._onModuleItemMouseEnter,classnames:{et_pb_folder:!0},onClickAction:function(){return e.onFolderClick(t)}})})),d=(0,k.default)(d,h)):p.settingsModalClass["et-fb-modal-settings--modules_filtered"]=!0,p.settingsModalClass.et_fb_insert_new_module=!0,p.allModulesList=o.default.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},d),p.moduleType="module";else if("et_pb_section"!==r||n.is_parent){if(("et_pb_row"===r||"et_pb_row_inner"===r)&&!n.is_parent||n.is_inner_row||"et_pb_section"===r&&n.is_parent){R.default.getLastAddedModuleData();var y={},g="regular",v="et_pb_column"===r?"et_pb_row_inner":r;p.settingsModalClass.et_fb_add_row_modal=!0,y.props={},"et_pb_row_inner"===v&&(g="specialty"),"on"===n.fullwidth&&(g="fullwidth"),y.props.section_parent=g,y.props.specialty_layout=n.specialty_layout,p.modalTitle=re.insertRow,p.mainTabTitle=re.newRow,p.allModulesList=o.default.createElement(A.default,Y({active:"true",_onClick:this.addRow,row:y,selectedItemIndex:e.state.selectedItemIndex,setMaxItemIndex:e.setMaxItemIndex,currentTourElement:e.state.currentTourElement},this.props))}}else{var _=i?["et_fb_specialty"]:["et_fb_regular","et_fb_specialty","et_fb_fullwidth"],E={et_fb_regular:re.regular,et_fb_fullwidth:re.fullwidth,et_fb_specialty:re.specialty};this.maxItemIndex.modules_all=0,p.modalTitle=re.insertSection,p.mainTabTitle=re.newSection,p.settingsModalClass.et_fb_add_section_modal=!0,d=(0,c.default)(_,(function(t){var n={};return e.maxItemIndex.modules_all++,"selectSectionType"===e.state.currentTourElement&&"et_fb_regular"===t&&(n["et-fb-product-tour-element"]=!0),o.default.createElement(N.default,{label:t,title:E[t],key:t,itemIndex:e.maxItemIndex.modules_all,selectedItemIndex:e.state.selectedItemIndex,onMouseEnter:e._onModuleItemMouseEnter,classnames:n})})),p.allModulesList=o.default.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},d)}return p}},{key:"handle_tab_click",value:function(e){e.preventDefault();var t=e.target.className;this.isLibrary()&&window.ETCloudApp?window.ETCloudApp.emitSignal({signal:"checkCloudItemProgress",data:{activeTab:t}}):this.setState({active_tab:t,libraryBackToLayouts:!0})}},{key:"insertLayout",value:function(e){var t="on"===this.state.replace_layout;j.default.insertSavedModule(e,!0,t),j.default.cancelTooltip()}},{key:"loadLibraryModules",value:function(){var e=this.getModuleType(),t="et_pb_row_inner"===e?"et_pb_row":e,n="yes"===R.default.getModuleAddAfter().fullwidth&&"et_pb_module"===e?"fullwidth":"regular";!1===R.default.getLibraryModules(t,n)&&j.default.getLibraryModules(t,n)}},{key:"_onLibraryLoaded",value:function(){var e=this.getModuleType();"et_pb_row_inner"===e&&(e="et_pb_row");var t="yes"===R.default.getModuleAddAfter().fullwidth&&"et_pb_module"===e?"fullwidth":"regular";this.setState({library_modules_updated:t+e,currentTourElement:R.default.getActiveProductTourElement()})}},{key:"setModalPosition",value:function(t){if(this.props.ignorePosition)return{};var n=R.default.getModuleAddAfter(),r=n.type,o=this.props.specialtyModal,a=this.props.modalPosition,i=!(0,d.default)(a)&&a,l=e(a.element).closest(".et-fb-skeleton"),u=ae?I.default.$topWindow("#et_pb_layout"):"",s=ae?u.offset().top:0,c=ae?u.offset().left:0,f=(0,w.default)(this,"props.previewMode"),p=!(0,d.default)(a)&&e((0,w.default)(a,"element","")),h=I.default.getAdminBarHeight(),m={},y=!1,g=!1;i&&!1!==a.element&&"rightClickMenu"!==a.element&&(0===(y=p&&p.length>0?p:I.default.$topWindow(".et-fb-page-settings-bar .et-fb-button--toggle-portability")).length&&(y=I.default.$topWindow(".et-fb-page-settings-bar .et-fb-button--toggle-add")),g=y.hasClass("et-fb-page-settings--tools"),(y.hasClass("et-fb-button-group")||g)&&(y.context?y=I.default.$topWindow(y.context):(0,w.default)(a,"element.prevObject")&&(y=I.default.$topWindow((0,w.default)(a,"element.prevObject"))))),!ae&&!ie&&y&&y.length>0&&!I.default.isElementInViewport(y)&&y[0].scrollIntoView({block:"center"});var v=y&&y.closest(".et-fb-page-settings-bar").length>0,_=y?y.innerHeight()/2:0,O=y?y.innerWidth()/2:0,k=I.default.topViewportWidth(),S=I.default.topViewportHeight(),C=y?y.offset():a,E=ae||(0,b.default)(["zoom","tablet","phone"],f)?I.default.$topWindow().scrollTop():I.default.$appWindow().scrollTop(),P="rightClickMenu"===a.element;(0,b.default)(["save_to_library","save_to_cloud"],this.props.actionType)&&P&&(C.top=this.props.rightClickPosition.top,"zoom"===f&&(C.top=C.top/2),"app"===I.default.getWindowScrollLocation(f)&&(C.left=this.props.rightClickPosition.left)),ae&&(E-=s,E-=parseFloat(I.default.$topWindow("#et-bfb-app-frame").css("marginTop"))),m.class={};var T="modules_library"===this.state.active_tab&&"add_module"===this.props.actionType;if(k<=502&&(this.isLibrary()||T))return m.style={top:0,left:0,right:!1,width:k,height:S,position:"fixed"},m;if(0===C.top&&0===C.left&&(C.top=a.top,C.left=a.left),!ae&&I.default.isResponsiveView(R.default.getPreviewMode())){var M=I.default.$topWindow("#et-fb-app-frame"),D=I.default.getIntegerValue(M.css("paddingTop"));C.top=C.top+D}var N=k<493?k-20:400,L=t||this.state.autoHeight,A=ae?-1*I.default.$topWindow("#adminmenuwrap").innerWidth():(0,b.default)(["tablet","phone"],f)?-1*I.default.$topWindow("#et-fb-app-frame").innerWidth()/2:0,B=(0,d.default)(this.props.modalHeight)||""===this.props.modalHeight?274:this.props.modalHeight,F=B,W=(0,d.default)(this.props.modalWidth)||""===this.props.modalWidth?N:this.props.modalWidth,V="zoom"!==f||v||"rightClickMenu"===a.element?C.left:C.left/2,U=!1,G=0;(V=V-W/2+O)>0?V=C.left+W/2+O>k?k-W-O-30:V:(U=Math.abs(A)<=Math.abs(V),G=Math.abs(V)-Math.abs(A),V=U?A:V),"et_pb_section"!==r||n.is_parent||o?"et_pb_row_inner"===r||n.is_inner_row?B=188:"modules_library"!==this.state.active_tab&&"portability"!==this.props.actionType&&("et_pb_row"===r||"et_pb_section"===r&&n.is_parent&&!o&&"yes"!==n.fullwidth)?B=284:"et_pb_section"===r&&o?B=320:"add_module"===this.props.actionType&&(B=385):B=198,g&&(B=290),"change_structure"===this.props.actionType&&p&&p.length>0&&p.closest(".et_pb_row_inner").length>0&&(B=148),"clear_layout"===this.props.actionType&&(B=200),F=(0,d.default)(L)||""===L?B:Math.max(B,Math.min(936,L));var H=E;!P||(0,b.default)(["save_to_library","save_to_cloud"],this.props.actionType)||ae||(0,b.default)(["zoom","tablet","phone"],f)||(H=0),ie&&(H+=I.default.viewportScrollTop());var z=H+S,q=H+S/2,K=(!ae||!v)&&C.top>=q,$=K?C.top-H:z-C.top,Y=x.default.tooltipModal.top,X=x.default.tooltipModal.bottom,J=K?Y:X;if(C.top,ae&&v&&(0,b.default)(["save_to_library","save_to_cloud","portability"],this.props.actionType)&&($=S+E),F+J>$&&(F=Math.max(B,$-J)),v||T||this.isExpandedIconPicker()){this.isExpandedIconPicker()&&(0===y.closest(".et-fb-page-settings-bar").length&&(y=ae?I.default.$topWindow(".et-fb-page-settings-bar .et-fb-button--toggle-history"):I.default.$topWindow(".et-fb-page-settings-bar .et-fb-button--toggle-add")),ae&&I.default.$topWindow("html, body").animate({scrollTop:0},100,"swing"));var Q=I.default.$topWindow(".et-fb-page-settings-bar"),Z=Q.hasClass("et-fb-page-settings-bar--vertical"),ee=Q.hasClass("et-fb-page-settings-bar--corner"),te=ee&&Q.hasClass("et-fb-page-settings-bar--right-corner"),ne=ee&&Q.hasClass("et-fb-page-settings-bar--left-corner"),re=Q.hasClass("et-fb-page-settings-bar--right"),oe=ee&&Q.hasClass("et-fb-page-settings-bar--top-corner"),le=Q.position().top,ue=ae?Q.offset().top+parseInt(Q.height())+13:Q.outerHeight(!0)+I.default.getAdminBarHeight(),se=95,ce=ne?se:V<(Z?80:10)?Z?80:10:Z?V-70:V,de=this.isLibrary()||T;if(re&&(ce-=I.default.maybeGetScrollbarWidth(f)),("modules_library"===this.state.active_tab||(0,b.default)(["save_to_library","save_to_cloud","portability","load_layout"],this.props.actionType)||T)&&k<493&&(W=k<493?k-100-30:400),de||this.isExpandedIconPicker()){var fe=Z||ae?30:parseInt(Q.height()),pe=ae||!Z&&!ee?50:se,he=ae?0:60-h;ie&&(he=-8),!ae&&860<=k&&1080>=k&&(pe=pe/2-5),!ae&&860>k&&(pe=0),F=S-h-fe-he,W=k-2*pe,ae&&(se=0),Z||ee||ae?(ue=oe?ue:h+he,(V=(k-W)/2)<15&&(V=15)):V=(k-W-I.default.getScrollbarWidth())/2}if((Z||ee||this.props.helpModalActive&&!this.state.helpModalMoved||ae||T)&&(m.class["et-fb-tooltip--no-arrow"]=!0),I.default.getAdminBarHeight()===le||ae)m.class={"et-fb-modal-settings--inversed":!ae||!de,"et-fb-tooltip--no-arrow":Z||ee||this.props.helpModalActive&&!this.state.helpModalMoved||ae&&de,"et-fb-tooltip--vertical-center":Z},!de&&!this.isExpandedIconPicker()||ae||(F-=25,ie&&!Z&&(F-=24));else{var me=ae?0:Y;if((ue=le-F)<me){var ye=me-ue;ue+=ye,F=Math.max(B,F-ye)}ae||!(0,b.default)(["save_to_library","save_to_cloud"],this.props.actionType)&&"clear_layout"!==this.props.actionType||((0,w.default)(this.state,"cloudStatus.error")?m.class["et-fb-modal-settings--red-bottom"]=!0:m.class["et-fb-modal-settings--blue-bottom"]=!0)}var ge=de||this.isExpandedIconPicker()?V:!te&&ce;return!ae&&de&&980<=k&&1080>=k&&(ge=20),!ae&&de&&860>k&&(ge=0),m.style={top:ue,left:ge,right:!!te&&se,width:W,height:F,position:ae&&!de?"absolute":"fixed"},m}var be=(ae?I.default.$topWindow("#et-bfb-app-frame"):I.default.$topWindow("#et-fb-app-frame")).offset(),ve=be.top;if(l.length>0){(0,b.default)(["save_to_library","save_to_cloud"],this.props.actionType)&&l.hasClass("et-fb-skeleton--row");l.offset().left}"app"===I.default.getWindowScrollLocation(f)&&0===E&&0===ve&&C.top>S&&setTimeout((function(){j.default.cancelTooltip()}),300),ve=ae||(0,b.default)(["zoom","tablet","phone"],f)||P&&!(0,b.default)(["save_to_library","save_to_cloud"],this.props.actionType)||this.props.renderInsideApp?ve:ve-E;var _e="zoom"===f&&"rightClickMenu"!==a.element?C.top/2:C.top;_e=_e-F+(ie?0:ve),this.props.forceFixedPosition||(V+=P?c:be.left),V+W>k&&(V=k-W);var we=0>V&&(this.props.forceFixedPosition||Math.abs(V)>be.left)?10:V;if(we=30>we?30:we,m.style={top:_e,left:we,width:W,height:F,position:this.props.forceFixedPosition?"fixed":"absolute"},this.props.forceFixedPosition&&"custom_content"===this.props.actionType)return(m.style.top<0||m.style.top+F>S)&&(m.style.top=m.style.top<0?50:S-F-100),(m.style.left<0||m.style.left+W>k)&&(m.style.left=m.style.left<0?50:k-W-100),m;(0,b.default)(["save_to_library","save_to_cloud"],this.props.actionType)&&((0,w.default)(this.state,"cloudStatus.error")?m.class["et-fb-modal-settings--red-bottom"]=!0:m.class["et-fb-modal-settings--blue-bottom"]=!0);var Oe="app"===I.default.getWindowScrollLocation(f),ke=P&&Oe?I.default.$appWindow().scrollTop()-this.state.appWindowScrollTopOnload:0;if(m.style.top=m.style.top-ke,!K){var Se=F+_+15;m.style.top=m.style.top+Se,!ae&&m.style.height+J+_+15>$&&(m.style.height=m.style.height-_-15),m.class={"et-fb-modal-settings--inversed":!0},(0,b.default)(["save_to_library","save_to_cloud"],this.props.actionType)&&(m.class["et-fb-modal-settings--blue-bottom"]=!1)}var Ce=K&&ae?F:F+J;if(!this.windowScrolled&&F===B&&Ce>$){var Ee=Ce-$,Pe="desktop"!==f||ae?I.default.$topWindow().scrollTop():I.default.$appWindow().scrollTop(),Te=K?Pe-Ee:Pe+Ee;("desktop"!==f||ae?I.default.$topWindow("html, body"):I.default.$appWindow("html, body")).animate({scrollTop:Te},500,"swing")}if(U){var Me=I.default.$topWindow("head"),je="et-fb-modal-edge-style",xe=200-G-30,De="".concat(ETBuilderBackend.css.prefix," .et-fb-modal-add-module-container.et-fb-modal-settings--left-side:after {left: ").concat(xe,"px;}");Me.remove("#"+je),Me.append('<style id="'.concat(je,'">').concat(De,"</style>")),m.class["et-fb-modal-settings--left-side"]=!0}return this.windowScrolled=!0,m}},{key:"addRow",value:function(e,t){t=(0,d.default)(t)?"et_pb_row":t,j.default.insertNewModule(t,e)}},{key:"_onClearLayout",value:function(e){e.preventDefault();var t=R.default.getActiveThemeBuilderArea();R.default.abIsMode("off",t)&&(j.default.performLayoutClearing(),j.default.cancelTooltip())}},{key:"_closePromptAndModal",value:function(e,t){window.ETCloudApp&&window.ETCloudApp.emitSignal({signal:"haltCloudItemProgress",data:{}}),(0,E.default)(t)||""===t?j.default.cancelTooltip():this.setState({active_tab:t,libraryBackToLayouts:!0})}},{key:"_closePrompt",value:function(){this.setState({isPromptOpen:!1})}},{key:"_openPrompt",value:function(){this.setState({isPromptOpen:!0})}},{key:"_onClose",value:function(){if(this.state.hasBackButton)this._onClickLibraryBackButton();else if(_.default!==this.props._closeFunction)this.props._closeFunction();else{var e=this.props.actionType;(0,b.default)(["load_layout","add_module"],e)&&this.isLibrary()&&window.ETCloudApp?window.ETCloudApp.emitSignal({signal:"checkCloudItemProgress",data:{}}):j.default.cancelTooltip()}}},{key:"_onInput",value:function(e,t){var n=ne({},e,t);"filterByTitle"===e&&I.default.hasValue(this.state.filterByTitle)&&(n.selectedItemIndex=1,n.selectedItemUpdated=!0),this.setState(n)}},{key:"isPreloadingItems",value:function(e){return!!this.props.preloadingItems&&R.default.isPreloadingItem(e)}},{key:"onFolderClick",value:function(e){this.setState({isFolderView:!0,folderName:e})}},{key:"onClickModulesFilteredListBackBtn",value:function(){this.setState({isFolderView:!1,folderName:""})}},{key:"render",value:function(){var e,t=this;if(!this.props.active)return!1;var n=R.default.getAppPreference("builder_animation"),r=(0,v.default)((ne(e={"et-fb-settings":!0,"et-fb-tooltip-modal":!0},"et-fb-tooltip-modal--".concat(this.props.actionType),!0),ne(e,"et-fb-modal-settings--container",!0),ne(e,"et-fb-modal-settings--".concat(this.state.active_tab),!0),ne(e,"et-fb-modal-add-module-container",!0),ne(e,"et-fb-moving",this.state.move),ne(e,"et-fb-movable-modal",this.props.movable),ne(e,"et-fb-tooltip-modal-animated","normal"===this.state.applyTransitionAnimation),ne(e,"et-fb-tooltip-modal-animated-fast","fast"===this.state.applyTransitionAnimation),ne(e,"et-fb-tooltip-modal-folder-view",this.state.isFolderView),e),this.props.classNames),a=!(0,d.default)(this.state.modalPositionData),s=a&&!(0,p.default)(this.state.modalPositionData)?this.state.modalPositionData:this.setModalPosition(),c=s.style,f="",h="";(0,d.default)(s.class)||(0,v.default)(r,s.class);var m="";switch(this.props.actionType){case"add_module":var y=this.generateAddModuleContent(),g=y.allModulesList,b=y.mainTabTitle,O=R.default.isProductTourActive()?R.default.getActiveProductTourElement():"",k={maxHeight:(0,w.default)(c,"height",100)-100},S=R.default.getModuleAddAfter(),C=S.is_specialty_placeholder,E=this.getModuleType(!1),j=S.saved_specialty_column_type,x=!1,N="regular";if("module"===E&&(N="no"!==(0,w.default)(S,"fullwidth","no")?"fullwidth":"regular"),"row"===E&&j&&(x="2_3"===j?4:3),"selectSectionType"===O&&(k.overflow="visible"),"modules_library"===this.state.active_tab&&this.state.hasBackButton)f=this.renderLibraryBackButton();else if(this.state.isFolderView){var V={position:(0,u.spring)(-12,{stiffness:100,damping:10}),opacity:(0,u.spring)(1,{stiffness:100,damping:10})};f=o.default.createElement(u.Motion,{defaultStyle:{position:-40,opacity:0},style:V},(function(e){return o.default.createElement("div",null,o.default.createElement(F.default,{className:"et-fb-settings-button--back",buttonName:M.default.MODULES_FILTERED_LIST_BACK_BUTTON,_onClick:t.onClickModulesFilteredListBackBtn,primary:!0,style:{opacity:e.opacity,transform:"translateX( ".concat(e.position,"% )")}},o.default.createElement(D.default,{size:"14",icon:"back",color:"#FFFFFF"})),y.modalTitle)}))}else f=y.modalTitle;(0,v.default)(r,y.settingsModalClass);var G="module"===y.moduleType?o.default.createElement("div",{className:"et-fb-modules-filters et-fb-module-single-filter"},o.default.createElement(W.default,{type:"text",value:this.state.filterByTitle,name:"filterByTitle",_onChange:this._onInput,onKeyDown:this._onKeyDownEvent,additional_attrs:{placeholder:re.search,autoComplete:"off"}})):"",H=R.default.isAllowedAction("add_library")&&R.default.isAllowedAction("divi_library")&&!C?o.default.createElement("li",{className:this.tabNavClassName("modules_library")},o.default.createElement("a",{href:"#",className:"modules_library",onClick:this.handle_tab_click},re.addFromLibrary)):"",z=R.default.isAllowedAction("add_library")&&R.default.isAllowedAction("divi_library")&&"modules_library"===this.state.active_tab?o.default.createElement("div",{className:this.tabClassName("modules_library",!0)},o.default.createElement(P.default,{isLoading:this.state.library_loading,_renderTabs:_.default,doneLoading:this._onLibraryDoneLoading,pageChanged:this._onLibraryPageChanged,backToLayouts:this.state.libraryBackToLayouts,importItemsOpened:this.state.libraryPortabilityActive,closeLibraryPortability:this.closeLibraryPortability,tabClassName:this.tabClassName,active_tab:"modules_library",type:E,moduleWidth:N,maxColumns:x,isProductTour:!1,modalMoving:!1,closeToolTipModal:this._closePromptAndModal,openPrompt:this._openPrompt})):"";m=o.default.createElement("div",{className:"et-fb-main-settings et-fb-main-settings--add_new_module"},o.default.createElement("ul",{className:"et-fb-settings-tabs-nav",ref:"settingsTabsNav"},o.default.createElement("li",{className:this.tabNavClassName("modules_all")},o.default.createElement("a",{href:"#",className:"modules_all",onClick:this.handle_tab_click},b)),H),o.default.createElement("div",{className:"et-fb-settings-options-wrap",style:k},o.default.createElement("div",{className:"et-fb-settings-options"},o.default.createElement("div",{className:this.tabClassName("modules_all")},G,g,"module"===y.moduleType&&o.default.createElement("a",{className:"et-fb-button et-fb-button--info et-fb-module-upsell-button",href:"https://www.elegantthemes.com/marketplace/?utm_source=Divi+Marketplace&utm_medium=Visual+Builder&utm_campaign=Native",style:{textAlign:"center",width:"100%",marginBottom:"20px"},target:"_blank"},oe.modals.exploreDiviModules)),z)));break;case"load_layout":var q="et-fb-modal-settings--library";r[q]=!0,this.state.hasBackButton?(r["".concat(q,"__layout")]=!0,f=this.renderLibraryBackButton()):f=re.loadLayout,m=o.default.createElement(P.default,{isLoading:this.state.library_loading,_renderTabs:this._renderTabs,doneLoading:this._onLibraryDoneLoading,pageChanged:this._onLibraryPageChanged,backToLayouts:this.state.libraryBackToLayouts,importItemsOpened:this.state.libraryPortabilityActive,closeLibraryPortability:this.closeLibraryPortability,tabClassName:this.tabClassName,active_tab:this.state.active_tab,layoutFilters:this.props.layoutFilters,type:"layout",isProductTour:R.default.isProductTourActive(),productTourElement:this.state.currentTourElement,modalMoving:this.props.modalMoving,closeToolTipModal:this._closePromptAndModal,openPrompt:this._openPrompt});break;case"save_to_library":case"save_to_cloud":r.et_fb_save_module_modal=!0;var K=R.default.getModuleLibrarySave();f=(0,B.getSaveModalTitle)(K),m=o.default.createElement(L.default,{maxHeight:(0,w.default)(c,"height",70)-70,action:this.props.actionType});break;case"expanded_icon_picker":r["et-fb-modal-add-module-container"]=!1,f=re.selectIcon,m=o.default.createElement(U.default,{selectedIcon:this.props.selectedIcon,handleChangeIcon:this.props.handleChangeIcon,closeModal:this.props._closeFunction,modalHeight:c.height,attrs:this.props.currentIconAttrs});break;case"change_structure":var Y=R.default.getStructurallyChangedRow();f=re.changeRow,m=o.default.createElement("div",{className:"et-fb-settings-options-wrap",style:{maxHeight:(0,w.default)(c,"height",100)-60}},o.default.createElement("div",{className:"et-fb-settings-options"},o.default.createElement(A.default,{row:Y,selectedItemIndex:this.state.selectedItemIndex,setMaxItemIndex:this.setMaxItemIndex})));break;case"clear_layout":f=re.clearLayout,m=o.default.createElement("div",{className:"et_fb_save_module_modal et_fb_clear_layout"},o.default.createElement("div",{className:"et-fb-settings-options"},re.clearLayoutText),o.default.createElement("a",{href:"#",className:"et-fb-save-library-button",onClick:this._onClearLayout},re.yes));break;case"portability":f=re.portability.replace(/&amp;/,"&"),m=o.default.createElement(T.default,{_renderTabs:this._renderTabs,preloadingItems:this.props.preloadingItems,tabClassName:this.tabClassName,active_tab:this.state.active_tab,maxHeight:(0,w.default)(c,"height",140)-140,hasProgressBar:this.state.hasProgressBar}),I.default.isBFB()||(r["et-fb-modal-settings--blue-bottom"]=!this.state.hasProgressBar&&!this.props.preloadingItems);break;case"custom_content":f=this.props.tooltipTitle,h=(0,d.default)(this.props.buttons)?"":this.props.buttons,m=o.default.createElement("div",{className:"et-fb-main-settings et-fb-settings-options"},this.props.children)}var X=a?1:0,J="custom_content"!==this.props.actionType?"et-fb-tooltip-helper-container":"et-fb-tooltip-helper-container-custom",Q=(0,w.default)(c,"position",""),Z=o.default.createElement(o.Fragment,null,o.default.createElement(u.Motion,{key:Q,defaultStyle:{size:.8},style:{size:n?(0,u.spring)(1,{stiffness:300,damping:20}):1}},(function(e){return o.default.createElement("div",{key:"modal",id:"et-fb-settings-column",ref:t.modal,className:(0,i.default)(r),onContextMenu:t._preventRightClick,onKeyDown:t._onKeyDownEvent,tabIndex:"0",style:$($({},c),{},{opacity:X,transform:"scale( ".concat(e.size," )")})},o.default.createElement("div",{className:J},o.default.createElement("div",{className:"et-fb-module-settings"},o.default.createElement("h3",{className:"et-fb-settings-heading",onMouseDown:t._handleMove},f,t.renderPortabilityButton(),o.default.createElement(F.default,{className:"et-fb-settings-button--close",buttonName:M.default.MODAL_SETTINGS_BUTTON_CLOSE,_onClick:t._onClose,primary:!0},o.default.createElement(D.default,{size:"14",icon:"close",color:"#FFFFFF"}))),m,h)))})),this.isLibrary()&&I.default.isBFB()&&o.default.createElement("div",{className:"et-core-modal-overlay et-core-active et-core-modal-overlay--library"}),this._renderRequestInProgressPrompt());return this.props.renderInsideApp?Z:l.default.createPortal(Z,I.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app"))[0])}}],r&&X(n.prototype,r),a&&X(n,a),Object.defineProperty(n,"prototype",{writable:!1}),z}(o.default.Component);se.propTypes=le,se.defaultProps=ue;var ce=se;t.default=ce}).call(this,n(8))},function(e,t,n){"use strict";(function(e,r){function o(e){return o="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},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=qe(n(40)),i=qe(n(215)),l=qe(n(199)),u=qe(n(334)),s=qe(n(371)),c=qe(n(149)),d=qe(n(522)),f=qe(n(516)),p=qe(n(69)),h=qe(n(147)),m=qe(n(359)),y=qe(n(392)),g=qe(n(135)),b=qe(n(41)),v=qe(n(124)),_=qe(n(56)),w=qe(n(162)),O=qe(n(185)),k=qe(n(125)),S=qe(n(17)),C=qe(n(10)),E=qe(n(1)),P=qe(n(72)),T=qe(n(64)),M=qe(n(37)),j=qe(n(12)),x=qe(n(4)),D=qe(n(163)),N=qe(n(11)),L=qe(n(7)),R=qe(n(197)),A=qe(n(96)),I=qe(n(42)),B=qe(n(5)),F=qe(n(9)),W=qe(n(34)),V=qe(n(127)),U=qe(n(107)),G=qe(n(399)),H=qe(n(31)),z=qe(n(58)),q=n(520),K=qe(n(164)),$=ze(n(0)),Y=qe(n(3)),X=n(27),J=n(67),Q=qe(n(13)),Z=qe(n(617)),ee=n(618),te=qe(n(2)),ne=qe(n(18)),re=n(138),oe=qe(n(15)),ae=qe(n(39)),ie=qe(n(59)),le=qe(n(283)),ue=qe(n(22)),se=qe(n(6)),ce=qe(n(14)),de=qe(n(784)),fe=qe(n(781)),pe=qe(n(43)),he=qe(n(806)),me=qe(n(63)),ye=ze(n(782)),ge=ze(n(506)),be=qe(n(1517)),ve=qe(n(1575)),_e=qe(n(1484)),we=qe(n(1850)),Oe=qe(n(281)),ke=qe(n(1550)),Se=qe(n(285)),Ce=n(66),Ee=qe(n(337)),Pe=qe(n(1498)),Te=n(60),Me=qe(n(791)),je=n(284),xe=n(396),De=qe(n(84)),Ne=qe(n(629)),Le=qe(n(519)),Re=qe(n(623)),Ae=n(405),Ie=qe(n(406)),Be=n(630),Fe=n(400),We=qe(n(1852)),Ve=qe(n(512)),Ue=qe(n(1551)),Ge=qe(n(1553));function He(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(He=function(e){return e?n:t})(e)}function ze(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=He(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function qe(e){return e&&e.__esModule?e:{default:e}}function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ke.apply(this,arguments)}function $e(e){return function(e){if(Array.isArray(e))return Je(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Xe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||Xe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(e,t){if(e){if("string"==typeof e)return Je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Je(e,t):void 0}}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){at(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function et(e,t){return et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},et(e,t)}function tt(e){var t=function(){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}}();return function(){var n,r=ot(e);if(t){var o=ot(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nt(this,n)}}function nt(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rt(e)}function rt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ot(e){return ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ot(e)}function at(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function it(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ut(e,t,n){return t&&lt(e.prototype,t),n&&lt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var st=e(".et_fb_preview_container"),ct=(0,b.default)((function(){st.removeClass("et_fb_preview_container__disable_animations")}),1500),dt=ce.default.getBackgroundFieldsNames(),ft=function(e){var t=ne.default.getFieldBaseName(e).split("_");return"padding"===t[0]&&(0,A.default)(parseInt(t[1]))&&2===t.length},pt=function(e){return ft(e)?ne.default.getFieldBaseName(e).split("_")[1]:NaN},ht=function(e){return["padding_top_".concat(e),"padding_right_".concat(e),"padding_bottom_".concat(e),"padding_left_".concat(e),"padding_top_bottom_link_".concat(e),"padding_left_right_link_".concat(e)]},mt=function(){function e(){it(this,e),this.reset()}return ut(e,[{key:"reset",value:function(){this.type="",this.data={},this.elementsType="",this.elementsData={}}},{key:"has",value:function(e,t){return e===this.type&&(0,W.default)(this.data,t)}},{key:"get",value:function(e,t){return e===this.type?(0,E.default)(this.data,t):void 0}},{key:"set",value:function(e,t,n){return e!==this.type&&(this.data={},this.type=e),(0,_.default)(this.data,t,n),!1}},{key:"hasElements",value:function(e,t){return e===this.elementsType&&(0,W.default)(this.elementsData,t)}},{key:"getElements",value:function(e,t){return e===this.elementsType&&(0,E.default)(this.elementsData,t)}},{key:"setElements",value:function(e,t,n){return e!==this.elementsType&&(this.elementsData={},this.elementsType=e),(0,_.default)(this.elementsData,t,n),!1}}]),e}(),yt={isVisible:Y.default.oneOfType([Y.default.array,Y.default.bool,Y.default.object]),module:Y.default.oneOfType([Y.default.array,Y.default.object,Y.default.bool]),onModalChange:Y.default.func,additionalClasses:Y.default.object,ignorePosition:Y.default.bool,isGlobalPresetsMode:Y.default.bool,nonInteractiveMode:Y.default.bool,disablePopupAnimation:Y.default.bool},gt=ce.default.shouldInheritParentDefaults,bt=ce.default.inheritParentDefaults,vt=function(t){!function(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&&et(e,t)}(o,t);var n=tt(o);function o(e){var t;it(this,o),at(rt(t=n.call(this,e)),"_onComponentFieldDefinitionsChange",(function(e,n){t.cache.reset(),e===(0,E.default)(rt(t),"props.module.type")?t.setState({generalFields:n}):t.forceUpdate()})),at(rt(t),"_updateComponentDefinitions",(function(){t.cache.reset();var e=t.props.isGlobalPresetsMode,n=t.getComponentAdvancedFields(t._getModule(),e),r=t.getComponentFields(t._getModule(),e),o=t.getComponentCSSFields(t._getModule(),e);t.setState({advancedFields:n,generalFields:r,cssFields:o})})),at(rt(t),"_onModulePresetChange",(function(){t._updateComponentDefinitions()})),at(rt(t),"_isDescriptionVisible",(function(e){return t.state.activeDescription===e})),at(rt(t),"optionsWithContext",(0,c.default)((function(){return function e(t){return(0,V.default)(t,(function(t,n,r){return"composite"===n.type?(0,V.default)((0,E.default)(n,"composite_structure",{}),(function(t,n){return Ze(Ze({},t),e((0,E.default)(n,"controls",{})))}),t):n.context?Ze(Ze({},t),{},at({},r,n.context)):t}),{})}(Ze(Ze(Ze({},(0,E.default)(t.state,"advancedFields",{})),(0,E.default)(t.state,"cssFields",{})),(0,E.default)(t.state,"generalFields",{})))}))),at(rt(t),"optionContext",(function(e){return(0,E.default)(t.optionsWithContext(),e)})),at(rt(t),"_isHoveredGroup",(function(e){var n=(0,s.default)(t.state.hoveredGroup).filter(te.default.hasValue).map(ne.default.getFieldBaseName),r=ne.default.getFieldBaseName(e);return!!(0,L.default)(n,r)||!!n.map(t.optionContext).find((function(e){return ne.default.getFieldBaseName(e)===r}))})),at(rt(t),"_emitSettingsChange",(function(e,n,r,o,a,i){"sticky_position"===n&&(ae.default.clearEnabledStickyPositionAddress(),ae.default.isStickyMode()&&(ue.default.setModuleSettingMode("desktop"),ue.default.setModuleSettingMode("sticky"))),t.props.isGlobalPresetsMode?ue.default.updateModulePresetSetting(e,n,r,a,i):ue.default.moduleSettingsChange(e,n,r,o,a,i)})),at(rt(t),"_onChangeCacheReset",(function(){return t.cache.reset()})),at(rt(t),"_onMouseEnterGroup",(function(e){t.hoverStarted=(new Date).getTime(),te.default.appWindow().clearTimeout(te.default.appWindow().ETBuilderFormGroupMouseEnterTimeout),te.default.appWindow().clearTimeout(t.mouseLeaveTimeout),te.default.appWindow().ETBuilderFormGroupMouseEnterTimeout=setTimeout((function(){t.setState({hoveredGroup:e.fieldName})}),200);var n={optionId:e.fieldName,optionLabel:e.fieldLabel,optionFamily:e.fieldType,toggleId:e.toggleId,toggleGroupId:e.toggleGroupId,mode:t.props.activeTabMode,optionContextMenu:e.fieldContextMenu,tabSlug:(0,E.default)(e,"tabSlug",e.toggleGroupId)},r=Se.default.getHelper("option").preparePayload({props:n},t.props.module);t._setHoveredElement("option",e.fieldName,r)})),at(rt(t),"_onMouseLeaveGroup",(function(e){if(te.default.appWindow().clearTimeout(te.default.appWindow().ETBuilderFormGroupMouseEnterTimeout),te.default.appWindow().clearTimeout(t.mouseLeaveTimeout),t.state.hoveredGroup===e.fieldName){var n=(new Date).getTime()-t.hoverStarted>600?300:10;t.mouseLeaveTimeout=setTimeout((function(){return t.setState({hoveredGroup:null})}),n)}t._setHoveredElement(!1)})),at(rt(t),"_onToggleRightMenu",(function(e){t.props.onToggleRightMenu(e)})),at(rt(t),"_onMouseEnterTitle",(function(){var e=t.props.module;if((0,E.default)(e,"props.is_module_child")){var n=Se.default.getHelper("child_item").preparePayload(e),r=(0,E.default)(e,"props.type","");t._setHoveredElement("child_item",r,n)}else ue.default.setHoveredModuleElement(e,{fromModalTitle:!0})})),at(rt(t),"_onMouseLeaveTitle",(function(){ue.default.setHoveredElement(!1)})),at(rt(t),"_onClickHelp",(function(e){e=ne.default.getFieldBaseName(e);var n=t.state.activeDescription===e?null:e;t.setState({activeDescription:n})})),at(rt(t),"_onSwitchTab",(function(e,n,r){var o=t.state.toggleTabs,a=[e,n];(0,E.default)(o,a)!==r&&t.setState({toggleTabs:(0,_.default)(Ze({},o),a,r)})})),at(rt(t),"_setHoveredElement",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ue.default.setHoveredElement(e,t,n)})),at(rt(t),"isOptionHovered",(function(e){var t=se.default.getMouseHoveredElement().elementId===e;return!t||"admin_label"!==e&&"background"!==e?t:"option"===se.default.getMouseHoveredElement().type})),at(rt(t),"_onTabSelect",(function(e){t.setState({tabSelectedIndex:e})})),at(rt(t),"_setActiveCustomCSSTab",(function(e){t.setState({activeCustomCSSTabIndex:e}),t.setState({activeCustomCSSTab:["freeFormCSS","moduleElements"][e]})})),at(rt(t),"_onGlobalPresetsStateChange",(function(){var e=se.default.getGlobalPresetsState().submitDialog;t.setState({isGlobalPresetsSubmitDialogVisible:e.isVisible,isGlobalPresetsSubmitDialogWaiting:e.showSpinner})})),at(rt(t),"_onBackToParent",(function(){var e=t.props.isGlobalPresetsMode?ie.default.BUTTON_GLOBAL_PRESETS_BACK_TO_PARENT:ie.default.MODULE_ITEM_BACK_TO_PARENT;ue.default.buttonClick({props:{buttonName:e}},t._getModule())})),at(rt(t),"_setHoveredElementWrapper",(function(e,n){var r=Se.default.getHelper("modal_tab");if(e){var o=(0,z.default)(t._getTabs(),(function(e){return e.slug===n}));if(!o)return;var a=t._getNonEmptyToggles(t.props.module.props.type,n+".toggles",n),i=t._getOptionsFields(n),l=r.preparePayload(n,o.title,a,i,t.props.module);t._setHoveredElement(e,n,l)}else t._setHoveredElement(!1)})),t.displayName="ETBuilderSettingsModal",t.cache=new mt;var r=e.module,a=e.isGlobalPresetsMode;if(t.module_type=(0,Ae.maybeConvertModuleType)(r),t.state=(0,C.default)({activeDescription:null,activeHover:null,activeHoverField:null,hoveredGroup:null,openedToggle:"main_content",openedGeneralGroup:"main_content",openedDesignGroup:"",openedCSSGroup:"",advancedFields:t.module_type&&t.getComponentAdvancedFields(r,a),generalFields:t.module_type&&t.getComponentFields(r,a),cssFields:t.module_type&&t.getComponentCSSFields(r,a),filterOptions:e.filterOptions||"",filterSelected:e.filterSelected,filterNotice:!1,toggleTabs:{},isGlobalPresetsSubmitDialogVisible:!1,tabSelectedIndex:e.tabSelectedIndex||0,isModalRest:!1,activeCustomCSSTabIndex:0,activeCustomCSSTab:"freeFormCSS"},t.getCustomTabsFields(t.module_type)),t.setting_resolver=t.getSettingResolver(),t.updatedAttrs={},!(0,E.default)(rt(t),"props.module.props.is_official_module")){var i=t.maybeGetFirstOpenedToggle();i&&(t.state.openedToggle=i,t.state.openedGeneralGroup=i)}return t.settingsModalTabPanelNode=$.default.createRef(),t._hasColumnsFields=t._hasColumnsFields.bind(rt(t)),t._onChange=t._onChange.bind(rt(t)),t._onChangeDynamic=t._onChangeDynamic.bind(rt(t)),t._resetOption=t._resetOption.bind(rt(t)),t._isResetActive=t._isResetActive.bind(rt(t)),t._onClickHelp=t._onClickHelp.bind(rt(t)),t._onClickHover=t._onClickHover.bind(rt(t)),t._onClickResponsive=t._onClickResponsive.bind(rt(t)),t._onClickSticky=t._onClickSticky.bind(rt(t)),t._onClickReset=t._onClickReset.bind(rt(t)),t._onMouseEnterGroup=t._onMouseEnterGroup.bind(rt(t)),t._onMouseLeaveGroup=t._onMouseLeaveGroup.bind(rt(t)),t._onToggleRightMenu=t._onToggleRightMenu.bind(rt(t)),t._onClickToggle=t._onClickToggle.bind(rt(t)),t._handleFormSubmission=t._handleFormSubmission.bind(rt(t)),t._unsyncGlobalSetting=t._unsyncGlobalSetting.bind(rt(t)),t._unsyncGlobalContent=t._unsyncGlobalContent.bind(rt(t)),t._onFilterInput=t._onFilterInput.bind(rt(t)),t._onFilterSelect=t._onFilterSelect.bind(rt(t)),t._onFilterChanged=t._onFilterChanged.bind(rt(t)),t._onGoToOption=t._onGoToOption.bind(rt(t)),t._isOptionMatchesFilter=t._isOptionMatchesFilter.bind(rt(t)),t._handleShortcuts=t._handleShortcuts.bind(rt(t)),t._onComponentAdvancedFieldDefinitionChange=t._onComponentAdvancedFieldDefinitionChange.bind(rt(t)),t._onComponentFieldDefinitionChange=t._onComponentFieldDefinitionChange.bind(rt(t)),t._onComponentCSSFieldDefinitionChange=t._onComponentCSSFieldDefinitionChange.bind(rt(t)),t._onComponentDefinitionsChange=t._onComponentDefinitionsChange.bind(rt(t)),t._onModalRest=t._onModalRest.bind(rt(t)),t._getOptionsFields=t._getOptionsFields.bind(rt(t)),t.getTabsCount=t.getTabsCount.bind(rt(t)),t.maybeGetFirstOpenedToggle=t.maybeGetFirstOpenedToggle.bind(rt(t)),t._isModuleItemSettings=t._isModuleItemSettings.bind(rt(t)),t._renderCustomCSSTabs=t._renderCustomCSSTabs.bind(rt(t)),t._setActiveCustomCSSTab=t._setActiveCustomCSSTab.bind(rt(t)),t._onQuickAccessSwitchTab=t._onQuickAccessSwitchTab.bind(rt(t)),t._onQuickAccessActive=t._onQuickAccessActive.bind(rt(t)),t._setHoveredToggleElement=t._setHoveredToggleElement.bind(rt(t)),t._setHoveredSubToggleElement=t._setHoveredSubToggleElement.bind(rt(t)),t.productTourOptionToggle=!1,t.builder_display_modal_settings=se.default.getAppPreference("builder_display_modal_settings"),t._onPromptUseTextClick=t._onPromptUseTextClick.bind(rt(t)),t.mouseLeaveTimeout=0,t.hoverStarted=0,t.isModalRestTimeout=null,t}return ut(o,[{key:"getComponentFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=n||(0,Ae.maybeConvertModuleType)(e),o=n?"general_fields__".concat(n):r;if(this.cache.has(r,o))return this.cache.get(r,o);var a=se.default.filterUserFields(ce.default.getComponentFields(n?{props:{type:n}}:e,t));return this.cache.set(r,o,a),a}},{key:"getComponentAdvancedFields",value:function(e,t){var n=(0,Ae.maybeConvertModuleType)(e);if(this.cache.has(n,"advanced_fields"))return this.cache.get(n,"advanced_fields");var r=se.default.filterUserFields(ce.default.getComponentAdvancedFields(e,t));return this.cache.set(n,"advanced_fields",r),r}},{key:"getComponentCSSFields",value:function(e,t){var n=(0,Ae.maybeConvertModuleType)(e);if(this.cache.has(n,"css_fields"))return this.cache.get(n,"css_fields");var r=se.default.filterUserFields(ce.default.getComponentCSSFields(e,t));return this.cache.set(n,"css_fields",r),r}},{key:"getComponentCustomTabFields",value:function(e,t){if(this.cache.has(e,"custom_tab-".concat(t)))return this.cache.get(e,"custom_tab-".concat(t));var n=se.default.filterUserFields(ce.default.getComponentCustomTabFields(e,t));return this.cache.set(e,"custom_tab-".concat(t),n),n}},{key:"getModuleCustomTabs",value:function(e){if(this.cache.has(e,"module_custom_tabs"))return this.cache.get(e,"module_custom_tabs");var t=ce.default.getComponentCustomTabs(e);return this.cache.set(e,"module_custom_tabs",t),t}},{key:"UNSAFE_componentWillMount",value:function(){this.cache.reset(),ce.default.addComponentAdvancedFieldDefinitionChangeListener(this._onComponentAdvancedFieldDefinitionChange),ce.default.addComponentFieldDefinitionChangeListener(this._onComponentFieldDefinitionChange),ce.default.addComponentFieldDefinitionsChangeListener(this._onComponentFieldDefinitionsChange),ce.default.addComponentCSSFieldDefinitionChangeListener(this._onComponentCSSFieldDefinitionChange),se.default.addGoToOptionListener(this._onGoToOption),se.default.addQuickAccessSwitchTabListener(this._onQuickAccessSwitchTab),se.default.addQuickAccessActiveListener(this._onQuickAccessActive),se.default.addOptionsFilterChangeListener(this._onFilterChanged),this._onChangeCacheReset=(0,b.default)(this._onChangeCacheReset,400,{leading:!0,trailing:!1})}},{key:"componentDidMount",value:function(){this.props.moduleRenderMode!==this.props.activeTabMode&&ue.default.setModuleSettingMode(this.props.moduleRenderMode,!1),te.default.topWindow().document.addEventListener("keydown",this._handleShortcuts),this.setState({tabsCount:this.getTabsCount()}),se.default.addGlobalPresetsStateChangeListener(this._onGlobalPresetsStateChange),se.default.addModulePresetChangeListener(this._onModulePresetChange),ce.default.addComponentDefinitionsChangeListener(this._onComponentDefinitionsChange),window.addEventListener("ai_prompt_use_text_click",this._onPromptUseTextClick)}},{key:"componentDidUpdate",value:function(e,t){var n=this.props;if((0,E.default)(n,"module.props.address","")!==(0,E.default)(e,"module.props.address","")){var r=(0,E.default)(e,"module.props.is_module_child"),o=this.maybeGetFirstOpenedToggle(r);o&&this.setState({openedToggle:o})}this.props.module!==e.module&&(this.setting_resolver=this.getSettingResolver(),this.setState({tabsCount:this.getTabsCount()})),this.props.isGlobalPresetsMode!==e.isGlobalPresetsMode&&(this.setting_resolver=this.getSettingResolver()),n.isVisible&&!e.isVisible&&(this.setState({filterOptions:"",openedToggle:"main_content",filterSelected:void 0,filterNotice:!1}),this.productTourOptionToggle=!1),this.maybeShowFilterNotice()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){(0,B.default)(e.optionsFilter)||this.cache.reset();var t=(0,E.default)(e,"module.props.type");if(e.module&&this.props.module.type!==t&&!(0,I.default)(this.props,e)){this.props.isGlobalPresetsMode!==e.isGlobalPresetsMode&&this.cache.reset();var n=this.getComponentAdvancedFields(e.module,e.isGlobalPresetsMode),r=this.getComponentFields(e.module,e.isGlobalPresetsMode),o=this.getComponentCSSFields(e.module,e.isGlobalPresetsMode),a=(0,Ae.maybeConvertModuleType)(e.module),i=this.getCustomTabsFields(a);this.module_type=a,this.setState(Ze({advancedFields:n,generalFields:r,cssFields:o},i))}}},{key:"UNSAFE_componentWillUpdate",value:function(e){if(!(0,I.default)((0,E.default)(this,"props.isVisible"),(0,E.default)(e,"isVisible"))){var t=se.default.getAppPreference("builder_display_modal_settings"),n=(0,E.default)(e,"module.props.type");if(t&&!(0,N.default)(n)){var r=(0,k.default)(ce.default.getComponentFieldsByFieldTypes(e.module,["custom_margin","custom_padding","range"]));ue.default.setListenerQuotaForGroup("settings-modal",r)}}}},{key:"componentWillUnmount",value:function(){te.default.appWindow().clearTimeout(te.default.appWindow().ETBuilderFormGroupMouseEnterTimeout),te.default.appWindow().clearTimeout(this.mouseLeaveTimeout),ct.flush(),ce.default.removeComponentAdvancedFieldDefinitionChangedListener(this._onComponentAdvancedFieldDefinitionChange),ce.default.removeComponentFieldDefinitionChangedListener(this._onComponentFieldDefinitionChange),ce.default.removeComponentFieldDefinitionsChangedListener(this._onComponentFieldDefinitionsChange),ce.default.removeComponentCSSFieldDefinitionChangedListener(this._onComponentCSSFieldDefinitionChange),ce.default.removeComponentDefinitionsChangeListener(this._onComponentDefinitionsChange),se.default.removeQuickAccessSwitchTabListener(this._onQuickAccessSwitchTab),se.default.removeQuickAccessActiveListener(this._onQuickAccessActive),se.default.removeOptionsFilterChangeListener(this._onFilterChanged),te.default.topWindow().document.removeEventListener("keydown",this._handleShortcuts),clearTimeout(this.focusTimer),clearTimeout(this.filterNoticeTimer),clearTimeout(this.filterTimer),clearTimeout(this.goToOptionTimer),clearTimeout(this.quickAccessScrollUp),clearTimeout(this.quickAccessOpenToggle),clearTimeout(this.isModalRestTimeout),se.default.removeGoToOptionListener(this._onGoToOption),se.default.removeGlobalPresetsStateChangeListener(this._onGlobalPresetsStateChange),se.default.removeModulePresetChangeListener(this._onModulePresetChange),window.removeEventListener("ai_prompt_use_text_click",this._onPromptUseTextClick)}},{key:"_onPromptUseTextClick",value:function(e){var t=(0,E.default)(this,"props.module"),n=e.detail,r=n.text,o=n.fieldName,a=n.intent,i=n.settings;if("background_image"!==o&&!(0,l.default)("_bg_image"))return"module_fields_autofill"===a?(0,Fe.aiAutofillModuleSettings)(i,t):void((0,Fe.isAIContentField)(o,t.props.type)?ue.default.moduleContentChange(t,r,!0,!1):this._onChange(o,r))}},{key:"maybeGetFirstOpenedToggle",value:function(e){var t=this.props.module,n=(0,E.default)(t,"props.type"),r=this._getNonEmptyToggles(n,"general.toggles","general"),o=(0,E.default)(r,"toggles"),a=(0,E.default)(o,this.state.openedToggle);if(e){var i=(0,E.default)(t,"props.module_items_config",{}),l=(0,E.default)(i,"toggle_slug");if(l)return l;if(!a)return"main_content"}if(a)return!1;if(!o)return!1;var u=(0,H.default)(o,(function(e,t){var n=(0,j.default)(e)?e:{title:e,priority:10};return n.name=t,n})),s=(0,m.default)(u,"priority","asc");return(0,E.default)((0,h.default)(s),"name","main_content")}},{key:"_updateSettingResolverGlobalPresetsAttrs",value:function(e,t){this.props.isGlobalPresetsMode&&(0,_.default)(this.setting_resolver,"source_object.props.attrs.".concat(e),t)}},{key:"_handleShortcuts",value:function(e){var t=this,n=e.metaKey,r=e.altKey,o=e.ctrlKey,a=27===e.keyCode,i=e.shiftKey,l=32===e.keyCode,u=te.default.$topWindow((0,X.findDOMNode)(this)).find(".et-fb-options-filter input"),s=u.length>0&&u.is(":focus");if(s&&i&&l)e.preventDefault();else{if(a&&this._isFilterActive())return e.preventDefault(),this.filterTimer=setTimeout((function(){t.setState({filterOptions:"",filterSelected:void 0,filterNotice:!1})}),300),!1;!s||n||r||o||27===e.keyCode||e.stopPropagation(),a&&this.props.isGlobalPresetsMode&&(ue.default.saveModulePresetSettings(this._getModule()),e.stopPropagation())}}},{key:"_onComponentAdvancedFieldDefinitionChange",value:function(e,t,n){if(!this.props.isGlobalPresetsMode){var r=(0,C.default)({},this.state.advancedFields);(0,_.default)(r,[e,t],n),this.cache.reset(),this.setState({advancedFields:r})}}},{key:"_onComponentFieldDefinitionChange",value:function(e,t,n){var r=(0,C.default)({},this.state.generalFields);(0,_.default)(r,[e,t],n),this.cache.reset(),this.setState({generalFields:r})}},{key:"_onComponentCSSFieldDefinitionChange",value:function(e,t,n){var r=(0,C.default)({},this.state.cssFields);(0,_.default)(r,[e,t],n),this.setState({cssFields:r})}},{key:"_onComponentDefinitionsChange",value:function(e){e===(0,E.default)(this._getModule(),"props.type")&&this._updateComponentDefinitions()}},{key:"_onModalRest",value:function(){var e=this;this.isModalRestTimeout=setTimeout((function(){e.setState({isModalRest:!0})}),1)}},{key:"getSettingResolver",value:function(){var e=this,t=new Z.default(this._getModule(),{},"props.attrs.");if(this.props.isGlobalPresetsMode){var n=te.default.flattenFields(Ze(Ze(Ze({},this.getComponentFields(this._getModule())),this.getComponentAdvancedFields(this._getModule())),this.getComponentFields(this._getModule()))),r={};(0,F.default)(n,(function(t){t.show_if&&(0,F.default)((0,S.default)(t.show_if),(function(t){r[t]=(0,E.default)(e.props,"module.props.attrs.".concat(t))})),t.show_if_not&&(0,F.default)((0,S.default)(t.show_if_not),(function(t){r[t]=(0,E.default)(e.props,"module.props.attrs.".concat(t))}))})),t.source_object={props:{attrs:(0,C.default)({},r,this.getModuleAttrs())}}}return t}},{key:"getCustomTabsList",value:function(){var e=this.props.module,t=this.getModuleCustomTabs(e.props.type);return!(0,B.default)(t)&&t}},{key:"getCustomTabsFields",value:function(e){var t=this,n=this.getCustomTabsList();if(!n)return!1;var r={};return(0,F.default)(n,(function(n,o){var a="".concat(o,"Fields");r[a]=t.getComponentCustomTabFields(e,o)})),r}},{key:"_getModule",value:function(){return this.props.module}},{key:"getBulk",value:function(){var e=this._getModule(),t=(0,E.default)(e,"props.address");return(0,B.default)(e)?{}:se.default.isMultiItemSelected(t)?se.default.getMultiSelectItemsData():at({},t,e)}},{key:"getModuleAttrs",value:function(){var e=this._getModule(),t=(0,E.default)(e,"props.type"),n=(0,E.default)(e,"props.address"),r=se.default.isMultiItemSelected(n);return this.props.isGlobalPresetsMode?ce.default.getComponentGlobalPresets(e):r?Ee.default.generateSelectedAttrs(t,(0,E.default)(e,"props.attrs",{}),this.updatedAttrs):(0,E.default)(e,"props.attrs",{})}},{key:"_isVisible",value:function(e,t){var n=this;if(this.props.isGlobalPresetsMode){var r=(0,u.default)(["animation"],(function(t){return!(0,P.default)(e.name,t)})),o=(0,u.default)(["text_shadow"],(function(t){return-1===e.name.indexOf(t)}));if(r&&o)return!0}var a=this.getModuleAttrs(),i=ce.default.getComponentDefaults(this.module_type),l=[];return(0,F.default)(e.depends_on,(function(r){var o=r,u=Me.default.isHoverMode()&&Me.default.isHoverEnabled(r,a),s=Me.default.isResponsiveMode()&&Me.default.isResponsiveEnabled(r,a);(u||s)&&(r=Me.default.getNameByMode(r,a));var c=(0,E.default)(t[r],"type","");if((0,E.default)(t[r],"depends_on",!1)&&!n._isVisible(t[r],t))return!1;var d=(0,E.default)(a,r,(0,E.default)(i,r,""));if((u||s)&&(0,N.default)(d)&&(d=(0,E.default)(i,o,(0,E.default)(t[o],"shortcode_default"))),"upload"!==c&&"text"!==c||""===d||(d="on"),(0,N.default)(e.depends_show_if)||d!==e.depends_show_if||l.push(r),!(0,N.default)(e.depends_show_if_not)){var f=e.depends_show_if_not;if((0,W.default)(e,"depends_on_responsive")&&(0,L.default)(e.depends_on_responsive,r)){var p=(0,E.default)(a,"".concat(r),""),h=(0,E.default)(a,"".concat(r,"_tablet"),""),m=(0,E.default)(a,"".concat(r,"_phone"),"");te.default.getResponsiveStatus((0,E.default)(a,"".concat(r,"_last_edited")))?(0,L.default)(f,p)&&(0,L.default)(f,h)&&(0,L.default)(f,m)||l.push(r):(0,L.default)(f,p)||l.push(r)}else{((0,x.default)(f)?!(0,L.default)(f,d):d!==f)&&l.push(r)}}})),!(0,B.default)(l)}},{key:"_isModuleItemSettings",value:function(){return!(0,N.default)(this.props.module.isModuleItem)}},{key:"_isModalExpanded",value:function(){var e=(0,xe.getModalPreferredSnapSettings)(),t=e.snap,n=e.snapLocation,r=(0,xe.getModalPreferredDimensions)().width,o=(0,L.default)(["top","bottom"],n),a=te.default.topWindow().innerWidth<le.default.responsive.phone;return(t&&o&&te.default.topWindow().innerWidth>1200||r>1200)&&!a}},{key:"_isToggleOpened",value:function(e,t){var n="general"===t,r="design"===t,o="css"===t,a=this._isModalExpanded();if(t&&a){if(n)return this.state.openedGeneralGroup===e;if(r)return this.state.openedDesignGroup===e;if(o)return this.state.openedCSSGroup===e}return this.state.openedToggle===e}},{key:"_isMultiSelectMode",value:function(){var e=(0,E.default)(this._getModule(),"props.address");return se.default.isMultiItemSelected(e)}},{key:"_hasColumnsFields",value:function(){var e=this.props.module.props.type,t=this.getModuleAttrs(),n=te.default.isOn(t.specialty)&&"et_pb_section"===e;return(0,L.default)(["et_pb_row","et_pb_row_inner"],e)||n}},{key:"_hasModuleItem",value:function(){return!(0,T.default)(this.props.module.props.child_slug)&&!(0,N.default)(this.props.module.props.child_slug)}},{key:"_onChange",value:function(e,t,n,o,a){var i=this;this._onChangeCacheReset(),this._updateSettingResolverGlobalPresetsAttrs(e,t),this.updatedAttrs[e]=t;var l=(0,E.default)(this.props.module,"props.address"),u=se.default.isMultiItemSelected(l);if("raw_content"!==e){var s=e.split("_"),c="padding_mobile"!==e&&"padding"===s[0]&&2===s.length;if(o)!(0,N.default)(this.props.module)&&this.props.module&&(u?ue.default.multiSelectContentChange(this.props.module,t):ue.default.moduleContentChange(this.props.module,t));else{(0,N.default)(this.props.module)||(0,N.default)(this.props.module.props)||"et_pb_social_media_follow_network"!==this.props.module.props.type||"social_network"!==e||(u?ue.default.multiSelectContentChange(this.props.module,t):ue.default.moduleContentChange(this.props.module,t));var d=(0,L.default)(["custom_css_before","custom_css_main_element","custom_css_after"],e)?e.replace("custom_css_",""):e,f=this._getModule(),p=this.getModuleAttrs(),h=(0,E.default)(f,"props.type"),m=(0,E.default)(p,"".concat(e)),y=se.default.getHoverMode(),g=this._getAllOptionsFields()[d],b=(0,N.default)(g)||(0,N.default)(g.depends_on)?e:g.depends_on[0],v=!(0,N.default)(g)&&!!g.hover&&(ne.default.isEnabled(e,p)||ne.default.isEnabled(b,p)),_=!0===y&&!0===v?ne.default.hoverSuffix():"",w=!1;if((0,P.default)(h,"et_pb_signup")){var O=ETBuilderBackend.emailPredefinedCustomFields,k=(0,E.default)(f,"parentModule.props.attrs"),S=this.getComponentFields({props:{type:"et_pb_signup"}}),C=(0,E.default)(S,"provider.default"),T=(0,E.default)(p,"provider",(0,E.default)(k,"provider",C)),j=Ye((0,E.default)(p,"".concat(T,"_list"),(0,E.default)(k,"".concat(T,"_list"),"")).split("|"),2),x=j[0],D=j[1];if("et_pb_signup"===h){var R=(0,W.default)(O,[T,x,D]);("provider"===e&&t!==m||R&&"".concat(T,"_list")===e&&t!==m)&&(w=!0)}else if("et_pb_signup_custom_field"===h&&(0,P.default)(e,"predefined_field_")&&t!==m){u?ue.default.multiSelectSettingsChange(r,"predefined_field",t):this._emitSettingsChange(f,"predefined_field",t);var A=[T,x];(0,W.default)(O,[T,x,"custom_fields"])?A.push("custom_fields"):A.push(D),A.push(t);var I=(0,E.default)(O,A);if(I){if(I.field_id!==p.field_id&&(u?ue.default.multiSelectSettingsChange(r,"field_id",I.field_id.toString()):this._emitSettingsChange(f,"field_id",I.field_id.toString())),I.name!==p.field_title&&(u?ue.default.multiSelectSettingsChange(r,"field_title",I.name):this._emitSettingsChange(f,"field_title",I.name)),!(0,N.default)(I.hidden)||"on"===(0,E.default)(p,"hidden")){var B=I.hidden?"on":"off";B!==p.hidden&&(u?ue.default.multiSelectSettingsChange(r,"hidden",B):this._emitSettingsChange(f,"hidden",B))}if("any"!==I.type&&I.type!==p.field_type&&(u?ue.default.multiSelectSettingsChange(r,"field_type",I.type):this._emitSettingsChange(f,"field_type",I.type),I.options)){var V=(0,H.default)(I.options,(function(e,t){return{checked:0,value:e,id:t}}));u?ue.default.multiSelectSettingsChange(r,"".concat(I.type,"_options"),JSON.stringify(V)):this._emitSettingsChange(f,"".concat(I.type,"_options"),JSON.stringify(V))}}}}if(c){var U=s[1],G=["padding_top_".concat(U).concat(_),"padding_right_".concat(U).concat(_),"padding_bottom_".concat(U).concat(_),"padding_left_".concat(U).concat(_),"padding_top_bottom_link_".concat(U).concat(_),"padding_left_right_link_".concat(U).concat(_)],z=(0,M.default)(t)?t.split("|"):["","","","","",""];(0,F.default)(G,(function(e,t){var r=(0,N.default)(z[t])?"":z[t];r!==p[e]&&(u?ue.default.multiSelectSettingsChange(i.props.module,e,r,null,n):i._emitSettingsChange(f,e,r,null,n))}))}else 0===e.indexOf("custom_css")&&(st.addClass("et_fb_preview_container__disable_animations"),ct()),u?ue.default.multiSelectSettingsChange(this.props.module,"".concat(e).concat(_),t,null,n,a):this._emitSettingsChange(f,"".concat(e).concat(_),t,null,n,a),w&&ue.default.deleteModuleChildren((0,E.default)(f,"props.address"))}}else u?ue.default.multiSelectContentChange(this.props.module,t):ue.default.moduleContentChange(this.props.module,t)}},{key:"_isFilterActive",value:function(){return te.default.hasValue(this.state.filterOptions)||te.default.hasValue(this.state.filterSelected)}},{key:"_onChangeDynamic",value:function(e,t,n,r,o){"et_pb_counter"===this.props.module.props.type&&"content"===Me.default.getBaseName(e)&&this._onChange(e,"",n,!0),this._onChange(e,t,n,r,o)}},{key:"_resetOption",value:function(e){if(!(0,N.default)(e)&&""!==e){var t=this._getModule();this._emitSettingsChange(t,e,"")}}},{key:"_onClickHover",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this._getModule();if(r){var o=n&&(0,x.default)(n)?[e].concat($e(n)):[e],a=Me.default.getHoverEnabledToggleValue(e,this.getModuleAttrs(),this.props.activeTabMode),i=se.default.isMultiItemSelected((0,E.default)(r,"props.address"));(0,F.default)(o,(function(e){var n=Me.default.getHoverEnabledName(e);i?ue.default.multiSelectSettingsChange(r,n,a):t._emitSettingsChange(r,n,a)})),0===a.indexOf("on")||Me.default.isAnyHoverEnabled(this.getModuleAttrs())||(i?ue.default.multiSelectSettingsChange(r,"hover_enabled",0):ue.default.moduleSettingsChange(r,"hover_enabled",0),Me.default.isHoverMode()&&ue.default.setModuleSettingMode("desktop",!0))}}},{key:"_onClickSticky",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this._getModule();if(r){var o=n&&(0,x.default)(n)?[e].concat($e(n)):[e],a=Me.default.getStickyEnabledToggleValue(e,this.getModuleAttrs(),this.props.activeTabMode),i=se.default.isMultiItemSelected((0,E.default)(r,"props.address"));(0,F.default)(o,(function(e){var n=Me.default.getStickyEnabledName(e);i?ue.default.multiSelectSettingsChange(r,n,a):t._emitSettingsChange(r,n,a)})),0===a.indexOf("on")||Me.default.isAnyStickyEnabled(this.getModuleAttrs())||(i?ue.default.multiSelectSettingsChange(r,"sticky_enabled",0):ue.default.moduleSettingsChange(r,"sticky_enabled",0),Me.default.isStickyMode()&&ue.default.setModuleSettingMode("desktop",!0))}}},{key:"_onClickResponsive",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this._getModule();if(r){var o=n&&(0,x.default)(n)?[e].concat($e(n)):[e],a=Me.default.getResponsiveEnabledToggleValue(e,this.getModuleAttrs(),this.props.activeTabMode),i=se.default.isMultiItemSelected((0,E.default)(r,"props.address"));(0,F.default)(o,(function(e){var n=Me.default.getResponsiveEnabledName(e);i?ue.default.multiSelectSettingsChange(r,n,a):t._emitSettingsChange(r,n,a)})),0!==a.indexOf("on")&&Me.default.isResponsiveMode()&&!Me.default.isAnyResponsiveEnabled(this.getModuleAttrs())&&ue.default.setModuleSettingMode("desktop",!0)}}},{key:"_onClickReset",value:function(e){var t=this,n=(0,E.default)(e,"props.name",!1);if(n){var r=this._getAllOptionsFields()[e.props.name],o=r&&r.type;if("select_box_shadow"!==o&&"presets_shadow"!==o){var a=this._getModule();if(a){var i=this.getModuleAttrs(),l=(0,E.default)(a,"props.address"),u=se.default.isMultiItemSelected(l),s=(0,E.default)(e,"props.backgroundFields",!1),c=u?[]:K.default.getModuleAttrsUsingGlobalColors(a.props),d=function(e){c.includes(e)&&(0,q.removeFieldFromGlobalColors)(e,a.props,(function(e){var n=e.module,r=e.setting,o=e.newValue;t._emitSettingsChange(n,r,o)}))};if("display_conditions"!==n)if(s)(0,F.default)((0,S.default)(s),(function(e){var n=Me.default.getNameByMode(e,i);u?ue.default.multiSelectSettingsChange(a,n,void 0,!1,void 0,!0):(t._emitSettingsChange(a,n,void 0,!1,void 0,!0),d(n))}));else if(ft(n)){var f=ht(pt(n));u?f.map((function(e){return ue.default.multiSelectSettingsChange(a,ne.default.getCompositeFieldOnHover(e,n,i),void 0,!1,void 0,!0)})):f.map((function(e){return ue.default.moduleSettingsChange(a,ne.default.getCompositeFieldOnHover(e,n,i),void 0,!1,void 0,!0)}))}else{var p=Me.default.getNameByMode(n,i);if("content"===p){var h=te.default.get((0,E.default)(e,"props.default_on_front"),te.default.get((0,E.default)(e,"props.defaultValue"),(0,E.default)((0,E.default)(this._getAllOptionsFields(),n,{}),"default","")));u?ue.default.multiSelectContentChange(a,h):ue.default.moduleContentChange(a,h)}else u?ue.default.multiSelectSettingsChange(a,p,void 0,!1,void 0,!0):(this._emitSettingsChange(a,p,void 0,!1,void 0,!0),d(p))}else{ue.default.triggerDisplayConditionsReset();var m=Me.default.getNameByMode(n,i);this._emitSettingsChange(a,m,void 0,!1,void 0,!0)}}}else{var y=Ie.default.getResetAction();ue.default.rightClickMenuAction(y,"",{simulateRightClick:!0})}}}},{key:"_isResetActive",value:function(e){var t=this,n=(0,E.default)(e,"name",!1),r=this._getModule(),o=this.getModuleAttrs(),a=this.props.activeTabMode;if(!n||!(0,j.default)(r))return!1;var i=function(e){var t="desktop"!==a?te.default.get((0,E.default)(e,"default"),(0,E.default)(e,"default_".concat(a))):(0,E.default)(e,"default");return(0,x.default)(t)?(0,E.default)((0,E.default)(t,1,{}),(0,E.default)(o,(0,E.default)(t,0))):t},u=function(e){return"content"===e?(0,E.default)(r,"props.content"):(0,E.default)(o,e)},s=(0,E.default)(e,"backgroundFields",!1)||(0,E.default)(e,"background_fields",!1);if(s){var c=(0,S.default)(s).filter((function(e){return!!(0,l.default)("_use_color_gradient",e)||(-1!==e.indexOf("_enable_")||"use_background_color_gradient"===e)}));return(0,p.default)(s,(function(e,t){var n=Me.default.getBaseName(t,o);if((0,L.default)(c,n))return!1;var r=Me.default.getNameByMode(n,o),l=u(r);if((0,N.default)(l))return!1;var s=i(e);return!("desktop"===a&&""===l&&!te.default.hasValue(s))&&s!==l}))}if(ft(n)){var d=pt(n);return ht(d).map((function(e){return(0,E.default)(t.state.advancedFields,"".concat(e,".default"),"")})).join("|")!==ht(d).map((function(e){return(0,E.default)(o,"".concat(ne.default.getCompositeFieldOnHover(e,n,o)))})).join("|")}var f=u(Me.default.getNameByMode(n,o));if((0,N.default)(f))return!1;var h=i(e);return!("desktop"===a&&""===f&&!te.default.hasValue(h))&&h!==f}},{key:"_onClickToggle",value:function(e,t,n,r){if(!se.default.getAppPreference("builder_display_modal_settings")){var o=this._isModalExpanded(),a=o?le.default.topbar.mobile:10,i="general"===n,l="design"===n,u="css"===n;if(this._isToggleOpened(e,n)&&(0,N.default)(r)){if(i)return this.setState({openedGeneralGroup:"",openedToggle:""});if(l)return this._setHoveredToggleElement(e,!1,!0),this.setState({openedDesignGroup:"",openedToggle:""});if(u)return this.setState({openedCSSGroup:"",openedToggle:""})}if(!this._isToggleOpened(e)||(this.setState({openedToggle:""}),!(0,N.default)(r))){var s="design"===n?"advanced":n,c=".et-fb-tabs__panel--".concat(s," .et-fb-form__toggle[data-name='").concat(e,"']"),d=te.default.$topWindow(c).prevAll(".et-fb-form__toggle").length+1,f=1===d?0:61*d-a,p=".et-fb-tabs__panel--".concat(s," .et-fb-settings-module-items-wrap");"general"===s&&te.default.$topWindow(p).length&&(1===d&&(f+=te.default.$topWindow(".et-fb-options-filter-input-wrap").height()),f+=te.default.$topWindow(p).outerHeight()+30),o?te.default.$topWindow((0,X.findDOMNode)(this)).find(".et-fb-tabs__panel--".concat(s)).animate({scrollTop:f},300):te.default.$topWindow((0,X.findDOMNode)(this)).find(".et-fb-tabs__panel--active").animate({scrollTop:f},300),this.setState({openedToggle:e,openedGeneralGroup:"general"===n?e:this.state.openedGeneralGroup,openedDesignGroup:"design"===n?e:this.state.openedDesignGroup,openedCSSGroup:"css"===n?e:this.state.openedCSSGroup}),l&&this._setHoveredToggleElement(e,!0,!0)}}}},{key:"_onQuickAccessSwitchTab",value:function(){var e=se.default.getActiveQuickAccess().clickedToggle.toggleGroupId,t="design"===e?"advanced":e,n=(0,i.default)(this._getTabs(),(function(e){return e.slug===t}));-1!==n&&this.setState({tabSelectedIndex:n})}},{key:"_onQuickAccessActive",value:function(){var e=this,t=se.default.getActiveQuickAccess().clickedToggle,n=t.toggleId,r=t.toggleGroupId,o=t.toggleSubIdName,a=this._isModalExpanded(),i=se.default.getAppPreference("builder_display_modal_settings"),l=a||i?le.default.topbar.mobile:10,u="design"===r?"advanced":r,s=".et-fb-tabs__panel--".concat(u," .et-fb-form__toggle[data-name='").concat(n,"']");if(i)return clearTimeout(this.quickAccessScrollUp),void(this.quickAccessScrollUp=setTimeout((function(){var t=te.default.$topWindow((0,X.findDOMNode)(e)).find(".et-fb-tabs__panel--".concat(u)),n=te.default.$topWindow(s);if(0!==n.length){var r=n[0].offsetTop;t.animate({scrollTop:r},300)}}),0));var c=te.default.$topWindow(s).prevAll(".et-fb-form__toggle").length+1,d=1===c?0:61*c-l;a?(te.default.$topWindow((0,X.findDOMNode)(this)).find(".et-fb-tabs__panel--".concat(u)).animate({scrollTop:d},300),this.setState({openedToggle:n,openedGeneralGroup:"general"===r?n:this.state.openedGeneralGroup,openedDesignGroup:"design"===r?n:this.state.openedDesignGroup,openedCSSGroup:"css"===r?n:this.state.openedCSSGroup,toggleTabs:(0,_.default)(Ze({},this.state.toggleTabs),[r,n],o),filterOptions:"",filterSelected:void 0,filterNotice:!1})):(clearTimeout(this.quickAccessScrollUp),this.quickAccessScrollUp=setTimeout((function(){te.default.$topWindow((0,X.findDOMNode)(e)).find(".et-fb-tabs__panel--active").animate({scrollTop:d},300)}),0),clearTimeout(this.quickAccessOpenToggle),this.quickAccessOpenToggle=setTimeout((function(){e.setState({openedToggle:n,openedGeneralGroup:"general"===r?n:e.state.openedGeneralGroup,openedDesignGroup:"design"===r?n:e.state.openedDesignGroup,openedCSSGroup:"css"===r?n:e.state.openedCSSGroup,toggleTabs:(0,_.default)(Ze({},e.state.toggleTabs),[r,n],o),filterOptions:"",filterSelected:void 0,filterNotice:!1})}),300))}},{key:"_setHoveredToggleElement",value:function(e,t,n){var r=this.props.module,o=(0,E.default)(r,"props.type"),a=(0,E.default)(r,"props.address");if(!(0,N.default)(Ce.quickAccessModuleToggleId[o])){var i=Ce.quickAccessModuleToggleId[o];if(!(0,N.default)(i[e])){var l={moduleAddress:a,toggleId:e,elementAddress:a,elementOrder:10,elementKey:null,elementOuter:null,toggleSubId:0,isChild:!(0,N.default)(r.isModuleItem),src:"settings",isOpened:t,hovered:n,isSubOpened:!1,subHovered:!1};ue.default.quickAccessHighlight(l)}}}},{key:"_setHoveredSubToggleElement",value:function(e,t,n,r){var o=this.props.module,a=(0,E.default)(o,"props.address");if(!(0,N.default)(Ce.quickAccessIdTextModule[e])){var i=Ce.quickAccessIdTextModule[e],l=(0,d.default)(i);if(!(0,N.default)(l[t])){var u={moduleAddress:a,toggleId:e,elementAddress:a,elementOrder:10,elementKey:null,elementOuter:null,toggleSubId:t,isChild:!(0,N.default)(o.isModuleItem),src:"settings",isOpened:!0,hovered:!1,isSubOpened:n,subHovered:r};ue.default.quickAccessHighlight(u)}}}},{key:"_unsyncGlobalContent",value:function(){this._unsyncGlobalSetting("et_pb_content_field",!0)}},{key:"_unsyncGlobalSetting",value:function(e,t){ue.default.unsyncGlobalSetting(e,this.props.module,t)}},{key:"_handleFormSubmission",value:function(t){if(t.preventDefault(),((0,N.default)((0,E.default)(this,"props.module.props.loading"))||!this.props.module.props.loading)&&!e((0,X.findDOMNode)(this)).find(":focus").hasClass("wp-color-picker")){var n=this,r=this.props.module;(0,F.default)(this.state.generalFields,(function(e){"text"===e.type&&((0,N.default)(e.name)||-1===e.name.indexOf("url")&&-1===e.name.indexOf("alt")&&-1===e.name.indexOf("link")&&n._onChange(e.name,te.default.decodeHtmlEntities(r.props.attrs[e.name])))})),ue.default.closeSettings(this._isModuleItemSettings())}}},{key:"_handleFieldConditionalDefaults",value:function(e,t,n){if((0,x.default)(e.default)&&"filter"===(0,E.default)(e,"default.0")){var r=(0,E.default)(e,"default.1").split("_").join(".");return Ze(Ze({},e),{},{default:(0,re.applyFilters)(r,e)})}return(0,x.default)(e.default)&&!(0,B.default)(e.default)?Ze(Ze({},e),{},{conditionalDefaults:e.default,default:n&&!(0,B.default)((0,E.default)(t,e.name))?(0,E.default)(t,e.name):te.default.getConditionalDefault(e.default,t,!1,n)}):Ze({},e)}},{key:"isGlobalModuleOpened",value:function(e){if(this.props.isGlobalPresetsMode)return!1;var t=this._getModule(),n=(0,L.default)(["et_pb_section","et_pb_row","et_pb_row_inner"],(0,E.default)(t,"props.type",""))?(0,E.default)(t,"props.type",""):"et_pb_module";if(se.default.isLibraryPostType()&&"global"===ETBuilderBackend.layoutScope){if(e){var r="et_pb_".concat(ETBuilderBackend.layoutType);return!(0,E.default)(t,"isModuleItem")&&r===n}return!0}var o=this.getModuleAttrs(),a=(0,E.default)(o,"global_parent",""),i=(0,E.default)(o,"global_module",""),l=(0,E.default)(t,"props.address").split(".");if(!e&&l.length>1){var u=!1,s=te.default.getModuleAddressSequence(l);return(0,F.default)(s,(function(e){var t=(0,z.default)(se.default.getSectionsFlattened(),{address:e});if(""!==(0,E.default)(t,"attrs.global_module",""))return u=!0,!1})),u}return!e&&""!==a&&"et_pb_section"!==n||(""!==i||!(0,N.default)(t.props.libraryModuleScope)&&"global"===t.props.libraryModuleScope)}},{key:"getGlobalTabClass",value:function(){if(this.isGlobalModuleOpened())return"et-fb-tabs__item__global"}},{key:"getGlobalModalClass",value:function(e){var t=(0,N.default)(e)?"":e;if(this.isGlobalModuleOpened())return"".concat(t,"__global")}},{key:"isGlobalOptionSynced",value:function(e){if(!this.isGlobalModuleOpened())return!0;var t=(0,E.default)(this.props.module,"props.unsyncedGlobalSettings",[]);return!(0,L.default)(t,e)}},{key:"isSelectiveSyncAvailable",value:function(e){return!(0,E.default)(e,"hide_sync",!1)&&(this.isGlobalModuleOpened(!0)&&!(0,L.default)(["et_pb_section","et_pb_row","et_pb_row_inner"],this.props.module.props.type))}},{key:"_onFilterInput",value:function(e){ue.default.setOptionsFilter({filterOptions:e,filterSelected:this.state.filterSelected}),this.setState({filterOptions:e,filterNotice:!1})}},{key:"_onFilterSelect",value:function(e){ue.default.setOptionsFilter({filterOptions:this.state.filterOptions,filterSelected:e}),this.setState({filterSelected:e,filterNotice:!1})}},{key:"_onFilterChanged",value:function(e){this.setState({filterSelected:e,filterNotice:!1})}},{key:"_onGoToOption",value:function(t){var n=this;if(!(0,B.default)(t)){(0,P.default)(t.elementId,"transform_")&&(t.elementId="transform_styles");var r=this.props.module,o=[{slug:"general",toggleGroupId:"general"},{slug:"advanced",toggleGroupId:"design"},{slug:"css",toggleGroupId:"css"}],a=this.getCustomTabsList();a&&(0,F.default)(a,(function(e,t){o.push({slug:t,toggleGroupId:t})}));var i={};(0,F.default)(o,(function(e,o){var a=n._getNonEmptyToggles(r.props.type,"".concat(e.slug,".toggles"),e.slug).toggles;if("option"===(0,E.default)(t,"type")){var l=n._getOptionsFields(e.slug);if((0,F.default)(l,(function(n,r){var a=(0,N.default)(n.name)?r:n.name;((0,x.default)(t.elementId)&&(0,L.default)(t.elementId,a)||(0,M.default)(t.elementId)&&t.elementId===a)&&(i={tabSlug:e.slug,toggleGroupId:e.toggleGroupId,keyCompare:a,fieldData:n,tabSelectedIndex:o})})),!(0,B.default)(i)){var u=0;(0,F.default)(a,(function(e,t){u++,t===i.fieldData.toggle_slug&&(i.toggleId=t,i.toggleOrder=u)}))}}else if(e.toggleGroupId===(0,E.default)(t,"payload.toggleGroupId")){i={tabSlug:e.slug,toggleGroupId:e.toggleGroupId,tabSelectedIndex:o};var s=0;(0,F.default)(a,(function(e,n){s++,n===(0,E.default)(t,"payload.toggleId")&&(i.toggleId=n,i.toggleOrder=s)}))}})),(0,B.default)(i)||(0,N.default)(i.toggleId)||(0,N.default)(i.toggleOrder)?this.setState({filterOptions:"",filterSelected:void 0,filterNotice:!1}):(this.setState({tabSelectedIndex:i.tabSelectedIndex,filterOptions:"",filterSelected:void 0,filterNotice:!1}),clearTimeout(this.goToOptionTimer),this.goToOptionTimer=setTimeout((function(){e((0,X.findDOMNode)(n)).find(".et-fb-tabs__item").each((function(t,n){t===i.tabSelectedIndex&&e(n).trigger("click")})),n._onClickToggle(i.toggleId,i.toggleOrder,i.toggleGroupId,!0)}),100))}}},{key:"_getNonEmptyToggles",value:function(e,t,n){var r="css.toggles"===t?"custom_css.toggles":t,o="".concat(r,"_").concat(n,"_toggles"),a=(0,E.default)(this.props,"module.props.address"),i=se.default.isMultiItemSelected(a),l=se.default.getMultiSelectElementsType();if(this.cache.has(e,o)&&!i)return this.cache.get(e,o);var u={};if(i){if(this.cache.hasElements(l,o))return this.cache.getElements(l,o);u=Ee.default.generateSelectedToggles(r)}var s=(0,B.default)(u)?(0,C.default)({unclassified:{title:"",priority:10}},(0,E.default)(ce.default.getOptionsToggles(e),r,{})):u,c=this._getOptionsFields(n),d=(this.getBackgroundFieldsNames(),{}),f={};(0,F.default)(c,(function(e){var t=e.toggle_slug,n=e.name,r=e.depends_on,o=e.show_if,a=e.show_if_not,i=e.type;(0,L.default)(["skip","computed"],i)||(0,N.default)(n)||(t=(0,N.default)(t)?"unclassified":t,(0,_.default)(d,t,!0),r||o||a||(0,_.default)(f,t,!0))}));var p={toggles:(0,v.default)(s,(function(e,t){return(0,W.default)(d,t)})),safe:f};return i?this.cache.setElements(l,o,p):this.cache.set(e,o,p),p}},{key:"_isFieldValueModified",value:function(e,t,n,r){var o=this,a=!1,i=(0,N.default)(e.name)?void 0:t[e.name],u=e.default;if((0,N.default)(i)&&"content"===e.name&&!(0,N.default)(this.props.module.props.content)&&(i=(0,E.default)(this,"props.module.props.content")),!(0,N.default)(e.default_from)){var s=e.default_from.split(".").pop();!s||(0,N.default)(r[s])||(0,N.default)(r[s].default)||(u=r[s].default)}if(!(0,N.default)(e.name)&&((0,l.default)(e.name,"_tablet")||(0,l.default)(e.name,"_phone"))){var c=oe.default.getFieldBaseName(e.name),d=e.name.replace(c,"");if((0,W.default)(r,c)){var p=r[c];(0,W.default)(p,"default".concat(d))&&(u=p["default".concat(d)])}}switch(!(0,B.default)(i)&&(0,M.default)(i)&&(i=i.toLowerCase()),!(0,B.default)(u)&&(0,M.default)(u)&&(u=u.toLowerCase()),e.type){case"font":a=!(0,B.default)(i)&&"||||||||"!==i&&i!==u;break;case"custom_padding":case"custom_margin":a=!(0,B.default)(i)&&i!==u;break;case"border-radius":a=!(0,B.default)(i)&&"||||"!==i&&"on||||"!==i&&i!==u;break;case"multiple_checkboxes":a=!((0,B.default)(i)||(0,M.default)(i)&&-1===i.indexOf("on"))&&i!==u;break;case"tiny_mce":a=!((0,B.default)(i)||(0,M.default)(i)&&!i.replace(/(?:<br ?\/?>|\n)/g,"").length)&&i!==u;break;case"range":var h=e.default_unit;if(!(0,N.default)(e.default_from)){var m=e.default_from.split(".").pop();(0,N.default)(r[m])||(0,N.default)(r[m].default_unit)||(h=r[m].default_unit)}(0,x.default)(u)&&(u=u[1][t[u[0]]]),h&&(i&&-1===i.indexOf(h)&&(i="".concat(i).concat(h)),u&&-1===u.indexOf(h)&&(u="".concat(u).concat(h))),a=!(0,B.default)(i)&&i!==u;break;case"color-alpha":a=!(0,B.default)(i)&&u!==i;break;case"yes_no_button":a=!(0,B.default)(i)&&"off"!==i&&u!==i;break;case"select":a=!(!te.default.hasValue(i)||(0,j.default)(e.options)&&!(0,B.default)(e.options)&&Object.keys(e.options)[0]===i)&&u!==i;break;case"composite":(0,N.default)(e.composite_structure)||(0,F.default)(e.composite_structure,(function(e){(0,N.default)(e.controls)||(0,F.default)(e.controls,(function(i,l){var u=Ze(Ze({},i),{},{name:l}),s=Ze(Ze({},r),e.controls);!o._isFieldDependencyExcluded(u,s)&&o._isFieldValueModified(u,t,n,s)&&(a=!0)}))}));break;case"background":if(!(a=(!(0,M.default)(i)||!(0,B.default)(i))&&u!==i)&&!(0,B.default)(e.backgroundFields)){var y=e.name.split("_").slice(-1).pop();y&&(0,F.default)(["background_color_%s","use_background_color_gradient_%s","bg_img_%s","background_video_mp4_%s","background_video_webm_%s"],(function(e){var n=e.replace("%s",y);(0,B.default)(t[n])||"off"===t[n]||(a=!0)}))}break;default:a=!(!(0,A.default)(i)&&!(0,f.default)(i)&&(0,B.default)(i))&&u!==i}if(!a&&this._isOptionMatchesStylesResponsive(e,t)){var g=Ze(Ze({},e),{},{name:"".concat(e.name,"_tablet"),default:(0,W.default)(e,"default_tablet")?e.default_tablet:u,mobile_options:void 0});if(this._isFieldValueModified(g,t,n,r)&&(a=!0),!a){var b=Ze(Ze({},e),{},{name:"".concat(e.name,"_phone"),default:(0,W.default)(e,"default_phone")?e.default_tablet:g.default,mobile_options:void 0});this._isFieldValueModified(b,t,n,r)&&(a=!0)}}return a}},{key:"_isOptionMatchesStylesModified",value:function(e,t,n,r){var o=this;if("general"===n&&!(0,N.default)(e.toggle_slug)&&"background"!==e.toggle_slug)return!1;if(!(0,L.default)(["general","advanced","css"],n)&&(0,L.default)(["text","textarea","tiny_mce","date_picker"],e.type))return!1;var a=this._isFieldValueModified(e,t,n,r);return a||"background_color"!==e.name||(0,F.default)(dt,(function(e){(0,N.default)(r[e])||o._isFieldValueModified(r[e],t,n,r)&&(a=!0)})),a}},{key:"_isOptionMatchesStylesResponsive",value:function(e,t){if((0,N.default)(e.mobile_options))return!1;var n=t["".concat(e.name,"_last_edited")],r=(0,N.default)(n)?["off","desktop"]:n.split("|");return!(0,N.default)(r[0])&&"on"===r[0]}},{key:"_isOptionMatchesStylesHover",value:function(e,t){var n="background_color"===e.name?"background":e.name;return ne.default.isEnabled(n,t)}},{key:"_isOptionMatchesStylesSticky",value:function(e,t){var n="background_color"===e.name?"background":e.name;return ae.default.isEnabled(n,t)}},{key:"_isOptionMatchesActiveContent",value:function(e,t,n,r){return!("general"===n&&!(0,N.default)(e.toggle_slug)&&"background"===e.toggle_slug)&&(!(0,L.default)(["advanced","css"],n)&&(!(!(0,L.default)(["general","advanced","css"],n)&&!(0,L.default)(["text","textarea","tiny_mce","date_picker"],e.type))&&this._isFieldValueModified(e,t,n,r)))}},{key:"_isFieldDependencyExcluded",value:function(e,t){return!(0,N.default)(e.depends_on)&&!this._isVisible(e,t)||!((0,N.default)(e.show_if)&&(0,N.default)(e.show_if_not)||(0,ee.canShowField)(e,this.setting_resolver))}},{key:"_getFilteredFields",value:function(e){var t=this,n=this._getOptionsFields(e),r=this.state.filterOptions,o=this.state.filterSelected;if(!this._isFilterActive())return n;var a=this.props.module.props.type,i="".concat(e,"_filter");if(this.cache.has(a,i)){var l=this.cache.get(a,i);if(l.search===r&&l.filterSelected===o)return l.filtered}var u=this.getModuleAttrs(),s=(0,E.default)(this,"props.module.props.content"),c={};(0,F.default)(n,(function(e){var t=e.type,n=e.name,r=e.is_fb_content;if("codemirror"===t||n&&0===n.indexOf("custom_css_")){var o=r?s:u[n];o&&(c[n]=o)}}));var d=(0,v.default)(n,(function(e){var n=e.type,r=e.label,o=e.description,a=e.name;return"composite"===n||t._isOptionMatchesFilter(r,o,c[a])}));return te.default.hasValue(o)?(d=this._isOptionMatchesFilterSelected(d,e),this.cache.set(a,i,{search:r,filterSelected:o,filtered:d}),d):(this.cache.set(a,i,{search:r,filterSelected:o,filtered:d}),d)}},{key:"_getFilteredToggleFields",value:function(e,t,n){var r=this.state.filterOptions,o=this.state.filterSelected;if(!this._isFilterActive())return t;var a=this.props.module.props.type,i="".concat(n,"_").concat(e,"_filter_toggle");if(this.cache.has(a,i)){var l=this.cache.get(a,i);if(l.search===r&&l.filterSelected===o)return l.filtered}return this._isOptionMatchesFilter(e)&&(t=this._getOptionsFields(n)),te.default.hasValue(o)?(t=this._isOptionMatchesFilterSelected(t,n),this.cache.set(a,i,{search:r,filterSelected:o,filtered:t}),t):(this.cache.set(a,i,{search:r,filterSelected:o,filtered:t}),t)}},{key:"_isOptionMatchesFilterSelected",value:function(e,t){var n=this,r=this._getOptionsFields(t),o=this.getModuleAttrs();return(0,v.default)(e,(function(e){if(n._isFieldDependencyExcluded(e,r))return!1;switch(n.state.filterSelected){case"styles_modified":return n._isOptionMatchesStylesModified(e,o,t,r);case"styles_responsive":return n._isOptionMatchesStylesResponsive(e,o);case"styles_hover":return n._isOptionMatchesStylesHover(e,o);case"styles_sticky":return n._isOptionMatchesStylesSticky(e,o);case"active_content":return n._isOptionMatchesActiveContent(e,o,t,r);default:return!1}}))}},{key:"_isOptionMatchesFilter",value:function(){for(var e=this.state.filterOptions.toLowerCase(),t=!1,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(0,F.default)(r,(function(n){return(0,N.default)(n)||-1===n.toLowerCase().indexOf(e)||(t=!0),!t})),t}},{key:"_getOptionsFields",value:function(e){var t=this,n=this._getModule(),r=n.props.type,o=this.getModuleAttrs(),a=this.props.isGlobalPresetsMode,i=se.default.isMultiItemSelected(n.props.address);if(this.cache.has(r,e)&&!i)return this.cache.get(r,e);var l=this,u=(0,C.default)({},this.state["".concat(e,"Fields")]),s=se.default.getMultiSelectElementsName(),c=se.default.getMultiSelectElementsType();if(i){if(this.cache.hasElements(c,e))return this.cache.getElements(c,e);var d={};(0,F.default)(s,(function(n){var r={},a={props:{type:n,attrs:o}};"general"===e?r=t.getComponentFields(a):"advanced"===e?r=t.getComponentAdvancedFields(a):"css"===e&&(r=t.getComponentCSSFields(a)),d=Ee.default.generateSelectedFieldsItem(d,r)})),u=(0,B.default)(d)?u:d}if(te.default.isOn(o.specialty)&&"et_pb_section"===r&&!a&&function(){for(var r=(0,W.default)(n.props,"children")&&!(0,B.default)(n.props.children)?n.props.children:n.props.content,o=r.length,a=function(n){var a=se.default.getColumnSettingFields(e),i={},s={};(0,F.default)(a,(function(e,t){var a=t.replace("%s",n),c={label:(0,E.default)(e,"label","").replace("%s",1!==o?n:""),name:a,sub_toggle:(0,E.default)(e,"sub_toggle","").replace("%s",n),isColumnField:!0,columnIndex:n-1,columnType:r[n-1].type};(0,N.default)(e.show_if)||(0,B.default)(e.show_if)||(c.show_if=(0,G.default)(e.show_if,(function(e,t){return t.replace("%s",n)}))),(0,N.default)(e.show_if_not)||(0,B.default)(e.show_if_not)||(c.show_if_not=(0,G.default)(e.show_if_not,(function(e,t){return t.replace("%s",n)}))),(0,N.default)(e.affects)||(0,B.default)(e.affects)||(c.affects=(0,H.default)(e.affects,(function(e){return e.replace("%s",n)}))),(0,x.default)(e.presets)&&(c.presets=e.presets.map((function(e){return Ze(Ze({},e),{},{fields:e.fields||{}})})).map((function(e){return Ze(Ze({},e),{},{fields:(0,S.default)(e.fields).map((function(t){return at({},t.replace("%s",n),e.fields[t])}))})})).map((function(e){return Ze(Ze({},e),{},{fields:e.fields.reduce((function(e,t){return Ze(Ze({},e),t)}),{})})}))),(0,N.default)(e.depends_on)||(0,B.default)(e.depends_on)||(c.depends_on=(0,H.default)(e.depends_on,(function(e){return e.replace("%s",n)})));var d=(0,C.default)(te.default.intentionallyClone(e),c);"background_color_%s"===t&&(i=te.default.intentionallyClone(d)),(0,L.default)(l.getColumnBackgroundFieldsNames(),t)?s[a]=d:u[a]=d})),"general"!==e||(0,B.default)(a)||(i.label=ETBuilderBackend.i18n.modules.column.backgroundColor.replace("%s",n),i.type="background",i.backgroundFields=s,i.isColumnBackground=!0,i.columnIndex=n,i._onChange=t._onChange,i.onMouseEnterGroup=t._onMouseEnterGroup,i.onMouseLeaveGroup=t._onMouseLeaveGroup,i.isDescriptionVisible=t._isDescriptionVisible,i.isHoveredGroup=t._isHoveredGroup,i.onClickHelp=t._onClickHelp,i.isResetActive=l._isResetActive,i.onClickReset=l._onClickReset,u["background_color_".concat(n)]=i)},i=1;i<=o;i++)a(i)}(),"css"===e){var f=["before","main_element","after"];(0,F.default)(u,(function(e,t){var n=te.default.intentionallyClone(e),r=!0;(0,F.default)(["module_id","module_class"],(function(e){(0,P.default)(t,e)&&(r=!1)})),r&&(0,N.default)(e.selector)&&(n.selector=""),(0,N.default)(e.isColumnField)&&((0,L.default)(["module_id","module_class"],t)||!(0,N.default)(e.type)?n.name=t:n.name=!(0,N.default)(e.selector)||(0,N.default)(e.name)||(0,L.default)(f,t)?"custom_css_".concat(t):t),u[t]=n}))}return i?this.cache.setElements(c,e,u):this.cache.set(r,e,u),u}},{key:"_getAllOptionsFields",value:function(){var e=this.props.module.props.type;if(this.cache.has(e,"all"))return this.cache.get(e,"all");var t=this._getOptionsFields("general"),n=this._getOptionsFields("advanced"),r=this._getOptionsFields("css"),o=this.getCustomTabsFields(e),a=(0,O.default)({},t,n,r);return o&&(0,F.default)(o,(function(e){a=(0,O.default)(a,e)})),this.cache.set(e,"all",a),a}},{key:"getBackgroundEnableFieldsNames",value:function(){return ce.default.getBackgroundEnableFieldsNames()}},{key:"getBackgroundFieldsNames",value:function(){return ce.default.getBackgroundFieldsNames()}},{key:"getColumnBackgroundFieldsNames",value:function(){return(0,S.default)(ETBuilderBackend.columnSettingFields.general)}},{key:"getModuleFields",value:function(){return Ze(Ze({},this.state.generalFields),this.state.advancedFields)}},{key:"isGlobalRow",value:function(){var e=(0,E.default)(this,"module_type","");return!!(0,L.default)(["et_pb_row","et_pb_row_inner"],e)&&(""!==(0,E.default)(this,"props.module.props.attrs.global_module","")||se.default.isEditingLibraryItem("row"))}},{key:"_renderModuleItems",value:function(){var e=this;if(this._isFilterActive())return!1;var t=(0,L.default)(["2_3,1_3","1_3,2_3"],(0,E.default)(this,"props.module.props.specialty_layout",""))||"2_3"===(0,E.default)(this,"props.module.props.content.[0].attrs.saved_specialty_column_type","")?4:3,n=(0,E.default)(this,"module_type",""),r=(0,E.default)(this,"props.module.props.content.length",0),o=this.isGlobalRow(),a="et_pb_row"===n&&6===r||"et_pb_row_inner"===n&&t===r,i=(0,L.default)(["et_pb_row","et_pb_row_inner"],n)&&1===r,l="";this._hasModuleItem()&&(0,x.default)(this.props.module.props.content)&&!(0,B.default)(this.props.module.props.content)&&(l=$.default.createElement(ve.default,{module:this.props.module,_v:this.props.module.props._v,setHoveredElement:this._setHoveredElement,disableDuplicate:a||o,disableDelete:i||o,onToggleRightMenu:this._onToggleRightMenu,isGlobalPresetsMode:this.props.isGlobalPresetsMode}));var u="";if(this._hasModuleItem()){var s=!1;if(this.isSelectiveSyncAvailable()){var c=this.isGlobalOptionSynced("et_pb_content_field")?"#97D000":"#EF5555";s=$.default.createElement("div",{className:"et-fb-form__global-sync",onClick:this._unsyncGlobalContent},$.default.createElement(pe.default,{icon:"sync",color:c}))}var d=!!se.default.getModuleItemDragEndWaiting()&&$.default.createElement("div",{className:"et-fb-settings-module-items--waiting"}),f=ETBuilderBackend.i18n,p=(0,E.default)(f,"modules.".concat(this.props.module.props.type,".addNew"))||f.controls.moduleItem.addNew,h=a||o||this.props.isGlobalPresetsMode?null:$.default.createElement("span",{className:"et-fb-item-button-wrap--add"},$.default.createElement(J.Motion,{defaultStyle:{size:.5,opacity:0},style:{size:this.props.options.animate?(0,J.spring)(1,{stiffness:300,damping:20}):1,opacity:this.props.options.animate?(0,J.spring)(1,{stiffness:300,damping:20}):1}},(function(t){return $.default.createElement(he.default,{buttonName:ie.default.MODULE_ITEM_ADD,editingModule:e,style:{opacity:t.opacity,transform:"scale( ".concat(t.size," )")},title:p})})));u=this._isModuleItemSettings()?"":$.default.createElement("div",{className:"et-fb-settings-module-items-wrap"},l,s,h,d)}return u}},{key:"renderToggleFields",value:function(e,t){return!!se.default.isProductTourActive()||(!!this.builder_display_modal_settings||(!!this._isFilterActive()||this._isToggleOpened(e,t)))}},{key:"_isValidProductTourToggle",value:function(e,t){return!("et_pb_row"===(0,E.default)(this.props,"module.props.type")&&!(0,B.default)(t.background)&&"background"!==e)}},{key:"_maybeRenderHelpButton",value:function(e){var t=this.props.module,n=e||t.props.type;if((0,N.default)(ETBuilderBackend.i18n.videos[n]))return!1;if(this.state.filterNotice)return!1;var r=this.props.address,o=se.default.isMultiItemSelected(r),a=1===se.default.getMultiSelectElementsName().length;return o&&!a&&(n="et_pb_default"),$.default.createElement(de.default,{videoListId:n})}},{key:"_renderCustomCSSTabs",value:function(){var e=this,t=ETBuilderBackend.i18n;return $.default.createElement("div",{className:"et-fb-form__group et-fb-form__custom-css-tabs"},$.default.createElement(Ue.default,{_onTabChange:function(t){return e._setActiveCustomCSSTab(t)},activeTab:this.state.activeCustomCSSTabIndex},$.default.createElement(Ge.default,{key:"freeFormCSS",label:t.controls.tabs.freeFormCSS,tabName:"freeFormCSS",handleTabHover:function(){}},$.default.createElement("p",null,t.modals.freeFormCSS.part1,$.default.createElement("code",null,"selector"),t.modals.freeFormCSS.part2,$.default.createElement("code",null,"selector h1 {color: red;}"))),$.default.createElement(Ge.default,{key:"moduleElements",label:t.controls.tabs.moduleElements,tabName:"moduleElements",handleTabHover:a.default},$.default.createElement("p",null,t.modals.moduleElements.part1,$.default.createElement("code",null,"color: red;"),t.modals.moduleElements.part2,$.default.createElement("code",null,"h1 {color: red;}")))))}},{key:"_renderTabToggles",value:function(e){var t=this,n=e.module,r=e.tabSlug,o=e.productTourTab,a=e.processedTabSlug,i=e.canShowModuleItems,l=e.moduleItemsToggle,u=e.moduleItemsLocation,s=e.moduleItems,c=e.moduleType,d=e.isItemSelected,f=e.moduleParentName,p=e.activeTabMode,h=e.thisClass,m=e.isRow,y=e.allOptionsFields,g=e.moduleName,b=this._getNonEmptyToggles(n.props.type,"".concat(r,".toggles"),r),v=b.safe,O=b.toggles,P=(0,E.default)(this._getModule(),"props.is_official_module"),T=this.getModuleAttrs(),x=this._isFilterActive(),V=0,G=r!==o,z=(0,xe.getModalPreferredDimensions)().width,q=(0,E.default)(this.state.toggleTabs,a,{}),K=this.getModuleFields(),Y=(0,S.default)(K).reduce((function(e,t){return e||!!t.match(/background_color(_[0-9])?$/)}),!1),X=se.default.getActiveQuickAccess().clickedToggle,J=X.toggleId,Z=X.toggleSubId,re=[],ie=this._getFilteredFields(r),le=(0,E.default)(this._getModule(),"parentModule.props.attrs"),ue=[],ce=te.default.isTB(),de=(0,E.default)(ETBuilderBackend,"postId"),fe="general"===a,pe="et_pb_wc_checkout_payment_info"===c,he=(0,L.default)(["et_pb_wc_checkout_billing","et_pb_wc_checkout_payment_info","et_pb_wc_checkout_shipping"],c),me="undefined"!=typeof wc_checkout_params&&"1"===(0,E.default)(wc_checkout_params,"is_checkout",!1)||ce&&Ve.default.getTBCheckoutTemplatePageId()===parseInt(de),ye=Ve.default.getCheckoutPaymentInfoNotice(),ve=Ve.default.getNonCheckoutPageNotice(),we=me?ye:ve,Ce=me?fe&&pe&&Ve.default.isDisplayCheckoutPaymentInfoNotice()&&!ce:fe&&he&&!ce,De="et_pb_wc_cart_notice"===this.module_type,Ne="advanced"===r,Le="cart"===(0,E.default)(T,"page_type",""),Re="product"===(0,E.default)(T,"page_type","");return(0,H.default)(O,(function(e,o){if((P||!t.props.isGlobalPresetsMode||"general"!==r||"background"===o)&&!(De&&Ne&&(0,L.default)(["field_label","form","form_field"],o)&&(Le||Re))){V++;var b=(0,j.default)(e)?e.title:e,X=(0,j.default)(e)?e.sub_toggles:{},ce=!(0,B.default)(X)&&(0,E.default)(e,"tabbed_subtoggles",!1),de=t._getFilteredToggleFields(b,ie,r),fe=(0,W.default)(v,o)&&"unclassified"!==o,pe=(0,E.default)(e,"always_open",!1),he=!fe||t.renderToggleFields(o,a)||pe,me=t._isToggleOpened(o,a)||!G&&t._isValidProductTourToggle(o,O)||t.productTourOptionToggle===o||pe,ye=(0,k.default)(O)===V;te.default.hasValue(b)||"unclassified"!==o||(b=g);var ve=J===o?Z:0,xe=!!X&&(0,S.default)(X)[0],Ae={},Ie=t.state.activeCustomCSSTab,Fe="custom_css"===o,We="moduleElements"===Ie,Ve="freeFormCSS"===Ie;1===V&&Ce&&ue.push($.default.createElement("div",{className:"et-fb-form__notice",style:{padding:"10px 0",color:"#F09649",lineHeight:1.5,fontWeight:"600"},dangerouslySetInnerHTML:{__html:we},key:"".concat(c,"-notice")})),ue.push($.default.createElement(ge.ETBuilderFormToggle,{fields:de,key:o,title:b,nonDefaultOptions:Ae,toggleId:o,toggleGroupId:a,toggleSubId:ve,_onClickToggle:t._onClickToggle,_onSwitchTab:t._onSwitchTab,setHoveredToggleElement:t._setHoveredToggleElement,setHoveredSubToggleElement:t._setHoveredSubToggleElement,isToggleOpened:me,toggleOrder:V,isLastToggle:ye,isFilterActive:x,isGroupActive:!t.builder_display_modal_settings,isModuleItemSettings:t._isModuleItemSettings(),showEmpty:fe,subToggles:X,tabbedSubtoggles:ce,setHoveredElement:function(e,n){if(e){var r=n.props.toggleId,o=Se.default.getHelper(e);if(o){var a=o.preparePayload(n,t.props.module);t._setHoveredElement(e,r,a)}}},alwaysVisible:pe,onToggleRightMenu:t._onToggleRightMenu},i&&o===l&&"top"===u&&s,Fe?t._renderCustomCSSTabs():null,!!he&&(0,H.default)(de,(function(e,u){var c=e,b=(0,E.default)(c,"toggle_slug","unclassified"),v=(0,N.default)(c.type)&&"css"===r?"codemirror":c.type;if(b!==o||(0,N.default)(v))return!1;if(!(0,N.default)(c.specialty_only)&&"yes"===c.specialty_only&&((0,N.default)(T.specialty)||"on"!==T.specialty))return!1;if("required_mark"===c.name&&"et_pb_signup"===f&&"getresponse"===(0,E.default)(n,"parentModule.props.attrs.provider"))return!1;"sortable_list"===(c="composite"===e.type?te.default.intentionallyCloneDeep(e):te.default.intentionallyClone(e)).type&&(c.useAddNewButton=!0);var S="et_pb_counter"===t.props.module.props.type&&"content"===c.name,P=(0,Q.default)("et-fb-settings-options","et-fb-option--".concat(v.replace("_","-"))),j="",V="",H="",X=T.content||(d?Ee.default.generateSelectedContent(n.props.content,t.updatedAttrs):n.props.content);X=X||"";var J,Z={},ie={},ue=f?"".concat(u,"_child"):u,de="",fe=(0,E.default)(c,"default",""),pe=Fe&&We&&"custom_css_free_form"===c.name,he=Fe&&Ve&&"custom_css_free_form"!==c.name;if(pe||he)return!1;if(Fe&&Ve&&(ie.inline=!1),"categories"===v&&(c.categories_list={},c.taxonomy_name=(0,N.default)(c.taxonomy_name)?"category":c.taxonomy_name),"select_sidebar"===v&&(c.sidebars_list={}),"text"===v&&(0,L.default)(["et_pb_signup","et_pb_contact_form"],n.props.type)&&(0,L.default)(c.option_class,"--last-field")&&(v="text_api_key"),"background_color"===c.name)c.backgroundFields={},c.onMouseEnterGroup=h._onMouseEnterGroup,c.onMouseLeaveGroup=h._onMouseLeaveGroup,c.isDescriptionVisible=h._isDescriptionVisible,c.isHoveredGroup=h._isHoveredGroup,c.onClickHelp=h._onClickHelp,(0,F.default)(dt,(function(e){var t=(0,E.default)(K,e,!1);t&&(c.backgroundFields[e]=Ze({},t),c.backgroundFields[e]._unsyncGlobalSetting=h._unsyncGlobalSetting,c.backgroundFields[e].isGlobalOptionSynced=h.isGlobalOptionSynced(e),c.backgroundFields[e].isSelectiveSyncAvailable=h.isSelectiveSyncAvailable(),c.backgroundFields[e].isGlobalOptionSynced=h.isGlobalOptionSynced(e))})),c.isResetActive=h._isResetActive,c.onClickReset=h._onClickReset,(0,k.default)(c.backgroundFields)>1&&(c.name="background",c.label=ETBuilderBackend.i18n.modules.background.label,c.type="background",v="background",c._onChange=h._onChange,c._unsyncGlobalSetting=h._unsyncGlobalSetting,c.description=ETBuilderBackend.i18n.modules.background.description,(0,N.default)(c.is_toggleable)&&delete c.depends_on,delete c.additional_code,delete c.depends_show_if);else if(Y&&(0,L.default)(dt,ne.default.getFieldBaseName((0,E.default)(c,"name",""))))return!1;("background-field"===c.type&&(c.onMouseEnterGroup=h._onMouseEnterGroup,c.onMouseLeaveGroup=h._onMouseLeaveGroup,c.isDescriptionVisible=h._isDescriptionVisible,c.isHoveredGroup=h._isHoveredGroup,c.onClickHelp=h._onClickHelp,c.background_fields=(0,U.default)(c.background_fields,(function(e,t){var n=Ke({},e);return n._unsyncGlobalSetting=h._unsyncGlobalSetting,n.isGlobalOptionSynced=h.isGlobalOptionSynced(t),n.isSelectiveSyncAvailable=h.isSelectiveSyncAvailable(),n.isGlobalOptionSynced=h.isGlobalOptionSynced(t),n})),c.isResetActive=h._isResetActive,c.onClickReset=h._onClickReset),f&&gt(c))&&(c=bt(c,n,"general"===r?"":r,!t.props.isGlobalPresetsMode));var me=t._getModule(),ye=!1!==(0,E.default)(c,"depends_on[0]",!1)&&(0,E.default)(c,"depends_on[0]",!1),ve=c.name||"",we=c.name||"",Se="tabs"===(0,E.default)(c,"hover",!1),Ce=!1!==(0,E.default)(c,"hover",!1)||void 0,De=ne.default.isHoverMode(),Ne=De&&Se&&ne.default.isEnabled(c.name,T);De&&ne.default.doesSupport(c)&&(ne.default.isEnabled(c.name,T)||ne.default.isEnabled(ye,T))&&(ve=ne.default.getHoverField(c.name||""),we=ne.default.getFieldBaseName(ve));var Le=ae.default.isStickyMode(),Re=ae.default.doesSupport(c)&&ae.default.hasStickyOptions((0,E.default)(me,"props",{})),Ue=Le&&Re&&(ae.default.isEnabled(c.name,T)||ae.default.isEnabled(ye,T));Ue&&(ve=ae.default.getStickyField(c.name||""),we=ae.default.getFieldBaseName(ve));var Ge=c.mobile_options;if(Fe&&Ve&&(Ce=!1,Re=!1,Ge=!1),"custom_padding"===v&&t._hasColumnsFields()&&"custom_padding"!==we){var He="";De?He=ne.default.hoverSuffix():Le&&(He=ae.default.stickySuffix());var ze=c.name.replace("padding_",""),qe=te.default.hasValue(T["padding_".concat(ze,"_last_edited")])?T["padding_".concat(ze,"_last_edited")].split("|"):[],$e=((0,E.default)(T,"padding_top_".concat(ze).concat(He),"")||"").trim(),Ye=((0,E.default)(T,"padding_right_".concat(ze).concat(He),"")||"").trim(),Xe=((0,E.default)(T,"padding_bottom_".concat(ze).concat(He),"")||"").trim(),Je=((0,E.default)(T,"padding_left_".concat(ze).concat(He),"")||"").trim(),Qe=((0,E.default)(T,"padding_top_bottom_link_".concat(ze).concat(He),"")||"").trim(),et=((0,E.default)(T,"padding_left_right_link_".concat(ze).concat(He),"")||"").trim(),tt="".concat($e,"|").concat(Ye,"|").concat(Xe,"|").concat(Je,"|").concat(Qe,"|").concat(et),nt=t.state.advancedFields,rt=(0,E.default)(nt,"padding_top_".concat(ze).concat(He,".default"),"").trim(),ot=(0,E.default)(nt,"padding_right_".concat(ze).concat(He,".default"),"").trim(),at=(0,E.default)(nt,"padding_bottom_".concat(ze).concat(He,".default"),"").trim(),it=(0,E.default)(nt,"padding_left_".concat(ze).concat(He,".default"),"").trim(),lt=(0,E.default)(nt,"padding_top_bottom_link_".concat(ze).concat(He,".default"),"").trim(),ut=(0,E.default)(nt,"padding_left_right_link_".concat(ze).concat(He,".default"),"").trim(),st="".concat(rt,"|").concat(ot,"|").concat(at,"|").concat(it,"|").concat(lt,"|").concat(ut);if(c.default=st,j={desktop:tt,tablet:(0,E.default)(T,"padding_".concat(ze,"_tablet"),""),phone:(0,E.default)(T,"padding_".concat(ze,"_phone"),""),isResponsive:!(0,N.default)(qe[0])&&"on"===qe[0],activeTab:(0,N.default)(qe[1])?"desktop":qe[1]},De||Le){var ct=(0,E.default)(T,"padding_top_".concat(ze),"").trim(),ft=(0,E.default)(T,"padding_right_".concat(ze),"").trim(),pt=(0,E.default)(T,"padding_bottom_".concat(ze),"").trim(),ht=(0,E.default)(T,"padding_left_".concat(ze),"").trim();V="".concat(ct,"|").concat(ft,"|").concat(pt,"|").concat(ht)}de=tt}else if((0,L.default)(["custom_margin","custom_padding"],v)&&c.mobile_options){c=t._handleFieldConditionalDefaults(c,T,c.name!==ve);var mt=T["".concat(c.name,"_last_edited")],yt=(0,N.default)(mt)?["off","desktop"]:mt.split("|"),vt=(0,E.default)(h,"props.module.props.is_module_child",!1)&&((0,W.default)(c,"default_tablet")||(0,W.default)(c,"default_phone")),_t=(0,E.default)(T,ve,""),wt=(0,E.default)(T,c.name,""),Ot=(0,E.default)(T,"".concat(c.name,"_tablet"),""),kt=(0,E.default)(T,"".concat(c.name,"_phone"),"");if(H=se.default.getPreviewMode(),!vt&&(0,E.default)(c,"default_value_depends",!1)){var St=c.default_value_depends,Ct=c.default_values_mapping;Z.getDefaultFrom=(0,E.default)(T,St,!1),wt=te.default.hasValue(T[c.name])&&c.default!==T[c.name]?T[c.name]:(0,E.default)(Ct,Z.getDefaultFrom,c.default),_t=te.default.hasValue(T[ve])&&c.default!==T[ve]?T[ve]:wt}Ot&&!(0,W.default)(c,"default_phone")&&(c.default_phone=Ot),Ot||!(0,W.default)(c,"default_tablet")||(0,W.default)(c,"default_phone")||(c.default_phone=c.default_tablet),_t&&!(0,W.default)(c,"default_tablet")&&(c.default_tablet=_t),_t&&!(0,W.default)(c,"default_phone")&&(c.default_phone=_t),V=wt,j={desktop:_t,tablet:Ot,phone:kt,isResponsive:oe.default.isResponsiveEnabled(T,c.name),activeTab:yt[1]},de=_t||(0,E.default)(c,"default","")}else if(c.mobile_options){c=t._handleFieldConditionalDefaults(c,T,c.name!==ve),H=se.default.getPreviewMode();var Et=oe.default.isResponsiveEnabled(T,c.name),Pt=(0,L.default)(["tablet","phone"],p)&&Et,Tt=Pt?"_".concat(p):"",Mt=S&&!ne.default.isHoverMode()&&ae.default.isStickyMode()?X:(0,E.default)(T,ve,""),jt=S&&!ne.default.isHoverMode()&&ae.default.isStickyMode()?X:(0,E.default)(T,ve,""),xt=(0,E.default)(T,"".concat(c.name,"_tablet"),"");(0,E.default)(T,"".concat(c.name,"_phone"),"");if(!((0,E.default)(h,"props.module.props.is_module_child",!1)&&((0,W.default)(c,"default_tablet")||(0,W.default)(c,"default_phone")))&&(0,E.default)(c,"default_value_depends",!1)){var Dt=(0,E.default)(c,"default_value_depends",""),Nt=(0,E.default)(c,"default_values_mapping",{});Z.getDefaultFrom=(0,E.default)(n.props.attrs,Dt,!1),jt=te.default.hasValue(jt)&&c.default!==jt?jt:(0,E.default)(Nt,Z.getDefaultFrom,c.default),Mt=te.default.hasValue(Mt)&&c.default!==Mt?Mt:jt}xt&&!(0,W.default)(c,"default_phone")&&(c.default_phone=xt),xt||!(0,W.default)(c,"default_tablet")||(0,W.default)(c,"default_phone")||(c.default_phone=c.default_tablet),Mt&&!(0,W.default)(c,"default_tablet")&&(c.default_tablet=Mt),Mt&&!(0,W.default)(c,"default_phone")&&(c.default_phone=Mt),j=Pt?(0,E.default)(T,"".concat(c.name).concat(Tt),""):Mt,V=jt,de=Mt||(0,E.default)(c,"default",""),Pt&&(ie.default=(0,E.default)(c,"default".concat(Tt),(0,E.default)(c,"default","")),c.default=ie.default,ie.name="".concat(c.name).concat(Tt),ie.baseName=c.name,"yes_no_button"===v?(ie.defaultValue=ie.default,c.defaultValue=ie.defaultValue):"background-field"===v&&delete ie.name),c.dynamic_content&&(0,A.default)(j)&&(j="".concat(j))}else if(S)j=(0,N.default)(T.content)?n.props.content:T.content;else if("composite"!==v){c=t._handleFieldConditionalDefaults(c,T,c.name!==ve);var Lt=(0,E.default)(c,"default","");if((0,E.default)(c,"default_from",!1)){var Rt=c.default_from;Lt=(0,E.default)(T,Rt,Lt)}V=(0,E.default)(T,c.name,Lt),j=(0,E.default)(T,ve,Ne||Ue?V:Lt),(0,A.default)(j)&&(j="".concat(j)),(0,A.default)(V)&&(V="".concat(V)),j||(j=""),V||(V=""),de=te.default.hasValue(j)?j:(0,E.default)(c,"default","")}if("font"===v&&(de=(0,N.default)(de)||(0,B.default)((0,w.default)(de.split("|")))?"":de,fe=(0,N.default)(fe)?"":fe),"select_with_option_groups"===v&&!(0,L.default)(["provider","spam"],(0,E.default)(c,"toggle_slug",""))&&te.default.hasValue(j)&&-1!==j.indexOf("|")&&(j=(0,M.default)(j)?j.split("|")[1]:j),"select_with_option_groups"===v&&te.default.hasValue(V)&&-1!==V.indexOf("|")&&(V=(0,M.default)(V)?V.split("|")[1]:V),(0,N.default)(c.depends_default)&&(0,N.default)(c.depends_show_if)&&(0,N.default)(c.depends_show_if_not)||(P=(0,Q.default)("et-fb-option--depends-on",P)),"select_with_option_groups"===v&&c.groups&&(P=(0,Q.default)("et-fb-option--select-with-option-groups",P)),"text"===v&&(J=(0,Q.default)("et-fb-settings-option-input--block",J)),"color-alpha"===v&&"et_pb_section"===(0,E.default)(n,"props.type")&&"background_color"===(0,E.default)(c,"name")&&(c.default=se.default.getPageSetting("et_pb_section_background_color")||se.default.getPageSettingField("et_pb_section_background_color").default),"admin_label"===u&&(c.default=g,c.defaultIfEmpty=!0),(0,N.default)(c.readonly_if)&&(0,N.default)(c.readonly_if_not)||!(0,ee.isReadOnlyField)(c,t.setting_resolver)||(c.readonly=!0,c.useAddNewButton=!1),(0,N.default)(v)||!_e.default.getControl(v))return!1;if("warning"===v&&c.display_if!==c.value)return!1;if(!(0,N.default)(c.depends_on)&&(0,N.default)(c.show_if_not)&&(0,N.default)(c.show_if)&&!t._isVisible(c,y))return re.push(c.name),!1;if(!((0,N.default)(c.show_if)&&(0,N.default)(c.show_if_not)||(0,ee.canShowField)(c,t.setting_resolver)))return re.push(c.name),!1;if(!(0,N.default)(c.depends_on)&&(0,I.default)(c.depends_on,(0,R.default)(c.depends_on,re)))return!1;if("position"===v){var At=(0,E.default)(t.state.cssFields,"positioning.default","none"),It=(0,Be.positionByDevice)(T,At,t.props.activeTabMode);if("none"===It||"position_origin_".concat(It.substr(0,1))!==c.name)return!1}if((0,L.default)(["vertical_offset","horizontal_offset"],c.name)){var Bt=(0,E.default)(t.state.cssFields,"positioning.default","none"),Ft=(0,Be.positionByDevice)(T,Bt,t.props.activeTabMode);if("none"===Ft)return!1;var Wt=(0,Be.originByDevice)(T,Ft,t.props.activeTabMode);if("center"===Wt[1]&&"center"===Wt[0]||"vertical_offset"===c.name&&"center"===Wt[0]||"horizontal_offset"===c.name&&"center"===Wt[1])return!1}if("composite"===v)return ke.default.createControl(c,{uniqueKey:ue,module:h,moduleAttrs:T,_onChange:h._onChange.bind(h),onClickHelp:h._onClickHelp,activeHover:ne.default.isEnabled(we,T),activeSticky:ae.default.isEnabled(we,T),onClickHover:h._onClickHover,onClickReset:h._onClickReset,onClickResponsive:h._onClickResponsive,onClickSticky:h._onClickSticky,hasHoverOptions:Ce,hasStickyOptions:Re,isDescriptionVisible:h._isDescriptionVisible,isHoveredGroup:h._isHoveredGroup,onMouseEnterGroup:h._onMouseEnterGroup,onMouseLeaveGroup:h._onMouseLeaveGroup,isSelectiveSyncAvailable:h.isSelectiveSyncAvailable.bind(h),isGlobalOptionSynced:h.isGlobalOptionSynced.bind(h),_unsyncGlobalSetting:h._unsyncGlobalSetting.bind(h),isResetActive:h._isResetActive,setting_resolver:h.setting_resolver,animate:h.props.options.animate,rightClickOpened:h.props.rightClickOpened,toggleGroupId:a,isSettingsModal:!0,isResponsiveEnabled:oe.default.isResponsiveEnabled(T,c.name),_isOptionMatchesFilter:h._isOptionMatchesFilter,toggleId:o,onToggleRightMenu:h._onToggleRightMenu,activeTabMode:p,isGlobalPresetsMode:h.props.isGlobalPresetsMode,isItemSelected:d,optionSubToggle:c.sub_toggle});var Vt=!(0,N.default)(c.description)&&""!==c.description,Ut=(0,L.default)(["content","raw_content"],u)||!(0,N.default)(c.is_fb_content)&&c.is_fb_content,Gt=Ut?"et_pb_content_field":c.name,Ht=(0,N.default)(c.priority)?10:c.priority,zt=!!(0,N.default)(c.vb_support)||c.vb_support?"":$.default.createElement("span",{className:"et-fb-no-vb-support-warning"},ETBuilderBackend.i18n.modals.moduleSettings.noSupport),qt=fe===de,Kt=c,$t=Kt.sub_toggle,Yt=Kt.toggle_slug;if(x||!$t||!ce||$t===(0,E.default)(q,Yt,xe)){var Xt=Vt?c.description:"",Jt={},Qt=c.label,Zt="",en=(0,N.default)(c.additional_button_type)?"":$.default.createElement(be.default,{type:c.additional_button_type,name:c.name,attrs:c.additional_button_attrs,module:n,_onChange:t._onChange});if("css"===r){var tn=!(0,N.default)(c.isColumnField)&&c.isColumnField,nn=tn?c.columnType:n.props.type,rn=tn?c.columnIndex:n.props.shortcode_index,on=".".concat((0,je.getModuleOrderClass)(nn,rn,n.props.theme_builder_suffix)),an=!(0,N.default)(c.selector)&&!Vt&&c.selector;if(!1!==an){if(-1!==an.indexOf("%%order_class%%"))an=an.replace(/%%order_class%%/g,on);else an=on+(!(0,N.default)(c.no_space_before_selector)&&c.no_space_before_selector?"":" ")+an;Vt=!0,Xt=Fe&&Ve?ETBuilderBackend.i18n.controls.cssSelectorFree:"".concat(ETBuilderBackend.i18n.controls.cssSelector," ").concat(an)}"custom_css"===c.toggle_slug&&t._isFilterActive()&&"freeFormCSS"!==Ie&&(Qt="".concat(c.label," ").concat(ETBuilderBackend.i18n.controls.cssText))}var ln=Me.default.getNameByMode(c.name,t.getModuleAttrs());if(Ut&&ln!==c.name&&(X=j),Me.default.isHoverEnabled(c.name,t.getModuleAttrs())&&Me.default.isHoverMode()&&(ie.name=ln,c.default=c["default".concat(ne.default.hoverSuffix())]?c["default".concat(ne.default.hoverSuffix())]:Me.default.getDesktopValue(c.name,t.getModuleAttrs(),c.default),"yes_no_button"===v&&(c.defaultValue=c.default)),Me.default.isStickyEnabled(c.name,t.getModuleAttrs())&&Me.default.isStickyMode()){ie.name=ln;var un=Me.default.getDesktopValue(c.name,t.getModuleAttrs(),c.default);!te.default.hasValue(un)&&te.default.hasValue(c.default)&&(un=c.default),c.default=c["default".concat(ae.default.stickySuffix())]?c["default".concat(ae.default.stickySuffix())]:un,"yes_no_button"===v&&(c.defaultValue=c.default)}if("general"===r&&"background"!==c.toggle_slug&&!Me.default.isDesktopMode()){var sn=Me.default.getBaseName(c.name),cn=Me.default.getNameByMode(c.name,T);if(sn&&cn&&sn!==cn&&!(0,W.default)(T,cn)){var dn=null;dn="content"===sn?Me.default.getContentByMode((0,C.default)({},T,{content:(0,E.default)(t,"props.module.props.content")})):"raw_content"===sn?Me.default.getRawContentByMode((0,C.default)({},T,{content:(0,E.default)(t,"props.module.props.content")})):Me.default.getValueByMode(sn,T),(0,D.default)(dn)||dn===j||(j=dn,X=dn,c.default=dn)}(0,F.default)(["value","default","default_on_front","default_tablet","default_phone","defaultValue"],(function(e){var t="value"===e?j:(0,E.default)(c,e);if(t&&(0,Te.isDynamicContent)(t)){var n=(0,Te.getDynamicContent)(t);if(!(0,B.default)(n)&&(0,W.default)(n,"content")&&(0,W.default)(n,"settings")){var r=se.default.getPostContentFieldValue("dynamic",n.content,n.settings,sn);!r&&Me.default.isPhoneMode()&&(r=se.default.getPostContentFieldValue("dynamic",n.content,n.settings,Me.default.getTabletName(sn))),(0,D.default)(r)||("value"===e&&(j=r,c.default=r,ie.default=r),(0,W.default)(c,e)&&(c[e]=r),(0,W.default)(ie,e)&&(ie[e]=r))}}}))}"upload"===v&&!1===(0,E.default)(c,"data_type",!1)&&(ie.showDeleteButton=!0,ie.showResetButton=!0);var fn=c.default_on_front||c.defaultValue||c.default,pn=ne.default.isEnabled(we,T),hn=ae.default.isEnabled(we,T),mn=(0,N.default)(c.linked_responsive)?[]:c.linked_responsive,yn=(0,E.default)(c,"context_menu",!0);Jt.activeHover=pn,Jt.isHoverTab=De,Jt.activeSticky=hn,Jt.isStickyTab=Le;var gn=(0,N.default)(c.label)||""===c.label?"":$.default.createElement(ge.ETBuilderFormLabel,{name:ve,backgroundFields:c.backgroundFields||c.background_fields,defaultValue:fn,activeHelp:h._isDescriptionVisible(we),activeHover:pn,activeSticky:hn,hoveredGroup:h._isHoveredGroup(we),key:"".concat(r,"-form-label-").concat(c.name),onClickHelp:!!Vt&&h._onClickHelp,onClickHover:!!Se&&h._onClickHover,onClickSticky:h._onClickSticky,onClickResponsive:h._onClickResponsive,onClickReset:h._onClickReset,isResetActive:h._isResetActive(c),hasResponsiveOptions:Ge,hasHoverOptions:Ce,hasStickyOptions:Re,onToggleRightMenu:!!yn&&h._onToggleRightMenu,isResponsiveEnabled:oe.default.isResponsiveEnabled(T,c.name),linkedResponsive:mn},Qt),bn=Vt?$.default.createElement(ge.ETBuilderFormDescription,{active:h._isDescriptionVisible(c.name),key:"".concat(r,"-form-description-").concat(c.name)},Xt):"",vn=c.mobile_options&&oe.default.isResponsiveEnabled(T,c.name)||Se&&ne.default.isEnabled(we,T)||ae.default.isEnabled(we,T)?$.default.createElement(Oe.default,null,$.default.createElement(ge.ETBuilderFormSettingModeTabs,{module:t._getModule(),moduleAttrs:T,fieldName:we,activeTabMode:p,isGlobalPresetsMode:t.props.isGlobalPresetsMode,isResponsiveEnabled:oe.default.isResponsiveEnabled(T,we),isHoverEnabled:ne.default.isEnabled(we,T),isStickyEnabled:Re&&ae.default.isEnabled(we,T),isItemSelected:d})):"";if(G||c.isColumnBackground||!t._isValidProductTourToggle(o,O)||(Zt="et-fb-product-tour-element","text"===v?Zt+=" et-fb-product-tour-element-text":"background"===v&&(Zt+=" et-fb-product-tour-element-background"),t.productTourOptionToggle=o,G=!0),"codemirror"===v&&(Jt.search=t.state.filterOptions),"font"===v&&(Jt.formLabel=gn,Jt.formDescription=bn),(0,E.default)(c,"attributes.data-old-option-ref",!1)){var _n=c.attributes["data-old-option-ref"];Z.oldOptionValue=(0,E.default)(T,_n,!1)}var wn={slug:c.type,type:"field"},On=(0,C.default)({processedKey:ue,value:j,className:J,module:h,moduleAttrs:T,parentModuleAttrs:le,content:X,resetValue:!1,previewMode:H,_onChange:t._onChange,_resetOption:t._resetOption,visible:!0,additionalAttrs:Z,filterSelected:t.state.filterSelected,animate:t.props.options.animate,rightClickOpened:t.props.rightClickOpened,isSettingsModal:!0,isResponsive:oe.default.isResponsiveEnabled(T,c.name),fieldDefinition:e,matching:wn,activeTabMode:p,isItemSelected:d,onToggleRightMenu:t._onToggleRightMenu},Jt,c,ie),kn=(0,E.default)(c,"data_type",!1),Sn=v+(kn?"_".concat(kn):""),Cn=(0,$.createElement)(_e.default.getControl(v),On),En={fieldName:c.name,fieldLabel:Qt,fieldType:Sn,toggleId:o,toggleGroupId:a,fieldContextMenu:yn,tabSlug:(0,E.default)(c,"tab_slug",a)};return $.default.createElement(ge.ETBuilderFormGroup,{name:c.name,key:"".concat(r,"-form-group-").concat(ue),onMouseEnterGroup:function(){t._onMouseEnterGroup(En)},onMouseLeaveGroup:function(){t._onMouseLeaveGroup(En)},hovered:t.isOptionHovered(c.name),isSelectiveSyncAvailable:t.isSelectiveSyncAvailable(c),isGlobalOptionSynced:t.isGlobalOptionSynced(Gt),_unsyncGlobalSetting:t._unsyncGlobalSetting,optionSubToggle:c.sub_toggle,globalName:Gt,className:Zt,priority:Ht,isDefaultValue:qt},!(0,L.default)(["font"],v)&&gn,vn,!(0,L.default)(["font"],v)&&bn,$.default.createElement("div",{className:P,key:"et-fb-option-".concat(r,"_").concat(ue)},$.default.createElement("div",{className:"et-fb-option-container",key:"et-fb-option-container-".concat(ue)},$.default.createElement(Oe.default,{componentName:c.name},c.dynamic_content?$.default.createElement(Pe.default,{type:c.dynamic_content,fieldName:ln,fieldType:v,isContentField:!S&&ln===c.name&&Ut,value:Ut&&ln===c.name?X:j,defaultValue:fn,dynamicAttributes:(0,Te.getEnabledDynamicAttributes)(T),onChange:function(){S&&t._onChange(c.name,"",v,!0),t._onChange.apply(t,arguments)},onReset:t._resetOption,modalWidth:z,moduleType:n.props.type},Cn):Cn),en,zt)),i&&(0,N.default)(l)&&m&&"column_structure"===c.name&&s)}(0,_.default)(Ae,$t,(0,E.default)(Ae,$t)||!qt)})),i&&o===l&&"bottom"===u&&s))}})),ue}},{key:"_renderTabOptionsPanel",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=["general","advanced","css"],o="advanced"===e?"design":e,a=(0,L.default)(r,e)?"".concat(e,"_settings"):e;if(a="css"===e?"custom_css_settings":a,!se.default.isAllowedAction(a))return!1;var i=this,l=i.props,u=l.module,s=l.activeTabMode,c=se.default.isMultiItemSelected(u.props.address),d=(0,L.default)(["et_pb_column","et_pb_column_inner"],u.props.type),f=!(!u.isModuleItem||(0,N.default)(u.parentModule.props.type)||d)&&u.parentModule.props.type,p=this._getAllOptionsFields();this.setting_resolver.property_definitions=p,"et_pb_signup_custom_field"===(0,E.default)(u,"props.child_slug")&&(this.setting_resolver.child_property_definitions=this.getComponentFields(u,!1,"et_pb_signup_custom_field")),"et_pb_signup_custom_field"===(0,E.default)(u,"props.type")&&(this.setting_resolver.property_definitions.parentModule=this.getComponentFields({props:{type:"et_pb_signup"}}));var h="general"===e&&!c&&this._renderModuleItems(),m=(0,E.default)(u,"props.module_items_config",{}),y=(0,E.default)(m,"toggle_slug"),g=(0,E.default)(m,"location"),b=(0,B.default)(m)||(0,ee.canShowField)(m,this.setting_resolver),v=["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column"],_="";if((0,L.default)(v,u.props.type))_=(0,z.default)(ETBuilderBackend.structureModules,{slug:u.props.type}).name;else{var w=(0,z.default)(ETBuilderBackend.modules,{label:u.props.type});(0,N.default)(w)||(0,N.default)(w.title)||(_=w.title)}var O=(0,E.default)(this,"props.module.props.type"),k=(0,L.default)(["et_pb_row","et_pb_row_inner"],O)&&!this.props.isGlobalPresetsMode,S=this.props.isGlobalPresetsMode?"settings-modal-back":"settings-modal-front",C={module:u,tabSlug:e,productTourTab:t,processedTabSlug:o,canShowModuleItems:b,moduleItemsToggle:y,moduleItemsLocation:g,moduleItems:h,moduleType:O,isItemSelected:c,moduleParentName:f,activeTabMode:s,thisClass:i,isRow:k,allOptionsFields:p,moduleName:_};return $.default.createElement(ye.ETBuilderTabPanel,{key:"et-fb-tabs__panel--".concat(o),className:"et-fb-tabs__panel--".concat(e),slug:e,isModuleItemSettings:this._isModuleItemSettings(),displayFilter:n,filterValue:this.state.filterOptions,_onFilterInput:this._onFilterInput,tabsCount:this.state.tabsCount,filterItems:this._getFilterItems(),filterGroups:{show_only:ETBuilderBackend.i18n.modals.show_only},filterSelected:this.state.filterSelected,filterNotice:this.state.filterNotice,_onFilterSelect:this._onFilterSelect,filterName:S,passedRef:this.settingsModalTabPanelNode},$.default.createElement(ge.default,{onSubmit:this._handleFormSubmission},$.default.createElement("input",{type:"submit",className:"et-fb-hide"}),b&&(0,N.default)(y)&&!k&&h,this._renderTabToggles(C),$.default.createElement("div",{className:"et-fb-modal__tab-footer"},this._isFilterActive()||this.renderSupportNotice((0,E.default)(this,"props.module.props.vb_support","off")),this._maybeRenderHelpButton(f),this._isFilterActive()||$.default.createElement(we.default,{moduleTitle:this._getModuleTitle(),moduleType:u.props.type}))))}},{key:"_getTabs",value:function(){var e=this,t=[];se.default.isAllowedAction("general_settings")&&this.hasOptionTab("general",!0)&&t.push({slug:"general",title:ETBuilderBackend.i18n.controls.tabs.general,custom:!1}),se.default.isAllowedAction("advanced_settings")&&!(0,B.default)(this.state.advancedFields)&&t.push({slug:"advanced",title:ETBuilderBackend.i18n.controls.tabs.design,custom:!1}),se.default.isAllowedAction("custom_css_settings")&&!(0,B.default)(this.state.cssFields)&&t.push({slug:"css",title:ETBuilderBackend.i18n.controls.tabs.css,custom:!1});var n=this.getCustomTabsList();return(0,B.default)(n)||(0,F.default)(n,(function(n,r){se.default.isAllowedAction(r)&&e.hasOptionTab(r)&&t.push({slug:r,title:n.name||r,custom:!0})})),t}},{key:"getTabsCount",value:function(){return this._getTabs().length}},{key:"hasOptionTab",value:function(e,t){var n=t?this._getOptionsFields(e):this._getFilteredFields(e),r=!(0,B.default)((0,g.default)(n,["toggles_".concat(e,"_toggles"),"_builder_version"])),o=!1;return"general"===e&&(o=this._hasModuleItem()),r||o}},{key:"renderSupportNotice",value:function(e){if(te.default.isOn(e))return"";var t=(0,L.default)(["off","partial"],e)?e:"off";return $.default.createElement("div",{className:"et-fb-modal__support-notice",dangerouslySetInnerHTML:{__html:(0,y.default)((0,E.default)(ETBuilderBackend,["i18n","vbSupport","modalSupportNotices",t],""))}})}},{key:"_getModuleTitle",value:function(){var e=this.props.module;return(0,Re.default)(e)}},{key:"_getFilterItems",value:function(){var e=this._getModule();return ae.default.hasStickyOptions((0,E.default)(e,"props",{}))?ETBuilderBackend.searchFilterItems:(0,U.default)(ETBuilderBackend.searchFilterItems,(function(e){return(0,g.default)(e,"styles_sticky")}))}},{key:"maybeShowFilterNotice",value:function(){var t=e((0,X.findDOMNode)(this)).find(".et-fb-tabs__panel--filter-active"),n=!(0,B.default)(this.state.filterOptions)||!(0,B.default)(this.state.filterSelected);t.length&&t.each((function(t,r){te.default.hasValue(e(r).find(".et-fb-form__group:not(:empty)").text())&&(n=!1)})),n!==this.state.filterNotice&&this.setState({filterNotice:n})}},{key:"_renderGlobalPresetsCloseBadge",value:function(){if(!this.props.isGlobalPresetsMode||this.state.isGlobalPresetsSubmitDialogVisible)return!1;var e=(0,Q.default)({"et-fb-modal__badge__button":!0,"et-fb-modal__badge__button--back-to-settings":!0});return $.default.createElement(me.default,{buttonName:ie.default.BUTTON_SAVE_MODULE_PRESET_SETTINGS,tooltip:ETBuilderBackend.i18n.tooltip.modal.globalPresets.exit,disableClick:this.props.nonInteractiveMode,className:e,editingModule:this._getModule()},$.default.createElement(pe.default,{icon:"global-presets-return",color:De.default.success,size:"14"}))}},{key:"_getModalMinWidth",value:function(){return this.isGlobalModuleOpened()?430:400}},{key:"_renderModalOverlay",value:function(){if(this.props.nonInteractiveMode)return $.default.createElement("div",{className:"et-fb-modal__overlay"});var e=se.default.getGlobalPresetsState().submitDialog,t=e.confirmationAction,n=e.actionPayload,r=e.type;if(!this.state.isGlobalPresetsSubmitDialogVisible||r!==Le.default.CONFIRMATION_DIALOG_TYPE_DEFAULT)return!1;var o=this._getModule();return $.default.createElement("div",{className:"et-fb-modal__overlay"},$.default.createElement("div",{className:"et-fb-modal__overlay__header"}),$.default.createElement("div",{className:"et-fb-modal__overlay__content"},$.default.createElement(Ne.default,{animate:this.props.options.animate,onConfirm:function(){return ue.default.confirmGlobalPresetDialog(t,o,n)},dangerouslySetInnerHTML:{__html:e.confirmationText},isLoading:this.state.isGlobalPresetsSubmitDialogWaiting})))}},{key:"_renderButtons",value:function(){var e=this.props.module,t=(0,xe.getModalPreferredSnapSettings)(),n=t.snap,r=t.snapLocation,o=se.default.getGlobalPresetsState().history.isLoading,a=o?"loading":"check",i="wireframe"===se.default.getPreviewMode(),l="saveModule"===this.props.currentTourElement?e:{},u=(0,E.default)(this.props,"module.props.loading",!1)&&!i,s={"et-fb-product-tour-element":"saveModule"===this.props.currentTourElement},c={"et-fb-product-tour-element":"saveModule"===this.props.currentTourElement||"saveRow"===this.props.currentTourElement};return this.props.isGlobalPresetsMode?[$.default.createElement(me.default,{block:!0,danger:!0,buttonName:ie.default.BUTTON_GLOBAL_PRESETS_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel,disableClick:this.props.nonInteractiveMode,additionalAttrs:{skipReset:n&&r}},$.default.createElement(pe.default,{icon:"exit",color:"#FFFFFF"})),$.default.createElement(me.default,{block:!0,primary:!0,alt:!0,buttonName:ie.default.BUTTON_GLOBAL_PRESETS_SUBHISTORY_UNDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.undo,disableClick:this.props.nonInteractiveMode},$.default.createElement(pe.default,{icon:"undo",color:"#FFFFFF"})),$.default.createElement(me.default,{block:!0,info:!0,buttonName:ie.default.BUTTON_GLOBAL_PRESETS_SUBHISTORY_REDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.redo,disableClick:this.props.nonInteractiveMode},$.default.createElement(pe.default,{icon:"redo",color:"#FFFFFF"})),$.default.createElement(me.default,{block:!0,success:!0,buttonName:ie.default.BUTTON_SAVE_MODULE_PRESET_SETTINGS,tooltip:ETBuilderBackend.i18n.tooltip.modal.save,disabled:o,disableClick:this.props.nonInteractiveMode||o,additionalAttrs:{skipReset:n&&r},editingModule:e},$.default.createElement(pe.default,{icon:a,color:"#FFFFFF"}))]:[$.default.createElement(me.default,{block:!0,danger:!0,buttonName:ie.default.MODAL_SETTINGS_BUTTON_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel,disableClick:u,className:s,editingModule:l,additionalAttrs:{skipReset:n&&r}},$.default.createElement(pe.default,{icon:"exit",color:"#FFFFFF"})),$.default.createElement(me.default,{block:!0,primary:!0,alt:!0,buttonName:ie.default.MODAL_SETTINGS_BUTTON_UNDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.undo,disableClick:u},$.default.createElement(pe.default,{icon:"undo",color:"#FFFFFF"})),$.default.createElement(me.default,{block:!0,info:!0,buttonName:ie.default.MODAL_SETTINGS_BUTTON_REDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.redo,disableClick:u},$.default.createElement(pe.default,{icon:"redo",color:"#FFFFFF"})),$.default.createElement(me.default,{block:!0,success:!0,buttonName:this._isModuleItemSettings()?ie.default.MODULE_ITEM_BACK_TO_PARENT:ie.default.MODAL_SETTINGS_BUTTON_SAVE,tooltip:ETBuilderBackend.i18n.tooltip.modal.save,disableClick:u,className:c,editingModule:l,additionalAttrs:{skipReset:n&&r}},$.default.createElement(pe.default,{icon:"check",color:"#FFFFFF"}))]}},{key:"_renderHeaderDropdown",value:function(){return this._isMultiSelectMode()?null:$.default.createElement(We.default,{module:this.props.module,onMouseEnter:this._onMouseEnterTitle,onMouseLeave:this._onMouseLeaveTitle})}},{key:"_renderTabNavs",value:function(){var e=this,t=this._getTabs();return!(0,B.default)(t)&&t.map((function(t){var n=e.getGlobalTabClass();return $.default.createElement(ye.ETBuilderTabItem,{key:t.slug,className:n,panelId:t.slug,setHoveredElement:e._setHoveredElementWrapper},t.title)}))}},{key:"_renderTabPanels",value:function(){var e=this,t=this._getTabs();if((0,B.default)(t))return!1;var n=(0,z.default)(t,(function(e){return"general"===e.slug})),r=this.props,o=r.currentTourElement,a=r.module,i=se.default.getProductTourModuleName(),l="configureModule"===o&&i===a.props.type||"editRow"===o&&"et_pb_row"===a.props.type,u=l?"general":"";l&&!n&&(u=hasDesignTab&&advancedTabOutput?"advanced":"css");this._isModalExpanded();var s=this._isFilterActive();return t.map((function(t,n){var r=s?0===n:e.state.tabSelectedIndex===n;return t.custom?e._renderTabOptionsPanel(t.slug,void 0,r):e._renderTabOptionsPanel(t.slug,u,r)}))}},{key:"render",value:function(){var e=this.props,t=e.isVisible,n=e.module;if(!t)return!1;if((0,N.default)(n.props))return!1;var r=this.state.isModalRest,o=this._isFilterActive(),a=!r&&!o,i=this._getModuleTitle(),l=(0,xe.getModalPreferredSnapSettings)().snapLocation,u=(0,Q.default)({"et-fb-modal__module-settings":!0,"et-fb-modal__filter-active":o,"et-fb-modal__selective-sync":this.isSelectiveSyncAvailable(),"et-fb-modal__global-presets-mode":this.props.isGlobalPresetsMode,"et-fb-modal--with-header-dropdown":!this._isMultiSelectMode()},this.getGlobalModalClass("et-fb-modal")),s=this.props.ignorePosition?{x:0,y:0}:(0,xe.getModalPreferredCoordinates)(),c=(0,xe.getModalPreferredFullscreen)(),d=(0,xe.getModalPreferredDimensions)().width,f=this.props.isGlobalPresetsMode?"settings-modal-back":"settings-modal-front",p=this.props.isGlobalPresetsMode?ETBuilderBackend.i18n.modals.globalPresets.title.replace("%s",i):ETBuilderBackend.i18n.modals.moduleSettings.title.replace("%s",i),h=this.props.isGlobalPresetsMode&&this._renderGlobalPresetsCloseBadge(),m=this._renderModalOverlay(),y=se.default.isViewGlobalPresetsAllowed()&&!se.default.isProductTourActive();return $.default.createElement(fe.default,Ke({key:f,className:u,disableEscShortcut:o,footerButtons:this._renderButtons(),fullscreen:c,globalUpdate:!0,isModuleItemSettings:this._isModuleItemSettings(),label:p,headerContent:this._renderHeaderDropdown(),passthroughClicksFor:["et-fb-modal__module-settings__header-dropdown__overflow-container","et-core-popup__wrapper"],badge:y&&h,modalMinimalWidth:this._getModalMinWidth(),measurement:(0,xe.getModalPreferredDimensions)(),animate:this.props.options.animate,disablePopupAnimation:this.props.disablePopupAnimation,onModalChange:this.props.onModalChange,ignorePosition:this.props.ignorePosition,snapLocation:l,tabsCount:this.state.tabsCount,onMouseEnterTitle:this._onMouseEnterTitle,onMouseLeaveTitle:this._onMouseLeaveTitle,overlay:m,onBackToParent:this._onBackToParent,_setHoveredElement:this._onMouseEnterTitle},this.props,{position:s,onRest:this._onModalRest}),$.default.createElement(ye.default,{selectedIndex:this.state.tabSelectedIndex,module:this.props.module,onSelect:this._onTabSelect,renderOnSelectedOnce:a},$.default.createElement(ye.ETBuilderTabList,{className:this.getGlobalModalClass("et-fb-tabs__list"),modalWidth:d,snapLocation:l,fullscreen:c,showScroll:!o},this._renderTabNavs()),this._renderTabPanels()))}}]),o}($.Component);vt.propTypes=yt,vt.defaultProps={additionalClasses:{},ignorePosition:!1,isGlobalPresetsMode:!1,nonInteractiveMode:!1,disablePopupAnimation:!1};var _t=vt;t.default=_t}).call(this,n(8),n(97)(e))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=x(n(0)),a=M(n(7)),i=M(n(360)),l=M(n(10)),u=M(n(1)),s=M(n(129)),c=M(n(11)),d=M(n(184)),f=M(n(34)),p=M(n(368));n(1571);var h=M(n(2)),m=M(n(22)),y=M(n(59)),g=M(n(283)),b=M(n(63)),v=M(n(198)),_=x(n(506)),w=n(782),O=M(n(43)),k=M(n(781)),S=M(n(1491)),C=M(n(1489)),E=M(n(6)),P=M(n(14)),T=["builderAnimation","builderDisplayModalSettings","builderEnableDummyContent","builderEventMode","builderViewMode","builderHideDisabledModules","builderModalPreference","builderPageCreationFlow","builderEnableVisualThemeBuilder","historyIntervals","toolbarButtons"];function M(e){return e&&e.__esModule?e:{default:e}}function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(j=function(e){return e?n:t})(e)}function x(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=j(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(this,arguments)}function N(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}function A(e){var t=function(){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}}();return function(){var n,r=F(e);if(t){var o=F(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return B(e)}function B(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}var W=h.default.isLimitedMode(),V=h.default.topWindow(),U=ETBuilderBackend.i18n.app.modal,G=h.default.condition("is_bfb"),H=h.default.condition("is_rtl")&&!h.default.condition("is_no_rtl"),z=G?30:10;function q(e,t){return t[e]?"#5C6978":"#BEC9D6"}function K(e,t){if(t)switch(e){case"hover":default:return 0;case"click":return 1;case"grid":return 2}else switch(parseInt(e)){case 0:default:return"hover";case 1:return"click";case 2:return"grid"}}function $(){return h.default.condition("is_bfb")?"wireframe":"desktop"}function Y(e,t){if(t)switch(parseInt(e)){case 1:default:return 0;case 10:return 1;case 20:return 2;case 30:return 3;case 40:return 4}else switch(parseInt(e)){case 0:default:return 1;case 1:return 10;case 2:return 20;case 3:return 30;case 4:return 40}}function X(e,t){if(t)switch(e){case"default":default:return 0;case"minimum":return 1;case"fullscreen":return 2;case"left":return 3;case"right":return 4;case"bottom":return 5;case"top":return 6}else switch(parseInt(e)){case 0:default:return"default";case 1:return"minimum";case 2:return"fullscreen";case 3:return"left";case 4:return"right";case 5:return"bottom";case 6:return"top"}}function J(e,t){var n=P.default.getPageCreationOptions();if(t)return(0,f.default)(n,"".concat(e,".setting.value_index"))?parseInt((0,u.default)(n,"".concat(e,".setting.value_index"))):0;var r=(0,p.default)(n,(function(t){return(0,f.default)(t,"setting.value_index")&&parseInt((0,u.default)(t,"setting.value_index"))===parseInt(e)}));return r||"default"}var Q=function(e){!function(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&&R(e,t)}(p,e);var t,n,r,f=A(p);function p(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(e=f.call(this)).displayName="ETBuilderAppModal";return e.state={height:635,width:V.innerWidth<520?V.innerWidth-g.default.pageSettingsBar-30:400},e._getPosition=e._getPosition.bind(B(e)),e._handleAnimationChange=e._handleAnimationChange.bind(B(e)),e._handleAllModalSettings=e._handleAllModalSettings.bind(B(e)),e._handleDummyContent=e._handleDummyContent.bind(B(e)),e._handleVisualThemeBuilder=e._handleVisualThemeBuilder.bind(B(e)),e._handleDisabledModules=e._handleDisabledModules.bind(B(e)),e._handleShortcuts=e._handleShortcuts.bind(B(e)),e._handleResize=e._handleResize.bind(B(e)),e._handleScroll=e._handleScroll.bind(B(e)),e}return t=p,n=[{key:"UNSAFE_componentWillMount",value:function(){this._handleResize(),G&&(this.throttleScroll=(0,d.default)(this._handleScroll,100),V.addEventListener("scroll",this.throttleScroll),h.default.$topWindow().on("et-preview-animation-complete",this._handleResize)),V.addEventListener("resize",this._handleResize)}},{key:"componentDidMount",value:function(){h.default.topDocument().addEventListener("keydown",this._handleShortcuts),E.default.addPreviewModeUpdateListener(this._handleResize)}},{key:"componentWillUnmount",value:function(){h.default.topDocument().removeEventListener("keydown",this._handleShortcuts),E.default.removePreviewModeUpdateListener(this._handleResize),G&&(V.removeEventListener("scroll",this.throttleScroll),h.default.$topWindow().off("et-preview-animation-complete",this._handleResize)),V.removeEventListener("resize",this._handleResize)}},{key:"_getModalOptions",value:function(){return G?(0,s.default)(U.modal_default_select,[0,1,2,4]):W?U.modal_default_select.slice(0,-3):U.modal_default_select}},{key:"_getPosition",value:function(e){var t=this.props.pageSettingsBarLocation,n=(0,a.default)(["top-left","top-right"],t),r="top"===t,o="right"===t,i="left"===t,l=(0,a.default)(["top-right","bottom-right"],t),s=g.default.responsive.phone>V.innerWidth,c=s?0:g.default.pageSettingsBar,d=s?0:30,f=!!G&&h.default.$topWindow("#et_pb_layout");if("top"===e){if(G&&f){var p=h.default.$topWindow().scrollTop();return(0,u.default)(f.offset(),"top",0)+f.find("h2.hndle").outerHeight()+z-p}return i||o?g.default.topbar.desktop+d:r||n?c+g.default.topbar.desktop:"auto"}return"bottom"===e?G||r||n||i||o?"auto":c:"right"===e?G?H?"auto;":h.default.$topWindow().width()-((0,u.default)(f.offset(),"left",0)+f.width())+10:l||o?c:i?"auto":!(!h.default.condition("is_rtl")||h.default.condition("is_no_rtl"))&&d:"left"===e?G?H?(0,u.default)(f.offset(),"left",0)+10:"auto":i?c:l||o?"auto":n?c:!(!r&&h.default.condition("is_rtl")&&!h.default.condition("is_no_rtl"))&&d:void 0}},{key:"_handleScroll",value:function(){this._handleResize()}},{key:"_handleShortcuts",value:function(e){27===e.keyCode&&m.default.buttonClick({props:{buttonName:y.default.MODAL_APP_BUTTON_CLOSE}})}},{key:"_handleResize",value:function(){var e=G?h.default.$topWindow("#et_pb_layout").offset().top:0,t=G?h.default.$topWindow().scrollTop():0,n=G?96:146;V.innerHeight<940+n+(e-t)+30?V.innerHeight<200?this.setState({height:100}):this.setState({height:V.innerHeight-n-30-e+t}):this.setState({height:940})}},{key:"_handleAnimationChange",value:function(){var e=this.props.builderAnimation;m.default.preferencesChange({builder_animation:!e})}},{key:"_handleDisabledModules",value:function(){var e=this.props.builderHideDisabledModules;m.default.preferencesChange({hide_disabled_modules:!e})}},{key:"_handleAllModalSettings",value:function(){var e=this.props.builderDisplayModalSettings;m.default.preferencesChange({builder_display_modal_settings:!e})}},{key:"_handleDummyContent",value:function(){var e=this.props.builderEnableDummyContent;m.default.preferencesChange({builder_enable_dummy_content:!e})}},{key:"_handleEventModeChange",value:function(e,t){m.default.preferencesChange({event_mode:K(t)})}},{key:"_handleVisualThemeBuilder",value:function(){var e=this.props.builderEnableVisualThemeBuilder;e&&m.default.setActiveThemeBuilderArea("post_content"),m.default.preferencesChange({builder_enable_visual_theme_builder:!e})}},{key:"_handleViewModeChange",value:function(e,t){var n=(0,c.default)(t)?$():t;m.default.preferencesChange({view_mode:n})}},{key:"_handleHistoryChange",value:function(e,t){m.default.preferencesChange({history_intervals:Y(t)})}},{key:"_handlePageCreationFlowChange",value:function(e,t){m.default.preferencesChange({page_creation_flow:J(t)})}},{key:"_handleModalChange",value:function(e,t){m.default.preferencesChange({modal_preference:X(t)})}},{key:"_handleReset",value:function(e,t,n){return e!==t&&o.default.createElement(b.default,{__onClick:n},o.default.createElement(O.default,{icon:"reset"}))}},{key:"_getViewModesList",value:function(){var e=h.default.condition("is_bfb"),t=U.view_mode_select;if(e){var n=t.wireframe;(0,i.default)(t.wireframe),t=(0,l.default)({wireframe:n},t)}return t}},{key:"render",value:function(){var e=this.props,t=e.builderAnimation,n=e.builderDisplayModalSettings,r=e.builderEnableDummyContent,i=e.builderEventMode,l=e.builderViewMode,s=e.builderHideDisabledModules,c=e.builderModalPreference,d=e.builderPageCreationFlow,f=e.builderEnableVisualThemeBuilder,p=e.historyIntervals,m=e.toolbarButtons,g=N(e,T),P=this.state,M=P.height,j=P.width,x=E.default.getAppPreferences();return o.default.createElement(k.default,D({className:"et-fb-modal--app",forceUpdate:!0,headerButtons:[o.default.createElement(b.default,{buttonName:y.default.MODAL_APP_BUTTON_CLOSE,inverse:!0,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel},o.default.createElement(O.default,{icon:"exit",color:"#FFFFFF"}))],label:U.title,measurement:{height:M,width:j},animate:this.props.options.animate,style:{top:this._getPosition("top"),bottom:this._getPosition("bottom"),left:this._getPosition("left"),right:this._getPosition("right")}},g),o.default.createElement(w.ETBuilderTabPanel,{selected:!0},o.default.createElement("div",{className:"et-fb-form"},o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.toolbar),o.default.createElement(v.default,null,o.default.createElement(b.default,{additionalAttrs:{toolbarButton:"wireframe"},buttonName:y.default.TOGGLE_TOOLBAR_BUTTON,stopPropagation:!0,style:{background:"#F2F6F9"}},o.default.createElement(O.default,{color:q("wireframe",m),icon:"wireframe"})),o.default.createElement(b.default,{additionalAttrs:{toolbarButton:"zoom"},buttonName:y.default.TOGGLE_TOOLBAR_BUTTON,stopPropagation:!0,style:{background:"#F2F6F9"}},o.default.createElement(O.default,{color:q("zoom",m),icon:"zoom-in"})),o.default.createElement(b.default,{additionalAttrs:{toolbarButton:"desktop"},buttonName:y.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(O.default,{color:q("desktop",m),icon:"desktop"})),o.default.createElement(b.default,{additionalAttrs:{toolbarButton:"tablet"},buttonName:y.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(O.default,{color:q("tablet",m),icon:"tablet"})),o.default.createElement(b.default,{additionalAttrs:{toolbarButton:"phone"},buttonName:y.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(O.default,{color:q("phone",m),icon:"phone"}))),o.default.createElement(v.default,{style:h.default.condition("is_rtl")&&!h.default.condition("is_no_rtl")?{marginRight:3}:{marginLeft:3}},o.default.createElement(b.default,{additionalAttrs:{toolbarButton:"hover"},buttonName:y.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(O.default,{color:q("hover",m),icon:"hover"})),o.default.createElement(b.default,{additionalAttrs:{toolbarButton:"click"},buttonName:y.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(O.default,{color:q("click",m),icon:"click"})),o.default.createElement(b.default,{additionalAttrs:{toolbarButton:"grid"},buttonName:y.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(O.default,{color:q("grid",m),icon:"grid"})))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.view_mode),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"builder_view_mode",value:l,options:this._getViewModesList(),_onChange:this._handleViewModeChange}),l!==$()&&""!==l&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handleViewModeChange,small:!0},o.default.createElement(O.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.interaction_mode),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"view_mode",value:K(i,!0),options:U.interaction_mode_select,_onChange:this._handleEventModeChange}),!(0,a.default)(["","hover","default"],i)&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handleEventModeChange,small:!0},o.default.createElement(O.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.history),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"history",value:Y(p,!0),options:U.history_intervals_select,_onChange:this._handleHistoryChange}),1!==p&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handleHistoryChange,small:!0},o.default.createElement(O.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.modal_position),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"modal_position",value:X(c,!0),options:this._getModalOptions(),_onChange:this._handleModalChange}),"default"!==c&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handleModalChange,small:!0},o.default.createElement(O.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.page_creation_flow),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"page_creation",value:J(d,!0),options:U.page_creation_flow_select,_onChange:this._handlePageCreationFlowChange}),"default"!==d&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handlePageCreationFlowChange,small:!0},o.default.createElement(O.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.animation),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(C.default,{onClick:this._handleAnimationChange,options:{on:U.builder_animation_toggle.on,off:U.builder_animation_toggle.off},value:t?"on":"off"}),t!==(0,u.default)(x,"builder_animation.default")&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handleAnimationChange,small:!0},o.default.createElement(O.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.disabled_modules),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(C.default,{onClick:this._handleDisabledModules,options:{on:U.hide_disabled_module_toggle.on,off:U.hide_disabled_module_toggle.off},value:s?"off":"on"}),s!==(0,u.default)(x,"hide_disabled_modules.default")&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handleDisabledModules,small:!0},o.default.createElement(O.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.group_settings),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(C.default,{onClick:this._handleAllModalSettings,options:{on:U.display_modal_settings.on,off:U.display_modal_settings.off},value:n?"off":"on"}),n!==(0,u.default)(x,"builder_display_modal_settings.default")&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handleAllModalSettings,small:!0},o.default.createElement(O.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.dummy_content),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(C.default,{onClick:this._handleDummyContent,options:{on:U.enable_dummy_content.on,off:U.enable_dummy_content.off},value:r?"on":"off"}),r!==(0,u.default)(x,"builder_enable_dummy_content.default")&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handleDummyContent,small:!0},o.default.createElement(O.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,U.labels.visual_theme_builder),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(C.default,{onClick:this._handleVisualThemeBuilder,options:{on:U.enable_visual_theme_builder.on,off:U.enable_visual_theme_builder.off},value:f?"on":"off"}),f!==(0,u.default)(x,"builder_enable_visual_theme_builder.default")&&o.default.createElement(b.default,{className:"et-fb-button--reset",__onClick:this._handleVisualThemeBuilder,small:!0},o.default.createElement(O.default,{icon:"reset"}))))))))}}],n&&L(t.prototype,n),r&&L(t,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Component);Q.propTypes={},Q.defaultProps={toolbarButtons:{}};var Z=Q;t.default=Z},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=H(n(0)),a=n(27),i=H(n(13)),l=H(n(3)),u=H(n(11)),s=H(n(9)),c=H(n(5)),d=H(n(7)),f=H(n(42)),p=H(n(197)),h=H(n(31)),m=H(n(34)),y=H(n(56)),g=H(n(332)),b=H(n(10)),v=H(n(136)),_=H(n(124)),w=H(n(12)),O=H(n(125)),k=H(n(1)),S=H(n(28)),C=H(n(135)),E=H(n(14)),P=H(n(59)),T=H(n(283)),M=H(n(22)),j=H(n(63)),x=H(n(784)),D=H(n(43)),N=H(n(781)),L=H(n(6)),R=G(n(782)),A=G(n(506)),I=H(n(2)),B=H(n(1484)),F=H(n(807)),W=n(396);n(1549);var V=["onModalChange"];function U(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(U=function(e){return e?n:t})(e)}function G(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=U(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function H(e){return e&&e.__esModule?e:{default:e}}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}function q(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $(e,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$(e,t)}function Y(e){var t=function(){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}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return X(this,n)}}function X(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return J(e)}function J(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ee,te={isVisible:l.default.bool,onModalChange:l.default.func},ne=function(t){!function(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&&$(e,t)}(G,t);var n,r,l,U=Y(G);function G(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,G),Z(J(t=U.call(this,e)),"AISelectRef",null),Z(J(t),"handleAIEnable",(function(e){t.AISelectRef[e].toggleMenu({target:null})})),Z(J(t),"isOptionHovered",(function(e){return t.state.hoveredGroup===e})),Z(J(t),"_onClickReset",(function(e){var n=e.props;return t._onChange(n.name,"")})),t.displayName="ETBuilderSettingsPage";var n=ETBuilderBackend.themeBuilder.isLayout||"post_content"!==L.default.getActiveThemeBuilderArea();return t.fields=n?(0,C.default)(E.default.pageSettings,["et_pb_post_settings_excerpt","et_pb_post_settings_image","et_pb_content_area_background_color"]):E.default.pageSettings,t.state={activeDescription:null,hoveredGroup:null,openedToggle:e.openedToggle||"main_content",openedContentGroup:"",openedDesignGroup:"",openedAdvancedGroup:"",filterOptions:"",filterSelected:void 0,aiImageID:0,aiImageURL:""},t.tabs=(0,b.default)({},ETBuilderBackend.i18n.modals.pageSettings.tabs),t.toggles=(0,b.default)({},ETBuilderBackend.i18n.modals.pageSettings.toggles),t._handleFormSubmission=t._handleFormSubmission.bind(J(t)),t._onChange=t._onChange.bind(J(t)),t._renderPageSettingsPanel=t._renderPageSettingsPanel.bind(J(t)),t._renderTab=t._renderTab.bind(J(t)),t.isVisible=t.isVisible.bind(J(t)),t._isDescriptionVisible=t._isDescriptionVisible.bind(J(t)),t._isHoveredGroup=t._isHoveredGroup.bind(J(t)),t._onClickHelp=t._onClickHelp.bind(J(t)),t._onMouseEnterGroup=t._onMouseEnterGroup.bind(J(t)),t._onMouseLeaveGroup=t._onMouseLeaveGroup.bind(J(t)),t._onFilterInput=t._onFilterInput.bind(J(t)),t._onFilterSelect=t._onFilterSelect.bind(J(t)),t._isOptionMatchesFilter=t._isOptionMatchesFilter.bind(J(t)),t._onClickToggle=t._onClickToggle.bind(J(t)),t._handleShortcuts=t._handleShortcuts.bind(J(t)),t.builder_display_modal_settings=L.default.getAppPreference("builder_display_modal_settings"),t}return n=G,(r=[{key:"componentDidMount",value:function(){I.default.topDocument().addEventListener("keydown",this._handleShortcuts),window.addEventListener("ai_prompt_use_text_click",this._onPromptUseTextClick.bind(this)),L.default.getDroploaderPayloadCss()&&this.setState({filterOptions:"".concat(ETBuilderBackend.i18n.modules.customCss.label)}),this.setState({aiImageID:L.default.getPageSetting("et_pb_post_settings_image")})}},{key:"componentDidUpdate",value:function(e,t){this.props.isVisible&&!e.isVisible&&this.setState({filterOptions:"",openedToggle:"main_content",filterSelected:void 0,filterNotice:!1}),this.maybeShowFilterNotice()}},{key:"componentWillUnmount",value:function(){clearTimeout(ee),I.default.topDocument().removeEventListener("keydown",this._handleShortcuts),window.removeEventListener("ai_prompt_use_text_click",this._onPromptUseTextClick.bind(this))}},{key:"_onPromptUseTextClick",value:function(e){var t=this,n=e.detail,r=n.text,o=n.localImageID,a=n.intent,i=n.fieldName,l=n.settings,u=void 0===l?{}:l;L.default.isSettingsModalOpen("settings")&&(o&&this.setState({aiImageID:o,aiImageURL:r}),"module_fields_autofill"!==a&&(u[i]=null!=o?o:r),(0,s.default)(u,(function(e,n){t._onChange(n,e)})),L.default.emitPageSettingsChange())}},{key:"_handleShortcuts",value:function(e){var t=this;if(27===e.keyCode&&I.default.isBuilderFocused()){if(e.preventDefault(),I.default.hasValue(this.state.filterOptions)||I.default.hasValue(this.state.filterSelected))return void setTimeout((function(){t.setState({filterOptions:"",filterSelected:void 0})}),100);M.default.pageSettingsClose()}}},{key:"isVisible",value:function(e,t){var n=[];return(0,s.default)(e.depends_on,(function(r){if((0,m.default)(t,r)){var o=(0,u.default)(L.default.getPageSetting(r))?"":L.default.getPageSetting(r);(0,u.default)(e.depends_show_if)||o!==e.depends_show_if||n.push(r)}})),!(0,c.default)(n)}},{key:"_isDescriptionVisible",value:function(e){return this.state.activeDescription===e}},{key:"_isHoveredGroup",value:function(e){return this.state.hoveredGroup===e}},{key:"_isToggleOpened",value:function(e,t){var n="content"===t,r="design"===t,o="advanced"===t,a=(0,W.getModalPreferredSnapSettings)(),i=a.snap,l=a.snapLocation,u=(0,W.getModalPreferredDimensions)().width,s=(0,d.default)(["top","bottom"],l),c=I.default.topWindow().innerWidth<T.default.responsive.phone,f=(i&&s&&I.default.topWindow().innerWidth>1200||u>1200)&&!c;if(t&&f){if(n)return this.state.openedContentGroup===e;if(r)return this.state.openedDesignGroup===e;if(o)return this.state.openedAdvancedGroup===e}return this.state.openedToggle===e}},{key:"_onMouseEnterGroup",value:function(e){this.setState({hoveredGroup:e})}},{key:"_onMouseLeaveGroup",value:function(e){this.state.hoveredGroup===e&&this.setState({hoveredGroup:null})}},{key:"_onClickHelp",value:function(e){var t=this.state.activeDescription===e?null:e;this.setState({activeDescription:t})}},{key:"_onClickToggle",value:function(t,n,r){var o=(0,W.getModalPreferredSnapSettings)(),i=o.snap,l=o.snapLocation,u=(0,W.getModalPreferredDimensions)().width,s=(0,d.default)(["top","bottom"],l),c=I.default.topWindow().innerWidth<T.default.responsive.phone,f=(i&&s&&I.default.topWindow().innerWidth>1200||u>1200)&&!c,p="content"===r,h="design"===r,m="advanced"===r;if(this._isToggleOpened(t,r)&&f){if(p)return this.setState({openedContentGroup:"",openedToggle:""});if(h)return this.setState({openedDesignGroup:"",openedToggle:""});if(m)return this.setState({openedAdvancedGroup:"",openedToggle:""})}if(this._isToggleOpened(t))this.setState({openedToggle:""});else{var y=1===n?0:61*n-10;f?e((0,a.findDOMNode)(this)).find(".et-fb-tabs__panel--".concat(r)).animate({scrollTop:y},300):e((0,a.findDOMNode)(this)).find(".et-fb-tabs__panel--active").animate({scrollTop:y},300),this.setState({openedToggle:t,openedContentGroup:"content"===r?t:this.state.openedContentGroup,openedDesignGroup:"design"===r?t:this.state.openedDesignGroup,openedAdvancedGroup:"advanced"===r?t:this.state.openedAdvancedGroup})}}},{key:"_onFilterInput",value:function(e){this.setState({filterOptions:e,filterNotice:!1})}},{key:"_onFilterSelect",value:function(e){this.setState({filterSelected:e,filterNotice:!1})}},{key:"_isOptionMatchesFilter",value:function(e,t,n){var r=this.state.filterOptions,o=[e.label,e.description,t,n],a=this.state.filterSelected;if(""===r&&(0,c.default)(a))return!0;var i=!1;if(r&&(0,s.default)(o,(function(e){(0,u.default)(e)||-1===e.toLowerCase().indexOf(r.toLowerCase())||(i=!0)})),"styles_modified"===a){if("content"===e.tab_slug&&"background"!==e.toggle_slug)return!1;var l=this._isOptionDefaultValue(e);i=r?i&&!l:!l}return i}},{key:"_isOptionDefaultValue",value:function(e){var t=e.default,n=L.default.getPageSetting(e.id);return!(0,u.default)(e.depends_on)&&!this.isVisible(e,this.fields)||(!(!(0,u.default)(e.readonly)||"readonly"!==e.readonly)||("yes_no_button"===e.type?!(!(0,c.default)(t)||"off"!==n)||t===n:!(!(0,c.default)(t)||!(0,c.default)(n))||t===n))}},{key:"renderToggleFields",value:function(e,t){return!!this.builder_display_modal_settings||!(""===this.state.filterOptions&&!I.default.hasValue(this.state.filterSelected))||this._isToggleOpened(e,t)}},{key:"_getTogglesForTab",value:function(e){var t={};return(0,s.default)(this.fields,(function(n){var r=n.tab_slug,o=n.toggle_slug,a=n.hide_on_fb,i=n.type;r!==e||a||"hidden"===i||(0,y.default)(t,o,!0)})),(0,_.default)(this.toggles,(function(e,n){return(0,m.default)(t,n)||"unclassified"===n}))}},{key:"_renderTab",value:function(e){var t=this,n=[],r=0,a=this._getTogglesForTab(e);return(0,h.default)(a,(function(l,s){r++;var m=(0,w.default)(l)?l.title:l,y=(0,w.default)(l)?l.sub_toggles:{};return o.default.createElement(A.ETBuilderFormToggle,{key:s,title:m,toggleId:s,toggleGroupId:e,_onClickToggle:t._onClickToggle,isToggleOpened:t._isToggleOpened(s,e),toggleOrder:r,isLastToggle:(0,O.default)(a)===r,isFilterActive:""!==t.state.filterOptions||I.default.hasValue(t.state.filterSelected),subToggles:y},!!t.renderToggleFields(s,e)&&(0,h.default)((0,v.default)((0,g.default)(t.fields),["index"]),(function(r,a){var l=r;a=r.id;var h,y=(0,d.default)(["et_pb_post_settings_title","et_pb_post_settings_excerpt","et_pb_post_settings_image"],a);if(r.name&&r.name.indexOf("custom_css")>=0&&(h=L.default.getPageSetting(r.id)),!t._isOptionMatchesFilter(r,m,h))return!1;if(r.tab_slug!==e)return"";if(r.toggle_slug!==s)return!1;if(r.hide_on_fb)return"";if((0,u.default)(r.name)&&(r.name=r.id),"categories"===r.type&&(r.categories_list={},r.taxonomy_name=(0,u.default)(r.taxonomy_name)?"category":r.taxonomy_name),"select_sidebar"===r.type&&(r.sidebars_list={}),(0,u.default)(r.type)||!B.default.getControl(r.type))return!1;var g={isPageSetting:!0};if("codemirror"===r.type&&(g.search=t.state.filterOptions),!(0,u.default)(r.depends_on_post_type)&&-1===r.depends_on_post_type.indexOf(ETBuilderBackend.postType))return n.push(r.name),!1;if(!(0,u.default)(r.depends_on)&&!t.isVisible(r,t.fields))return n.push(r.name),!1;if(!(0,u.default)(r.depends_on)&&(0,f.default)(r.depends_on,(0,p.default)(r.depends_on,n)))return!1;var v={};v["".concat("et-fb-settings-options")]=!0,v["et-fb-option--".concat(r.type.replace("_","-"))]=!0,(0,u.default)(r.depends_show_if)||(v[" et-fb-settings-option--depends-on"]=!0),"categories"!==r.type||(0,u.default)(r.taxonomy_name)||""===r.taxonomy_name||(v["et-fb-option--".concat(r.taxonomy_name)]=!0);var _="",w="",O=!(0,u.default)(r.description)&&""!==r.description,C=(0,S.default)(function(e){return I.default.get((0,k.default)(e,"default_on_front"),I.default.get((0,k.default)(e,"defaultValue"),I.default.get((0,k.default)(e,"default"),"")))}(r)),E=(0,S.default)(L.default.getPageSetting(r.id)),P=C===E?"":E;(0,u.default)(r.label)||""===r.label||(_=o.default.createElement(A.ETBuilderFormLabel,{name:r.name,activeHelp:t._isDescriptionVisible(r.name),hoveredGroup:t._isHoveredGroup(r.name),isResetActive:I.default.get(P,C)!==C,onClickReset:t._onClickReset,key:"et-fb-settings-option-label-".concat(a),onClickHelp:!!O&&t._onClickHelp},r.label)),O&&(w=o.default.createElement(A.ETBuilderFormDescription,{active:t._isDescriptionVisible(r.name),key:"et-fb-settings-option-description-".concat(a)},r.description));var T={slug:r.type,type:"field"},M=L.default.getPageSettings(!0,L.default.getActiveThemeBuilderArea()),j="et_pb_post_settings_image"===a,x=!j||j&&("0"===P||(0,c.default)(P)),D=(j||r.type,j||(0,c.default)(P),t.state),N=D.aiImageID,R=D.aiImageURL;return o.default.createElement(A.ETBuilderFormGroup,{name:r.name,key:"et-fb-settings-option-form-group-".concat(a),onMouseEnterGroup:t._onMouseEnterGroup,onMouseLeaveGroup:t._onMouseLeaveGroup,hovered:t.isOptionHovered(r.name)},_,w,o.default.createElement("div",{className:(0,i.default)(v),key:"et-fb-settings-option-".concat(a)},o.default.createElement("div",{className:"et-fb-settings-option-container",key:"et-fb-settings-option-container-".concat(a)},o.default.createElement(B.default.getControl(r.type),(0,b.default)({key:r.id,value:P,name:r.id,content:P,_onChange:t._onChange,animate:t.props.options.animate,defaultValue:C,fieldDefinition:l,matching:T,attrs:M,aiImageID:N,aiImageURL:R},g,r)),y&&o.default.createElement(o.default.Fragment,null,x&&o.default.createElement(F.default,{ref:function(e){return t.AIButtonRef=e},type:r.type,className:(0,i.default)("et-fb-settings-option-ai__enable","et-fb-settings-option-ai__enable--".concat(t.props.fieldType)),name:r.name,onOpen:function(){},onClose:function(){},value:P,label:r.label,tooltip:ETBuilderBackend.i18n.ai.tooltips.divi_ai_options})))))})))}))}},{key:"_handleFormSubmission",value:function(e){e.preventDefault(),M.default.pageSettingsClose()}},{key:"maybeShowFilterNotice",value:function(){var t=this;this.state.filterNotice||(0,c.default)(this.state.filterOptions)&&(0,c.default)(this.state.filterSelected)||(clearTimeout(ee),ee=setTimeout((function(){e((0,a.findDOMNode)(t)).find(".et-fb-form__group").length||(e((0,a.findDOMNode)(t)).find(".et-fb-options-filter input").trigger("blur"),t.setState({filterNotice:!0}))}),300))}},{key:"_renderPageSettingsPanel",value:function(e){var t={},n=["styles_modified"];return(0,s.default)(ETBuilderBackend.searchFilterItems,(function(e,r){(0,u.default)(t[r])&&(t[r]={}),(0,s.default)(e,(function(e,o){n.includes(o)&&(t[r][o]=e)}))})),o.default.createElement(R.ETBuilderTabPanel,{className:"et-fb-tabs__panel--".concat(e),key:"et-fb-tabs__panel--".concat(e),displayFilter:!0,filterValue:this.state.filterOptions,filterSelected:this.state.filterSelected,filterItems:t,filterGroups:{show_only:ETBuilderBackend.i18n.modals.show_only},filterNotice:this.state.filterNotice,_onFilterInput:this._onFilterInput,_onFilterSelect:this._onFilterSelect},o.default.createElement(A.default,{onSubmit:this._handleFormSubmission},o.default.createElement("input",{type:"submit",className:"et-fb-hide"}),this._renderTab(e),!(this.state.filterNotice||(this.state.filterOptions||this.state.filterSelected)&&(0,d.default)(["content","design"],e))&&o.default.createElement(x.default,{id:"et_pb_default"})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.onModalChange,r=q(t,V),a=ETBuilderBackend.i18n.modals.pageSettings.tabs,l=[o.default.createElement(j.default,{block:!0,danger:!0,buttonName:P.default.PAGE_SETTINGS_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel},o.default.createElement(D.default,{icon:"exit",color:"#FFFFFF"})),o.default.createElement(j.default,{block:!0,primary:!0,alt:!0,buttonName:P.default.PAGE_SETTINGS_BUTTON_UNDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.undo},o.default.createElement(D.default,{icon:"undo",color:"#FFFFFF"})),o.default.createElement(j.default,{block:!0,info:!0,buttonName:P.default.PAGE_SETTINGS_BUTTON_REDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.redo},o.default.createElement(D.default,{icon:"redo",color:"#FFFFFF"})),o.default.createElement(j.default,{block:!0,success:!0,buttonName:P.default.PAGE_SETTINGS_EDIT,tooltip:ETBuilderBackend.i18n.tooltip.modal.save},o.default.createElement(D.default,{icon:"check",color:"#FFFFFF"}))],u=(0,i.default)({"et-fb-modal__module-settings":!0,"et-fb-modal__filter-active":""!==this.state.filterOptions||I.default.hasValue(this.state.filterSelected),"et-fb-modal__page-settings":!0}),s=(0,W.getModalPreferredSnapSettings)().snapLocation,c=this.props.activeTab||0,d=L.default.getActiveThemeBuilderArea(),f=ETBuilderBackend.i18n.modals.pageSettings.title[d];return o.default.createElement(N.default,z({className:u,footerButtons:l,fullscreen:(0,W.getModalPreferredFullscreen)(),globalUpdate:!0,label:f,measurement:(0,W.getModalPreferredDimensions)(),animate:this.props.options.animate,onModalChange:n,position:(0,W.getModalPreferredCoordinates)(),snapLocation:s},r),o.default.createElement(R.default,{selectedIndex:c},o.default.createElement(R.ETBuilderTabList,null,(0,h.default)(a,(function(e,t){return o.default.createElement(R.ETBuilderTabItem,{key:"et-fb-modal--builder-settings-".concat(t)},e)}))),(0,h.default)(a,(function(t,n){return e._renderPageSettingsPanel(n)}))))}},{key:"_onChange",value:function(e,t){"et_pb_enable_ab_testing"===e&&I.default.isOff(t)&&L.default.abIsMode("on",L.default.getActiveThemeBuilderArea())?M.default.abDisable():M.default.pageSettingsChange(e,t)}}])&&K(n.prototype,r),l&&K(n,l),Object.defineProperty(n,"prototype",{writable:!1}),G}(o.default.Component);ne.propTypes=te;var re=ne;t.default=re}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=oe(n(1559)),a=oe(n(786)),i=re(n(0)),l=oe(n(13)),u=n(93),s=oe(n(10)),c=oe(n(58)),d=oe(n(9)),f=oe(n(1)),p=oe(n(34)),h=oe(n(147)),m=oe(n(7)),y=oe(n(4)),g=oe(n(5)),b=oe(n(12)),v=oe(n(37)),_=oe(n(11)),w=oe(n(17)),O=oe(n(31)),k=oe(n(107)),S=oe(n(40)),C=oe(n(129)),E=oe(n(124)),P=oe(n(214)),T=oe(n(56)),M=oe(n(69)),j=oe(n(72)),x=oe(n(395)),D=oe(n(28)),N=oe(n(63)),L=oe(n(1498)),R=n(60),A=oe(n(43)),I=oe(n(1484)),B=oe(n(281)),F=oe(n(781)),W=re(n(782)),V=n(506),U=oe(n(22)),G=oe(n(6)),H=oe(n(14)),z=oe(n(800)),q=n(2),K=oe(n(398)),$=n(18),Y=n(39),X=n(396),J=oe(n(791)),Q=n(358),Z=n(282),ee=n(1481),te=n(783);function ne(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(ne=function(e){return e?n:t})(e)}function re(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=ne(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function oe(e){return e&&e.__esModule?e:{default:e}}function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){he(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}function ce(e){var t=function(){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}}();return function(){var n,r=pe(e);if(t){var o=pe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return de(this,n)}}function de(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fe(e)}function fe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pe(e){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pe(e)}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1876);var me=new z.default,ye=ETBuilderBackend.i18n.fonts,ge=null,be=function(e){!function(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&&se(e,t)}(ne,e);var t,n,r,z=ce(ne);function ne(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,ne),he(fe(t=z.call(this,e)),"_onPromptUseTextClick",(function(e){var n=e.detail,r=n.text,o=n.fieldName;t._onChangeField(o,r)})),he(fe(t),"isOptionHovered",(function(e){return t.state.hoveredGroup===e})),t.displayName="ETBuilderFindReplaceModal";var n=t._getSelectedFieldValue();return t.state={find:n,replace:n,within:"this_page",throughout:"this_page",all:"off",buttonState:!1,colorPaletteMode:"saved"},t._setFindReplacei18n(),t.tabSlug="find-replace",t.isDynamic=(0,R.isDynamicContent)(n),t.moduleSettingMode=G.default.getModuleSettingMode(),t._onKeyDown=t._onKeyDown.bind(fe(t)),t._onClose=t._onClose.bind(fe(t)),t._onMouseEnterGroup=t._onMouseEnterGroup.bind(fe(t)),t._onMouseLeaveGroup=t._onMouseLeaveGroup.bind(fe(t)),t._onClickHelp=t._onClickHelp.bind(fe(t)),t._onChangeMap=t._onChangeMap.bind(fe(t)),t._onChangeField=t._onChangeField.bind(fe(t)),t._onChangeFieldWithin=t._onChangeFieldWithin.bind(fe(t)),t._onChangeFieldThroughout=t._onChangeFieldThroughout.bind(fe(t)),t._onFindReplace=t._onFindReplace.bind(fe(t)),t._resetOption=t._resetOption.bind(fe(t)),t._onPromptUseTextClick=t._onPromptUseTextClick.bind(fe(t)),t}return t=ne,n=[{key:"componentDidMount",value:function(){var e=this;me.reset(),(0,q.appWindow)().addEventListener("keydown",this._onKeyDown),(0,q.topWindow)().addEventListener("keydown",this._onKeyDown),G.default.addColorPaletteChangeListener((function(t){e.setState({colorPaletteMode:t})})),window.addEventListener("ai_prompt_use_text_click",this._onPromptUseTextClick)}},{key:"componentWillUnmount",value:function(){me.reset(),(0,q.appWindow)().removeEventListener("keydown",this._onKeyDown),(0,q.topWindow)().removeEventListener("keydown",this._onKeyDown),window.removeEventListener("ai_prompt_use_text_click",this._onPromptUseTextClick)}},{key:"_setFindReplacei18n",value:function(){ge="replace_global_color"===this.props.element.intent?ETBuilderBackend.i18n.replaceGlobalColor.modal:ETBuilderBackend.i18n.findReplace.modal}},{key:"_getEditedModule",value:function(e,t){var n=(0,f.default)(this.props,"module");return(0,_.default)(e)?n:(0,f.default)(n,e,t)}},{key:"_getEditedModuleType",value:function(){return this._getEditedModule("props.type")}},{key:"_getModuleStructure",value:function(e){switch(e||this._getEditedModuleType()){case"et_pb_section":return"section";case"et_pb_row":case"et_pb_row_inner":return"row";case"et_pb_column":case"et_pb_column_inner":return"column";default:return"module"}}},{key:"_getModuleTitle",value:function(e){var t=e||this._getEditedModuleType();return me.has("getModuleTitle",t)?me.get("getModuleTitle",t):me.set(G.default.getModuleTitle(t),"getModuleTitle",t)}},{key:"_getSourceModuleAddressScope",value:function(e){var t=this,n=G.default.getSectionsFlattened(),r=this._getEditedModule("props",{}),o=(0,f.default)(r,"address",""),a=(0,q.getModuleAddressSequence)(o),i=e.replace("this_","");return(0,c.default)(n,(function(e){if(!(0,m.default)(a,e.address))return!1;var n="et_pb_column"===e.type,r="et_pb_specialty_section"===e.parent_slug,o=(0,M.default)((0,f.default)(e,"content",[]),(function(e){return"et_pb_row_inner"===e.type}));return!(n&&r&&o)&&t._getModuleStructure(e.type)===i}))}},{key:"_getTargetModules",value:function(){var e=this,t=G.default.getSectionsFlattened(),n=this._getEditedModule("props",{}),r=(0,f.default)(n,"type","");return function(){switch(e.state.within){case"this_module":return[n];case"this_page":return t;case"this_section":case"this_row":case"this_column":var o=(0,f.default)(e._getSourceModuleAddressScope(e.state.within),"address");return t.filter((function(e){return(0,m.default)((0,q.getModuleAddressSequence)(e.address),o)}));default:var a=(0,f.default)(e._getSourceModuleAddressScope(e.state.throughout),"address"),i="this_page"===e.state.throughout,l="all_same_type"===e.state.within;return t.filter((function(t){var n=(0,m.default)((0,q.getModuleAddressSequence)(t.address),a);return!(!i&&!n)&&(l?r===t.type:"module"===e._getModuleStructure(t.type))}))}}().filter((function(e){return!(0,q.isModuleLocked)(e,t)}))}},{key:"_getModuleFields",value:function(e){var t=e?{props:e}:this._getEditedModule(),n=t.props.type;if(me.has("getModuleFields",n))return me.get("getModuleFields",n);var r=G.default.getModuleFields(t),o=(0,f.default)(this._getEditedModule("props"),"attrs"),a={};return(0,d.default)(r,(function(e,t){var n=(0,$.getHoverField)(t),r=(0,Y.getStickyField)(t);(0,p.default)(o,n)&&(0,T.default)(a,n,e),(0,p.default)(o,r)&&(0,T.default)(a,r,e)})),me.set((0,s.default)({},r,a),"getModuleFields",n)}},{key:"_getHoveredElement",value:function(e){var t=(0,_.default)(e)?"element":"element.".concat(e);return(0,f.default)(this.props,t)}},{key:"_getHoveredElementId",value:function(){return this._getHoveredElement("elementId")}},{key:"_getHoveredElementSubId",value:function(){return this._getHoveredElement("subElementId")}},{key:"_getSelectedField",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._getHoveredElement("payload.toggleId"),n=this._getEditedModule(),r=this._getHoveredElement("payload.toggleGroupId"),o=this._getHoveredElement("elementId");e||(r="css"===r?"custom_css":r);var a=(0,c.default)(G.default.getModuleFields(n),{name:o,tab_slug:r,toggle_slug:t}),i=(0,s.default)({},{name:o,type:this._getHoveredElement("payload.option_family"),label:this._getHoveredElement("payload.optionTitle"),subField:this._getHoveredElement("subElementId")},a);if("categories"===i.type&&(i=(0,s.default)({},i,{categories_list:{},taxonomy_name:(0,_.default)(i.taxonomy_name)?"category":i.taxonomy_name})),"conditional_logic"===i.type&&(i=(0,s.default)({},i,{hideAddButton:!0,hideDeleteButton:!0})),"select"===i.type&&(0,_.default)(i.default)&&!(0,g.default)(i.options)){var l=(0,y.default)(i.options)?[]:{};(0,d.default)(i.options,(function(e,t){(0,b.default)(e)||(0,y.default)(e)?(0,d.default)(e,(function(e,t){l[t]=e})):l[t]=e})),l&&(i=(0,s.default)({},i,{default:(0,y.default)(l)?l[0]:(0,h.default)((0,w.default)(l))}))}return"center_map"===i.type&&(i=(0,s.default)({},i,{disableAction:!0,hideUpdateButton:!0})),i}},{key:"_getSelectedFieldType",value:function(){return(0,f.default)(this._getSelectedField(),"type","text")}},{key:"_getSelectedFieldLabel",value:function(){var e=this._getSelectedField(),t=(0,f.default)(e,"label","");if("font"===e.type){var n=(0,f.default)(this._getSelectedField(),"group_label",""),r=this._getHoveredElementSubId(),o=(this._getSelectedFieldValue()||"||||||||").split("|"),a={family:(0,f.default)(o,0,""),weight:(0,f.default)(o,1,""),italic:(0,f.default)(o,2,""),uppercase:(0,f.default)(o,3,""),underline:(0,f.default)(o,4,""),capitalize:(0,f.default)(o,5,""),strikethrough:(0,f.default)(o,6,""),line_style:(0,f.default)(o,7,""),line_color:(0,f.default)(o,8,"")},i=(0,q.isOn)((0,f.default)(a,"underline"));switch(r){case"weight":t=ye.fontWeight;break;case"style":t=ye.fontStyle;break;case"line_color":var l=i?ye.underline:ye.strikethrough,u=ye.color;t="".concat(l," ").concat(u);break;case"line_style":var s=i?ye.underline:ye.strikethrough,c=ye.style;t="".concat(s," ").concat(c);break;default:t=(0,f.default)(ye,r,"")}return(0,_.default)(n)?t:"".concat(n," ").concat(t)}return t}},{key:"_getSelectedFieldValue",value:function(){var e=(0,f.default)(this._getSelectedField(!0),"name");return"desktop"!==this.moduleSettingMode&&(e=J.default.getNameByMode(e,this._getEditedModule("props.attrs"))),this._getFieldValue(e)}},{key:"_getFieldValue",value:function(e,t,n){var r=(0,_.default)(e)?(0,f.default)(this._getSelectedField(),"name"):e,o=(0,_.default)(t)?this._getSelectedField():t,a=(0,_.default)(n)?this._getEditedModule("props"):n,i=a.attrs||{};if(!((0,g.default)(o)||(0,_.default)(r)||(0,_.default)(o.type))){var l;if(("content"===r||(0,f.default)(o,"is_fb_content",!1))&&(l=(0,f.default)(a,"content")),"gradient-stops"===o.type){var u=(0,te.getStopWithinGradient)(o.subField,(0,f.default)(a.attrs,r));l=null==u?void 0:u.color}if("custom_padding"===o.type&&"custom_padding"!==r&&this._isModuleHasColumn(a)){var s=r.replace("padding_",""),c=(0,q.hasValue)(i["padding_".concat(s,"_last_edited")])?i["padding_".concat(s,"_last_edited")].split("|"):[],d=((0,f.default)(i,"padding_top_".concat(s),"")||"").trim(),p=((0,f.default)(i,"padding_right_".concat(s),"")||"").trim(),h=((0,f.default)(i,"padding_bottom_".concat(s),"")||"").trim(),m=((0,f.default)(i,"padding_left_".concat(s),"")||"").trim(),y=((0,f.default)(i,"padding_top_bottom_link_".concat(s),"")||"").trim(),b=((0,f.default)(i,"padding_left_right_link_".concat(s),"")||"").trim(),v="".concat(d,"|").concat(p,"|").concat(h,"|").concat(m,"|").concat(y,"|").concat(b);switch((0,_.default)(c[1])?"desktop":c[1]){case"phone":l=(0,f.default)(i,"padding_".concat(s,"_phone"),"");break;case"tablet":l=(0,f.default)(i,"padding_".concat(s,"_tablet"),"");break;default:l=v}}return"center_map"===o.type&&(l="et_pb_map_pin"===a.type?JSON.stringify((0,C.default)(i,["pin_address","pin_address_lat","pin_address_lng","zoom_level"])):JSON.stringify((0,C.default)(i,["address_lat","address_lng","zoom_level"]))),(0,_.default)(l)&&(l=(0,f.default)(i,r,(0,f.default)(o,"default"))),l}}},{key:"_getWithinOptions",value:function(){var e=this,t=this._getModuleStructure(),n={};return(0,d.default)(ETBuilderBackend.findReplace.within,(function(r,o){if("locations"===o){var a=(0,w.default)(r).filter((function(t){return"this_page"===t||e._getSourceModuleAddressScope(t)}));(0,g.default)(a)||(n[o]=(0,C.default)(r,a))}else{var i=["this_module","all_same_type"];"module"===t&&i.push(["all_modules"]),(0,g.default)(i)||(n[o]=(0,k.default)((0,C.default)(r,i),(function(t){return t.replace("%s",e._getModuleTitle())})))}})),n}},{key:"_getThroughoutOptions",value:function(){var e=this,t=this._getModuleStructure(),n=(0,f.default)(ETBuilderBackend,"findReplace.throughout",{}),r=(0,w.default)(n).filter((function(n){return"this_".concat(t)!==n&&("this_page"===n||e._getSourceModuleAddressScope(n))}));return(0,C.default)(n,r)}},{key:"_isReplaceValueValid",value:function(e,t){var n=e||this.state.replace,r=t||this._getSelectedField();if(!(0,f.default)(r,"required",!1)&&!(0,q.hasValue)(n))return!0;switch((0,f.default)(r,"type")){case"color":case"color-alpha":case"button-bg-color":case"background-field":return K.default.isColorValid(n.toLowerCase())||(0,j.default)(n,"gcid-");case"gradient-stops":return(0,v.default)(n)?K.default.isColorValid(n.toLowerCase())||(0,j.default)(n,"gcid-"):(0,O.default)(n,(function(e){return K.default.isColorValid(e.color.toLowerCase())||(0,j.default)(e.color,"gcid-")}));case"range":var o=/^-?\d*\.?\d+$/,a=(0,f.default)(r,"default_unit",(0,f.default)(r,"fixed_unit",!1)),i=a?o.test(n.replace(a,"")):o.test(n);if(i&&(0,f.default)(r,"fixed_range",!1)){var l=r.range_settings||{min:0,max:100,step:1},u=(0,f.default)(r,"fixed_unit",(0,f.default)(r,"default_unit",!1)),s=u?parseFloat(n.replace(u,"")):parseFloat(n);i=s>=(0,f.default)(l,"min",0)&&s<=(0,f.default)(l,"max",100)}return i;case"font":return 9===(0,D.default)(n).split("|").length;case"center_map":return(0,q.isJson)(n);default:return!0}}},{key:"_isFieldTypeMatch",value:function(e){var t=!1,n=(0,m.default)(["color","color-alpha","gradient-stops","button-bg-color","background-field"],this._getSelectedFieldType()),r=function(){return e.type||"custom_css"!==e.toggle_slug?n?"color-alpha":e.type:"codemirror"};switch(r()){case"upload":var o=(0,f.default)(e,"data_type","image"),a=(0,f.default)(this._getSelectedField(),"data_type","image");(t=r()===this._getSelectedFieldType()&&o===a)&&"video"===a&&(t=(0,f.default)(e,"field_template",!0)===(0,f.default)(this._getSelectedField(),"field_template",!1));break;case"color":case"color-alpha":case"gradient-stops":case"button-bg-color":case"background-field":t=n;break;default:t=r()===this._getSelectedFieldType()}return t}},{key:"_isFieldNameMatch",value:function(e,t,n){if((0,q.isOn)(this.state.all))return!0;if(n&&(0,m.default)(this._getHoveredElement("payload.option"),n))return!0;var r={moduleType:this._getEditedModuleType(),field:this._getSelectedField(),value:this._getSelectedFieldValue()},o={moduleType:t.type,field:e,value:this._getFieldValue((0,f.default)(e,"name"),e,t)};return G.default.getModuleFieldsMapping(r,o)}},{key:"_isButtonEnabled",value:function(){return!((0,D.default)(this.state.find)===(0,D.default)(this.state.replace)||(0,g.default)(this.state.within)||this._isThroughoutEnabled()&&(0,g.default)(this.state.throughout)||!this._isReplaceValueValid())}},{key:"_isThroughoutEnabled",value:function(){return(0,m.default)(["all_modules","all_same_type"],this.state.within)}},{key:"_isDescriptionVisible",value:function(e){return this.state.activeDescription===e}},{key:"_isModuleHasColumn",value:function(e){var t=e||this._getModuleEdited("props"),n=(0,m.default)(["et_pb_row","et_pb_row_inner"],t.type),r=(0,q.isOn)((0,f.default)(t,"attrs.specialty")&&"et_pb_section"===(0,f.default)(t,"type"));return n||r}},{key:"_onKeyDown",value:function(e){27===e.keyCode&&this._onClose()}},{key:"_onClose",value:function(){U.default.findReplaceModalClose(this._getEditedModule(),this._getHoveredElement())}},{key:"_onMouseEnterGroup",value:function(e){this.setState({hoveredGroup:e})}},{key:"_onMouseLeaveGroup",value:function(){this.setState({hoveredGroup:!1})}},{key:"_onClickHelp",value:function(e){this.setState({activeDescription:this.state.activeDescription!==e&&e})}},{key:"_onChangeMap",value:function(e,t){try{this.setState({replace:JSON.stringify((0,T.default)(JSON.parse(this.state.replace),e,t))})}catch(n){this.setState(he({},e,t))}}},{key:"_onChangeField",value:function(e,t){e!==(0,f.default)(this._getSelectedField(),"name")?this.setState(he({},e,t)):this.setState({replace:t})}},{key:"_onChangeFieldWithin",value:function(e){this.setState({within:e})}},{key:"_onChangeFieldThroughout",value:function(e){this.setState({throughout:e})}},{key:"_onFindReplace",value:function(){var e=this;this.setState({buttonState:"loading"});var t=(0,D.default)(this.state.replace),n=(0,D.default)(this.state.find),r=!(0,q.hasValue)(n),i="font"===this._getHoveredElement("payload.option_family"),l=i&&this._getHoveredElement("subElementId"),u=l&&(0,q.getFontFieldIndexes)(l),s="gradient-stops"===this._getHoveredElement("payload.option_family"),h=this._getEditedModule("props.address"),y=this._getHoveredElement("payload.option"),b="display_conditions"===this._getHoveredElement("payload.option_family");new Promise((function(v){setTimeout((function(){var _=e._getTargetModules();return(0,g.default)(_)?v(!1):((0,d.default)(_,(function(v){var _=e._getModuleFields(v);"et_pb_icon"!==v.type||(0,p.default)(v.attrs.font_icon)||(v.attrs.font_icon=_.font_icon.default);var w={};(0,d.default)(v.attrs,(function(e,t){w[t]=e})),(0,d.default)(y,(function(e){(0,p.default)(w,e)||(w[e]="")}));var O=(0,E.default)(w,(function(e){if(e===n)return!0;if(i&&l){var t=e?e.split("|"):"||||||||".split("|"),o=n?n.split("|"):"||||||||".split("|");if(9===t.length&&t.length===o.length&&t[u]===o[u])return!0}return!!(0,ee.isMatchingGradientStopColorFound)(s,n,e)||!!(0,ee.isDisplayConditionsFoundInFindReplace)(b,n,e)||!(!r||(0,q.hasValue)(e))}));if(!(0,g.default)(O)){var k={};if((0,d.default)(O,(function(r,i){var l=J.default.getBaseName(i),u=(0,f.default)(_,l);if(!u&&(0,j.default)(l,"custom_css_")&&(u=(0,f.default)(_,(0,P.default)(l,"custom_css_",""))),u&&("skip"===u.type&&l.match(/_\d+$/)&&(u=(0,f.default)(_,l.replace(/_\d+$/,""),u)),u&&e._isFieldNameMatch(u,v,i)&&e._isFieldTypeMatch(u)&&e._isReplaceValueValid(t,u)))switch(u.type){case"font":var s=e._getFindReplaceFont(n,r,t);s&&(k[i]=s);break;case"select_box_shadow":var p=(0,c.default)(u.presets,(function(e){return e.value===t}));p&&((0,d.default)(p.fields,(function(e,t){k[t]=e})),k[i]=t);break;case"center_map":(0,d.default)(JSON.parse(t),(function(e,t){k[t]=e}));break;case"display_conditions":var h=(0,ee.decodeString)(t),m=(0,Q.isJson)(h)?JSON.parse(h):null;if(m){var y=(0,a.default)((function(e){return(0,o.default)("id",(0,Z.v4)(),e)}),m);k[i]=(0,ee.encodeString)(JSON.stringify(y))}break;default:k[i]=t}})),!(0,g.default)(k)){var S={};if((0,d.default)(k,(function(t,r){if(!(0,R.isDynamicContent)(t)||(0,R.isDynamicContentSupported)((0,f.default)(v,"type"),r)){if(r.includes("gradient")){var o=(0,te.parseGradientString)(v.attrs[r]);(0,d.default)(o,(function(e,t){(0,m.default)((0,x.default)(e.color),(0,x.default)(n))&&(o[t].color=k[r])})),t=(0,te.toGradientString)(o)}S[r]={value:t,isContent:(0,m.default)(["content","raw_content"],r)&&"et_pb_counter"!==(0,f.default)(v,"type")},(r.includes("color")||r.includes("gradient"))&&e._findReplaceColorValue(v,r)}})),!(0,g.default)(S)){var C=v.address,T=C===h;U.default.findReplaceModuleUpdate(C,S,T)}}}})),v(!0))}),0)})).then((function(){e._onClose()}))}},{key:"_getFindReplaceData",value:function(e,t,n){var r=this,o=(0,D.default)(this.state.find),a=(0,D.default)(this.state.replace),i={};if(!this._isFieldTypeMatch(t))return!1;if(!this._isFieldNameMatch(t,n))return!1;if(!this._isReplaceValueValid(a,t))return!1;var l=[e];if(t.mobile_options&&J.default.isResponsiveEnabled(e,n)&&(l.push("".concat(e,"_tablet")),l.push("".concat(e,"_phone"))),"tabs"===t.hover&&J.default.isHoverEnabled(e,n)&&l.push("".concat(e,"__hover")),t.sticky&&J.default.isStickyEnabled(e,n)&&l.push("".concat(e,"__sticky")),(0,d.default)(l,(function(l){var u=l,s=(0,f.default)(t,"tab_slug",""),c=(0,f.default)(t,"toggle_slug","");"custom_css"===s&&"classes"!==c&&(0,j.default)(u,"custom_css_")&&(u=(0,P.default)(u,"custom_css_",""));var p=(0,D.default)(r._getFieldValue(u,t,n));switch((0,f.default)(t,"type")){case"skip":case"hidden":break;case"font":var h=r._getFindReplaceFont(o,p,a);h&&(0,T.default)(i,u,h);break;case"center_map":o.toLowerCase()===p.toLowerCase()&&(0,d.default)(JSON.parse(a),(function(e,t){(0,T.default)(i,t,e)}));break;default:if(p.toLowerCase()===o.toLowerCase()&&(0,T.default)(i,u,a),0===u.indexOf("padding_")&&r._isModuleHasColumn(n.props)&&e!==u){var m=u.replace("padding_",""),y=a.split("|");e==="padding_top_".concat(m)?(0,T.default)(i,e,(0,f.default)(y,0,"")):e==="padding_right_".concat(m)?(0,T.default)(i,e,(0,f.default)(y,1,"")):e==="padding_bottom_".concat(m)?(0,T.default)(i,e,(0,f.default)(y,2,"")):e==="padding_left_".concat(m)?(0,T.default)(i,e,(0,f.default)(y,3,"")):e==="padding_top_bottom_link_".concat(m)?(0,T.default)(i,e,(0,f.default)(y,4,"")):e==="padding_left_right_link_".concat(m)&&(0,T.default)(i,e,(0,f.default)(y,5,""))}}})),!(0,g.default)(i)&&(0,f.default)(t,"presets",!1)){var u=t.presets.filter((function(e){return(0,f.default)(e,"value")===a}));(0,d.default)(u,(function(e){var t=(0,f.default)(e,"fields",!1);t&&(0,d.default)(t,(function(e,t){(0,T.default)(i,t,e)}))}))}return i}},{key:"_getFindReplaceFont",value:function(e,t,n){var r=(0,D.default)(e).split("|");9!==r.length&&(r="||||||||".split("|"));var o=(0,D.default)(t).split("|");9!==o.length&&(o="||||||||".split("|"));var a=(0,D.default)(n).split("|");9!==a.length&&(a="||||||||".split("|"));var i=(0,q.getFontFieldIndexes)(this._getHoveredElementSubId());return!(0,M.default)(i,(function(e){return(0,f.default)(r,e,"")!==(0,f.default)(o,e,"")}))&&((0,d.default)(i,(function(e){o[e]=(0,f.default)(a,e,"")})),o.join("|"))}},{key:"_resetOption",value:function(){this.setState({replace:""})}},{key:"_renderSubHeader",value:function(){if("replace_global_color"===this.props.element.intent)return i.default.createElement("p",{className:"et-fb-modal__find-replace__header-desc"},ge.description)}},{key:"_getColorFindReplaceConfig",value:function(e){return e.findReplaceModalFind?{hideColorManagerLinks:!0,hideHarmoniousPalette:!0,hideCurrentColorWrapper:!0,hideColorResetButton:!0,showCustomInput:!0}:e.findReplaceModalReplace?{hasColorManager:!0,showPickerPalettes:!1,hidePickerOnPaletteSelect:!0,hidePaletteOnPickerActive:!1}:void 0}},{key:"_getReplaceGloablColorConfig",value:function(e){var t=this.props.element,n=t.color,r=t.colorId;return e.findReplaceModalFind?{hideColorManagerLinks:!0,hideHarmoniousPalette:!0,hideCurrentColorWrapper:!0,hideColorResetButton:!0,showCustomInput:!0,colorPaletteMode:"global",colorId:r,value:n}:e.findReplaceModalReplace?{hideColorManagerLinks:!0,colorPaletteMode:"global",colorId:r,color:n}:void 0}},{key:"_findReplaceColorValue",value:function(e,t){var n=this.props.element,r=null;"replace_global_color"===n.intent&&(r=n.colorId),U.default.maybeUpdateGlobalColorsInfo(e,t,r)}},{key:"_renderField",value:function(e,t,n){var r=this._getEditedModule(),o=r.isModuleItem&&!(0,_.default)(r.parentModule.props.type)&&r.parentModule.props.type?"".concat(e.name,"_child"):e.name;e.findReplaceModalFind?o="".concat(o,"__find"):e.findReplaceModalReplace?o="".concat(o,"__replace"):e.findReplaceModalWithin?o="".concat(o,"__within"):e.findReplaceModalThroughout?o="".concat(o,"__throughout"):e.findReplaceModalReplaceAll&&(o="".concat(o,"__all"));var a,u={slug:e.type,type:"field"},c=(0,s.default)({},e,{resetValue:!1,mobile_options:!1,disableReset:!0,uniqueKey:o,processedKey:o,fieldDefinition:e,matching:u});if("transform"===c.type){var d=(0,f.default)(H.default.getComponentAdvancedFields(this.props.module),"transform_styles.composite_structure"),p="".concat(c.name).replace("transform_",""),h=(0,f.default)(d,"".concat(p,".controls.transform_").concat(p));c.default_unit=h.default_unit,c.transform_type="".concat(c.name).replace("transform_",""),(0,q.hasValue)(c.default)||(c.default=h.default),(0,q.hasValue)(c.value)||(c.value=h.default)}(e.findReplaceModalFind||e.findReplaceModalReplace)&&((0,m.default)(["color","color-alpha","gradient-stops"],c.type)&&(a="replace_global_color"===this.props.element.intent?this._getReplaceGloablColorConfig(e):this._getColorFindReplaceConfig(e),c=(0,s.default)({},c,le(le({},a),{},{moduleAttrs:(0,f.default)(r,"props.attrs")}))),"font"===c.type&&(c=(0,s.default)({},c,{subFieldLabel:!1,subField:this._getHoveredElementSubId()?this._getHoveredElementSubId():"font"})),"select_with_option_groups"===c.type&&(c=(0,s.default)({},c,{value:(0,f.default)((0,D.default)(c.value).split("|"),1,"none"),hideAddButton:!0,hideRemoveButton:!0,hideFetchButton:!0})),"multiple_checkboxes"===c.type&&(c=(0,s.default)({},c,{shortcut_index:o})));var y=(0,f.default)(c,"type","text"),g=y.replace("_","-");"custom_css_free_form"===(0,f.default)(e,"name")&&(c=(0,s.default)({},c,{inline:!1}));var b=(0,l.default)(he({"et-fb-form__group--find-replace":!0,"et-fb-form__group--find-replace__find":e.findReplaceModalFind,"et-fb-form__group--find-replace__replace":e.findReplaceModalReplace,"et-fb-form__group--find-replace__within":e.findReplaceModalWithin,"et-fb-form__group--find-replace__throughout":e.findReplaceModalThroughout,"et-fb-form__group--find-replace__all":e.findReplaceModalReplaceAll,"et-fb-settings-option-select--column-structure":"column-structure"===y},"et-fb-form__group--".concat(g),!0)),v=(0,l.default)(he({"et-fb-settings-options":!0,"et-fb-option--depends-on":!(0,_.default)(e.depends_default)||!(0,_.default)(e.depends_show_if)||!(0,_.default)(e.depends_show_if_not),"et-fb-option--select-with-option-groups":"select_with_option_groups"===y&&e.groups},"et-fb-option--".concat(g),!0)),w=(0,l.default)(he({"et-fb-option-container":!0},"et-fb-option-container--".concat(g),!0)),O=(0,i.createElement)(I.default.getControl(y),c);return i.default.createElement(V.ETBuilderFormGroup,{className:b,name:o,key:"".concat(this.tabSlug,"-form-group-").concat(o),hovered:this.isOptionHovered(c.name),onMouseEnterGroup:this._onMouseEnterGroup,onMouseLeaveGroup:this._onMouseLeaveGroup},i.default.createElement(V.ETBuilderFormLabel,{name:o,hoveredGroup:this.state.hoveredGroup===o,activeHelp:this.state.activeDescription===o,onClickHelp:this._onClickHelp},t),i.default.createElement(V.ETBuilderFormDescription,{active:this.state.activeDescription===o},n),i.default.createElement("div",{className:v},i.default.createElement("div",{className:w},i.default.createElement(B.default,{componentName:o},(this.isDynamic||c.findReplaceModalReplace)&&(0,m.default)(L.default.supportedFieldTypes,y)?i.default.createElement(L.default,{type:c.dynamic_content||y,fieldName:c.name,fieldType:y,value:c.value,dynamicAttributes:[c.name],showSettingsButton:!c.readonly,showDisableButton:!c.readonly,onChange:c._onChange,onReset:this._resetOption},O):O))))}},{key:"_renderFieldFind",value:function(){var e,t=(0,s.default)({},this._getSelectedField(),{module:this,type:this._getSelectedFieldType(),value:this.state.find,findReplaceModalFind:!0,readonly:!0,_onChange:S.default}),n=this.state.find;"text"===t.type||(0,_.default)(n)||(0,T.default)(t,"default",n),"codemirror"===t.type&&(0,f.default)(t,"is_fb_content")&&(0,T.default)(t,"content",n),e="replace_global_color"===this.props.element.intent?ge.find.label:ge.find.label.replace("%s",this._getSelectedFieldLabel());var r=ge.find.description;return this._renderField(t,e,r)}},{key:"_renderFieldWithin",value:function(){if("replace_global_color"!==this.props.element.intent&&"global"!==this.state.colorPaletteMode){var e={name:"within",type:"select",value:this.state.within,options:this._getWithinOptions(),optionGroups:ETBuilderBackend.findReplace.groups,groupSeparator:!1,findReplaceModalWithin:!0,__onChange:this._onChangeFieldWithin},t=ge.within.label,n=ge.within.description;return this._renderField(e,t,n)}}},{key:"_renderFieldThroughout",value:function(){if(!this._isThroughoutEnabled())return!1;var e={name:"throughout",type:"select",value:this.state.throughout,options:this._getThroughoutOptions(),findReplaceModalThroughout:!0,__onChange:this._onChangeFieldThroughout},t=ge.throughout.label,n=ge.throughout.description;return this._renderField(e,t,n)}},{key:"_renderFieldReplace",value:function(){var e=this,t=(0,s.default)({},this._getSelectedField(),{module:this,type:this._getSelectedFieldType(),default:(0,R.isDynamicContent)(this.state.find)?"":this.state.find,value:(0,_.default)(this.state.replace)?"":this.state.replace,findReplaceModalReplace:!0,_onChange:S.default}),n=(0,f.default)(t,"readonly_if",!1);n&&(0,d.default)(n,(function(n,r){(0,m.default)(n,e._getEditedModule(r.replace(":",".props.attrs.")))&&(0,T.default)(t,"readonly",!0)}));var r=(0,f.default)(t,"readonly_if_not",!1);r&&(0,d.default)(r,(function(n,r){(0,m.default)(n,e._getEditedModule(r.replace(":",".props.attrs.")))||(0,T.default)(t,"readonly",!0)})),(0,f.default)(t,"readonly",!1)||("center_map"===t.type?((0,T.default)(t,"_onChange",this._onChangeMap),(0,T.default)(t,"hideUpdateButton",this._onChangeMap),(0,q.isJson)(this.state.replace)&&(0,d.default)(JSON.parse(this.state.replace),(function(e,n){(0,T.default)(t,n,(0,m.default)(["zoom_level"],n)?parseInt(e,10):e)}))):(0,T.default)(t,"_onChange",this._onChangeField)),"codemirror"===t.type&&(0,f.default)(t,"is_fb_content")&&(0,T.default)(t,"content",this.state.replace);var o=ge.replaceWith.label,a=ge.replaceWith.description;return this._renderField(t,o,a)}},{key:"_renderFieldReplaceAll",value:function(){var e=this;if("replace_global_color"!==this.props.element.intent&&"global"!==this.state.colorPaletteMode){var t=(0,k.default)(ETBuilderBackend.findReplace.all,(function(t){return t.replace("%s",e._getSelectedFieldLabel())})),n={name:"all",type:"multiple_checkboxes",value:this.state.all,options:t,findReplaceModalReplaceAll:!0,_onChange:this._onChangeField},r=ge.replaceAll.label.replace("%s",this._getSelectedFieldLabel()),o=ge.replaceAll.description;return this._renderField(n,r,o)}this.setState({all:"on"})}},{key:"render",value:function(){var e=this.state.buttonState?i.default.createElement(A.default,{icon:this.state.buttonState,color:"#FFFFFF"}):ge.tooltip,t=[i.default.createElement(N.default,{block:!0,info:!0,ink:!1,disable:!1!==this.state.buttonState,tooltip:ge.tooltip,__onClick:this.state.buttonState?S.default:this._onFindReplace},e)],n=(0,X.getModalPreferredSnapSettings)().snapLocation,r=le(le({},this.props),{},{measurement:(0,X.getModalPreferredDimensions)(),disableFullscreenButton:!0,disableSnapButton:!0,disableResizeButton:!0}),o=(0,l.default)({"et-fb-modal__module-settings":!0,"et-fb-modal__find-replace":!0}),a="font_icon"===this._getHoveredElement("elementId");return i.default.createElement(F.default,ae({className:o,footerButtons:t,fullscreen:(0,X.getModalPreferredFullscreen)(),label:(0,u.decode)(ge.title),position:(0,X.getModalPreferredCoordinates)(),snapLocation:n,_closeFunction:this.state.buttonState?S.default:this._onClose,globalUpdate:!0},r),i.default.createElement(B.default,null,i.default.createElement(W.default,{selectedIndex:0},i.default.createElement(W.ETBuilderTabPanel,{className:"et-fb-tabs__panel--".concat(this.tabSlug),slug:this.tabSlug,selected:!0},i.default.createElement("div",{className:"et-fb-form"},this._renderSubHeader(),this._renderFieldFind(),this._renderFieldWithin(),this._renderFieldThroughout(),this._renderFieldReplace(),a?"":this._renderFieldReplaceAll())))))}}],n&&ue(t.prototype,n),r&&ue(t,r),Object.defineProperty(t,"prototype",{writable:!1}),ne}(i.default.PureComponent),ve=be;t.default=ve},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=ee(n(164)),a=Z(n(0)),i=ee(n(13)),l=n(93),u=ee(n(10)),s=ee(n(58)),c=ee(n(9)),d=ee(n(1)),f=ee(n(34)),p=ee(n(147)),h=ee(n(7)),m=ee(n(4)),y=ee(n(12)),g=ee(n(5)),b=ee(n(11)),v=ee(n(17)),_=ee(n(107)),w=ee(n(135)),O=ee(n(40)),k=ee(n(129)),S=ee(n(124)),C=ee(n(304)),E=ee(n(28)),P=ee(n(56)),T=ee(n(72)),M=ee(n(844)),j=ee(n(37)),x=ee(n(214)),D=ee(n(69)),N=ee(n(42)),L=ee(n(63)),R=ee(n(43)),A=ee(n(1484)),I=ee(n(281)),B=ee(n(781)),F=Z(n(782)),W=n(506),V=ee(n(22)),U=ee(n(6)),G=ee(n(14)),H=ee(n(800)),z=n(2),q=ee(n(18)),K=ee(n(39)),$=ee(n(1498)),Y=n(60),X=n(396),J=n(464);function Q(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Q=function(e){return e?n:t})(e)}function Z(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=Q(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function ee(e){return e&&e.__esModule?e:{default:e}}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},te.apply(this,arguments)}function ne(e){return function(e){if(Array.isArray(e))return re(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return re(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return re(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function le(e,t){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},le(e,t)}function ue(e){var t=function(){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}}();return function(){var n,r=de(e);if(t){var o=de(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return se(this,n)}}function se(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ce(e)}function ce(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function de(e){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},de(e)}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1877);var pe=new H.default,he=ETBuilderBackend.i18n.modals.extend_styles,me=ETBuilderBackend.i18n.fonts,ye=function(e){!function(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&&le(e,t)}(Q,e);var t,n,r,H=ue(Q);function Q(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Q),fe(ce(t=H.call(this,e)),"isOptionHovered",(function(e){return t.state.hoveredGroup===e})),fe(ce(t),"getModuleFields",(function(e){var t=e.props.type;if(pe.has("getModuleFields",t))return pe.get("getModuleFields",t);var n=U.default.getModuleFields(e),r=(0,k.default)(n,(0,v.default)(n).filter((function(e){return!(0,T.default)(e,"_")&&!(0,h.default)(["advanced_common","advanced_defaults"],e)})));return pe.set(r,"getModuleFields",t)})),fe(ce(t),"getModuleStructure",(function(e){if(pe.has("getModuleStructure",e))return pe.get("getModuleStructure",e);switch(e){case"et_pb_section":return pe.set("section","getModuleStructure",e);case"et_pb_row":case"et_pb_row_inner":return pe.set("row","getModuleStructure",e);case"et_pb_column":case"et_pb_column_inner":return pe.set("column","getModuleStructure",e);default:return pe.set("module","getModuleStructure",e)}})),fe(ce(t),"getAvailableThroughoutOptions",(function(){var e=ae({},he.options.throughout),t=U.default.getActiveThemeBuilderArea(),n=U.default.isAllowedAction("theme_builder"),r=!!ETBuilderBackend.themeBuilder.themeBuilderAreas.et_header_layout&&ETBuilderBackend.themeBuilder.themeBuilderAreas.et_header_layout.override,o=!!ETBuilderBackend.themeBuilder.themeBuilderAreas.et_body_layout&&ETBuilderBackend.themeBuilder.themeBuilderAreas.et_body_layout.override,a=!!ETBuilderBackend.themeBuilder.themeBuilderAreas.et_footer_layout&&ETBuilderBackend.themeBuilder.themeBuilderAreas.et_footer_layout.override;return r&&"et_header_layout"===t||delete e.et_header_layout,o&&"et_body_layout"===t||delete e.et_body_layout,a&&"et_footer_layout"===t||delete e.et_footer_layout,"post_content"!==t&&delete e.post_content,n&&(r||o||a)||delete e.page,e})),t.displayName="ETBuilderExtendStylesModal",t.defaultStates={to:t.getTargetElement(),throughout:"page"},t.state=(0,u.default)({buttonState:!1},t.defaultStates),t.slug="extend-styles",t.onClose=t.onClose.bind(ce(t)),t.onKeyDown=t.onKeyDown.bind(ce(t)),t.onMouseEnterGroup=t.onMouseEnterGroup.bind(ce(t)),t.onMouseLeaveGroup=t.onMouseLeaveGroup.bind(ce(t)),t.onClickHelp=t.onClickHelp.bind(ce(t)),t.onChangeField=t.onChangeField.bind(ce(t)),t.onExtendStyles=t.onExtendStyles.bind(ce(t)),t}return t=Q,n=[{key:"componentDidMount",value:function(){pe.reset(),(0,z.appWindow)().addEventListener("keydown",this.onKeyDown),(0,z.topWindow)().addEventListener("keydown",this.onKeyDown)}},{key:"componentWillUnmount",value:function(){pe.reset(),(0,z.appWindow)().removeEventListener("keydown",this.onKeyDown),(0,z.topWindow)().removeEventListener("keydown",this.onKeyDown)}},{key:"onClose",value:function(){var e=(0,d.default)(this.props,"source"),t=(0,d.default)(this.props,"element"),n=(0,d.default)(this.props,"module");V.default.extendStylesModalClose(e,t,n)}},{key:"onKeyDown",value:function(e){27===e.keyCode&&this.onClose()}},{key:"componentDidUpdate",value:function(e){var t=this;(0,D.default)(["module","element","source"],(function(n){return!(0,N.default)(e[n],t.props[n])}))&&this.setState({buttonState:!1,to:this.getTargetElement(),throughout:"page"})}},{key:"onMouseEnterGroup",value:function(e){this.setState({hoveredGroup:e})}},{key:"onMouseLeaveGroup",value:function(){this.setState({hoveredGroup:!1})}},{key:"onClickHelp",value:function(e){this.setState({activeDescription:this.state.activeDescription!==e&&e})}},{key:"onChangeField",value:function(e,t){(0,d.default)(this.state,e)!==t&&(0,f.default)(this.defaultStates,e)&&this.setState(fe({},e,t))}},{key:"getTargetElement",value:function(){return this.isTargetElementModule()?"module":this.getSelectedModuleType()}},{key:"isTargetElementModule",value:function(){return this.getSelectedModule("props.is_module_child",!1)&&(0,d.default)(this.props,"element")}},{key:"onExtendStyles",value:function(){var e=this;this.setState({buttonState:"loading"}),new Promise((function(t){setTimeout((function(){var n=e.getExtendSourceFields();if((0,g.default)(n))return t(!1);var r=e.getExtendTargetModules();if((0,g.default)(r))return t(!1);var o=e.getExtendTargetModulesFields(n,r);return(0,g.default)(o)?t(!1):((0,c.default)(o,(function(e){var t=e.targetModule,n=e.extendStylesData;V.default.extendStylesModalUpdate(t.address,n)})),t(!0))}),0)})).then((function(){e.onClose()}))}},{key:"getExtendSourceFields",value:function(){var e=this,t=this.getSelectedModule(),n=this.getSelectedModuleType(),r=this.getModuleFields(t),o=[];switch(this.getSelectedSource()){case"module":var a=(0,v.default)(r);o=[].concat(ne(a),ne((0,J.getCompositeFieldAttrs)(n,a)));break;case"options_group":var i=this.getSelectedElement("payload.fields");o=[].concat(ne(i),ne((0,J.getCompositeFieldAttrs)(n,i)));break;default:var l=this.getSelectedElement("payload.option");(0,j.default)(l)&&(l=[l]),o=[].concat(ne(l),ne((0,J.getCompositeFieldAttrs)(n,l)))}var u=this.getSelectedElement("payload.toggleId"),s=this.getSelectedElement("payload.toggleGroupId"),c=o.map((function(t){return e.convertCustomCSSFieldName(t,s,u)})),d=(0,S.default)(r,(function(t,n){var r=(0,z.getProcessedTabSlug)(t.tab_slug),o=e.convertCustomCSSFieldName(n,t.tab_slug,t.toggle_slug);return("general"!==r||"background"===t.toggle_slug)&&("css"!==r||"classes"!==t.toggle_slug)&&(0,h.default)(c,o)}));return!(0,g.default)(d)&&(d=ae(ae(ae({},d),q.default.getHoverFieldsDefinition(d)),K.default.getStickyFieldsDefinition(d)))}},{key:"convertCustomCSSFieldName",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"css"===t&&"custom_css"===n&&(0,T.default)(e,"custom_css_")?(0,x.default)(e,"custom_css_",""):e}},{key:"prependCustomCSSFieldName",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"css"!==t||"custom_css"!==n||(0,T.default)(e,"custom_css_")?e:"custom_css_".concat(e)}},{key:"getExtendTargetModules",value:function(){var e=this,t=U.default.getSectionsFlattened(),n=this.getSelectedModule("props.address"),r=(0,z.getModuleAddressSequence)(n),o=(0,s.default)(t,(function(t){return e.getModuleStructure(t.type)===e.state.throughout&&(0,h.default)(r,t.address)}));return t.filter((function(t){var n=(0,d.default)(t,"type",""),r=n.replace("_inner","");return"module"===e.state.to?e.getModuleStructure(r)===e.state.to:e.getModuleStructure(e.state.to)===e.getModuleStructure(r)&&("et_pb_column"!==n||"et_pb_specialty_section"!==(0,d.default)(t,"parent_slug")||!(0,s.default)((0,d.default)(t,"content",[]),(function(e){return"et_pb_row_inner"===e.type})))&&(r===e.state.to||t.is_module_child&&r===(0,d.default)(G.default.getModuleChildSlugs(),e.state.to))})).filter((function(t){return"page"===e.state.throughout||("post_content"===e.state.throughout?!t.attrs.theme_builder_area||t.attrs.theme_builder_area===e.state.throughout:["et_header_layout","et_footer_layout","et_body_layout"].includes(e.state.throughout)?t.attrs.theme_builder_area===e.state.throughout:(0,h.default)((0,z.getModuleAddressSequence)(t.address),(0,d.default)(o,"address")))})).filter((function(e){return!(0,z.isModuleLocked)(e,t)})).filter((function(n){return!(e.getSelectedModule("props.is_module_child",!1)&&!(0,g.default)(n.child_slug)&&!(0,g.default)((0,s.default)(t,{parent_address:n.address}))||!(0,g.default)(e.getSelectedModule("props.child_slug",""))&&n.is_module_child&&!(0,g.default)((0,s.default)(t,{address:n.parent_address})))})).filter((function(e){return e.address!==n}))}},{key:"getExtendTargetModulesFields",value:function(e,t){var n=this,r=this.getSelectedModule("props"),a=this.getSelectedModuleType(),i=o.default.getGlobalColorsInfo(r),l={},p=[];return(0,c.default)(t,(function(t){var o={},h=(0,d.default)(t,"type","");if(h===a)(0,c.default)(e,(function(e){if((0,f.default)(e,"name")){var a=n.prependCustomCSSFieldName(e.name,e.tab_slug,e.toggle_slug);o[a]=n.getExtendStylesValue(e,r,e,t);var u=n.getGlobalColorsData(a,o,i);(0,b.default)(u)||(l=u)}}));else{var m=n.getModuleFields({props:t});m=ae(ae(ae({},m),q.default.getHoverFieldsDefinition(m)),K.default.getStickyFieldsDefinition(m)),(0,c.default)(e,(function(e){var c={};if((0,f.default)(e,"name")){var p=n.convertCustomCSSFieldName(e.name,e.tab_slug,e.toggle_slug);if(pe.has("targetField",p,a,h))c=pe.get("targetField",p,a,h);else{if((0,f.default)(m,p))c=(0,d.default)(m,p);else{var y={moduleType:a,field:e};c=(0,s.default)(m,(function(e){var t=(0,u.default)({},{moduleType:h,field:e});return U.default.getModuleFieldsMapping(y,t)}))}pe.set(c,"targetField",e.name,a,h)}}if(!(0,g.default)(c)&&(0,f.default)(c,"name")){var v=n.prependCustomCSSFieldName(e.name,e.tab_slug,e.toggle_slug);o[v]=n.getExtendStylesValue(e,r,c,t);var _=n.getGlobalColorsData(v,o,i);(0,b.default)(_)||(l=_)}}))}(0,g.default)(o)||(o.global_colors_info=l,p.push((0,u.default)({},{targetModule:t,extendStylesData:o})))})),p}},{key:"getExtendStylesValue",value:function(e,t,n,r){var o=this.prependCustomCSSFieldName(e.name,e.tab_slug,e.toggle_slug),a=(0,d.default)(t,"attrs.".concat(o));if("font"!==(0,d.default)(e,"type")||"option"!==this.getSelectedSource())return a;var i=a.split("|"),l=(0,d.default)(n,"name"),u=(0,d.default)(r,"attrs.".concat(l),"||||||||").split("|"),s=(0,z.getFontFieldIndexes)(this.getSelectedField("subField","font"));return(0,c.default)(s,(function(e){u[e]=i[e]})),u.join("|")}},{key:"getSelectedSource",value:function(){return(0,d.default)(this.props,"source")}},{key:"getSelectedFamily",value:function(){var e=(0,d.default)(this.props,"element");return(0,d.default)(e,"payload.option_family","")}},{key:"getSelectedElement",value:function(e,t){var n=(0,d.default)(this.props,"element"),r=(0,d.default)(n,"payload.toggleGroupId",""),o=(0,d.default)(n,"payload.toggleId","");if("css"===r&&"custom_css"!==o){var a=(0,T.default)(n.elementId,"custom_css_")?(0,x.default)(n.elementId,"custom_css_",""):n.elementId;n.elementId=a}return(0,b.default)(e)?n:(0,d.default)(n,e,t)}},{key:"getSelectedModule",value:function(e,t){var n=(0,d.default)(this.props,"module");return(0,b.default)(e)?n:(0,d.default)(n,e,t)}},{key:"getSelectedModuleType",value:function(){return this.getSelectedModule("props.type")}},{key:"getSelectedModuleTitle",value:function(){var e=this.getSelectedModuleType();return pe.has("getSelectedModuleTitle",e)?pe.get("getSelectedModuleTitle",e):pe.set(U.default.getModuleTitle(e),"getSelectedModuleTitle",e)}},{key:"getSelectedModuleTitlePlural",value:function(){var e=this.getSelectedModuleType();return pe.has("getSelectedModuleTitlePlural",e)?pe.get("getSelectedModuleTitlePlural",e):pe.set(U.default.getModuleTitlePlural(e),"getSelectedModuleTitlePlural",e)}},{key:"getSelectedModuleStructure",value:function(){var e=this.getSelectedModuleType();return pe.has("getSelectedModuleStructure",e)?pe.get("getSelectedModuleStructure",e):pe.set(this.getModuleStructure(e),"getSelectedModuleStructure",e)}},{key:"getSelectedField",value:function(e,t){var n=this.getSelectedElement("elementId"),r=(0,z.getProcessedTabSlug)(this.getSelectedElement("payload.tabSlug")),o=this.getSelectedElement("payload.toggleId"),a=this.getSelectedModule(),i=(0,s.default)(this.getModuleFields(a),{name:n,tab_slug:r,toggle_slug:o}),l=(0,u.default)({},{name:n,type:this.getSelectedElement("payload.option_family"),label:this.getSelectedElement("payload.optionTitle"),subField:this.getSelectedElement("subElementId")},i);if(l.default_on_child&&(0,m.default)(l.default)&&2===l.default.length){var c=this.getSelectedModule("props.attrs.".concat(l.default[0]));l.default=c?(0,d.default)(l.default[1],c,""):""}return(0,b.default)(e)?l:(0,d.default)(l,e,t)}},{key:"getSelectedFieldValue",value:function(){return this.getFieldValue((0,d.default)(this.getSelectedField(),"name"),this.getSelectedField(),this.getSelectedModule("props"))}},{key:"getFieldValue",value:function(e,t,n){var r,o=n||this.getSelectedModule("props"),a=o.attrs||{};if(("content"===e||(0,d.default)(t,"is_fb_content",!1))&&(r=(0,d.default)(o,"content")),"custom_padding"===t.type&&"custom_padding"!==e){var i=(0,h.default)(["et_pb_row","et_pb_row_inner"],o.type),l=(0,z.isOn)((0,d.default)(o,"attrs.specialty")&&"et_pb_section"===(0,d.default)(o,"type"));if(i||l){var u=e.replace("padding_",""),s=(0,z.hasValue)(a["padding_".concat(u,"_last_edited")])?a["padding_".concat(u,"_last_edited")].split("|"):[],c=((0,d.default)(a,"padding_top_".concat(u),"")||"").trim(),f=((0,d.default)(a,"padding_right_".concat(u),"")||"").trim(),p=((0,d.default)(a,"padding_bottom_".concat(u),"")||"").trim(),m=((0,d.default)(a,"padding_left_".concat(u),"")||"").trim(),y=((0,d.default)(a,"padding_top_bottom_link_".concat(u),"")||"").trim(),g=((0,d.default)(a,"padding_left_right_link_".concat(u),"")||"").trim(),v="".concat(c,"|").concat(f,"|").concat(p,"|").concat(m,"|").concat(y,"|").concat(g);switch((0,b.default)(s[1])?"desktop":s[1]){case"phone":r=(0,d.default)(a,"padding_".concat(u,"_phone"),"");break;case"tablet":r=(0,d.default)(a,"padding_".concat(u,"_tablet"),"");break;default:r=v}}}if("center_map"===t.type&&(r="et_pb_map_pin"===o.type?JSON.stringify((0,k.default)(a,["pin_address","pin_address_lat","pin_address_lng","zoom_level"])):JSON.stringify((0,k.default)(a,["address_lat","address_lng","zoom_level"]))),"select_with_option_groups"===t.type&&(r=(0,d.default)((0,E.default)((0,d.default)(a,e,(0,d.default)(t,"default"))).split("|"),1,"none")),(0,d.default)(t,"mobile_options",!1)){var _=(0,d.default)(a,"".concat(e,"_last_edited"),"off|desktop").split("|");(0,z.isOn)((0,d.default)(_,0,"off"))&&"desktop"!==(0,d.default)(_,1,"desktop")&&(r=(0,d.default)(a,"".concat(e,"_").concat((0,d.default)(_,1))))}return(0,b.default)(r)&&(r=(0,d.default)(a,e,(0,d.default)(t,"default"))),r}},{key:"getGlobalColorsData",value:function(e,t,n){if(e.includes("_color")&&!(0,b.default)(t[e])){var r={};return(0,c.default)(n,(function(t,n){t.includes(e)&&(r[n]=(0,d.default)(r,n,[]),r[n].push(e))})),r}}},{key:"renderField",value:function(e,t,n){var r,o=this.getSelectedModule(),l=o.isModuleItem&&!(0,b.default)(o.parentModule.props.type)&&o.parentModule.props.type?"".concat(e.name,"_child"):e.name,s={slug:e.type,type:"field"},c=(0,u.default)({},e,{resetValue:!1,mobile_options:!1,disableReset:!0,uniqueKey:l,processedKey:l,animate:(0,d.default)(this.props,"options.animate",!1),fieldDefinition:e,matching:s}),f=(0,d.default)(c,"type","text"),p=f.replace("_","-"),m=(0,Y.isDynamicContent)(c.value),y=(0,g.default)(n),v=(0,i.default)((fe(r={},"et-fb-form__group--".concat(this.slug),!0),fe(r,"et-fb-form__group--".concat(p),!0),fe(r,"et-fb-form__group--readonly",c.readonly),r)),_=(0,i.default)(fe({"et-fb-settings-options":!0,"et-fb-option--depends-on":!(0,b.default)(e.depends_default)||!(0,b.default)(e.depends_show_if)||!(0,b.default)(e.depends_show_if_not),"et-fb-option--select-with-option-groups":"select_with_option_groups"===f&&e.groups},"et-fb-option--".concat(p),!0)),w=(0,i.default)(fe({"et-fb-option-container":!0},"et-fb-option-container--".concat(p),!0)),k=(0,a.createElement)(A.default.getControl(f),c);return a.default.createElement(W.ETBuilderFormGroup,{className:v,name:l,key:"".concat(this.slug,"-form-group-").concat(l),onMouseEnterGroup:y?O.default:this.onMouseEnterGroup,onMouseLeaveGroup:y?O.default:this.onMouseLeaveGroup,hovered:this.isOptionHovered(c.name)},a.default.createElement(W.ETBuilderFormLabel,{name:l,hoveredGroup:this.state.hoveredGroup===l,activeHelp:this.state.activeDescription===l,onClickHelp:this._onClickHelp},t),a.default.createElement(W.ETBuilderFormDescription,{active:this.state.activeDescription===l},n),a.default.createElement("div",{className:_},a.default.createElement("div",{className:w},a.default.createElement(I.default,{componentName:l},m&&(0,h.default)($.default.supportedFieldTypes,f)?a.default.createElement($.default,{type:c.dynamic_content||f,fieldName:c.name,fieldType:f,value:c.value,dynamicAttributes:[c.name],previewMode:"background",showSettingsButton:!1,showDisableButton:!1,onChange:c._onChange},k):k))))}},{key:"renderFieldSource",value:function(){var e=this;if("module"===this.getSelectedSource()){var t=this.getSelectedModuleTitle(),n=this.getSelectedModuleTitlePlural(),r=(0,z.sprintf)(he.labels.extend_module,t,n);return a.default.createElement(W.ETBuilderFormGroup,null,a.default.createElement(W.ETBuilderFormLabel,null,(0,l.decode)(r)))}if("options_group"===this.getSelectedSource()){var o=this.getSelectedElement("payload.toggleTitle"),i=he.labels.extend_options_group.replace(/%s/g,o);return a.default.createElement(W.ETBuilderFormGroup,null,a.default.createElement(W.ETBuilderFormLabel,null,(0,l.decode)(i)))}if("background-gradient"===this.getSelectedFamily()){var s=this.getSelectedElement("payload.optionTitle"),f=he.labels.extend_options_group.replace(/%s/g,s);return a.default.createElement(W.ETBuilderFormGroup,null,a.default.createElement(W.ETBuilderFormLabel,null,(0,l.decode)(f)))}var _=this.getSelectedModule(),w=this.getSelectedElement("payload.option"),k=this.getSelectedField(),S=(0,h.default)(["composite"],(0,d.default)(k,"type"));if(!(0,g.default)(k)&&!S){var C=(0,u.default)({},k,{value:this.getSelectedFieldValue()}),E=this.getSelectedElement("payload.optionTitle"),M=function t(n){(0,P.default)(n,"module",e),(0,P.default)(n,"readonly",!0),(0,P.default)(n,"visible",!0),(0,P.default)(n,"_onChange",O.default);var r=(0,d.default)(n,"name"),o=(0,d.default)(n,"type");if("transform"===o&&(n.transform_type="".concat(n.name).replace("transform_","")),(0,T.default)(o,"background-")){(0,P.default)(n,"type","background"),(0,P.default)(n,"activeTab",o.replace("background-","")),(0,P.default)(n,"isDescriptionVisible",(function(){return!1})),(0,P.default)(n,"isHoveredGroup",(function(){return!1})),(0,P.default)(n,"onMouseEnterGroup",O.default),(0,P.default)(n,"onMouseLeaveGroup",O.default);var a={};(0,c.default)(e.getModuleFields(_),(function(e){(0,h.default)(w,e.name)&&(a[e.name]=(0,u.default)({},t(e)))})),(0,P.default)(n,"backgroundFields",a)}if("font"===o){var i=(0,d.default)(n,"group_label",""),l=(0,d.default)(n,"value","||||||||").split("|"),s={font:(0,d.default)(l,0,""),weight:(0,d.default)(l,1,""),italic:(0,d.default)(l,2,""),uppercase:(0,d.default)(l,3,""),underline:(0,d.default)(l,4,""),capitalize:(0,d.default)(l,5,""),strikethrough:(0,d.default)(l,6,""),line_style:(0,d.default)(l,7,""),line_color:(0,d.default)(l,8,"")},f=(0,z.isOn)((0,d.default)(s,"underline"));switch(n.subField){case"weight":(0,P.default)(n,"label",me.fontWeight);break;case"style":(0,P.default)(n,"label",me.fontStyle);break;case"line_color":var k=f?me.underline:me.strikethrough,S=me.color;(0,P.default)(n,"label","".concat(k," ").concat(S));break;case"line_style":var C=f?me.underline:me.strikethrough,E=me.style;(0,P.default)(n,"label","".concat(C," ").concat(E));break;default:(0,P.default)(n,"label",(0,d.default)(me,n.subField,""))}(0,g.default)(i)||(0,P.default)(n,"label","".concat(i," ").concat(n.label)),(0,P.default)(n,"subFieldLabel",!1)}if((0,T.default)(o,"color")&&((0,P.default)(n,"hideColorManagerLinks",!0),(0,P.default)(n,"hideHarmoniousPalette",!0),(0,P.default)(n,"hideCurrentColorWrapper",!0),(0,P.default)(n,"hideColorResetButton",!0),(0,P.default)(n,"showCustomInput",!0),(0,P.default)(n,"hasPreview",!1)),"select_with_option_groups"===o&&((0,P.default)(n,"hideAddButton",!0),(0,P.default)(n,"hideRemoveButton",!0),(0,P.default)(n,"hideFetchButton",!0)),"center_map"===o&&((0,P.default)(n,"disableAction",!0),(0,P.default)(n,"hideUpdateButton",!0)),"conditional_logic"===o&&((0,P.default)(n,"hideAddButton",!0),(0,P.default)(n,"hideDeleteButton",!0)),"categories"===o&&((0,P.default)(n,"categories_list",{}),(0,g.default)(n.taxonomy_name)&&(0,P.default)(n,"taxonomy_name","category")),"select-pattern"!==o&&"select-mask"!==o||(0,P.default)(n,"isExtendStylesModal",!0),"select"===o&&(0,b.default)(n.default)&&!(0,g.default)(n.options)){var M=(0,m.default)(n.options)?[]:{};(0,c.default)(n.options,(function(e,t){(0,y.default)(e)||(0,m.default)(e)?(0,c.default)(e,(function(e,t){M[t]=e})):M[t]=e})),(0,g.default)(M)||(0,P.default)(n,"default",(0,m.default)(M)?(0,p.default)(M):(0,p.default)((0,v.default)(M)))}return"custom_css_free_form"===r&&(0,P.default)(n,"inline",!1),n}(C),j=(0,l.decode)(he.labels.extend_option.replace(/%s/g,(0,d.default)(M,"label",E)));return this.renderField(M,j)}var x=this.getSelectedElement("payload.optionTitle"),D=he.labels.extend_option.replace(/%s/g,x);return a.default.createElement(W.ETBuilderFormGroup,null,a.default.createElement(W.ETBuilderFormLabel,null,(0,l.decode)(D)))}},{key:"renderFieldTo",value:function(){if("module"===this.getSelectedSource())return!1;var e,t,n,r=(e=this.getSelectedModuleStructure(),t=(0,_.default)((0,S.default)((0,u.default)({},U.default.getModules()),(function(e){return e.is_official_module&&((0,z.isOn)(e.is_parent)||(0,h.default)(["et_pb_column","et_pb_column_inner"],e.label))})),(function(e,t){var n=U.default.getModuleTitlePlural(t);return he.labels.all.replace("%s",(0,g.default)(n)?e.title:n)})),n=(0,_.default)((0,u.default)({},he.options.to),(function(e,n){return"containers"===n?(0,k.default)(t,["et_pb_section","et_pb_row","et_pb_column","et_pb_column_inner"]):(0,u.default)({},e,(0,w.default)(t,["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column","et_pb_column_inner"]))})),(0,S.default)(n,(function(t,n){return("module"!==e||"containers"!==n)&&t})));return this.renderField({options:r,type:"select",name:"to",default:this.state.to,value:this.state.to,optionGroups:he.groups.to,searchable:!0,_onChange:this.onChangeField},he.labels.to)}},{key:"renderFieldThroughout",value:function(){var e=this.getAvailableThroughoutOptions(),t=(0,v.default)(e),n=this.getSelectedModule("props.parent_slug"),r=this.getSelectedModuleType(),o=this.getModuleStructure(r),a=this.getModuleStructure(this.state.to),i="module"===o?t:(0,M.default)(t,t.indexOf(o)),l=("module"===a?t:(0,C.default)(t,t.indexOf(a))).filter((function(e){return"module"===o?"et_pb_section"===n||-1!==n.indexOf("fullwidth")?!(0,h.default)(["row","column"],e):"et_pb_specialty_column"!==n||!(0,h.default)(["row"],e):!(0,h.default)(i,e)||e===o})),u={options:(0,k.default)(e,l),type:"select",name:"throughout",default:this.state.throughout,value:this.state.throughout,_onChange:this.onChangeField};return this.renderField(u,he.labels.throughout)}},{key:"render",value:function(){var e,t,n=this.state.buttonState?a.default.createElement(R.default,{icon:this.state.buttonState,color:"#FFFFFF"}):he.button,r=[a.default.createElement(L.default,{block:!0,info:!0,ink:!1,tooltip:he.button,disable:!1!==this.state.buttonState,__onClick:this.state.buttonState?O.default:this.onExtendStyles},n)],o=(0,X.getModalPreferredSnapSettings)().snapLocation,u=ae(ae({},this.props),{},{measurement:(0,X.getModalPreferredDimensions)(),disableFullscreenButton:!0,disableSnapButton:!0,disableResizeButton:!0}),s=(0,i.default)((fe(e={"et-fb-modal__module-settings":!0},"et-fb-modal__".concat(this.slug),!0),fe(e,"et-fb-modal__".concat(this.slug,"--").concat(this.getSelectedSource()),!0),e)),c=(0,i.default)((fe(t={"et-fb-tabs__panel":!0},"et-fb-tabs__panel--".concat(this.slug),!0),fe(t,"et-fb-tabs__panel--".concat(this.slug,"--").concat(this.getSelectedSource()),!0),t)),d=(0,i.default)(fe({"et-fb-form":!0},"et-fb-form--".concat(this.getSelectedSource()),!0));return a.default.createElement(B.default,te({className:s,footerButtons:r,fullscreen:(0,X.getModalPreferredFullscreen)(),label:(0,l.decode)(he.title),position:(0,X.getModalPreferredCoordinates)(),snapLocation:o,_closeFunction:this.state.buttonState?O.default:this.onClose,globalUpdate:!0},u),a.default.createElement(I.default,null,a.default.createElement(F.default,{selectedIndex:0},a.default.createElement(F.ETBuilderTabPanel,{className:c,slug:this.slug,selected:!0},a.default.createElement("div",{className:d},a.default.createElement("div",{className:"et-fb-form--inner"},this.renderFieldSource(),this.renderFieldTo(),this.renderFieldThroughout()))))))}}],n&&ie(t.prototype,n),r&&ie(t,r),Object.defineProperty(t,"prototype",{writable:!1}),Q}(a.default.PureComponent),ge=ye;t.default=ge},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=W(n(0)),a=B(n(3)),i=B(n(13)),l=B(n(10)),u=B(n(41)),s=B(n(9)),c=B(n(1)),d=B(n(34)),f=B(n(5)),p=B(n(42)),h=B(n(11)),m=B(n(31)),y=B(n(129)),g=B(n(84)),b=B(n(22)),v=B(n(63)),_=B(n(198)),w=B(n(59)),O=B(n(457)),k=B(n(616)),S=B(n(218)),C=B(n(281)),E=B(n(43)),P=B(n(1878)),T=B(n(1879)),M=B(n(619)),j=B(n(781)),x=B(n(6)),D=W(n(782)),N=B(n(401)),L=W(n(2)),R=B(n(1563)),A=n(94),I=n(509);function B(e){return e&&e.__esModule?e:{default:e}}function F(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(F=function(e){return e?n:t})(e)}function W(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=F(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){X(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function z(e,t){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},z(e,t)}function q(e){var t=function(){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}}();return function(){var n,r=Y(e);if(t){var o=Y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $(e)}function $(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y(e){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Y(e)}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1881);var J=(0,c.default)(ETBuilderBackend,"i18n.modals.layersView"),Q=["currentTourElement","editEnabled","multiSelectLastSelection"],Z=["filterDropdownActive","filterNotice"],ee=function(t){!function(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&&z(e,t)}(F,t);var n,r,a,B=q(F);function F(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,F),X($(n=B.call(this,t)),"renderBreakpoint",15),X($(n),"renderCounter",0),X($(n),"getLayersData",(function(){var e=x.default.getSections(),t=x.default.getActiveThemeBuilderArea();return x.default.isAllowedAction("theme_builder")?x.default.filterThemeBuilderAreaContent(e,t):e})),X($(n),"getStartingAddress",(function(){var e=n.getLayersData(),t=!!e[0].address&&e[0].address.substr(-1);return!!t&&parseInt(t)})),X($(n),"initSortable",(function(){var t=e(n.containerRef.current),r=!(!ETBuilderBackend.themeBuilder.themeBuilderAreas.et_body_layout||ETBuilderBackend.themeBuilder.themeBuilderAreas.isLayout)&&ETBuilderBackend.themeBuilder.themeBuilderAreas.et_body_layout.override,o=x.default.isAllowedAction("theme_builder")&&"post_content"===x.default.getActiveThemeBuilderArea()&&r,a={parent:"> .et-fb-layers-view",connectWith:!1,child:".et_pb_section",childSlug:"section",handle:"> .et_fb_move_module_handler",update:n.dragUpdate,root:!o,placeholderHeight:"4px",wireframeMode:!1,layersView:!0,startingAddress:n.getStartingAddress()};setTimeout((function(){(0,N.default)(t,a)}),150)})),X($(n),"dragUpdate",(function(t,r){var o=e($(n)),a=ETBuilderBackend.i18n.sortable;x.default.abIsMode("on",n.state.activeThemeBuilderArea)||x.default.isAllowedAction("ab_testing")||(alert(a.has_no_ab_permission),o.sortable("cancel"),r.sender&&e(r.sender).sortable("cancel"),b.default.cancelDraggingModule())})),X($(n),"filterInput",(0,u.default)((function(e,t){n.isComponentMounted&&n.setState({filterValue:t},(function(){setTimeout((function(){b.default.setLayersViewFilterSearch(n.state.filterSelected,t)}),0)}))}),300)),X($(n),"renderABTestingStyle",(function(){if(!x.default.abIsMode("selecting",n.state.activeThemeBuilderArea))return null;var e=[],t=x.default.abGetMode(n.state.activeThemeBuilderArea).replace("_","-"),r=[".et-fb-modal__layers-view .et-fb-editable-element",".et-fb-modal__layers-view .et_pb_section > .et_fb_move_module_handler > .et-fb-layers-view--content",".et-fb-modal__layers-view .et_pb_row > .et_fb_move_module_handler > .et-fb-layers-view--content",".et-fb-modal__layers-view .et_pb_module > .et_fb_move_module_handler > .et-fb-layers-view--content"];e.push([{selector:r.join(", "),declaration:"cursor: url(".concat(ETBuilderBackend.images_uri,"/cursor-").concat(t,".png), default !important;")}]),e.push([{selector:(0,m.default)(r,(function(e){return".ie ".concat(e,", .edge ").concat(e)})).join(", "),declaration:"cursor: url(".concat(ETBuilderBackend.images_uri,"/cursor-").concat(t,".cur), default !important;")}]),e.push([{selector:(0,m.default)(r,(function(e){return".chrome ".concat(e,", .gecko ").concat(e)})).join(", "),declaration:"cursor: url(".concat(ETBuilderBackend.images_uri,"/cursor-").concat(t,".png) 16 16, default !important; /* Chrome/Firefox cursor hotspot fix, Ignored by IE */;")}]);return e.push([{selector:[".et-fb-modal__layers-view .et-fb-editable-element",".et-fb-modal__layers-view .et-fb-layers-view--actions-group",".et-fb-modal__layers-view .et-fb-layers-view--add",".et-fb-modal__layers-view .et_pb_column > .et_fb_move_module_handler > .et-fb-layers-view--content"].join(", "),declaration:"pointer-events: none;"}]),o.default.createElement(S.default,{key:"css-lv-ab-testing",additional_css:e,module_class:"body"})}));return n.containerRef=o.default.createRef(),n.slug="layers-view",n.searchFilters=n.getSearchFilters(),n.state={index:null,filterDropdownActive:!1,filterSelected:void 0,filterValue:"",activeThemeBuilderArea:x.default.getActiveThemeBuilderArea()},n.defaultModalHeight=444,n.defaultModalWidth=300,n.isComponentMounted=!1,n.scrollTimeout=100,setTimeout((function(){return b.default.setLayersViewContextMenuCallback(t.contextMenuCallback)}),0),n.forceUpdateLayers=n.forceUpdateLayers.bind($(n)),n.filterSelect=n.filterSelect.bind($(n)),n.filterDropdownToggle=n.filterDropdownToggle.bind($(n)),n.filterReset=n.filterReset.bind($(n)),n.filterResetAll=n.filterResetAll.bind($(n)),n.maybeCloseDropdown=n.maybeCloseDropdown.bind($(n)),n.maybeShowFilterNotice=n.maybeShowFilterNotice.bind($(n)),n.maybeRenderFilterNotice=n.maybeRenderFilterNotice.bind($(n)),n.setSearchFocus=n.setSearchFocus.bind($(n)),n.activeLayerChange=n.activeLayerChange.bind($(n)),n.sectionsContentChange=n.sectionsContentChange.bind($(n)),n.renderLayers=n.renderLayers.bind($(n)),n.renderToggleAll=n.renderToggleAll.bind($(n)),n.handleShortcuts=n.handleShortcuts.bind($(n)),n.handleToggleAll=n.handleToggleAll.bind($(n)),n.updateModalState=n.updateModalState.bind($(n)),n}return n=F,r=[{key:"componentDidMount",value:function(){this.isComponentMounted=!0,this.debouncedSectionsContentChangee=(0,u.default)(this.sectionsContentChange,100),x.default.addSectionsContentChangeListener(this.debouncedSectionsContentChangee),x.default.addThemeBuilderAreaChangeEventListener(this.forceUpdateLayers),M.default.addActiveLayerChangeListener(this.activeLayerChange),M.default.addLayerDataChangeListener(this.forceUpdateLayers),x.default.isProductTourActive()||this.initSortable();var e=M.default.getActiveLayer();(0,A.isOn)((0,c.default)(e,"props.scrollToLayerOnModal"))&&setTimeout((function(){return(0,I.scrollToLayerOnModal)(e)}),this.scrollTimeout),e||this.setSearchFocus(),x.default.getActiveModule()?(L.default.appWindow().removeEventListener("keydown",this.handleShortcuts),L.default.topWindow().removeEventListener("keydown",this.handleShortcuts)):(L.default.appWindow().addEventListener("keydown",this.handleShortcuts),L.default.topWindow().addEventListener("keydown",this.handleShortcuts,{useCapture:!0})),L.default.topDocument().addEventListener("keydown",this.handleShortcuts),L.default.topWindow().addEventListener("mousedown",this.maybeCloseDropdown)}},{key:"shouldComponentUpdate",value:function(e,t){var n=(0,y.default)(e,Q),r=(0,y.default)(this.props,Q),o=(0,y.default)(t,Z),a=(0,y.default)(this.state,Z);return!(0,p.default)(n,r)||!(0,p.default)(o,a)}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.editEnabled,r=M.default.getActiveLayer(),o=M.default.isFilterActive();x.default.isProductTourActive()||this.initSortable();var a=!(o||(0,p.default)(t.filterValue,this.state.filterValue)&&(0,p.default)(t.filterSelected,this.state.filterSelected));!r&&a&&this.setSearchFocus();var i=x.default.isSettingsModalOpen("settings_modal"),l=!(0,f.default)(n)&&!(0,p.default)(e.editEnabled,n),u=(0,c.default)(n,"props.address")!==(0,c.default)(r,"props.address");i&&l&&u&&(setTimeout((function(){return b.default.setActiveLayer(n)}),0),setTimeout((function(){return(0,I.scrollToLayerOnModal)(n)}),this.scrollTimeout)),this.maybeShowFilterNotice(),(0,p.default)(e.multiSelectLastSelection,this.props.multiSelectLastSelection)||this.debouncedSectionsContentChangee()}},{key:"componentWillUnmount",value:function(){this.isComponentMounted=!1,x.default.removeSectionsContentChangeListener(this.debouncedSectionsContentChangee),M.default.removeActiveLayerChangeListener(this.activeLayerChange),M.default.removeLayerDataChangeListener(this.forceUpdateLayers),L.default.appWindow().removeEventListener("keydown",this.handleShortcuts),L.default.topDocument().removeEventListener("keydown",this.handleShortcuts),L.default.topWindow().removeEventListener("keydown",this.handleShortcuts),L.default.topWindow().removeEventListener("mousedown",this.maybeCloseDropdown),setTimeout((function(){return b.default.clearLayerData()}),0)}},{key:"getSearchFilters",value:function(){var e=ETBuilderBackend.i18n.modals.layersView.searchFilterItems,t={};return(0,s.default)(e,(function(e,n){(0,h.default)(t[n])&&(t[n]={}),(0,s.default)(e,(function(e,r){t[n][r]=e}))})),(0,s.default)(ETBuilderBackend.modules,(function(e){var n=(0,L.getComponentType)({type:(0,c.default)(e,"label")});if((0,A.isOn)(e.is_parent)&&(0,A.isOn)(e.vb_support)&&(0,d.default)(e,"title")&&(0,d.default)(e,"label")&&"module"===n){var r=e.label.replace("et_pb_","");t.show_only[r.replace(/_/g,"-")]=e.plural?e.plural:e.title}})),t}},{key:"setSearchFocus",value:function(){var e=this;setTimeout((function(){var t=L.default.$topWindow(".et-fb-modal__".concat(e.slug)).find(".et-fb-options-filter input");t.length&&t.trigger("focus")}),100)}},{key:"sectionsContentChange",value:function(){this.isComponentMounted&&(b.default.resetLayerData(),M.default.isFilterActive()&&b.default.setLayersViewFilterSearch(this.state.filterSelected,this.state.filterValue),this.forceUpdate())}},{key:"activeLayerChange",value:function(e,t){if(this.isComponentMounted){var n=M.default.isFilterActive(),r=!(0,f.default)(e)&&(0,A.isOn)((0,c.default)(e,"props.scrollToLayerOnModal"));n&&r&&!(0,p.default)(t,e)&&this.filterResetAll(),r&&setTimeout((function(){return(0,I.scrollToLayerOnModal)(e)}),this.scrollTimeout)}}},{key:"forceUpdateLayers",value:function(){this.isComponentMounted&&this.forceUpdate()}},{key:"filterSelect",value:function(e){var t=this;this.setState({filterDropdownActive:!1,filterSelected:e},(function(){setTimeout((function(){b.default.setLayersViewFilterSearch(e,t.state.filterValue)}),0)}))}},{key:"filterDropdownToggle",value:function(){this.setState({filterDropdownActive:!this.state.filterDropdownActive})}},{key:"filterReset",value:function(){this.setState({filterDropdownActive:!1,filterSelected:void 0}),b.default.setLayersViewFilterSearch(void 0,this.state.filterValue)}},{key:"filterResetAll",value:function(){this.setState({filterDropdownActive:!1,filterSelected:void 0,filterValue:""}),b.default.setLayersViewFilterSearch(void 0,"")}},{key:"maybeCloseDropdown",value:function(t){this.state.filterDropdownActive&&e(t.target).closest(".et-fb-options-filter-dropdown-wrap, .et-fb-options-filter-button-group").length<1&&this.filterDropdownToggle()}},{key:"maybeShowFilterNotice",value:function(){var e=M.default.isFilterActive();M.default.isEmptyFilterResults()||(e=!1),e!==this.state.filterNotice&&this.setState({filterNotice:e})}},{key:"maybeRenderFilterNotice",value:function(){if(!this.state.filterNotice||this.state.filterDropdownActive)return!1;var e=J.filterNoticeClickable,t=J.filterNotice.split(e);return 2===t.length?o.default.createElement("div",{className:"et-fb-options-filter-notice"},o.default.createElement("span",null,t[0]),o.default.createElement(v.default,{className:"et-fb-filter-notice-button",ink:!1,onMouseDown:this.filterResetAll,onMouseUp:this.filterResetAll},e),o.default.createElement("span",null,t[1])):o.default.createElement("div",{className:"et-fb-options-filter-notice"},o.default.createElement(v.default,{className:"et-fb-filter-notice-button",ink:!1,onMouseDown:this.filterResetAll,onMouseUp:this.filterResetAll},J.filterNotice))}},{key:"handleShortcuts",value:function(e){var t=e.metaKey,n=e.altKey,r=e.ctrlKey,o=27===e.keyCode,a=e.shiftKey,i=32===e.keyCode,l=M.default.isFilterActive(),u=L.default.$topWindow(".et-fb-modal__".concat(this.slug)).find(".et-fb-options-filter input"),s=u.length>0&&u.is(":focus");return s&&a&&i?(e.preventDefault(),!1):o&&s&&l?(e.stopImmediatePropagation(),this.filterResetAll(),!1):(!s||t||n||r||o||e.stopPropagation(),o&&l&&!x.default.isSettingsModalOpen("settings_modal")?(e.stopImmediatePropagation(),this.filterResetAll(),!1):void 0)}},{key:"handleToggleAll",value:function(){var e=!M.default.isAllExpanded(),t=L.default.$topWindow(".et-fb-layers-view--toggle-all"),n=L.default.$topWindow(".et-fb-layers-view");b.default.toggleAllLayers(e),t.toggleClass("et-fb-layers-view--toggle-all-expanded",e),n.find(".et_pb_section").toggleClass("et-fb-layers-view--expanded",e),n.find(".et_pb_section").find(".et-fb-layers-view--layer:not(.et_pb_row_inner)").toggleClass("et-fb-layers-view--hidden",!e)}},{key:"updateModalState",value:function(e){b.default.updateLayersViewModalState({measurement:{height:e.height,width:e.width},position:{x:e.x,y:e.y}})}},{key:"renderToggleAll",value:function(){var e=M.default.isFilterActive(),t=x.default.isEditingLibraryItem("section"),n=x.default.isEditingLibraryItem("row"),r=x.default.isEditingLibraryItem("module");if(e||t||n||r)return!1;var a=(0,i.default)({"et-fb-button-group":!0,"et-fb-layers-view--toggle-all":!0,"et-fb-layers-view--toggle-all-expanded":M.default.isAllExpanded()}),l=L.default.condition("is_rtl")&&!L.default.condition("is_no_rtl")?"caret-left":"caret-right",u={margin:"-5px -4px",opacity:.5};return o.default.createElement("div",{className:a},o.default.createElement(R.default,{singleClick:this.handleToggleAll},o.default.createElement("button",{className:"et-fb-button"},o.default.createElement(E.default,{color:g.default.inactiveGrey,icon:"caret-down",size:"14",style:u}),o.default.createElement(E.default,{color:g.default.inactiveGrey,icon:l,size:"14",style:u}),o.default.createElement("div",{className:"et-fb-layers-view--toggle-all-label"},J.toggleAll))))}},{key:"renderChildLayers",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=(0,I.hasChildLayers)(e)?e.content:[];if((0,f.default)(a)&&((0,L.is)("section",e)||(0,L.is)("column",e))){var i=M.default.getLayerProps(e.address);if((0,c.default)(e.attrs,"_deleted")||(0,f.default)(i))return null;var l=i.isLayerVisible&&i.isLayerExpanded||i.isLayerVisible&&i.isColumnSpecialty;return l?o.default.createElement(P.default,G({key:"lv-layer-add-button-".concat(i.address)},i)):null}return a.map((function(a,i){var l=M.default.getLayerProps(a.address);if((0,c.default)(e.attrs,"_deleted")||(0,f.default)(l))return null;var u=(0,I.isLayerGlobal)(U(U({},e),{},{globalParent:n})),s=(0,I.isLayerLocked)(U(U({},e),{},{lockedParent:r})),d=t.renderCounter>t.renderBreakpoint;return t.renderCounter++,o.default.createElement(T.default,G({key:"lv-layer-".concat(l.address),index:i,globalParent:u,lockedParent:s,isDelayRender:d},l),t.renderChildLayers(a,u,s))}))}},{key:"renderLayers",value:function(){var e=this,t=M.default.isFilterActive();if(t&&M.default.isEmptyFilterResults())return null;this.renderCounter=0;var n=this.getLayersData(),r=(0,i.default)({"et-fb-layers-view":!0,"et-fb-layers-view--results":t});return o.default.createElement("div",{id:"et-fb-layers-view-container",ref:this.containerRef},o.default.createElement("div",{className:r},n.map((function(t,n){var r=M.default.getLayerProps(t.address);if((0,c.default)(t.attrs,"_deleted")||(0,f.default)(r))return null;var a=e.renderCounter>e.renderBreakpoint;return e.renderCounter++,o.default.createElement(T.default,G({key:"lv-layer-".concat(r.address),index:n,globalParent:!1,lockedParent:!1,isDelayRender:a},r),e.renderChildLayers(t,!1,!1))}))))}},{key:"render",value:function(){var e,t=this.state,n=t.filterValue,r=t.filterSelected,a=t.filterDropdownActive,u=t.filterNotice,s=M.default.isFilterActive(),p=this.searchFilters,h=(0,d.default)(p.show_only,r)?p.show_only[r]:r,m=(0,f.default)(r)?o.default.createElement(_.default,{className:"et-fb-options-filter-button-group"},o.default.createElement(v.default,{_onClick:this.filterDropdownToggle},o.default.createElement(E.default,{icon:"add",color:s?g.default.white:g.default.shuttleGrey,size:"14"})),o.default.createElement(v.default,{_onClick:this.filterDropdownToggle},ETBuilderBackend.i18n.modals.filter)):o.default.createElement(_.default,{className:"et-fb-options-filter-button-group"},o.default.createElement(v.default,{_onClick:this.filterDropdownToggle},h),o.default.createElement(v.default,{_onClick:this.filterReset},o.default.createElement(E.default,{icon:"exit",color:s?g.default.white:g.default.shuttleGrey,size:"10"}))),y=!!a&&o.default.createElement("div",{className:"et-fb-options-filter-dropdown-wrap"},o.default.createElement(k.default,{value:r,name:"layers-filter",options:p,optionGroups:{show_only:ETBuilderBackend.i18n.modals.show_only},_onClick:this.filterDropdownToggle,__onChange:this.filterSelect,activeOnLoad:!0,focusOnSearchOnLoad:!0,searchable:!0})),b=o.default.createElement("div",{className:(0,i.default)({"et-fb-options-filter":!0,"et-fb-options-filter--has-dropdown":!(0,f.default)(p)})},o.default.createElement("div",{className:"et-fb-options-filter-input-wrap"},o.default.createElement(O.default,{type:"text",value:n,name:"filterValue",_onChange:this.filterInput,additional_attrs:{placeholder:J.searchLayers,"data-shortcuts-allowed":""}})),!(0,f.default)(p)&&o.default.createElement("div",{className:"et-fb-options-filter-button-wrap"},m),y,this.maybeRenderFilterNotice()),S=(0,i.default)((X(e={"et-fb-modal__module-settings":!0},"et-fb-modal__".concat(this.slug),!0),X(e,"et-fb-modal__filter-active",!0),X(e,"et-fb-modal__filter-none",!s),e)),P=(0,i.default)({"et-fb-tabs__panel--filter-active":!0,"et-fb-tabs__panel--filter-none":!s,"et-fb-tabs__panel--filter-dropdown":!(0,f.default)(p),"et-fb-tabs__panel--filter-selected":!(0,f.default)(r),"et-fb-tabs__panel--filter-notice":u}),T=M.default.getModalState(),x=(0,l.default)({},this.props,{adjustHeightOffset:!0,className:S,forceUpdateSpecificModal:!0,headerButtons:[o.default.createElement(v.default,{key:"modal-close-button",buttonName:w.default.LAYERS_VIEW_MODAL_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.close,primary:!0},o.default.createElement(E.default,{icon:"close",color:"#FFFFFF"}))],label:J.title,measurement:{height:(0,c.default)(T,"measurement.height",this.defaultModalHeight),width:(0,c.default)(T,"measurement.width",this.defaultModalWidth)},modalMinimalWidth:300,position:{x:(0,c.default)(T,"position.x",this.props.position.x),y:(0,c.default)(T,"position.y",this.props.position.y)},updateSpecificModal:this.updateModalState});return o.default.createElement(j.default,x,o.default.createElement(C.default,null,o.default.createElement(D.default,{selectedIndex:0},o.default.createElement(D.ETBuilderTabList,null,o.default.createElement(D.ETBuilderTabItem,null,J.title)),o.default.createElement(D.ETBuilderTabPanel,{slug:this.slug,className:P,selected:!0},b,this.renderToggleAll(),this.renderLayers())),this.renderABTestingStyle()))}}],r&&H(n.prototype,r),a&&H(n,a),Object.defineProperty(n,"prototype",{writable:!1}),F}(o.Component);X(ee,"propTypes",{contextMenuCallback:a.default.func}),X(ee,"defaultProps",{});var te=ee;t.default=te}).call(this,n(8))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=Y(n(0)),a=n(67),i=K(n(13)),l=K(n(10)),u=K(n(40)),s=K(n(1)),c=K(n(5)),d=K(n(37)),f=K(n(9)),p=K(n(28)),h=K(n(42)),m=K(n(58)),y=K(n(12)),g=K(n(4)),b=K(n(462)),v=K(n(215)),_=K(n(184)),w=K(n(35)),O=K(n(65)),k=K(n(7)),S=K(n(304)),C=K(n(126)),E=K(n(17)),P=K(n(129)),T=K(n(11)),M=K(n(146)),j=K(n(34)),x=K(n(124)),D=K(n(359)),N=K(n(56)),L=K(n(72)),R=(K(n(88)),K(n(63))),A=K(n(43)),I=K(n(303)),B=K(n(1484)),F=n(506),W=K(n(281)),V=K(n(781)),U=Y(n(782)),G=K(n(22)),H=K(n(6)),z=K(n(824)),q=Y(n(2));function K(e){return e&&e.__esModule?e:{default:e}}function $(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return($=function(e){return e?n:t})(e)}function Y(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=$(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function X(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ne(e,t){return ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ne(e,t)}function re(e){var t=function(){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}}();return function(){var n,r=ie(e);if(t){var o=ie(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return oe(this,n)}}function oe(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ae(e)}function ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}n(1882);var le=q.default.topDocument(),ue=q.default.appDocument(),se=function(e,t){var n=t||"quickActions";return(0,s.default)(ETBuilderBackend.i18n,"".concat(n,".").concat(e),e)},ce=function(t){!function(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&&ne(e,t)}(Y,t);var n,r,K,$=re(Y);function Y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Y),(t=$.call(this,e)).displayName="ETBuilderQuickActionsModal",t.data=q.default.intentionallyClone(z.default.getData()),t.settingKeys=["always_start_with","show_recent_queries","recent_category","recent_queries"],t.defaultSettings=t.getDefaultSettings(),t.state=(0,l.default)({},{reRender:!1,context:"modal",keyword:"",parentSelected:t.parentSelectedDefault(),pointerItem:{},itemHovered:{},inputFocused:!0,placeholder:!1,settingPanelActive:!1,lastUsedCategory:!1,mousePointer:{}},t.defaultSettings),t.slug="quick-actions",t.placeholderId="quick-actions-placeholder",t.isScrollingList=!1,t.modalWidth=600,t.modalHeight=360,t.timeout=100,t.throttledMouseMove=(0,_.default)(t.togglePlaceholder,t.timeout,{leading:!1}),t.searchInputRef=o.default.createRef(),t.setModalWrapRef=t.setModalWrapRef.bind(ae(t)),t.setResultsWrapRef=t.setResultsWrapRef.bind(ae(t)),t.setSettingPanelRef=t.setSettingPanelRef.bind(ae(t)),t.setSearchInputFocus=t.setSearchInputFocus.bind(ae(t)),t.handleSearchInput=t.handleSearchInput.bind(ae(t)),t.handleSearchInputFocus=t.handleSearchInputFocus.bind(ae(t)),t.handleSearchInputBlur=t.handleSearchInputBlur.bind(ae(t)),t.handleMouseDown=t.handleMouseDown.bind(ae(t)),t.handleMouseDownTopDocument=t.handleMouseDownTopDocument.bind(ae(t)),t.handleMouseMove=t.handleMouseMove.bind(ae(t)),t.handleKeyDown=t.handleKeyDown.bind(ae(t)),t.handleItemMouseOver=t.handleItemMouseOver.bind(ae(t)),t.handleItemMouseDown=t.handleItemMouseDown.bind(ae(t)),t.handleItemClick=t.handleItemClick.bind(ae(t)),t.handleDataUpdated=t.handleDataUpdated.bind(ae(t)),t.closeModal=t.closeModal.bind(ae(t)),t.openSettingsPanel=t.openSettingsPanel.bind(ae(t)),t.closeSettingsPanel=t.closeSettingsPanel.bind(ae(t)),t.updateSetting=t.updateSetting.bind(ae(t)),t.resetResultsList=t.resetResultsList.bind(ae(t)),t}return n=Y,(r=[{key:"componentDidMount",value:function(){var e=this;le.addEventListener("keydown",this.handleKeyDown),ue.addEventListener("keydown",this.handleKeyDown),le.addEventListener("mousedown",this.handleMouseDownTopDocument),ue.addEventListener("mousedown",this.handleMouseDown),q.default.$topWindow().on("et_fb_quick_actions_data_updated",this.handleDataUpdated),setTimeout((function(){e.setSearchInputFocus()}),200)}},{key:"componentDidUpdate",value:function(e,t){this.isScrollingList=!1,t.context!==this.state.context&&"pointer"===this.state.context&&((0,q.topWindow)().addEventListener("mousemove",this.handleMouseMove),(0,q.appWindow)().addEventListener("mousemove",this.handleMouseMove)),t.context!==this.state.context&&"pointer"===t.context&&((0,q.topWindow)().removeEventListener("mousemove",this.handleMouseMove),(0,q.appWindow)().removeEventListener("mousemove",this.handleMouseMove))}},{key:"componentWillUnmount",value:function(){le.removeEventListener("keydown",this.handleKeyDown),ue.removeEventListener("keydown",this.handleKeyDown),le.removeEventListener("mousedown",this.handleMouseDownTopDocument),ue.removeEventListener("mousedown",this.handleMouseDown),q.default.$topWindow().off("et_fb_quick_actions_data_updated",this.handleDataUpdated),this.removePlaceholder()}},{key:"setModalWrapRef",value:function(e){this.modalWrapRef=e}},{key:"setResultsWrapRef",value:function(e){this.resultsWrapRef=e}},{key:"setSettingPanelRef",value:function(e){this.settingPanelRef=e}},{key:"setSearchInputFocus",value:function(){(0,c.default)(this.searchInputRef)||(0,c.default)(this.searchInputRef.current)||(this.searchInputRef.current.setAttribute("autocomplete","off"),this.searchInputRef.current.focus())}},{key:"getDefaultSettings",value:function(){var e={};return(0,f.default)(this.settingKeys,(function(t){var n=H.default.getAppPreference("quick_actions_".concat(t));e[t]="recent_queries"===t?(0,c.default)(n)||"false"===(0,p.default)(n)?[]:n.split(","):n})),e}},{key:"getItem",value:function(e){return(0,y.default)(e)?(0,m.default)(this.data,(function(t){var n={},r={};return(0,f.default)(e,(function(e,o){n[o]=(0,d.default)((0,s.default)(t,o))?(0,s.default)(t,o).toLowerCase():(0,s.default)(t,o),r[o]=(0,d.default)(e)?e.toLocaleLowerCase():e})),(0,h.default)(n,r)})):{}}},{key:"getItemHoveredIndex",value:function(){var e=this,t=(0,c.default)(this.state.itemHovered)?0:(0,v.default)(this.getResults(),(function(t){return(0,h.default)(t,e.state.itemHovered)}));return parseInt(t,10)}},{key:"getRecentItems",value:function(){if("on"!==this.getSetting("show_recent_queries"))return[];if(!(0,c.default)(this.state.keyword))return[];if(!(0,c.default)(this.state.parentSelected))return[];var e=this.getSetting("recent_queries");return(0,c.default)(e)?[]:e.map((function(e,t){return(0,l.default)({},{label:e,key:"recent_query__".concat(t),parent:void 0,depth:1,recentQuery:!0})}))}},{key:"getItems",value:function(){var e=this,t=this.state,n=t.keyword,r=t.parentSelected,o=H.default.getActiveThemeBuilderArea();if(!(0,c.default)(n)&&!(0,c.default)(r)){var a=this.data.filter((function(e){return(0,s.default)(r,"key","")===e.parent})),i=this.data.filter((function(t){var n=(0,m.default)(a,t)||(0,m.default)(a,{key:t.parent,depth:t.depth-1});return e.isKeywordMatch(t)&&n}));return"goto"===r.parent?i.filter((function(e){return!e.goto.props.attrs.theme_builder_area||o===e.goto.props.attrs.theme_builder_area})):i}if((0,c.default)(n)&&!(0,c.default)(r)){var l=this.data.filter((function(e){return(0,s.default)(r,"key","")===e.parent}));return"goto"===r.parent?l.filter((function(e){return!e.goto.props.attrs.theme_builder_area||o===e.goto.props.attrs.theme_builder_area})):l}if(!(0,c.default)(n)&&(0,c.default)(r)){var u={goto__section:{match:!1,hasChild:!1},goto__row:{match:!1,hasChild:!1},goto__module:{match:!1,hasChild:!1}},d=this.data.filter((function(t){var n=e.isKeywordMatch(t);return n&&((0,j.default)(u,t.key)&&(u[t.key].match=!0),(0,j.default)(u,t.parent)&&(u[t.parent].hasChild=!0)),n||(0,j.default)(u,t.key)})),f=d.filter((function(e){return e.goto&&e.goto.props.attrs.theme_builder_area?o===e.goto.props.attrs.theme_builder_area:f})),p=(0,E.default)((0,x.default)(u,(function(e){return!e.match&&!e.hasChild})));return(0,c.default)(p)?d:f.filter((function(e){return!(0,k.default)(p,e.key)}))}return this.data.filter((function(e){return 1===e.depth}))}},{key:"getResults",value:function(){var e=this.getRecentItems(),t=this.getItems();if(!(0,c.default)(this.state.keyword)&&(0,c.default)(this.state.parentSelected)){var n=t.map((function(e){return e.parent||(0,N.default)(e,"priority",-1),e})),r=(0,D.default)(n,["priority"],["asc"]);return(0,M.default)(e,r)}return(0,M.default)(e,t)}},{key:"getMousePosition",value:function(){var t=this.state.mousePointer;if((0,c.default)(t)){var n=(0,q.appWindow)().innerWidth/2,r=(0,q.appWindow)().innerHeight/2;return{x:n-e(window).scrollLeft(),y:r-e(window).scrollTop()}}var o=(0,s.default)(t,"pageX",(0,s.default)(t,"clientX",0)),a=(0,s.default)(t,"pageY",(0,s.default)(t,"clientY",0));return{x:o-e(window).scrollLeft(),y:a-e(window).scrollTop()}}},{key:"getSetting",value:function(e,t){return(0,T.default)(e)?(0,P.default)(this.state,(0,E.default)(this.defaultSettings)):(0,s.default)(this.state,e,t)}},{key:"isKeywordMatch",value:function(e){var t=(0,p.default)(this.state.keyword).toLowerCase(),n=(0,s.default)(e,"label",!1);if(n&&-1!==(0,p.default)(n).toLowerCase().indexOf(t))return!0;var r=(0,s.default)(e,"keywordLabel",!1);if(r&&-1!==(0,p.default)(r).toLowerCase().indexOf(t))return!0;var o=(0,s.default)(e,"tagLabel",!1);return!(!o||-1===(0,p.default)(o).toLowerCase().indexOf(t))}},{key:"updateSetting",value:function(e,t){if((0,k.default)(this.settingKeys,e)){var n,r=this.getSetting(e);n="recent_queries"===e?(0,S.default)((0,C.default)((0,M.default)([t],r)),5):t,(0,h.default)(r,n)||(G.default.quickActionsUpdateSetting(e,n),this.setState(ee({},e,n)))}}},{key:"parentSelectedDefault",value:function(){var e=(0,s.default)(this.defaultSettings,"always_start_with");return"nothing"===e?{}:"recent_category"===e?this.getItem({key:(0,s.default)(this.defaultSettings,"recent_category"),depth:1}):this.getItem({key:e,depth:1})}},{key:"closeModal",value:function(){G.default.quickActionsSetContext(!this.state.context)}},{key:"isPlaceholderDataChanged",value:function(e){var t=this;if((0,h.default)(this.state.placeholder,e))return!1;var n=["targetAddress","isNoChild","isAddBefore"],r=[];return(0,f.default)(n,(function(n){(0,s.default)(t.state.placeholder,n)===(0,s.default)(e,n)&&r.push(n)})),n.length!==r.length}},{key:"getPlaceholderData",value:function(){var t=this,n=(0,s.default)(H.default.getHoveredModule(),"props",{});if((0,c.default)(n))return!1;var r=e('[data-address="'.concat((0,s.default)(n,"address"),'"]')).first();if(!r||1!==r.length)return!1;var o=this.state.pointerItem,a=o.group,i=o.slug,u=o.insert_saved,d=function(e){var t=(0,s.default)(e,"type","");return(0,k.default)(["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column","et_pb_column_inner"],t)?t.replace("et_pb_",""):"module"},f={fullwidth:{section:function(){return"section"===d(n)?{target:r}:{target:r.closest(".et_pb_section")}},module:function(){if(0!==i.indexOf("et_pb_fullwidth_"))return!1;if("module"===d(n))return{target:r};if(r.hasClass("et-fb-no-children"))return{target:r,isNoChild:!0};var e=r.find(".et_pb_module.et-first-child.et-last-child").first();return e&&e.length?{target:e}:!(0,c.default)(t.state.placeholder)&&t.state.placeholder}},specialty:{section:function(){return"section"===d(n)?{target:r}:{target:r.closest(".et_pb_section")}},row:function(){switch(d(n)){case"section":return!(u||!(0,c.default)(n.content))&&{target:r,isNoChild:!0};case"module":case"column_inner":return{target:r.closest(".et_pb_row_inner")};case"column":return!!(0,q.hasValue)((0,s.default)(n,"attrs.specialty_columns",""))&&{target:r,isNoChild:!0};case"row_inner":return{target:r};default:return!(0,c.default)(t.state.placeholder)&&t.state.placeholder}},module:function(){if(0===i.indexOf("et_pb_fullwidth_"))return!1;switch(d(n)){case"module":return{target:r};case"column_inner":return{target:r,isNoChild:!0};case"column":return!(0,q.hasValue)((0,s.default)(n,"attrs.specialty_columns",""))&&{target:r,isNoChild:!0};default:return!(0,c.default)(t.state.placeholder)&&t.state.placeholder}}},regular:{section:function(){return"section"===d(n)?{target:r}:{target:r.closest(".et_pb_section")}},row:function(){switch(d(n)){case"module":case"column":return{target:r.closest(".et_pb_row")};case"row":return{target:r};default:return!!r.hasClass("et-fb-no-children")&&{target:r,isNoChild:!0}}},module:function(){if(0===i.indexOf("et_pb_fullwidth_"))return!1;switch(d(n)){case"module":return{target:r};case"column":return{target:r,isNoChild:!0};default:return!(0,c.default)(t.state.placeholder)&&t.state.placeholder}}}},h=(0,q.getModuleSectionType)(n,H.default.getSectionsFlattened()),m=(0,s.default)(f,"".concat(h,".").concat(a));if(!(0,w.default)(m))return!1;var y=m();if(!y||!y.target||!y.target.length)return!1;var g=y.isNoChild||!1,b=(0,p.default)(y.target.attr("data-address"));if(g)return(0,l.default)({},y,{targetAddress:b,isNoChild:g,isAddBefore:!1});var v=(0,s.default)(y.target.offset(),"top",0),_=y.target.height()/2,O=(0,s.default)(this.state.mousePointer,"pageY",0);return(0,l.default)({},y,{isNoChild:g,targetAddress:b,isAddBefore:O<v+_})}},{key:"togglePlaceholder",value:function(t){var n=this;if("pointer"===this.state.context){if((0,s.default)(t,"target")){var r=e(t.target).closest(".et-fb-column-divider").find(".et_pb_column_dropzone"),o=(0,s.default)(this,"state.pointerItem.slug","");if(r.length>0&&"module"===(0,s.default)(this,"state.pointerItem.group","")&&!(0,L.default)(o,"et_pb_fullwidth_"))return void this.setState({placeholder:{parentRow:r.data("row-address"),columnIndex:r.data("zone-index")}})}var a=this.getPlaceholderData();this.isPlaceholderDataChanged(a)&&e.when(this.removePlaceholder()).then((function(){(0,c.default)(a)?n.setState({placeholder:a}):e.when(n.addPlaceholder(a)).then((function(){var t=e("#".concat(n.placeholderId));n.setState({placeholder:(0,l.default)({},a,{buttonPosition:Z(Z({},t.offset()),{},{element:t})})})}))}))}}},{key:"addPlaceholder",value:function(t){var n,r=t.target||!1,o=t.isNoChild||!1,a=t.isAddBefore||!1;if(r&&r.length){var l=this.state.pointerItem,u=l.group,c=l.slug,d=(0,s.default)(this.props,"previewMode","desktop"),f=(0,i.default)((ee(n={"et-fb-quick-actions-placeholder":!0,"et-fb-quick-actions-placeholder--no-child":o,"et-fb-quick-actions-placeholder--first-child":a},"et-fb-quick-actions-placeholder--".concat(u),!0),ee(n,"et-fb-quick-actions-placeholder--".concat(u,"-fullwidth"),"fullwidth"===c.replace("et_fb_","")),ee(n,"et-fb-quick-actions-placeholder--".concat(u,"-specialty"),"specialty"===c.replace("et_fb_","")),ee(n,"et-fb-quick-actions-placeholder--".concat(u,"-regular"),"regular"===c.replace("et_fb_","")||"section"===c.replace("et_pb_","")),n)),p={opacity:"wireframe"===d?1:0,height:"wireframe"===d?"40px":"0px"},h={opacity:1,height:"20px"},m=e('<div id="'.concat(this.placeholderId,'" class="').concat(f,'"></div>')).css(p);e.when(void(o?r.find(".et-fb-add-wrap").first().append(m):"wireframe"===d?a?r.prepend(m):r.append(m):a?r.before(m):r.after(m))).then((function(){"wireframe"!==d&&m.animate(h,500,"easeOutCubic")}))}}},{key:"removePlaceholder",value:function(){e("#".concat(this.placeholderId)).remove()}},{key:"handleDataUpdated",value:function(){this.data=q.default.intentionallyClone(z.default.getData());var e={reRender:!this.state.reRender};(0,c.default)(this.state.parentSelected)||(e.parentSelected=this.getItem({key:(0,s.default)(this.state,"parentSelected.key"),parent:(0,s.default)(this.state,"parentSelected.parent"),depth:(0,s.default)(this.state,"parentSelected.depth")})),this.setState(e)}},{key:"handleMouseDown",value:function(e){var t=this;if("pointer"===this.state.context&&!(0,c.default)(this.state.placeholder))return this.removePlaceholder(),this.setState({context:!1}),void setTimeout((function(){var e=t.state.placeholder,n=(0,l.default)({},Z({},t.state.pointerItem),{placeholder:e});G.default.quickActionProcess(n)}),200);"modal"===this.state.context&&this.modalWrapRef&&!this.modalWrapRef.contains(e.target)&&this.closeModal()}},{key:"handleMouseDownTopDocument",value:function(t){this.state.settingPanelActive&&this.settingPanelRef&&!this.settingPanelRef.contains(t.target)?this.closeSettingsPanel():"modal"!==this.state.context||e(t.target).closest(".et-fb-modal__quick-actions").length||this.closeModal()}},{key:"handleMouseMove",value:function(e){this.setState({mousePointer:e}),this.throttledMouseMove.cancel(),this.throttledMouseMove(e)}},{key:"handleKeyDown",value:function(t){var n=this,r=t.keyCode||t.which,o=27===r,a=8===r,i=38===r,l=40===r,u=13===r,d=this.state,f=d.parentSelected,p=d.keyword,h=d.inputFocused,m=d.context;if(o){if(this.state.settingPanelActive)return void this.closeSettingsPanel();if("pointer"===m)return this.setState({context:"modal",placeholder:!1}),this.removePlaceholder(),void G.default.quickActionsSetContext("modal");this.closeModal()}if(a&&!(0,c.default)(f)&&(0,c.default)(p)&&h){var y=(0,s.default)(f,"depth",1),g=(0,s.default)(f,"parent",""),b=y>1?this.getItem({depth:y-1,key:g}):{};this.setState({keyword:"",parentSelected:b,itemHovered:{}})}if(!this.isScrollingList&&(i||l)){var v=this.getResults();if(!(0,c.default)(v)){var _=function(){var e=v.length-1,t=n.getItemHoveredIndex(),r=!1;if(l)for(;!1===r&&t<=e;){t+=1;var o=(0,s.default)(v,t);(0,c.default)(o)||o.isGroup||(r=t)}if(i)for(;!1===r&&t>=0;){t-=1;var a=(0,s.default)(v,t);(0,c.default)(a)||a.isGroup||(r=t)}return r}();if(!1!==_){var w=(0,s.default)(v,_);if(!(0,c.default)(w)){var O=e(this.resultsWrapRef),k=O.outerHeight(),S=parseInt(O.css("padding-top"),10),C=parseInt(O.css("padding-bottom"),10),E=O.closest(".et-fb-tabs__panel"),P=E.height(),T=E.scrollTop(),M=O.find("li").eq(_),j=M.outerHeight()||0,x=M.offset().top-E.offset().top,D=k>P,N=0===_,L=_===v.length-1,R=function(t){n.isScrollingList=!0,e.when(E.scrollTop(t)).then((function(){n.setState({itemHovered:w})}))};if(l&&D&&x+j>=P){var A=T+x+j-P;L&&(A+=C),R(A)}else if(i&&D&&x-j<=0){var I=T+x;N&&(I-=S),R(I)}else this.setState({itemHovered:w})}}}}if(u){var B=this.getResults();if(!(0,c.default)(B)){var F=(0,s.default)(B,this.getItemHoveredIndex());(0,c.default)(F)||F.isGroup||this.handleItemClick(F)}}}},{key:"handleSearchInput",value:function(e){var t=(0,b.default)(e.target.value),n=this.state.parentSelected,r={};(0,c.default)(n)?r=this.getItem({label:t}):(r=this.getItem({label:t,parent:(0,s.default)(n,"key")}),(0,c.default)(r)&&(r=this.getItem({tabLabel:t,parent:(0,s.default)(n,"key")})));var o=(0,c.default)(r)||(0,c.default)(r.actions)?n:r,a=(0,c.default)(r)||(0,c.default)(r.actions)?t:"";1===(0,s.default)(o,"depth")&&this.updateSetting("recent_category",o.key),"help"===(0,s.default)(o,"key")&&G.default.quickActionsLoad("articles"),this.setState({parentSelected:o,keyword:a,itemHovered:{}})}},{key:"handleSearchInputFocus",value:function(){this.state.settingPanelActive||this.state.settingPanelActive||this.setState({inputFocused:!0})}},{key:"handleSearchInputBlur",value:function(){this.state.settingPanelActive||this.state.settingPanelActive||this.setState({inputFocused:!1})}},{key:"handleItemClick",value:function(e){if(!this.state.settingPanelActive&&!this.state.settingPanelActive){if((0,s.default)(e,"recentQuery"))return this.setState({keyword:e.label}),void this.setSearchInputFocus();var t=X((0,s.default)(e,"key","").split("__"),2),n=t[0],r=t[1];switch(n){case"insert_saved":G.default.quickActionsLoad("library",r);break;case"help":G.default.quickActionsLoad("articles");break;case"open":r&&!(0,k.default)(r,"_")&&G.default.quickActionsLoad("posts",r)}if(1===(0,s.default)(e,"depth")&&this.updateSetting("recent_category",e.key),(0,c.default)(this.state.keyword)||this.updateSetting("recent_queries",this.state.keyword),!(0,T.default)(e.actions))return this.setState({parentSelected:e,keyword:"",itemHovered:{}}),void this.setSearchInputFocus();if((0,k.default)(["insert_module","insert_saved"],n)&&"pointer"!==this.state.context){this.setState({context:"pointer",pointerItem:e}),this.togglePlaceholder();var o={pointerItemSlug:(0,s.default)(e,"slug",""),pointerItemGroup:(0,s.default)(e,"group","")};G.default.quickActionsSetContext("pointer",o)}else G.default.quickActionProcess(e)}}},{key:"handleItemMouseOver",value:function(e){this.isScrollingList||this.setState({itemHovered:e})}},{key:"handleItemMouseDown",value:function(e){e.persist(),this.setState({mousePointer:e})}},{key:"openSettingsPanel",value:function(){this.state.settingPanelActive||this.setState({settingPanelActive:!0})}},{key:"closeSettingsPanel",value:function(){this.setState({settingPanelActive:!1})}},{key:"resetResultsList",value:function(){var e={keyword:""};(0,c.default)(this.state.keyword)&&!(0,c.default)(this.state.parentSelected)&&(e.parentSelected=this.getItem({depth:(0,s.default)(this.state.parentSelected,"depth")-1,key:(0,s.default)(this.state.parentSelected,"parent")})),this.setState(e)}},{key:"renderSettingPanel",value:function(){var e=this;if(!this.state.settingPanelActive)return!1;var t={nothing:se("Nothing"),recent_category:se("Last Used Search Category")},n=(0,O.default)(this.data,(function(e){return 1===e.depth}));(0,f.default)(n,(function(e){t[e.key]=e.label}));var r=[{label:se("Always Start Search With"),fieldData:{name:"always_start_with",type:"select",default:"nothing",options:t,value:this.getSetting("always_start_with"),_onChange:this.updateSetting}},{label:se("Show Recent Queries"),fieldData:{name:"show_recent_queries",type:"yes_no_button",default:"off",options:{on:se("Yes"),off:se("No")},value:this.getSetting("show_recent_queries"),_onChange:this.updateSetting}}].map((function(t){var n=(0,o.createElement)(B.default.getControl(t.fieldData.type),t.fieldData);return o.default.createElement(F.ETBuilderFormGroup,{name:t.fieldData.name,key:"".concat(e.slug,"-form-group-").concat(t.fieldData.name)},o.default.createElement(F.ETBuilderFormLabel,null,t.label),o.default.createElement(W.default,{componentName:t.fieldData.name},n))})),l=(0,i.default)({"et-fb-quick-actions-setting-panel":!0,"et-fb-modal":!0}),u=H.default.getAppPreference("builder_animation");return o.default.createElement(a.Motion,{defaultStyle:{size:.8,opacity:0},style:{size:u?(0,a.spring)(1,{stiffness:300,damping:20}):1,opacity:u?(0,a.spring)(1,{stiffness:300,damping:20}):1}},(function(t){return o.default.createElement("div",{className:"et-fb-quick-actions-setting-panel--wrap",style:{opacity:t.opacity,transform:"scale( ".concat(t.size," )")}},o.default.createElement("div",{className:"et-fb-quick-actions-setting-panel--button-mask"}),o.default.createElement("div",{className:l,ref:e.setSettingPanelRef},r))}))}},{key:"renderSearchInput",value:function(){var e=this.state.parentSelected,t=!(0,c.default)(e)&&o.default.createElement("div",{className:"et-fb-modal__header--selected"},o.default.createElement("span",null,(0,s.default)(e,"tagLabel",(0,s.default)(e,"label"))));return o.default.createElement("div",{className:"et-fb-modal__header--input-wrap"},t,o.default.createElement("div",{className:"et-fb-modal__header--input"},o.default.createElement("input",{type:"hidden",value:"fakeInputValueDisableBrowserAutoSuggestions",style:{display:"none"}}),o.default.createElement("input",{type:"text",id:"keyword",name:"keyword",className:"et-fb-settings-option-input et-fb-settings-option-input--block",placeholder:(0,c.default)(e)?"".concat(se("Search"),"..."):"",value:this.state.keyword,onChange:this.handleSearchInput,onFocus:this.handleSearchInputFocus,onBlur:this.handleSearchInputBlur,ref:this.searchInputRef})),this.renderSettingPanel())}},{key:"renderResultsList",value:function(){var e=this,t=this.state.parentSelected,n=this.state.keyword;if(!(0,c.default)(t)&&(0,c.default)(t.actions)&&t.isLoading)return o.default.createElement(I.default,{useWrapper:!1,isLoading:!0});var r=this.getResults();if((0,c.default)(r))return o.default.createElement("div",{className:(0,i.default)({"et-fb-quick-actions":!0,"et-fb-quick-actions--no-results":!0})},o.default.createElement("p",{onClick:this.resetResultsList,dangerouslySetInnerHTML:{__html:se("No options exist for this search query. <span>Click here</span> to clear your search.")}}));var a=r.filter((function(e){return e.recentQuery})),l=r.map((function(r,l){var u,s=function(t,n){return!e.state.settingPanelActive&&((0,c.default)(e.state.itemHovered)?0===t:(0,h.default)(n,e.state.itemHovered))},d=(0,i.default)(ee({"et-fb-quick-actions--item--label":!0,"et-fb-quick-actions--item--label--hovered":s(l,r)},"et-fb-quick-actions--item--label--depth-".concat(r.depth),!0)),f=(0,i.default)(ee({"et-fb-quick-actions--item--description":!0,"et-fb-quick-actions--item--description--hovered":s(l,r)},"et-fb-quick-actions--item--description--depth-".concat(r.depth),!0)),m=(0,i.default)((ee(u={"et-fb-quick-actions--item":!0},"et-fb-quick-actions--item--depth-".concat(r.depth),!0),ee(u,"et-fb-quick-actions--item--hovered",s(l,r)&&!r.isGroup),ee(u,"et-fb-quick-actions--item--separator",!(0,c.default)(a)&&a.length-1===l),u)),y=o.default.createElement("span",{className:d},function(e){return e.injected||(0,c.default)(n)||(0,c.default)(e.keywordLabel)||!(0,c.default)(t)?e.label:e.keywordLabel}(r)),b=o.default.createElement("span",{className:f},function(e){return!(0,c.default)(e.description)&&(0,g.default)(e.description)?e.description.map((function(e){return o.default.createElement("span",{key:e,"data-content":e,className:"kbd-key key-".concat(e)})})):(0,p.default)(e.description)}(r)),v={key:"".concat(r.depth,"_-_").concat(r.key),className:m,onClick:function(){return e.handleItemClick(r)},onMouseOver:function(){return e.handleItemMouseOver(r)},onMouseDown:e.handleItemMouseDown},_=r.element||"div",w=r.attrs||{};return o.default.createElement("li",v,(0,o.createElement)(_,w,y,b))})),u=(0,i.default)({"et-fb-quick-actions":!0,"et-fb-quick-actions--results":!0});return o.default.createElement("ul",{className:u,ref:this.setResultsWrapRef},l)}},{key:"renderPointer",value:function(){var e;if("pointer"!==this.state.context)return!1;var t=H.default.getHoveredModule();if((0,c.default)(t))return!1;var n=this.state.pointerItem,r=n.group,a=n.slug,l=this.getMousePosition(),d={className:(0,i.default)((e={"et-fb-quick-actions-pointer":!0},ee(e,"et-fb-quick-actions-pointer--".concat(r),!0),ee(e,"et-fb-quick-actions-pointer--".concat(r,"--").concat(a.replace("et_pb_","")),"section"!==r),ee(e,"et-fb-quick-actions-pointer--".concat(r,"--fullwidth"),"fullwidth"===a.replace("et_fb_","")),ee(e,"et-fb-quick-actions-pointer--".concat(r,"--specialty"),"specialty"===a.replace("et_fb_","")),ee(e,"et-fb-quick-actions-pointer--".concat(r,"--regular"),"regular"===a.replace("et_fb_","")||"section"===a.replace("et_pb_","")),e)),tooltip:(0,s.default)(ETBuilderBackend.i18n.tooltip,"".concat(r,".addButton")),round:!0,info:"regular"===a.replace("et_fb_","")||"section"===a.replace("et_pb_",""),primary:"fullwidth"===a.replace("et_fb_",""),warning:"specialty"===a.replace("et_fb_",""),success:"row"===r,inverse:"module"===r,disabled:!0,onClick:u.default,style:{left:(0,s.default)(l,"x",0),top:(0,s.default)(l,"y",0)}};return o.default.createElement("div",{className:"et-fb-quick-actions-wrap--pointer"},o.default.createElement(R.default,d,o.default.createElement(A.default,{size:"14",icon:"add",color:"#FFFFFF"})))}},{key:"renderModal",value:function(){var e;if("modal"!==this.state.context)return!1;var t=(0,i.default)((ee(e={"et-fb-modal__module-settings":!0},"et-fb-modal__".concat(this.slug),!0),ee(e,"et-fb-modal__".concat(this.slug,"__").concat((0,q.getOS)().toLowerCase()),!0),e)),n=(0,i.default)(ee({"et-fb-tabs__panel":!0},"et-fb-tabs__panel--".concat(this.slug),!0)),r=(0,i.default)(ee({"et-fb-form":!0},"et-fb-form--".concat(this.slug),!0)),a=[o.default.createElement(R.default,{tooltip:se("Settings"),ink:!1,_onClick:this.openSettingsPanel},o.default.createElement(A.default,{icon:"setting"})),o.default.createElement(R.default,{tooltip:se("Close"),ink:!1,_onClick:this.closeModal},o.default.createElement(A.default,{icon:"close"}))],u=(0,l.default)({},this.props,{className:t,label:this.renderSearchInput(),measurement:{width:this.modalWidth,height:this.modalHeight},alwaysCentered:!0,headerButtons:a});return o.default.createElement("div",{className:"et-fb-quick-actions-wrap--modal",ref:this.setModalWrapRef},o.default.createElement(V.default,u,o.default.createElement(W.default,null,o.default.createElement(U.default,{selectedIndex:0},o.default.createElement(U.ETBuilderTabPanel,{className:n,slug:this.slug,selected:!0},o.default.createElement("div",{className:r},this.renderResultsList()))))))}},{key:"render",value:function(){return o.default.createElement(o.default.Fragment,null,this.renderPointer(),this.renderModal())}}])&&te(n.prototype,r),K&&te(n,K),Object.defineProperty(n,"prototype",{writable:!1}),Y}(o.default.Component);t.default=ce}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=d(n(27)),i=d(n(3)),l=d(n(13)),u=d(n(6)),s=d(n(842)),c=d(n(2));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}n(1883);var v={active:i.default.bool},_=function(e){!function(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&&m(e,t)}(d,e);var t,n,r,i=y(d);function d(){return p(this,d),i.apply(this,arguments)}return t=d,(n=[{key:"componentDidMount",value:function(){c.default.$appWindow().trigger("et-core-modal-active")}},{key:"renderDescription",value:function(){var e=u.default.getAlertModalSetting("description");return c.default.hasValue(e)?o.default.createElement("div",{className:"et-core-modal-content",dangerouslySetInnerHTML:{__html:s.default.wpautop(e)}}):""}},{key:"renderButton",value:function(e,t,n){var r=(0,l.default)({"et-core-modal-action":!0},n);return o.default.createElement("a",{href:"#button",className:r,onClick:t},e)}},{key:"render",value:function(){var e=c.default.replaceCodeContentEntities(u.default.getAlertModalSetting("title")),t=u.default.getAlertModalSetting("buttonCancelLabel"),n=t?this.renderButton(t,u.default.getAlertModalSetting("onClickCancelButton"),{"et-core-modal-action-secondary":!0}):"",r=u.default.getAlertModalSetting("buttonProceedLabel"),i=r?this.renderButton(r,u.default.getAlertModalSetting("onClickProceedButton"),{"et-core-modal-action-restore":!0}):"",s=t?o.default.createElement("a",{href:"#close",className:"et-core-modal-close",onClick:u.default.getAlertModalSetting("onClickCancelButton")}):"",d=["et-core-modal-overlay","et-core-active","et-fb-modal-alert"];r&&t&&d.push("et-core-modal-two-buttons");var f=o.default.createElement("div",{className:(0,l.default)(d),onClick:u.default.getAlertModalSetting("onClickCancelButton")},o.default.createElement("div",{className:"et-core-modal"},o.default.createElement("div",{className:"et-fb-modal-overlay-mousetrap"}),o.default.createElement("div",{className:"et-core-modal-header"},o.default.createElement("h3",{className:"et-core-modal-title"},e),s),this.renderDescription(),o.default.createElement("div",{className:"et_pb_prompt_buttons"},n,i)));return a.default.createPortal(f,c.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app"))[0])}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.Component);_.propTypes=v,_.defaultProps={active:!1};var w=_;t.default=w},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=v(n(27)),i=v(n(13)),l=v(n(1)),u=v(n(31)),s=v(n(2)),c=v(n(6)),d=v(n(14)),f=v(n(63)),p=n(506),h=v(n(1533)),m=v(n(1488)),y=v(n(22)),g=v(n(303)),b=v(n(84));function v(e){return e&&e.__esModule?e:{default:e}}function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function S(e){var t=function(){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}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1884);var M=function(e){!function(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&&k(e,t)}(_,e);var t,n,r,v=S(_);function _(){var e;w(this,_);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return T(E(e=v.call.apply(v,[this].concat(n))),"state",{consent:"",notes:"",status:"initial",requestResponse:{}}),T(E(e),"_onModalChange",(function(){var t=c.default.getErrorReportModalStatus(),n=c.default.getErrorReportRequestResponse();e.setState({status:t,requestResponse:n}),"sending_success"===t&&setTimeout((function(){e._closeModal()}),3e3)})),T(E(e),"_onChange",(function(t,n){e.setState(T({},t,n)),"consent"===t&&setTimeout((function(){return e.forceUpdate()}),0)})),T(E(e),"_onCloseModal",(function(t){var n=s.default.$topWindow(t.target);n.closest(".et-core-modal").length>0&&!n.hasClass("et-core-modal-close")||(t.preventDefault(),t.stopPropagation(),e._closeModal())})),T(E(e),"_closeModal",(function(){s.default.$topWindow(a.default.findDOMNode(e.refs.reportModalOverlay)).addClass("et-core-closing").delay(600).queue((function(){y.default.setErrorReportModalActive(!1,null,null)}))})),T(E(e),"_onSubmitReport",(function(t){y.default.sendErrorReport(c.default.getSections(),c.default.getPageSettings(),e.state.notes)})),T(E(e),"_isSubmissionReady",(function(){return s.default.isOn(e.state.consent)})),e}return t=_,(n=[{key:"componentDidMount",value:function(){this._adjustModalPositionOnMount(),c.default.addErrorReportModalChange(this._onModalChange)}},{key:"componentWillUnmount",value:function(){c.default.removeErrorReportModalChange(this._onModalChange)}},{key:"_getI18n",value:function(e){return d.default.getI18n("errorBoundaries.modal.".concat(e))}},{key:"_getModalInitialHeight",value:function(){var e=s.default.$topWindow(a.default.findDOMNode(this.refs.reportModal));return e.find(".et-core-modal-header").outerHeight()+parseInt(e.find(".et-core-modal-content").css("paddingTop"))+parseInt(e.find(".et-core-modal-content").css("paddingBottom"))+e.find(".et-fb-form__group").outerHeight()}},{key:"_adjustModalPositionOnMount",value:function(){var e=s.default.$topWindow(a.default.findDOMNode(this.refs.reportModal));if(this._getModalInitialHeight()<=parseInt(.6*s.default.$topWindow().innerHeight())){s.default.$topWindow(a.default.findDOMNode(this.refs.reportModalOverlay)).addClass("et-core-modal-disabled-scrollbar");var t=this._getModalInitialHeight();e.css({marginTop:"-".concat(t/2,"px")})}}},{key:"_isStatus",value:function(e){return e===this.state.status}},{key:"_isEtAccountActive",value:function(){var e=d.default.getEtAccount("et_username"),t=d.default.getEtAccount("et_api_key"),n=d.default.getEtAccount("status");return s.default.hasValue(e)&&s.default.hasValue(t)&&"active"===n}},{key:"_renderModalHeader",value:function(){return o.default.createElement("div",{className:"et-core-modal-header"},o.default.createElement("h3",{className:"et-core-modal-title"},this._getI18n("title")),o.default.createElement("a",{href:"#close",className:"et-core-modal-close",onClick:this._onCloseModal,style:{pointerEvents:this._isStatus("sending")?"none":"auto",opacity:this._isStatus("sending")?0:1}}))}},{key:"_renderPreloader",value:function(){return this._isStatus("sending")?o.default.createElement(g.default,{isLoading:!0}):null}},{key:"_renderErrorMessage",value:function(){return this._isStatus("sending_error")?o.default.createElement("div",{className:"et-fb-error-report-notification et-fb-error-report-notification--error"},(0,l.default)(this.state,"requestResponse.message",this._getI18n("errorMessage"))):null}},{key:"_renderDebugInfo",value:function(){var e=(0,u.default)(this._getI18n("debugInfo"),(function(e,t){return o.default.createElement("div",{className:"et-fb-error-report-debug-items",key:"debug-info-".concat(t)},o.default.createElement("p",{className:"et-fb-error-report-debug-items-title"},t),o.default.createElement("ul",{className:"et-fb-error-report-debug-items-list"},(0,u.default)(e,(function(e){return o.default.createElement("li",{key:"debug-info-".concat(t,"-").concat(e)},e.replace(/_/g," "))}))))}));return o.default.createElement("div",{className:"et-fb-error-report-debug-items-wrap"},e)}},{key:"_renderReportForm",value:function(){var e=this._isEtAccountActive()?o.default.createElement(p.ETBuilderFormGroup,null,o.default.createElement(p.ETBuilderFormLabel,null,this._getI18n("consentTitle")),o.default.createElement("p",{className:"et-fb-error-report-consent-description"},this._getI18n("consentDescription")),this._renderDebugInfo(),o.default.createElement(p.ETBuilderFormLabel,null,this._getI18n("consentNotes")),o.default.createElement("p",{className:"et-fb-error-report-consent-description"},this._getI18n("consentNotesDescription")),o.default.createElement(h.default,{name:"notes",_onChange:this._onChange}),o.default.createElement(m.default,{name:"consent",_onChange:this._onChange,options:[s.default.decodeHtmlEntities(this._getI18n("consentLabel"))],value:this.state.consent})):o.default.createElement("div",{className:"et-fb-error-report-notification et-fb-error-report-notification--error"},o.default.createElement("p",null,this._getI18n("noAccountMessage")),o.default.createElement("p",null,this._getI18n("noAccountGuide"))),t={opacity:this._isStatus("sending")?0:1,pointerEvents:this._isStatus("sending")?"none":"auto"};return o.default.createElement("form",null,this._renderPreloader(),o.default.createElement("div",{className:"et-core-modal-content",style:t},this._renderErrorMessage(),e),this._renderModalProceedButton())}},{key:"_renderBugReportSentMessage",value:function(){return o.default.createElement("div",{className:"et-core-modal-content"},o.default.createElement("p",null,this._getI18n("successMessage")),o.default.createElement("p",null,this._getI18n("successAutoclose")))}},{key:"_renderModalProceedButton",value:function(){return this._isEtAccountActive()?o.default.createElement("div",{className:"et_pb_prompt_buttons"},o.default.createElement(f.default,{buttonName:"error-boundaries-report-submit",className:"et-core-modal-action",_onClick:this._onSubmitReport,style:{backgroundColor:b.default.coreModalButtonBlue,pointerEvents:this._isStatus("sending")?"none":"auto",opacity:this._isStatus("sending")?0:1},disabled:!this._isSubmissionReady()},this._getI18n("buttonLabel"))):o.default.createElement("a",{href:d.default.getUrl("themeOptionsUrl"),className:"et-core-modal-action"},this._getI18n("noAccountButtonLabel"))}},{key:"render",value:function(){var e=o.default.createElement("div",{className:(0,i.default)(["et-core-modal-overlay","et-core-active","et-fb-modal-report"]),onClick:this._onCloseModal,ref:"reportModalOverlay"},o.default.createElement("div",{className:"et-core-modal",ref:"reportModal"},o.default.createElement("div",{className:"et-fb-modal-overlay-mousetrap"}),this._renderModalHeader(),this._isStatus("sending_success")?this._renderBugReportSentMessage():this._renderReportForm()));return a.default.createPortal(e,s.default.$topWindow("#et-fb-app")[0])}}])&&O(t.prototype,n),r&&O(t,r),Object.defineProperty(t,"prototype",{writable:!1}),_}(o.Component),j=M;t.default=j},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=S(n(0)),a=O(n(3)),i=O(n(9)),l=O(n(4)),u=O(n(37)),s=O(n(11)),c=O(n(332)),d=(O(n(40)),O(n(6))),f=O(n(59)),p=O(n(22)),h=O(n(1885)),m=O(n(63)),y=O(n(43)),g=O(n(781)),b=S(n(782)),v=O(n(281)),_=O(n(2));n(1887);var w=["currentVideo","currentVideoList","helpModalState","onModalChange","videoOverlayStatus"];function O(e){return e&&e.__esModule?e:{default:e}}function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}function S(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(this,arguments)}function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}function M(e){var t=function(){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}}();return function(){var n,r=D(e);if(t){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var L=ETBuilderBackend.i18n.help,R={isVisible:a.default.bool,onModalChange:a.default.func,modalMoving:a.default.bool};var A=function(t){!function(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&&T(e,t)}(k,t);var n,r,a,O=M(k);function k(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),N(x(t=O.call(this,e)),"_checkActiveModals",(function(){return t.handleShortcutsTimeout=setTimeout(t._setHandleShortcuts)})),N(x(t),"_setHandleShortcuts",(function(){d.default.getActiveModule()?(_.default.appWindow().removeEventListener("keydown",t._handleShortcuts),_.default.topWindow().removeEventListener("keydown",t._handleShortcuts)):(_.default.appWindow().addEventListener("keydown",t._handleShortcuts),_.default.topWindow().addEventListener("keydown",t._handleShortcuts,{useCapture:!0}))})),t.displayName="ETBuilderHelp",t.isOSX=-1!==navigator.userAgent.indexOf("Mac OS X");var n=.5625*400,r=Object.keys(ETBuilderBackend.i18n.videos[t.props.currentVideoList]).length;return t.state={index:null,height:50*r+116+n,width:400,position:{x:t.props.position.x,y:t.props.position.y}},t._updateSpecificModal=t._updateSpecificModal.bind(x(t)),t._handleMouseEnter=t._handleMouseEnter.bind(x(t)),t._handleMouseLeave=t._handleMouseLeave.bind(x(t)),t._handleShortcuts=t._handleShortcuts.bind(x(t)),t}return n=k,(r=[{key:"UNSAFE_componentWillMount",value:function(){var e=this;setTimeout((function(){return e._updateSpecificModal({width:400,x:e.props.position.x,y:e.props.position.y})}),0)}},{key:"componentDidMount",value:function(){this._setHandleShortcuts(),d.default.addModuleActiveListener(this._checkActiveModals),_.default.topDocument().addEventListener("keydown",this._handleShortcuts)}},{key:"componentWillUnmount",value:function(){_.default.topDocument().removeEventListener("keydown",this._handleShortcuts)}},{key:"shouldComponentUpdate",value:function(e,t){return _.default.shouldComponentUpdate(this,e,t)}},{key:"_getHeaderButtons",value:function(){return[o.default.createElement(m.default,{primary:!0,buttonName:f.default.MODAL_HELP_BUTTON_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel},o.default.createElement(y.default,{icon:"close",color:"#FFFFFF"}))]}},{key:"_updateSpecificModal",value:function(e){p.default.setHelpModal({width:e.width,position:{x:e.x,y:e.y}}),this.setState({width:e.width})}},{key:"_handleMouseEnter",value:function(){this.setState({hover:!0})}},{key:"_handleMouseLeave",value:function(){this.setState({hover:!1})}},{key:"_handleShortcuts",value:function(t){var n=t.keyCode,r=t.metaKey;if((27===n||13===n&&!r)&&!e(":focus").length)return p.default.buttonClick({props:{buttonName:f.default.MODAL_HELP_BUTTON_CLOSE}}),!1}},{key:"renderKdb",value:function(e,t){var n=e;return"super"===n&&(n=this.isOSX?"cmd":"ctrl"),o.default.createElement("kbd",{key:"shortcut-item-kbd-".concat(t),className:"key-".concat(n)},n)}},{key:"renderShortcutSet",value:function(e,t){var n=this,r=[];return(0,i.default)(e,(function(a,l){(0,u.default)(a)?(r.push(n.renderKdb(a,"".concat(t,"-").concat(l))),l<e.length-1&&r.push(o.default.createElement("span",{className:"et-fb-shortcut-separator-combination",key:"shortcut-set-separator-combination".concat(t,"-").concat(l)},"+"))):(0,i.default)(a,(function(e,i){r.push(n.renderKdb(e,"".concat(t,"-").concat(l,"-").concat(i))),i<a.length-1&&r.push(o.default.createElement("span",{className:"et-fb-shortcut-separator-optional",key:"shortcut-set-separator-optional-".concat(t,"-").concat(l,"-").concat(i)},"/"))}))})),r}},{key:"renderShortcutSets",value:function(e,t){var n=this;return(0,l.default)(e)?this.renderShortcutSet(e,t):(0,c.default)(e).map((function(e,r){var a="".concat(t,"-").concat(r);return o.default.createElement("div",{className:"et-fb-shortcut-item-set",key:"shortcut-item-set-".concat(a)},n.renderShortcutSet(e,a))}))}},{key:"renderShortcutList",value:function(){var e=this,t=ETBuilderBackend.i18n.help.shortcuts;return(0,c.default)(t).map((function(t,n){return(0,c.default)(t).map((function(t,r){return(0,s.default)(t.title)?o.default.createElement("div",{className:"et-fb-shortcut-item",key:"shortcut-item-".concat(n,"-").concat(r)},o.default.createElement("div",{className:"et-fb-shortcut-kbd"},e.renderShortcutSets(t.kbd,"".concat(n,"-").concat(r))),o.default.createElement("div",{className:"et-fb-shortcut-desc"},o.default.createElement("p",null,t.desc))):o.default.createElement("h4",{className:"et-fb-shortcut-subtitle",key:"shortcut-item-".concat(n)},t.title)}))}))}},{key:"render",value:function(){var e=this.props,t=e.currentVideo,n=e.currentVideoList,r=e.helpModalState,a=e.onModalChange,i=e.videoOverlayStatus,l=E(e,w),u=this.state,s=u.height,c=u.hover,d=u.position,f=u.width,p=this.props.activeTab||0;return o.default.createElement(g.default,C({className:"et-fb-modal--help",headerButtons:this._getHeaderButtons(),label:L.modal.title,measurement:{height:s,width:400},animate:this.props.options.animate,onModalChange:a,onMouseEnter:this._handleMouseEnter,onMouseLeave:this._handleMouseLeave,updateSpecificModal:this._updateSpecificModal},l),o.default.createElement(b.default,{selectedIndex:p},o.default.createElement(b.ETBuilderTabList,null,o.default.createElement(b.ETBuilderTabItem,null,L.modal.tabs.gettingStarted),o.default.createElement(b.ETBuilderTabItem,null,L.modal.tabs.shortcut)),o.default.createElement(b.ETBuilderTabPanel,null,o.default.createElement("div",{className:"et-fb-form"},o.default.createElement(v.default,null,o.default.createElement(h.default,{currentVideo:t,currentVideoList:n,helpModalState:r,modalHover:c,modalPosition:d,modalWidth:f,videoOverlayStatus:i,modalMoving:this.props.modalMoving,animate:this.props.options.animate})))),o.default.createElement(b.ETBuilderTabPanel,null,o.default.createElement("div",{className:"et-fb-form"},o.default.createElement(v.default,null,this.renderShortcutList())))))}}])&&P(n.prototype,r),a&&P(n,a),Object.defineProperty(n,"prototype",{writable:!1}),k}(o.Component);A.propTypes=R;var I=A;t.default=I}).call(this,n(8))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=N(n(0)),a=N(n(27)),i=N(n(3)),l=N(n(13)),u=N(n(162)),s=N(n(65)),c=N(n(1)),d=N(n(34)),f=N(n(7)),p=N(n(5)),h=N(n(35)),m=N(n(12)),y=N(n(11)),g=N(n(31)),b=N(n(370)),v=N(n(392)),_=N(n(85)),w=N(n(628)),O=N(n(6)),k=N(n(2)),S=N(n(22)),C=N(n(63)),E=N(n(59)),P=N(n(43)),T=N(n(781)),M=N(n(303)),j=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=D(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(782)),x=N(n(84));n(1888);N(n(827)),N(n(1466));function D(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(D=function(e){return e?n:t})(e)}function N(e){return e&&e.__esModule?e:{default:e}}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function I(e){var t=function(){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}}();return function(){var n,r=W(e);if(t){var o=W(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}function B(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return F(e)}function F(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}var V=ETBuilderBackend.i18n,U={animate:i.default.bool},G=function(t){!function(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&&A(e,t)}(N,t);var n,r,i,D=I(N);function N(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,N),(t=D.call(this,e)).displayName="ETBuilderABTesting";var n=["clicks","reads","bounces","engagements","conversions","shortcode_conversions"],r=ETBuilderBackend.abTesting.refresh_interval_duration,o=(0,w.default)(n,(0,b.default)(n.length,(function(){return r}))),a=O.default.getActiveThemeBuilderArea();return t.tabList=n,t.subjects=O.default.abGetAllSubjects(a),t.hasConversion=O.default.abHasConversion((0,c.default)(O.default.abGetAllGoals(),"type")),t.hasShortcodeConversions=k.default.isOn(O.default.getPageSetting("et_pb_enable_shortcode_tracking")),t.timeFilterList=["day","week","month","all"],t.renderedPieChart={},t.renderedLineChart={},t.onMountInit=!1,t.state={durations:o,tab:"clicks",loading:!1,reportData:L({},r,O.default.abGetReportData(r)),excludedSubjects:{}},t._onABTestingChange=t._onABTestingChange.bind(F(t)),t._onMotionRest=t._onMotionRest.bind(F(t)),t._handleTabSwitch=t._handleTabSwitch.bind(F(t)),t._handleFilterSubjectChange=t._handleFilterSubjectChange.bind(F(t)),t._handleFilterTimeChange=t._handleFilterTimeChange.bind(F(t)),t._onRefreshReport=t._onRefreshReport.bind(F(t)),t._onCloseReport=t._onCloseReport.bind(F(t)),t}return n=N,(r=[{key:"componentDidMount",value:function(){this.unmounted=!1,O.default.abAddChangeListener(this._onABTestingChange)}},{key:"componentDidUpdate",value:function(){this.initUI()}},{key:"componentWillUnmount",value:function(){this.unmounted=!0,O.default.abRemoveChangeListener(this._onABTestingChange)}},{key:"initUI",value:function(){var t=e(a.default.findDOMNode(this)),n=this.getCurrentTab(),r=t.find("#et-fb-ab-testing-report-table-".concat(n));r.tablesorter(),r.trigger("update"),r.find(".headerSortUp").length||r.find(".headerSortDown").length||r.find("thead tr").first().find("th").first().trigger("click");var o=this.getPieChartData(),i=t.find("#et-fb-ab-testing-report-pie-".concat(n));(0,h.default)((0,c.default)(this,["renderedPieChart",n,"destroy"]))&&this.renderedPieChart[n].destroy(),!(0,p.default)(o)&&i.length&&(this.renderedPieChart[n]=new Chart(i.get(0).getContext("2d")).Pie(o,{animationEasing:"easeInCubic",animationSteps:50,tooltipTemplate:"<%if (label){%><%=label%><%}%>"}));var l=this.getLineChartData(),u=t.find("#et-fb-ab-testing-report-chart-".concat(n));(0,h.default)((0,c.default)(this,["renderedLineChart",n,"destroy"]))&&this.renderedLineChart[n].destroy(),(0,d.default)(l,"datasets")&&(0,p.default)(l.datasets)&&(l.datasets=[{}]),(0,y.default)(u.get(0))||(this.renderedLineChart[n]=new Chart(u.get(0).getContext("2d")).Line(l,{scaleFontSize:13,scaleFontColor:"#a1a9b1",scaleLabel:"<%=value%>%",scaleGridLineWidth:2,scaleLineWidth:2,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>%",multiTooltipTemplate:"<%= value %>%",datasetStrokeWidth:4,pointDotStrokeWidth:2,pointDotRadius:7}))}},{key:"_handleTabSwitch",value:function(e){var t=this,n=(0,u.default)((0,g.default)(this.tabList,(function(e){return!("conversions"===e&&!t.hasConversion)&&!("shortcode_conversions"===e&&!t.hasShortcodeConversions)&&e})));(0,d.default)(n,e)&&this.setState({tab:(0,c.default)(n,e)})}},{key:"_handleFilterSubjectChange",value:function(e){e.preventDefault();var t=(0,c.default)(this,"state.excludedSubjects",{}),n=e.target.getAttribute("data-tab-name"),r=e.target.getAttribute("data-subject-id");(0,d.default)(t,[n,r])?delete t[n][r]:(0,m.default)((0,c.default)(t,[n]))?t[n][r]=r:t[n]=L({},r,r),this.setState({excludedSubjects:t})}},{key:"_handleFilterTimeChange",value:function(e){e.preventDefault();var t=(0,c.default)(this,["state","tab"]),n=(0,c.default)(this,["state","durations"]),r=e.target.getAttribute("data-time");n[t]=r,this.setState({durations:n})}},{key:"_onRefreshReport",value:function(){var e=(0,c.default)(this,["state","durations",name]);S.default.abRefreshReport(e)}},{key:"_onCloseReport",value:function(){S.default.abCloseReport()}},{key:"_onABTestingChange",value:function(){var e=this.getCurrentDuration(),t=(0,c.default)(this,"state.reportData");t[e]=O.default.abGetReportData(e),this.unmounted||this.setState({reportData:t})}},{key:"_onMotionRest",value:function(){this.onMountInit||(this.initUI(),this.onMountInit=!0)}},{key:"isSubjectDisabled",value:function(e,t){var n=(0,_.default)((0,c.default)(this.state,["excludedSubjects",e],[]));return(0,d.default)(t,"attrs.ab_subject_id")&&(0,f.default)(n,(0,c.default)(t,"attrs.ab_subject_id"))}},{key:"getCurrentTab",value:function(){return(0,c.default)(this,"state.tab")}},{key:"getCurrentDuration",value:function(){return(0,c.default)(this,["state","durations",this.getCurrentTab()])}},{key:"getCurrentData",value:function(){return(0,c.default)(this,["state","reportData",(0,c.default)(this,["state","durations",this.getCurrentTab()])])}},{key:"getReportData",value:function(e){if((0,d.default)(this,["state","reportData",e]))return(0,c.default)(this,["state","reportData",e]);var t=(0,c.default)(this,"state.reportData");return t[e]=O.default.abGetReportData(e),this.setState({reportData:t}),O.default.abGetReportData(e)}},{key:"getRenderedSubjects",value:function(){var e=this,t=(0,c.default)(e,"state.tab");return(0,s.default)(this.subjects,(function(n){return!e.isSubjectDisabled(t,n)}))}},{key:"getLineChartData",value:function(){var e=this,t=e.getCurrentTab(),n=e.getReportData(e.getCurrentDuration()),r=(0,c.default)(n,"dates");return!(0,y.default)(r)&&{labels:r,datasets:(0,g.default)(this.getRenderedSubjects(),(function(e){var r=(0,c.default)(e,"attrs.ab_subject_id"),o=(0,c.default)(n,["subjects_totals","subject_".concat(r),"color"]),a=O.default.abGetSubjectLabel(e);return{data:(0,_.default)((0,c.default)(n,["subjects_analysis","subject_".concat(r),t])),fillColor:"transparent",label:a,pointColor:o,pointStrokeColor:"#fff",strokeColor:o,subject_id:r}}))}}},{key:"getPieChartData",value:function(){var e=(0,c.default)(this,["state","reportData",this.getCurrentDuration(),"subjects_totals"]),t=(0,c.default)(this,"state.tab");return(0,y.default)(e)?[]:(0,u.default)((0,g.default)(this.getRenderedSubjects(),(function(n){var r=(0,c.default)(n,"attrs.ab_subject_id"),o="subject_".concat(r);return{value:(0,c.default)(e,[o,t]),color:(0,c.default)(e,[o,"color"]),label:O.default.abGetSubjectLabel(n)}})))}},{key:"headerButtons",value:function(){return[o.default.createElement(C.default,{block:!0,buttonName:E.default.AB_CLOSE_REPORT,_onClick:this._onCloseReport},o.default.createElement(P.default,{icon:"close",color:"#FFFFFF"}))]}},{key:"renderSubjectFilter",value:function(e){var t=this;return(0,g.default)(this.subjects,(function(n,r){var a="tab-".concat(e,"-filter-subject-").concat(r),i=t.isSubjectDisabled(e,n),u=i?x.default.disabledSubject:O.default.abGetSubjectRank(n,"color");return o.default.createElement("li",{key:a},o.default.createElement("button",{"data-subject-id":(0,c.default)(n,"attrs.ab_subject_id"),"data-tab-name":e,style:{backgroundColor:u},className:(0,l.default)({"et-fb-ab-testing-filter-item-subject":!0,"et-fb-ab-testing-filter-item-subject--disabled":i}),onClick:t._handleFilterSubjectChange},O.default.abGetSubjectLabel(n)))}))}},{key:"renderTimeFilter",value:function(e){var t=this;return(0,g.default)(t.timeFilterList,(function(n,r){var a="tab-".concat(e,"-filter-time-").concat(r),i=n===(0,c.default)(t,["state","durations",e]);return o.default.createElement("li",{key:a},o.default.createElement("button",{className:(0,l.default)({"et-fb-ab-testing-filter-item-time":!0,"et-fb-ab-testing-filter-item-time--active":i}),"data-time":n,onClick:t._handleFilterTimeChange},(0,c.default)(V,["abTesting","reportFilterTime",n])))}))}},{key:"renderTabPanel",value:function(e){var t=this.getCurrentData(),n="isFetchingData"===t,r=!t||(0,p.default)((0,c.default)(t,"subjects_totals")),a=((0,c.default)(this,["state","durations",e]),o.default.createElement("canvas",{id:"et-fb-ab-testing-report-chart-".concat(e),className:"et-fb-ab-testing-report-chart"}));return o.default.createElement(j.ETBuilderTabPanel,{key:"abTesting-report-panel-".concat(e)},o.default.createElement("div",{className:"et-fb-form"},o.default.createElement(M.default,{isLoading:n},r?o.default.createElement("div",{className:"et-fb-ab-testing-no-report"},o.default.createElement("object",{type:"image/svg+xml",data:"".concat(ETBuilderBackend.images_uri,"/stats-no-data.svg")}),o.default.createElement("h2",null,(0,c.default)(V,"abTesting.no_report.title")),o.default.createElement("p",null,(0,c.default)(V,"abTesting.no_report.desc"))):o.default.createElement("div",null,o.default.createElement("ul",{className:"et-fb-ab-testing-filter--time"},this.renderTimeFilter(e),o.default.createElement("li",null,o.default.createElement(C.default,{className:"et-fb-ab-testing-report-refresh",buttonName:E.default.AB_REFRESH_REPORT,_onClick:this._onRefreshReport,tooltip:(0,c.default)(V,"abTesting.reportRefreshTooltip")},o.default.createElement(P.default,{icon:"undo",color:x.default.abTestingTimeFilter})))),o.default.createElement("ul",{className:"et-fb-ab-testing-filter--subjects"},this.renderSubjectFilter(e)),a,this.renderTable(e),this.renderPieChart(e)))))}},{key:"renderTable",value:function(e){var t=this,n=(0,c.default)(this,["state","durations",e]),r=O.default.abGetAnalysisFormula(e),a=(0,c.default)(r,"denominator"),i=(0,c.default)(r,"numerator"),l=(0,c.default)(V,["abTesting","view_stats_thead_titles",e]),u=0,s=0,d=0,f=(0,g.default)(this.getRenderedSubjects(),(function(r){var l=(0,c.default)(r,"attrs.ab_subject_id");if((0,y.default)(l))return!1;var f="subject_".concat(l),p=O.default.abGetSubjectLabel(r),h=(0,c.default)(t,["state","reportData",n,"subjects_totals",f,a],0),m=(0,c.default)(t,["state","reportData",n,"subjects_totals",f,i],0),g=(0,c.default)(t,["state","reportData",n,"subjects_totals",f,e],0);return u+=parseFloat(h),s+=parseFloat(m),d+=parseFloat(g),o.default.createElement("tr",{key:"abTesting-row-".concat(e,"-").concat(n,"-").concat(l)},o.default.createElement("td",null,l),o.default.createElement("td",null,p),o.default.createElement("td",null,h),o.default.createElement("td",null,m),o.default.createElement("td",null,"".concat(g,"%")))})),h=d/f.length,m="".concat(h).split(".").length>1?2:0,b=!(0,p.default)(this.getRenderedSubjects())&&o.default.createElement("tr",null,o.default.createElement("td",{colSpan:"2"},(0,c.default)(V,["abTesting","reportTotal"])),o.default.createElement("td",null,u),o.default.createElement("td",null,s),o.default.createElement("td",null,"".concat(h.toFixed(m),"%")));return o.default.createElement("div",{className:"et-fb-ab-testing-report-table--wrapper"},o.default.createElement("table",{id:"et-fb-ab-testing-report-table-".concat(e),className:"et-fb-ab-testing-report-table"},o.default.createElement("thead",null,o.default.createElement("tr",null,o.default.createElement("th",null,l[0]),o.default.createElement("th",null,l[1]),o.default.createElement("th",null,l[2]),o.default.createElement("th",null,l[3]),o.default.createElement("th",null,l[4]))),o.default.createElement("tbody",null,f),o.default.createElement("tfoot",null,b)))}},{key:"renderPieChart",value:function(e){var t=this,n=(0,g.default)(this.subjects,(function(n,r){var a=t.isSubjectDisabled(t.state.tab,n),i=a?"#E1E4E9":O.default.abGetSubjectRank(n,"color"),l=a?{color:"#E1E4E9"}:{};return o.default.createElement("li",{key:"".concat(e,"-legend-").concat(r)},o.default.createElement("span",{style:{backgroundColor:i}}),o.default.createElement("a",{href:"#subject",style:l,"data-subject-id":(0,c.default)(n,"attrs.ab_subject_id"),"data-tab-name":e,onClick:t._handleFilterSubjectChange},O.default.abGetSubjectLabel(n)))})),r=(0,p.default)((0,c.default)(this.getLineChartData(),"datasets"))?o.default.createElement("div",{className:"et-fb-ab-testing-report-chart"}):o.default.createElement("canvas",{id:"et-fb-ab-testing-report-pie-".concat(e),className:"et-fb-ab-testing-report-pie",width:"200",height:"200"});return o.default.createElement("div",{className:"et-fb-ab-testing-report-pie--wrapper"},r,o.default.createElement("ul",{className:"et-fb-ab-testing-report-pie--legend"},n))}},{key:"render",value:function(){var e=this,t=this,n=(0,g.default)(this.tabList,(function(e){return!("conversions"===e&&!t.hasConversion)&&!("shortcode_conversions"===e&&!t.hasShortcodeConversions)&&o.default.createElement(j.ETBuilderTabItem,{key:"abTesting-report-nav-".concat(e)},(0,c.default)(V,["abTesting","reportTabNavs",e]))})),r=(0,g.default)(this.tabList,(function(n){return!("conversions"===n&&!t.hasConversion)&&!("shortcode_conversions"===n&&!t.hasShortcodeConversions)&&e.renderTabPanel(n)}));return o.default.createElement(T.default,{fullscreen:!0,headerButtons:this.headerButtons(),footerButtons:[o.default.createElement(C.default,{block:!0,info:!0,buttonName:E.default.BUTTON_AB_DISABLE},(0,v.default)((0,c.default)(V,"abTesting.reportEndTestButton")))],label:(0,c.default)(V,"abTesting.reportTitle"),onRest:this._onMotionRest,animate:this.props.animate},o.default.createElement(j.default,{selectedIndex:0,onSelect:this._handleTabSwitch},o.default.createElement(j.ETBuilderTabList,{disableScroll:!1},n),r))}}])&&R(n.prototype,r),i&&R(n,i),Object.defineProperty(n,"prototype",{writable:!1}),N}(o.default.Component);G.propTypes=U,G.defaultProps={animate:!0};var H=G;t.default=H}).call(this,n(8))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=S(n(0));n(1926);var a=S(n(11)),i=S(n(1)),l=S(n(34)),u=S(n(197)),s=S(n(42)),c=S(n(5)),d=S(n(850)),f=S(n(137)),p=S(n(305)),h=S(n(17)),m=S(n(65)),y=S(n(58)),g=S(n(7)),b=S(n(184)),v=S(n(146)),_=S(n(1465)),w=S(n(6)),O=S(n(22)),k=S(n(2));function S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function P(e){var t=function(){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}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return M(e)}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var D=k.default.$appWindow("body"),N=k.default.$topWindow("body"),L=k.default.condition("is_bfb"),R=function(t){!function(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&&E(e,t)}(j,t);var n,r,S,T=P(j);function j(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,j),x(M(t=T.call(this)),"getElementOffset",(function(e){var t={top:100,left:0,usePrevElementPosition:!1};switch(e){case"loadLayout":case"openHistory":case"pageSettings":t={left:-50,top:L?130:80};break;case"selectLayoutPack":t={left:850,top:-330,usePrevElementPosition:!0};break;case"loadLayoutItem":t={left:0,top:150,usePrevElementPosition:!0};break;case"addSection":t={left:-240,top:100};break;case"selectSectionType":t={left:600,top:150};break;case"selectModule":t={left:600,top:19};break;case"selectRow":t={left:-500,top:163};break;case"configureModule":t={left:590,top:-700};break;case"saveModule":t={left:630,top:-878};break;case"duplicateModule":t={left:410,top:247};break;case"rightClickCopy":t={left:440,top:255};break;case"moveModule":t={left:810,top:260};break;case"rightClickPaste":t={left:-300,top:307};break;case"rowOptions":t={left:367,top:250};break;case"editRow":t={left:590,top:-710};break;case"saveRow":case"editHistory":t={left:320,top:-879};break;case"tabletPreview":t={left:50,top:75};break;case"desktopPreview":t={left:100,top:75};break;case"savePage":t={left:-125,top:95}}return t})),x(M(t),"disableFullscreenMenu",(function(){e(".et_header_style_fullscreen .et_slide_in_menu_container").removeClass("et_pb_fullscreen_menu_opened"),D.removeClass("et_pb_fullscreen_menu_active")})),x(M(t),"disableSlideMenu",(function(){var t=e(".et_header_style_slide .et_slide_in_menu_container");return t.hasClass("et_pb_slide_menu_opened")?t.removeClass("et_pb_slide_menu_opened"):t.addClass("et_pb_slide_menu_opened"),!1})),x(M(t),"isFalse",(function(e){return!1===e})),t.productTourLocalization=ETBuilderBackend.i18n.productTourText;var n={__html:t.productTourLocalization.start.description},r=o.default.createElement("div",{className:"et-fb-product-tour-text",dangerouslySetInnerHTML:n});if(t.state={isActive:!0,modalContent:r,modalTitle:t.productTourLocalization.start.title,endButtonText:t.productTourLocalization.start.endButtonText,skipButtonText:t.productTourLocalization.start.skipButtonText,tourElement:"start",autoLoadDemo:!1,modalPosition:{top:1e3,left:1e3,element:!1}},t.stepsSequence=t.getAvailableTourItems(),t.appliedModalOffsets={},t.skipToArray={start:"loadLayout",moveModule:"rightClickCopy",rightClickCopy:"rowOptions",rightClickPaste:"rowOptions",rowOptions:"pageSettings",tabletPreview:"desktopPreview",desktopPreview:"openHistory",openHistory:"savePage",savePage:"finish"},t.absolutelyPositionedElements=["addSection","selectModule","selectSectionType","selectRow","rowOptions","rightClickPaste","rightClickCopy","moveModule","duplicateModule"],L){t.absolutelyPositionedElements=(0,v.default)(t.absolutelyPositionedElements,["loadLayout","tabletPreview","desktopPreview","openHistory","savePage"]),t.skipToArray.rowOptions="tabletPreview"}return t.onClose=t.onClose.bind(M(t)),t.nextTip=t.nextTip.bind(M(t)),t.nextTourContent=t.nextTourContent.bind(M(t)),t.skipTip=t.skipTip.bind(M(t)),t.isTourButtonClicked=t.isTourButtonClicked.bind(M(t)),t.getActiveElementPosition=t.getActiveElementPosition.bind(M(t)),t.getAvailableTourItems=t.getAvailableTourItems.bind(M(t)),t.autoloadLayout=t.autoloadLayout.bind(M(t)),t.setAfterMoveStep=t.setAfterMoveStep.bind(M(t)),t.maybeScroll=t.maybeScroll.bind(M(t)),t.maybeAddScrollbar=t.maybeAddScrollbar.bind(M(t)),t}return n=j,(r=[{key:"componentDidMount",value:function(){var t=this,n=this;D.add(N).on("click mouseup mousedown","*",n.isTourButtonClicked),D.add(N).on("mouseup click",".et-fb-product-tour-element",(function(t){"mouseup"===t.type&&"selectRow"!==n.state.tourElement||e(this).hasClass("et_fb_move_module_handler")||e(this).hasClass("et-fb-product-tour-element-text")||setTimeout(n.nextTip,0)})),D.add(N).on("keyup",".et-fb-product-tour-element-text",(function(){setTimeout(n.nextTip,0)})),D.add(N).on("mouseup",".et-fb-product-tour-secondary-element",(function(){O.default.setActiveTourElement(n.state.tourElement,!0)})),D.add(N).on("mousedown",".et_fb_move_module_handler.et-fb-product-tour-element",(function(){n.nextTip()})),D.add(N).on("et_fb_product_tour_element_clicked",(function(){return setTimeout(t.nextTip,0)})),k.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app")).append('<div class="et-core-modal-overlay et-fb-product-tour-overlay et-core-active"></div>'),e(".et_search_form_container").length>0&&e(".et_search_form_container").addClass("et_pb_is_animating"),e(".et_header_style_slide .et_slide_in_menu_container").length>0&&(e(".et_header_style_slide .et_slide_in_menu_container").addClass("et_pb_slide_menu_opened"),e("#main-header").on("click",".et_toggle_slide_menu",n.disableSlideMenu)),e(".et_header_style_fullscreen .et_slide_in_menu_container").length>0&&e("#page-container").on("click",".et_toggle_fullscreen_menu",n.disableFullscreenMenu),w.default.addProductTourMoveFinishedListener(this.setAfterMoveStep),N.on("click",".et-fb-tour-video-overlay",(function(){var t=e(this),n=t.data("video");t.replaceWith('<iframe width="200" height="150" src="'.concat(n,'" frameborder="0" allowfullscreen></iframe>'))})),N.on("mousedown, click, mouseup","#publishing-action.et-fb-product-tour-element",(function(e){return e.preventDefault(),!1})),this.shortThrottleReset=(0,b.default)(this.maybeAddScrollbar,100),k.default.appWindow().addEventListener("resize",this.shortThrottleReset),this.maybeAddScrollbar()}},{key:"componentWillUnmount",value:function(){w.default.removeProductTourMoveFinishedListener(this.setAfterMoveStep),k.default.appWindow().removeEventListener("resize",this.shortThrottleReset),D.off("click mouseup mousedown","*",this.isTourButtonClicked),D.off("et_fb_product_tour_element_clicked")}},{key:"onClose",value:function(){O.default.endProductTour();var t=this;k.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app")).find(".et-fb-product-tour-overlay").remove(),e(".et_search_form_container").length>0&&e(".et_search_form_container").removeClass("et_pb_is_animating"),e(".et_header_style_slide .et_slide_in_menu_container").length>0&&(e(".et_header_style_slide .et_slide_in_menu_container").removeClass("et_pb_slide_menu_opened"),D.removeClass("et_pb_slide_menu_active"),e("#main-header").off("click",".et_toggle_slide_menu",t.disableSlideMenu)),e(".et_header_style_fullscreen .et_slide_in_menu_container").length>0&&e("#page-container").off("click",".et_toggle_fullscreen_menu",t.disableFullscreenMenu),this.setState({isActive:!1}),D.off("click mouseup mousedown ondragstart","*",t.isTourButtonClicked)}},{key:"getActiveElementPosition",value:function(e){var t=this.state.modalPosition,n=0===k.default.$appWindow(".et-fb-product-tour-element").length,r=n?k.default.$topWindow(".et-fb-product-tour-element"):k.default.$appWindow(".et-fb-product-tour-element"),o=t,l=this.getElementOffset(e),u=L?k.default.$topWindow("#et-bfb-app-frame").offset():0,s=n&&!L?k.default.$appWindow().scrollTop():0;if(!l.usePrevElementPosition&&r.length>0&&(o=r.offset(),r.closest(".et-fb-page-settings-bar").length>0))if(L)r.closest(".et-fb-page-settings-bar__column--left").length>0&&(o.top-=u.top,o.left-=200);else{var c=r.closest(".et-fb-page-settings-bar");o.top=c.position().top-100}(0,a.default)(o)?this.setState({isActive:!0}):(o.top+=s,(0,i.default)(this.appliedModalOffsets,e)?o=this.appliedModalOffsets[e]:(o.element=!1,o.top+=(0,d.default)((0,i.default)(l,"top",0)),o.left+=(0,d.default)((0,i.default)(l,"left",0)),this.appliedModalOffsets[e]=o),L&&n&&(r.closest(".et-fb-modal__module-settings").length>0||r.closest(".et-fb-tooltip-modal").length>0||r.closest(".et-fb-right-click-menu").length>0)&&(o.top-=(0,d.default)(u.top)+200),this.setState({modalPosition:o,isActive:!0}))}},{key:"getAvailableTourItems",value:function(){var e=!1,t=!1,n=!1,r="et_pb_blurb",o=w.default.isAllowedAction("divi_library")&&w.default.isAllowedAction("load_layout"),a=w.default.isAllowedAction("add_module"),i=w.default.isAllowedAction("edit_module"),l=w.default.isAllowedAction("move_module"),u=w.default.isAllowedAction("general_settings"),s=w.default.isAllowedAction("advanced_settings"),d=w.default.isAllowedAction("custom_css_settings");if(w.default.isAllowedAction(r))e=!0,w.default.setProductTourModuleName(r);else{var f,b=(0,m.default)(ETBuilderBackend.modules,{is_parent:"on"});f=(0,y.default)(b,(function(e){return!(0,g.default)(["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column","et_pb_column_inner"],e.label)&&w.default.isAllowedAction(e.label)})),(0,c.default)(f)||(w.default.setProductTourModuleName(f.label),e=!0)}(u||s||d)&&(t=!(!w.default.isAllowedAction("general_settings")&&!w.default.isAllowedAction("custom_css_settings")),n=!0);var v={start:!0,loadLayout:o,selectLayoutPack:o,loadLayoutItem:o,addSection:e&&a,selectSectionType:e&&a,selectRow:e&&a,selectModule:e&&a,configureModule:e&&a&&t,saveModule:e&&a,duplicateModule:e&&a,moveModule:l,rightClickCopy:a,rightClickPaste:a,rowOptions:i&&n,editRow:i&&n,saveRow:i&&n,pageSettings:!k.default.condition("is_bfb"),tabletPreview:!0,desktopPreview:!0,openHistory:!0,editHistory:!0,savePage:!0,finish:!0};return(0,h.default)((0,p.default)(v,this.isFalse))}},{key:"setAfterMoveStep",value:function(){var e=(0,i.default)(this.stepsSequence,(0,f.default)(this.stepsSequence,"moveModule")+1,"");w.default.setProductTourElementReady(e)}},{key:"autoloadLayout",value:function(e){if((this.state.autoLoadDemo||e)&&!(0,c.default)(results)){var t=results.pop();this.setState({autoLoadDemo:!1}),t[0].savedShortcode=t[0].shortcode,w.default.loadSavedLayoutFromComponent(t[0],!0),setTimeout((function(){w.default.replacePageContent(),w.default.setProductTourElementReady("predefined_layouts"),k.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app")).find(".et-fb-product-tour-overlay").remove()}),1e3)}}},{key:"isTourButtonClicked",value:function(t){var n=this.state.tourElement;if("mouseup"===t.type&&"moveModule"===n)return!0;var r=e(t.target);return r.closest(".et-builder-bfb-welcome-modal, .et-theme-builder-no-post-content").length>0||!(0===r.closest(".et-fb-product-tour-element, .et-fb-product-tour-secondary-element, .et-fb-tooltip--product-tour, .et-fb-modal__module-settings, .et-fb-modal-history, .et-fb-tour-video-overlay, #wpadminbar, .et-fb-product-tour-secondary-element-hidden").length||r.closest(".et-fb-modal__footer, .et-fb-modal__badge").length>0&&0===r.closest(".et-fb-product-tour-element, .et-fb-product-tour-secondary-element, .et-fb-product-tour-secondary-element-hidden").length)||(t.preventDefault(),t.stopPropagation(),!1)}},{key:"maybeAddScrollbar",value:function(){var t=this.state.tourElement,n=e(".et-fb-tooltip--product-tour--centered"),r=k.default.$appWindow().height();this.getActiveElementPosition(t),800>r?n.addClass("et-core-modal-enabled-scrollbar"):n.removeClass("et-core-modal-enabled-scrollbar")}},{key:"maybeScroll",value:function(){var e=this.state.tourElement,t=L?"top":"app";if("selectModule"===e&&k.default.$topWindow(".et-fb-settings-options-wrap").animate({scrollTop:150},400),"editRow"===e&&k.default.$topWindow(".et-fb-tabs__panel--general").animate({scrollTop:452},400),(0,g.default)(this.absolutelyPositionedElements,e)){var n=k.default.$topWindow(".et-fb-tooltip--product-tour").length>0?k.default.$topWindow(".et-fb-tooltip--product-tour"):k.default.$appWindow(".et-fb-tooltip--product-tour");if(n.length>0){var r=k.default.$topWindow().height(),o=("top"===t?k.default.$topWindow().scrollTop():k.default.$appWindow().scrollTop())+r,a=n.innerHeight(),i=n.offset().top,l=L?90:0,u=0===k.default.$appWindow(".et-fb-product-tour-element").length?k.default.$topWindow(".et-fb-product-tour-element"):k.default.$appWindow(".et-fb-product-tour-element"),s=L&&u.closest(".et-fb-page-settings-bar").length>0;if(o<i+a+l||s){var c=i-a/2-l;("top"===t?k.default.$topWindow("html, body"):k.default.$appWindow("html, body")).animate({scrollTop:c<0?0:c},500,"swing")}}}else this.maybeAddScrollbar()}},{key:"nextTip",value:function(e){var t=this,n=this.state.tourElement,r=(0,i.default)(this.stepsSequence,(0,f.default)(this.stepsSequence,n)+1,"");if(e)if((0,l.default)(this.skipToArray,n)){var o=this.skipToArray[n];if(-1===(0,f.default)(this.stepsSequence,o))for(;-1===(0,f.default)(this.stepsSequence,o);)o=(0,l.default)(this.skipToArray,o)?this.skipToArray[o]:r;r=o}else(0,g.default)(["selectLayoutPack","loadLayoutItem"],n)?k.default.$appWindow().trigger("et-fb-product-tour-skip"):((0===k.default.$appWindow(".et-fb-product-tour-element").length?k.default.$topWindow(".et-fb-product-tour-element"):k.default.$appWindow(".et-fb-product-tour-element")).trigger("click"),"pageSettings"===n&&O.default.settingsBarToggleStatus("active"));var a=!1,u=!1,s=[];switch("loadLayoutItem"===n&&O.default.settingsBarToggleStatus("inactive"),r){case"loadLayout":k.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app")).find(".et-fb-product-tour-overlay").remove(),O.default.settingsBarToggleStatus("active");break;case"selectLayoutPack":case"loadLayoutItem":a=!0,s.push(r);break;case"moveModule":case"rowOptions":case"rightClickCopy":"not_set"===w.default.getProductTourModule()&&w.default.setProductTourModule(),"moveModule"!==n||e||s.push(r);break;case"savePage":L&&k.default.$topWindow("#publishing-action").addClass("et-fb-product-tour-element");break;case"finish":L&&k.default.$topWindow("#publishing-action").removeClass("et-fb-product-tour-element"),k.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app")).append('<div class="et-core-modal-overlay et-fb-product-tour-overlay et-core-active"></div>')}if((0,g.default)(["moveModule","loadLayoutItem"],n)&&(a=!0,u=!0,"loadLayoutItem"===n&&s.push("addSection")),"start"===n&&"loadLayout"!==r&&(s.push("predefined_layouts"),a=!0,"pageSettings"===r&&(u=!0),this.setState({autoLoadDemo:!0}),w.default.activateGlobalPreloader(),w.default.emitPreloaderInProcess(),this.autoloadLayout(!0)),this.setState({isActive:!1}),u||setTimeout((function(){O.default.setActiveTourElement(r)}),0),a)this.waitProductTourElement(s,r,u);else{var c=(0,g.default)(["rightClickCopy","rightClickPaste"],n)?800:500;setTimeout((function(){t.nextTourContent(r)}),c)}}},{key:"nextTourContent",value:function(e){var t=this,n=(0,i.default)(this.productTourLocalization,[e,"endButtonText"],this.productTourLocalization.endButtonTextDefault),r=(0,i.default)(this.productTourLocalization,[e,"skipButtonText"],this.productTourLocalization.skipButtonTextDefault),a=(0,i.default)(this.productTourLocalization,[e,"title"],""),l=(0,i.default)(this.productTourLocalization,[e,"description"],!1);setTimeout((function(){t.getActiveElementPosition(e)}),200);var u={__html:l};l=o.default.createElement("div",{className:"et-fb-product-tour-text",dangerouslySetInnerHTML:u}),this.setState({tourElement:e,modalContent:l,modalTitle:a,endButtonText:n,skipButtonText:r}),setTimeout(this.maybeScroll,1e3)}},{key:"skipTip",value:function(){this.nextTip(!0)}},{key:"waitProductTourElement",value:function(e,t,n){var r=this,o=w.default.getProductTourElementReady();if((0,s.default)(e,(0,u.default)(o,e)))return n&&O.default.setActiveTourElement(t),void this.nextTourContent(t);setTimeout((function(){r.waitProductTourElement(e,t,n)}),1e3)}},{key:"render",value:function(){var e=this.state,t=e.endButtonText,n=e.isActive,r=e.modalContent,a=e.modalTitle,i=e.modalPosition,l=e.skipButtonText,u=e.tourElement;if(!n)return!1;var s="finish"===u?"":o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore et-core-modal-action-secondary",onMouseUp:this.skipTip},l),c=o.default.createElement("div",{className:"et-fb-tour-buttons"},o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore",onClick:this.onClose},t),s),d=!(0,g.default)(this.absolutelyPositionedElements,u),f={"et-fb-tooltip--no-arrow":!0,"et-fb-tooltip--product-tour":!0,"et-fb-tooltip--product-tour--centered":"start"===u||"finish"===u,"et-fb-tooltip--product-tour--finish":"finish"===u},p="start"===u||"finish"===u,h=0===k.default.$appWindow(".et-fb-product-tour-element").length;return o.default.createElement(_.default,{active:n,actionType:"custom_content",tooltipTitle:a,_closeFunction:this.onClose,classNames:f,modalPosition:i,forceFixedPosition:d,modalWidth:340,enableContextMenu:!0,ignorePosition:p,movable:!p,buttons:c,renderInsideApp:!h&&!L},o.default.createElement("div",null,r))}}])&&C(n.prototype,r),S&&C(n,S),Object.defineProperty(n,"prototype",{writable:!1}),j}(o.default.Component);t.default=R}).call(this,n(8))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=j(n(0)),a=j(n(3));j(n(13));n(1927);var i=j(n(5)),l=j(n(1)),u=j(n(31)),s=j(n(11)),c=j(n(7)),d=j(n(162)),f=j(n(199)),p=j(n(9)),h=j(n(184)),m=j(n(360)),y=j(n(394)),g=(j(n(85)),j(n(395))),b=j(n(125)),v=j(n(84)),_=j(n(303)),w=j(n(43)),O=j(n(1488)),k=j(n(457)),S=j(n(1465)),C=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(506)),E=j(n(6)),P=(j(n(14)),j(n(22))),T=j(n(2));function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}function j(e){return e&&e.__esModule?e:{default:e}}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function N(e){var t=function(){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}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var I={active:a.default.bool},B=T.default.$topWindow("body"),F=ETBuilderBackend.i18n.fonts,W=ETBuilderBackend.allFontWeights,V=ETBuilderBackend.allFontFormats,U=function(t){!function(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&&D(e,t)}(j,t);var n,r,a,M=N(j);function j(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,j),(e=M.call(this)).state={fontFilesData:{},fontError:"",errorElements:[],fontName:"",fontProcessing:!1,selectedFontWeightsAll:"on",selectedFontWeights:"",activeDescription:null,hoveredGroup:null},e._onFileUpload=e._onFileUpload.bind(R(e)),e.onUpload=e.onUpload.bind(R(e)),e.onDelete=e.onDelete.bind(R(e)),e._onFontNameInput=e._onFontNameInput.bind(R(e)),e.processFont=e.processFont.bind(R(e)),e.updateFontSettings=e.updateFontSettings.bind(R(e)),e.fontDataValid=e.fontDataValid.bind(R(e)),e.maybeAddScrollbar=e.maybeAddScrollbar.bind(R(e)),e.generateFilesListPreview=e.generateFilesListPreview.bind(R(e)),e.removeFontFile=e.removeFontFile.bind(R(e)),e._onClickHelp=e._onClickHelp.bind(R(e)),e._isDescriptionVisible=e._isDescriptionVisible.bind(R(e)),e._isHoveredGroup=e._isHoveredGroup.bind(R(e)),e}return n=j,(r=[{key:"componentDidMount",value:function(){var e='<div class="et-core-modal-overlay et-fb-font-upload-overlay et-core-active"></div>';T.default.isLB()?B.find(".et-block-builder-modal").append(e):T.default.isTB()?B.find(".et-tb-branded-modal").append(e):T.default.isFB()?B.find("#et-fb-app").append(e):B.append(e),B.addClass("et-fb-global-scroll-disabled et-fb-has-font-upload-overlay"),this.shortThrottleReset=(0,h.default)(this.maybeAddScrollbar,100),T.default.appWindow().addEventListener("resize",this.shortThrottleReset),this.maybeAddScrollbar();var t=E.default.getDroploaderPayloadFont();t&&this.setState({fontFilesData:t.fontFilesData,fontName:t.fontName})}},{key:"componentWillUnmount",value:function(){B.removeClass("et-fb-global-scroll-disabled et-fb-has-font-upload-overlay"),T.default.appWindow().removeEventListener("resize",this.shortThrottleReset)}},{key:"_onClickHelp",value:function(e){var t=this.state.activeDescription===e?null:e;this.setState({activeDescription:t})}},{key:"_isDescriptionVisible",value:function(e){return this.state.activeDescription===e}},{key:"_isHoveredGroup",value:function(e){return this.state.hoveredGroup===e}},{key:"maybeAddScrollbar",value:function(){var e=T.default.$topWindow(".et-fb-font-upload-modal");800>T.default.$topWindow().height()?e.addClass("et-core-modal-enabled-scrollbar"):e.removeClass("et-core-modal-enabled-scrollbar")}},{key:"fontDataValid",value:function(e){var t=[],n="";return"add"!==e||(""===this.state.fontName&&t.push("fontName"),(0,i.default)(this.state.fontFilesData)&&(n=F.noFilesError,t.push("fontFile")),"on"!==this.state.selectedFontWeightsAll&&-1===this.state.selectedFontWeights.indexOf("on")&&t.push("fontWeight"),(0,i.default)(t)?(this.setState({errorElements:[],fontError:""}),!0):(this.setState({errorElements:t,fontProcessing:!1,fontError:n}),!1))}},{key:"_onFontNameInput",value:function(e,t){var n=(0,y.default)(this.state.errorElements,(function(e){return"fontName"===e}));this.setState({fontName:t,errorElements:n})}},{key:"onUpload",value:function(e){e.preventDefault(),this.state.fontProcessing||this.processFont("add")}},{key:"onDelete",value:function(){this.state.fontProcessing||this.processFont("remove",this.props.fontID)}},{key:"getFontWeights",value:function(){if("on"===this.state.selectedFontWeightsAll)return"all";var e=this.state.selectedFontWeights.split("|"),t=0;return(0,d.default)((0,u.default)(W,(function(n,r){return t++,"on"===e[t-1]&&r}))).join(",")}},{key:"processFont",value:function(t,n){var r=this,o=(0,s.default)(n)?r.state.fontName:n,a={};if(r.fontDataValid(t)){r.setState({fontError:"",errorElements:[],fontProcessing:!0}),"add"===t&&(a=JSON.stringify({font_weights:r.getFontWeights(),generic_family:"sans-serif"}));var u=new FormData,c={action:"et_pb_process_custom_font",et_pb_font_action:t,et_fb_upload_font_nonce:ETBuilderBackend.nonces.uploadFontNonce,et_pb_font_name:o,et_pb_font_settings:a};(0,p.default)(r.state.fontFilesData,(function(e,t){c["et_pb_font_file_".concat(t)]=e.file})),e.each(c,(function(e,t){u.append(e,t)})),e.ajax({type:"POST",url:ETBuilderBackend.ajaxUrl,contentType:!1,processData:!1,data:u,success:function(e){var n=JSON.parse(e);if((0,i.default)(n.error)){if(ETBuilderBackend.customFonts=(0,l.default)(n,"updated_fonts",ETBuilderBackend.customFonts),r.setState({fontError:"",fontProcessing:!1}),"add"===t&&""!==r.props.callback){var o=(0,l.default)(n,"uploaded_font","");r.props.callback(o)}r.onClose()}else r.setState({fontError:n.error,fontProcessing:!1})}})}}},{key:"getFontName",value:function(e){return(0,l.default)(ETBuilderBackend.customFonts,[e,"font_name"],e)}},{key:"onClose",value:function(){P.default.setFontUploaderStatus("disabled"),T.default.$topWindow(".et-fb-font-upload-overlay").remove()}},{key:"_onFileUpload",value:function(e){var t=e.target.files,n=this.state.fontFilesData;if(!((0,b.default)(t)<1))if((0,p.default)(t,(function(e){var t=(0,g.default)((0,l.default)(e,"name",""));(0,p.default)(V,(function(r){".".concat(r),(0,f.default)(t,r)&&(n[r]={fileName:t,file:e})}))})),(0,i.default)(n)){var r="".concat(F.fileError,". ").concat(F.supportedFiles,": ").concat(V.join(", "));this.setState({fontError:r})}else this.setState({fontFilesData:n,fontError:""})}},{key:"updateFontSettings",value:function(e,t){switch(e){case"et-font-uploader-weights-all":this.setState({selectedFontWeightsAll:t});break;case"et-font-uploader-weights-select":this.setState({selectedFontWeights:t})}}},{key:"removeFontFile",value:function(t){var n=e(t.target).closest(".et-fb-font-files-list-item");if(!(n.length<1)){var r=n.data("file_ext"),o=this.state.fontFilesData;(0,m.default)(o,r),this.setState({fontFilesData:o})}}},{key:"generateFilesListPreview",value:function(){var e=this;if((0,i.default)(this.state.fontFilesData))return!1;var t=(0,u.default)(this.state.fontFilesData,(function(t,n){return o.default.createElement("div",{className:"et-fb-font-files-list-item","data-file_ext":n,key:n},o.default.createElement("span",{className:"et-fb-font-files-list-item-remove",onClick:e.removeFontFile},o.default.createElement(w.default,{icon:"delete",color:v.default.danger})),t.fileName)}));return o.default.createElement("div",{className:"et-fb-font-files-list"},o.default.createElement("label",{className:"et-fb-form__label"},o.default.createElement("span",{className:"et-fb-form__label-text"},F.selectedFiles,":")),t)}},{key:"getWeightCheckboxValues",value:function(){var e=[];return(0,p.default)(W,(function(t,n){var r="".concat(t," ").concat(n);e.push({value:t,label:r})})),e}},{key:"render",value:function(){var e={"et-fb-font-upload-modal":!0,"et-fb-font-upload-modal--delete":"delete"===this.props.action,"et-fb-modal-allow-scroll":!0},t=""!==this.state.fontError?o.default.createElement("div",{className:"et-fb-font-upload-error"},this.state.fontError):"",n="";if(this.state.fontProcessing)n=o.default.createElement(_.default,{isLoading:!0});else if("delete"===this.props.action){var r=o.default.createElement("div",{className:"et_pb_prompt_buttons et-fb-font-delete-confirmation"},o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore et-core-modal-action-secondary",onClick:this.onClose},F.cancel),o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-restore",onClick:this.onDelete},F.delete));n=o.default.createElement("div",null,o.default.createElement("div",{className:"et-core-modal-content"},"".concat(F.deleteConfirm,' "').concat(this.getFontName(this.props.fontID),'"'),"?"),r)}else{var a="on"!==this.state.selectedFontWeightsAll?o.default.createElement(O.default,{options:this.getWeightCheckboxValues(),name:"et-font-uploader-weights-select",_onChange:this.updateFontSettings,value:this.state.selectedFontWeights}):"",i=o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore",onClick:this.onUpload},F.upload);n=o.default.createElement("div",null,o.default.createElement("div",{className:"et-core-modal-content et-fb-allow-mouse-wheel"},o.default.createElement("div",{className:"et-core-modal-content-inner et-fb-allow-mouse-wheel-form"},t,o.default.createElement("label",{className:"et-fb-form__label"},o.default.createElement("span",{className:"et-fb-form__label-text"},F.fontNameLabel)),o.default.createElement(k.default,{type:"text",value:this.state.fontName,name:"userFontName",_onChange:this._onFontNameInput,className:!!(0,c.default)(this.state.errorElements,"fontName")&&"et-fb-font-error-element",additional_attrs:{placeholder:F.fontName}}),o.default.createElement("div",{className:"et-fb-upload-file-container"},o.default.createElement("span",{className:"et-core-portability-import-placeholder"},F.noFile),o.default.createElement("button",{className:"et-fb-button et-fb-button--upload-font et-fb-button--inverse et-fb-settings-button--additional-button"},F.chooseFile),o.default.createElement("input",{type:"file",className:"et-fb-import-file",onChange:this._onFileUpload,accept:".ttf, .otf, .eot, .woff2, .woff",multiple:!0}),o.default.createElement("p",{className:"et-font-uploader-hint"},F.supportedFiles,":"," ",V.join(", "))),this.generateFilesListPreview(),o.default.createElement(C.ETBuilderFormLabel,{name:"et-font-uploader-weight",activeHelp:this._isDescriptionVisible("et-font-uploader-weight"),hoveredGroup:!0,key:"et-font-uploader-weight-label",onClickHelp:this._onClickHelp},F.weightsSupport),o.default.createElement(C.ETBuilderFormDescription,{active:this._isDescriptionVisible("et-font-uploader-weight"),key:"et-font-uploader-weight-desc"},F.weightsHelp),o.default.createElement("div",{className:(0,c.default)(this.state.errorElements,"fontWeight")?"et-fb-font-error-element":""},o.default.createElement(O.default,{options:[F.all],_onChange:this.updateFontSettings,name:"et-font-uploader-weights-all",value:this.state.selectedFontWeightsAll}),a))),i)}var l="delete"===this.props.action?F.delete:F.upload,u=!!T.default.condition("is_bfb")&&T.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app"));return o.default.createElement(S.default,{active:!0,actionType:"custom_content",tooltipTitle:"".concat(l," ").concat(F.font),_closeFunction:this.onClose,classNames:e,ignorePosition:!0,enableContextMenu:!0,movable:!1,tooltipModalContainer:u},n)}}])&&x(n.prototype,r),a&&x(n,a),Object.defineProperty(n,"prototype",{writable:!1}),j}(o.default.Component);U.propTypes=I,U.defaultProps={active:!1};var G=U;t.default=G}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(0)),a=s(n(3)),i=s(n(1465)),l=s(n(812)),u=s(n(2));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){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}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}n(1928);var m={progress:a.default.number,total:a.default.number},y=u.default.$appWindow("body"),g=ETBuilderBackend.i18n.saveModuleLibraryAttrs,b=function(e){!function(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&&d(e,t)}(u,e);var t,n,r,a=f(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this)}return t=u,(n=[{key:"componentDidMount",value:function(){y.append('<div class="et-core-modal-overlay et-cloud-save-progress-overlay et-core-active"></div>')}},{key:"componentWillUnmount",value:function(){y.find(".et-cloud-save-progress-overlay").remove()}},{key:"render",value:function(){var e=this.props,t=e.progress,n=e.total,r=0<n?t/n*100:1;return o.default.createElement(i.default,{classNames:{"et-cloud-save-progress-modal":!0},active:!0,actionType:"custom_content",tooltipTitle:g.cloudSavingTitle,ignorePosition:!0,movable:!1,tooltipModalContainer:!1,renderInsideApp:!1},o.default.createElement(l.default,{progress:r}))}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.default.Component);b.propTypes=m,b.defaultProps={progress:1,total:1};var v=b;t.default=v},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMatchingGradientStopColorFound=t.isDisplayConditionsFoundInFindReplace=t.i18nDisplayConditions=t.encodeString=t.decodeString=void 0;var r=f(n(1)),o=f(n(843)),a=f(n(786)),i=f(n(124)),l=f(n(7)),u=f(n(395)),s=f(n(5)),c=n(358),d=n(783);function f(e){return e&&e.__esModule?e:{default:e}}var p=ETBuilderBackend.i18n.displayConditions;t.i18nDisplayConditions=function(e){return(0,r.default)(p,e,"").replace(/&#039;/g,"'")};t.encodeString=function(e){return btoa(unescape(encodeURIComponent(e)))};var h=function(e){try{return decodeURIComponent(escape(atob(e)))}catch(t){return console.log(t,e),null}};t.decodeString=h;t.isDisplayConditionsFoundInFindReplace=function(e,t,n){if(e){var r=(0,c.isJson)(h(t))?JSON.parse(h(t)):null,i=(0,c.isJson)(h(n))?JSON.parse(h(n)):null;if(!t||!i)return!1;var l=(0,a.default)((function(e){return(0,o.default)("id",e)}),r),u=(0,a.default)((function(e){return(0,o.default)("id",e)}),i);if(JSON.stringify(l)===JSON.stringify(u))return!0}return!1};t.isMatchingGradientStopColorFound=function(e,t,n){if(e&&(0,d.isGradientString)(n)){var r=(0,d.parseGradientString)(n),o=(0,i.default)(r,(function(e){return!!(0,l.default)((0,u.default)(e.color),(0,u.default)(t))}));return!(0,s.default)(o)}return!1}},function(e,t,n){e.exports=function(){"use strict";var e=ET_Builder.Frames.top.document,t=navigator.userAgent,n=navigator.platform,r=/gecko\/\d/i.test(t),o=/MSIE \d/.test(t),a=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),i=/Edge\/(\d+)/.exec(t),l=o||a||i,u=l&&(o?e.documentMode||6:+(i||a)[1]),s=!i&&/WebKit\//.test(t),c=s&&/Qt\/\d+\.\d+/.test(t),d=!i&&/Chrome\/(\d+)/.exec(t),f=d&&+d[1],p=/Opera\//.test(t),h=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),y=/PhantomJS/.test(t),g=h&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),b=/Android/.test(t),v=g||b||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),_=g||/Mac/.test(n),w=/\bCrOS\b/.test(t),O=/win/i.test(n),k=p&&t.match(/Version\/(\d*\.\d*)/);k&&(k=Number(k[1])),k&&k>=15&&(p=!1,s=!0);var S=_&&(c||p&&(null==k||k<12.11)),C=r||l&&u>=9;function E(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var P,T=function(e,t){var n=e.className,r=E(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function j(e,t){return M(e).appendChild(t)}function x(t,n,r,o){var a=e.createElement(t);if(r&&(a.className=r),o&&(a.style.cssText=o),"string"==typeof n)a.appendChild(e.createTextNode(n));else if(n)for(var i=0;i<n.length;++i)a.appendChild(n[i]);return a}function D(e,t,n,r){var o=x(e,t,n,r);return o.setAttribute("role","presentation"),o}function N(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function L(){var t;try{t=e.activeElement}catch(n){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function R(e,t){var n=e.className;E(t).test(n)||(e.className+=(n?" ":"")+t)}function A(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!E(n[r]).test(t)&&(t+=" "+n[r]);return t}P=e.createRange?function(t,n,r,o){var a=e.createRange();return a.setEnd(o||t,r),a.setStart(t,n),a}:function(t,n,r){var o=e.body.createTextRange();try{o.moveToElementText(t.parentNode)}catch(e){return o}return o.collapse(!0),o.moveEnd("character",r),o.moveStart("character",n),o};var I=function(e){e.select()};function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function F(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function W(e,t,n,r,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var a=r||0,i=o||0;;){var l=e.indexOf("\t",a);if(l<0||l>=t)return i+(t-a);i+=l-a,i+=n-i%n,a=l+1}}g?I=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(I=function(e){try{e.select()}catch(e){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function U(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var G=50,H={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},q={origin:"*mouse"},K={origin:"+move"};function $(e,t,n){for(var r=0,o=0;;){var a=e.indexOf("\t",r);-1==a&&(a=e.length);var i=a-r;if(a==e.length||o+i>=t)return r+Math.min(i,t-o);if(o+=a-r,r=a+1,(o+=n-o%n)>=t)return r}}var Y=[""];function X(e){for(;Y.length<=e;)Y.push(J(Y)+" ");return Y[e]}function J(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Z(e,t,n){for(var r=0,o=n(t);r<e.length&&n(e[r])<=o;)r++;e.splice(r,0,t)}function ee(){}function te(e,t){var n;return Object.create?n=Object.create(e):(ee.prototype=e,n=new ee),t&&F(t,n),n}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function oe(e,t){return t?!!(t.source.indexOf("\\w")>-1&&re(e))||t.test(e):re(e)}function ae(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function le(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ue(e,t,n){for(;(n<0?t>0:t<e.length)&&le(e.charAt(t));)t+=n;return t}function se(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,a=r<0?Math.ceil(o):Math.floor(o);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function ce(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,a=0;a<e.length;++a){var i=e[a];(i.from<n&&i.to>t||t==n&&i.to==t)&&(r(Math.max(i.from,t),Math.min(i.to,n),1==i.level?"rtl":"ltr",a),o=!0)}o||r(t,n,"ltr")}var de=null;function fe(e,t,n){var r;de=null;for(var o=0;o<e.length;++o){var a=e[o];if(a.from<t&&a.to>t)return o;a.to==t&&(a.from!=a.to&&"before"==n?r=o:de=o),a.from==t&&(a.from!=a.to&&"before"!=n?r=o:de=o)}return null!=r?r:de}var pe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,i=/[Lb1n]/,l=/[1n]/;function u(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var s="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,d=[],f=0;f<c;++f)d.push(n(e.charCodeAt(f)));for(var p=0,h=s;p<c;++p){var m=d[p];"m"==m?d[p]=h:h=m}for(var y=0,g=s;y<c;++y){var b=d[y];"1"==b&&"r"==g?d[y]="n":a.test(b)&&(g=b,"r"==b&&(d[y]="R"))}for(var v=1,_=d[0];v<c-1;++v){var w=d[v];"+"==w&&"1"==_&&"1"==d[v+1]?d[v]="1":","!=w||_!=d[v+1]||"1"!=_&&"n"!=_||(d[v]=_),_=w}for(var O=0;O<c;++O){var k=d[O];if(","==k)d[O]="N";else if("%"==k){var S=void 0;for(S=O+1;S<c&&"%"==d[S];++S);for(var C=O&&"!"==d[O-1]||S<c&&"1"==d[S]?"1":"N",E=O;E<S;++E)d[E]=C;O=S-1}}for(var P=0,T=s;P<c;++P){var M=d[P];"L"==T&&"1"==M?d[P]="L":a.test(M)&&(T=M)}for(var j=0;j<c;++j)if(o.test(d[j])){var x=void 0;for(x=j+1;x<c&&o.test(d[x]);++x);for(var D="L"==(j?d[j-1]:s),N=D==("L"==(x<c?d[x]:s))?D?"L":"R":s,L=j;L<x;++L)d[L]=N;j=x-1}for(var R,A=[],I=0;I<c;)if(i.test(d[I])){var B=I;for(++I;I<c&&i.test(d[I]);++I);A.push(new u(0,B,I))}else{var F=I,W=A.length,V="rtl"==t?1:0;for(++I;I<c&&"L"!=d[I];++I);for(var U=F;U<I;)if(l.test(d[U])){F<U&&(A.splice(W,0,new u(1,F,U)),W+=V);var G=U;for(++U;U<I&&l.test(d[U]);++U);A.splice(W,0,new u(2,G,U)),W+=V,F=U}else++U;F<I&&A.splice(W,0,new u(1,F,I))}return"ltr"==t&&(1==A[0].level&&(R=e.match(/^\s+/))&&(A[0].from=R[0].length,A.unshift(new u(0,0,R[0].length))),1==J(A).level&&(R=e.match(/\s+$/))&&(J(A).to-=R[0].length,A.push(new u(0,c-R[0].length,c)))),"rtl"==t?A.reverse():A}}();function he(e,t){var n=e.order;return null==n&&(n=e.order=pe(e.text,t)),n}var me=[],ye=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||me).concat(n)}};function ge(e,t){return e._handlers&&e._handlers[t]||me}function be(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var a=U(o,n);a>-1&&(r[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function ve(e,t){var n=ge(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,r)}function _e(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,n||t.type,e,t),Ee(t)||t.codemirrorIgnore}function we(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==U(n,t[r])&&n.push(t[r])}function Oe(e,t){return ge(e,t).length>0}function ke(e){e.prototype.on=function(e,t){ye(this,e,t)},e.prototype.off=function(e,t){be(this,e,t)}}function Se(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Pe(e){Se(e),Ce(e)}function Te(e){return e.target||e.srcElement}function Me(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),_&&e.ctrlKey&&1==t&&(t=3),t}var je,xe,De=function(){if(l&&u<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}();function Ne(t){if(null==je){var n=x("span","\u200b");j(t,x("span",[n,e.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(je=n.offsetWidth<=1&&n.offsetHeight>2&&!(l&&u<8))}var r=je?x("span","\u200b"):x("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Le(t){if(null!=xe)return xe;var n=j(t,e.createTextNode("A\u062eA")),r=P(n,0,1).getBoundingClientRect(),o=P(n,1,2).getBoundingClientRect();return M(t),!(!r||r.left==r.right)&&(xe=o.right-r.right<3)}var Re,Ae=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var a=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),i=a.indexOf("\r");-1!=i?(n.push(a.slice(0,i)),t+=i+1):(n.push(a),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Be="oncopy"in(Re=x("div"))||(Re.setAttribute("oncopy","return;"),"function"==typeof Re.oncopy),Fe=null;function We(e){if(null!=Fe)return Fe;var t=j(e,x("span","x")),n=t.getBoundingClientRect(),r=P(t,0,1).getBoundingClientRect();return Fe=Math.abs(n.left-r.left)>1}var Ve={},Ue={};function Ge(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ve[e]=t}function He(e,t){Ue[e]=t}function ze(e){if("string"==typeof e&&Ue.hasOwnProperty(e))e=Ue[e];else if(e&&"string"==typeof e.name&&Ue.hasOwnProperty(e.name)){var t=Ue[e.name];"string"==typeof t&&(t={name:t}),(e=te(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function qe(e,t){t=ze(t);var n=Ve[t.name];if(!n)return qe(e,"text/plain");var r=n(e,t);if(Ke.hasOwnProperty(t.name)){var o=Ke[t.name];for(var a in o)o.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=o[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var i in t.modeProps)r[i]=t.modeProps[i];return r}var Ke={};function $e(e,t){F(t,Ke.hasOwnProperty(e)?Ke[e]:Ke[e]={})}function Ye(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Xe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Je(e,t,n){return!e.startState||e.startState(t,n)}var Qe=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ze(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],a=o.chunkSize();if(t<a){n=o;break}t-=a}return n.lines[t]}function et(e,t,n){var r=[],o=t.line;return e.iter(t.line,n.line+1,(function(e){var a=e.text;o==n.line&&(a=a.slice(0,n.ch)),o==t.line&&(a=a.slice(t.ch)),r.push(a),++o})),r}function tt(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function nt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function rt(e){if(null==e.parent)return null;for(var t=e.parent,n=U(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var o=0;r.children[o]!=t;++o)n+=r.children[o].chunkSize();return n+t.first}function ot(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var o=e.children[r],a=o.height;if(t<a){e=o;continue e}t-=a,n+=o.chunkSize()}return n}while(!e.lines);for(var i=0;i<e.lines.length;++i){var l=e.lines[i].height;if(t<l)break;t-=l}return n+i}function at(e,t){return t>=e.first&&t<e.first+e.size}function it(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function lt(e,t,n){if(void 0===n&&(n=null),!(this instanceof lt))return new lt(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ut(e,t){return e.line-t.line||e.ch-t.ch}function st(e,t){return e.sticky==t.sticky&&0==ut(e,t)}function ct(e){return lt(e.line,e.ch)}function dt(e,t){return ut(e,t)<0?t:e}function ft(e,t){return ut(e,t)<0?e:t}function pt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ht(e,t){if(t.line<e.first)return lt(e.first,0);var n=e.first+e.size-1;return t.line>n?lt(n,Ze(e,n).text.length):mt(t,Ze(e,t.line).text.length)}function mt(e,t){var n=e.ch;return null==n||n>t?lt(e.line,t):n<0?lt(e.line,0):e}function yt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ht(e,t[r]);return n}Qe.prototype.eol=function(){return this.pos>=this.string.length},Qe.prototype.sol=function(){return this.pos==this.lineStart},Qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Qe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Qe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Qe.prototype.skipToEnd=function(){this.pos=this.string.length},Qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Qe.prototype.backUp=function(e){this.pos-=e},Qe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=W(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Qe.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Qe.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var gt=function(e,t){this.state=e,this.lookAhead=t},bt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function vt(e,t,n,r){var o=[e.state.modeGen],a={};Tt(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),a,r);for(var i=n.state,l=function(r){n.baseTokens=o;var l=e.state.overlays[r],u=1,s=0;n.state=!0,Tt(e,t.text,l.mode,n,(function(e,t){for(var n=u;s<e;){var r=o[u];r>e&&o.splice(u,1,e,o[u+1],r),u+=2,s=Math.min(e,r)}if(t)if(l.opaque)o.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;n<u;n+=2){var a=o[n+1];o[n+1]=(a?a+" ":"")+"overlay "+t}}),a),n.state=i,n.baseTokens=null,n.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)l(u);return{styles:o,classes:a.bgClass||a.textClass?a:null}}function _t(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=wt(e,rt(t)),o=t.text.length>e.options.maxHighlightLength&&Ye(e.doc.mode,r.state),a=vt(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wt(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new bt(r,!0,t);var a=Mt(e,t,n),i=a>r.first&&Ze(r,a-1).stateAfter,l=i?bt.fromSaved(r,i,a):new bt(r,Je(r.mode),a);return r.iter(a,t,(function(n){Ot(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&r<o.viewTo?l.save():null,l.nextLine()})),n&&(r.modeFrontier=l.line),l}function Ot(e,t,n,r){var o=e.doc.mode,a=new Qe(t,e.options.tabSize,n);for(a.start=a.pos=r||0,""==t&&kt(o,n.state);!a.eol();)St(o,a,n.state),a.start=a.pos}function kt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Xe(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function St(e,t,n,r){for(var o=0;o<10;o++){r&&(r[0]=Xe(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}bt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},bt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},bt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},bt.fromSaved=function(e,t,n){return t instanceof gt?new bt(e,Ye(e.mode,t.state),n,t.lookAhead):new bt(e,Ye(e.mode,t),n)},bt.prototype.save=function(e){var t=!1!==e?Ye(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new gt(t,this.maxLookAhead):t};var Ct=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Et(e,t,n,r){var o,a,i=e.doc,l=i.mode,u=Ze(i,(t=ht(i,t)).line),s=wt(e,t.line,n),c=new Qe(u.text,e.options.tabSize,s);for(r&&(a=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,o=St(l,c,s.state),r&&a.push(new Ct(c,o,Ye(i.mode,s.state)));return r?a:new Ct(c,o,s.state)}function Pt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Tt(e,t,n,r,o,a,i){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var u,s=0,c=null,d=new Qe(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&Pt(kt(n,r.state),a);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,i&&Ot(e,t,r,d.pos),d.pos=t.length,u=null):u=Pt(St(n,d,r.state,f),a),f){var p=f[0].name;p&&(u="m-"+(u?p+" "+u:p))}if(!l||c!=u){for(;s<d.start;)o(s=Math.min(d.start,s+5e3),c);c=u}d.start=d.pos}for(;s<d.pos;){var h=Math.min(d.pos,s+5e3);o(h,c),s=h}}function Mt(e,t,n){for(var r,o,a=e.doc,i=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>i;--l){if(l<=a.first)return a.first;var u=Ze(a,l-1),s=u.stateAfter;if(s&&(!n||l+(s instanceof gt?s.lookAhead:0)<=a.modeFrontier))return l;var c=W(u.text,null,e.options.tabSize);(null==o||r>c)&&(o=l-1,r=c)}return o}function jt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var o=Ze(e,r).stateAfter;if(o&&(!(o instanceof gt)||r+o.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var xt=!1,Dt=!1;function Nt(){xt=!0}function Lt(){Dt=!0}function Rt(e,t,n){this.marker=e,this.from=t,this.to=n}function At(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function It(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Bt(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Ft(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var a=e[o],i=a.marker;if(null==a.from||(i.inclusiveLeft?a.from<=t:a.from<t)||a.from==t&&"bookmark"==i.type&&(!n||!a.marker.insertLeft)){var l=null==a.to||(i.inclusiveRight?a.to>=t:a.to>t);(r||(r=[])).push(new Rt(i,a.from,l?null:a.to))}}return r}function Wt(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var a=e[o],i=a.marker;if(null==a.to||(i.inclusiveRight?a.to>=t:a.to>t)||a.from==t&&"bookmark"==i.type&&(!n||a.marker.insertLeft)){var l=null==a.from||(i.inclusiveLeft?a.from<=t:a.from<t);(r||(r=[])).push(new Rt(i,l?null:a.from-t,null==a.to?null:a.to-t))}}return r}function Vt(e,t){if(t.full)return null;var n=at(e,t.from.line)&&Ze(e,t.from.line).markedSpans,r=at(e,t.to.line)&&Ze(e,t.to.line).markedSpans;if(!n&&!r)return null;var o=t.from.ch,a=t.to.ch,i=0==ut(t.from,t.to),l=Ft(n,o,i),u=Wt(r,a,i),s=1==t.text.length,c=J(t.text).length+(s?o:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var p=At(u,f.marker);p?s&&(f.to=null==p.to?null:p.to+c):f.to=o}}if(u)for(var h=0;h<u.length;++h){var m=u[h];null!=m.to&&(m.to+=c),null==m.from?At(l,m.marker)||(m.from=c,s&&(l||(l=[])).push(m)):(m.from+=c,s&&(l||(l=[])).push(m))}l&&(l=Ut(l)),u&&u!=l&&(u=Ut(u));var y=[l];if(!s){var g,b=t.text.length-2;if(b>0&&l)for(var v=0;v<l.length;++v)null==l[v].to&&(g||(g=[])).push(new Rt(l[v].marker,null,null));for(var _=0;_<b;++_)y.push(g);y.push(u)}return y}function Ut(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Gt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=U(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var o=[{from:t,to:n}],a=0;a<r.length;++a)for(var i=r[a],l=i.find(0),u=0;u<o.length;++u){var s=o[u];if(!(ut(s.to,l.from)<0||ut(s.from,l.to)>0)){var c=[u,1],d=ut(s.from,l.from),f=ut(s.to,l.to);(d<0||!i.inclusiveLeft&&!d)&&c.push({from:s.from,to:l.from}),(f>0||!i.inclusiveRight&&!f)&&c.push({from:l.to,to:s.to}),o.splice.apply(o,c),u+=c.length-3}}return o}function Ht(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function zt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function qt(e){return e.inclusiveLeft?-1:0}function Kt(e){return e.inclusiveRight?1:0}function $t(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),o=t.find(),a=ut(r.from,o.from)||qt(e)-qt(t);if(a)return-a;var i=ut(r.to,o.to)||Kt(e)-Kt(t);return i||t.id-e.id}function Yt(e,t){var n,r=Dt&&e.markedSpans;if(r)for(var o=void 0,a=0;a<r.length;++a)(o=r[a]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||$t(n,o.marker)<0)&&(n=o.marker);return n}function Xt(e){return Yt(e,!0)}function Jt(e){return Yt(e,!1)}function Qt(e,t){var n,r=Dt&&e.markedSpans;if(r)for(var o=0;o<r.length;++o){var a=r[o];a.marker.collapsed&&(null==a.from||a.from<t)&&(null==a.to||a.to>t)&&(!n||$t(n,a.marker)<0)&&(n=a.marker)}return n}function Zt(e,t,n,r,o){var a=Ze(e,t),i=Dt&&a.markedSpans;if(i)for(var l=0;l<i.length;++l){var u=i[l];if(u.marker.collapsed){var s=u.marker.find(0),c=ut(s.from,n)||qt(u.marker)-qt(o),d=ut(s.to,r)||Kt(u.marker)-Kt(o);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?ut(s.to,n)>=0:ut(s.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?ut(s.from,r)<=0:ut(s.from,r)<0)))return!0}}}function en(e){for(var t;t=Xt(e);)e=t.find(-1,!0).line;return e}function tn(e){for(var t;t=Jt(e);)e=t.find(1,!0).line;return e}function nn(e){for(var t,n;t=Jt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function rn(e,t){var n=Ze(e,t),r=en(n);return n==r?t:rt(r)}function on(e,t){if(t>e.lastLine())return t;var n,r=Ze(e,t);if(!an(e,r))return t;for(;n=Jt(r);)r=n.find(1,!0).line;return rt(r)+1}function an(e,t){var n=Dt&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)if((r=n[o]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&ln(e,t,r))return!0}}function ln(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return ln(e,r.line,At(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,a=0;a<t.markedSpans.length;++a)if((o=t.markedSpans[a]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&ln(e,t,o))return!0}function un(e){for(var t=0,n=(e=en(e)).parent,r=0;r<n.lines.length;++r){var o=n.lines[r];if(o==e)break;t+=o.height}for(var a=n.parent;a;a=(n=a).parent)for(var i=0;i<a.children.length;++i){var l=a.children[i];if(l==n)break;t+=l.height}return t}function sn(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Xt(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=Jt(r);){var a=t.find(0,!0);n-=r.text.length-a.from.ch,n+=(r=a.to.line).text.length-a.to.ch}return n}function cn(e){var t=e.display,n=e.doc;t.maxLine=Ze(n,n.first),t.maxLineLength=sn(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=sn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var dn=function(e,t,n){this.text=e,zt(this,t),this.height=n?n(this):1};function fn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ht(e),zt(e,n);var o=r?r(e):1;o!=e.height&&nt(e,o)}function pn(e){e.parent=null,Ht(e)}dn.prototype.lineNo=function(){return rt(this)},ke(dn);var hn={},mn={};function yn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?mn:hn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function gn(e,t){var n=D("span",null,null,s?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,i=void 0;r.pos=0,r.addToken=vn,Le(e.display.measure)&&(i=he(a,e.doc.direction))&&(r.addToken=wn(r.addToken,i)),r.map=[],kn(a,r,_t(e,a,t!=e.display.externalMeasured&&rt(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=A(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=A(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ne(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=A(r.pre.className,r.textClass||"")),r}function bn(e){var t=x("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vn(t,n,r,o,a,i,s){if(n){var c,d=t.splitSpaces?_n(n,t.trailingSpace):n,f=t.cm.state.specialChars,p=!1;if(f.test(n)){c=e.createDocumentFragment();for(var h=0;;){f.lastIndex=h;var m=f.exec(n),y=m?m.index-h:n.length-h;if(y){var g=e.createTextNode(d.slice(h,h+y));l&&u<9?c.appendChild(x("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+y,g),t.col+=y,t.pos+=y}if(!m)break;h+=y+1;var b=void 0;if("\t"==m[0]){var v=t.cm.options.tabSize,_=v-t.col%v;(b=c.appendChild(x("span",X(_),"cm-tab"))).setAttribute("role","presentation"),b.setAttribute("cm-text","\t"),t.col+=_}else"\r"==m[0]||"\n"==m[0]?((b=c.appendChild(x("span","\r"==m[0]?"\u240d":"\u2424","cm-invalidchar"))).setAttribute("cm-text",m[0]),t.col+=1):((b=t.cm.options.specialCharPlaceholder(m[0])).setAttribute("cm-text",m[0]),l&&u<9?c.appendChild(x("span",[b])):c.appendChild(b),t.col+=1);t.map.push(t.pos,t.pos+1,b),t.pos++}}else t.col+=n.length,c=e.createTextNode(d),t.map.push(t.pos,t.pos+n.length,c),l&&u<9&&(p=!0),t.pos+=n.length;if(t.trailingSpace=32==d.charCodeAt(n.length-1),r||o||a||p||i||s){var w=r||"";o&&(w+=o),a&&(w+=a);var O=x("span",[c],w,i);if(s)for(var k in s)s.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&O.setAttribute(k,s[k]);return t.content.appendChild(O)}t.content.appendChild(c)}}function _n(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;o<e.length;o++){var a=e.charAt(o);" "!=a||!n||o!=e.length-1&&32!=e.charCodeAt(o+1)||(a="\xa0"),r+=a,n=" "==a}return r}function wn(e,t){return function(n,r,o,a,i,l,u){o=o?o+" cm-force-border":"cm-force-border";for(var s=n.pos,c=s+r.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>s&&d.from<=s);f++);if(d.to>=c)return e(n,r,o,a,i,l,u);e(n,r.slice(0,d.to-s),o,a,null,l,u),a=null,r=r.slice(d.to-s),s=d.to}}}function On(t,n,r,o){var a=!o&&r.widgetNode;a&&t.map.push(t.pos,t.pos+n,a),!o&&t.cm.display.input.needsContentAttribute&&(a||(a=t.content.appendChild(e.createElement("span"))),a.setAttribute("cm-marker",r.id)),a&&(t.cm.display.input.setUneditable(a),t.content.appendChild(a)),t.pos+=n,t.trailingSpace=!1}function kn(e,t,n){var r=e.markedSpans,o=e.text,a=0;if(r)for(var i,l,u,s,c,d,f,p=o.length,h=0,m=1,y="",g=0;;){if(g==h){u=s=c=l="",f=null,d=null,g=1/0;for(var b=[],v=void 0,_=0;_<r.length;++_){var w=r[_],O=w.marker;if("bookmark"==O.type&&w.from==h&&O.widgetNode)b.push(O);else if(w.from<=h&&(null==w.to||w.to>h||O.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&g>w.to&&(g=w.to,s=""),O.className&&(u+=" "+O.className),O.css&&(l=(l?l+";":"")+O.css),O.startStyle&&w.from==h&&(c+=" "+O.startStyle),O.endStyle&&w.to==g&&(v||(v=[])).push(O.endStyle,w.to),O.title&&((f||(f={})).title=O.title),O.attributes)for(var k in O.attributes)(f||(f={}))[k]=O.attributes[k];O.collapsed&&(!d||$t(d.marker,O)<0)&&(d=w)}else w.from>h&&g>w.from&&(g=w.from)}if(v)for(var S=0;S<v.length;S+=2)v[S+1]==g&&(s+=" "+v[S]);if(!d||d.from==h)for(var C=0;C<b.length;++C)On(t,0,b[C]);if(d&&(d.from||0)==h){if(On(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=p)break;for(var E=Math.min(p,g);;){if(y){var P=h+y.length;if(!d){var T=P>E?y.slice(0,E-h):y;t.addToken(t,T,i?i+u:u,c,h+T.length==g?s:"",l,f)}if(P>=E){y=y.slice(E-h),h=E;break}h=P,c=""}y=o.slice(a,a=n[m++]),i=yn(n[m++],t.cm.options)}}else for(var M=1;M<n.length;M+=2)t.addToken(t,o.slice(a,a=n[M]),yn(n[M+1],t.cm.options))}function Sn(e,t,n){this.line=t,this.rest=nn(t),this.size=this.rest?rt(J(this.rest))-n+1:1,this.node=this.text=null,this.hidden=an(e,t)}function Cn(e,t,n){for(var r,o=[],a=t;a<n;a=r){var i=new Sn(e.doc,Ze(e.doc,a),a);r=a+i.size,o.push(i)}return o}var En=null;function Pn(e){En?En.ops.push(e):e.ownsGroup=En={ops:[e],delayedCallbacks:[]}}function Tn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var o=e.ops[r];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}function Mn(e,t){var n=e.ownsGroup;if(n)try{Tn(n)}finally{En=null,t(n)}}var jn=null;function xn(e,t){var n=ge(e,t);if(n.length){var r,o=Array.prototype.slice.call(arguments,2);En?r=En.delayedCallbacks:jn?r=jn:(r=jn=[],setTimeout(Dn,0));for(var a=function(e){r.push((function(){return n[e].apply(null,o)}))},i=0;i<n.length;++i)a(i)}}function Dn(){var e=jn;jn=null;for(var t=0;t<e.length;++t)e[t]()}function Nn(e,t,n,r){for(var o=0;o<t.changes.length;o++){var a=t.changes[o];"text"==a?In(e,t):"gutter"==a?Fn(e,t,n,r):"class"==a?Bn(e,t):"widget"==a&&Wn(e,t,r)}t.changes=null}function Ln(e){return e.node==e.text&&(e.node=x("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&u<8&&(e.node.style.zIndex=2)),e.node}function Rn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Ln(t);t.background=r.insertBefore(x("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function An(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):gn(e,t)}function In(e,t){var n=t.text.className,r=An(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Bn(e,t)):n&&(t.text.className=n)}function Bn(e,t){Rn(e,t),t.line.wrapClass?Ln(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Fn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Ln(t);t.gutterBackground=x("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var i=Ln(t),l=t.gutter=x("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),i.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(x("div",it(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.display.gutterSpecs.length;++u){var s=e.display.gutterSpecs[u].className,c=a.hasOwnProperty(s)&&a[s];c&&l.appendChild(x("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[s]+"px; width: "+r.gutterWidth[s]+"px"))}}}function Wn(e,t,n){t.alignable&&(t.alignable=null);for(var r=E("CodeMirror-linewidget"),o=t.node.firstChild,a=void 0;o;o=a)a=o.nextSibling,r.test(o.className)&&t.node.removeChild(o);Un(e,t,n)}function Vn(e,t,n,r){var o=An(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),Bn(e,t),Fn(e,t,n,r),Un(e,t,r),t.node}function Un(e,t,n){if(Gn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Gn(e,t.rest[r],t,n,!1)}function Gn(e,t,n,r,o){if(t.widgets)for(var a=Ln(n),i=0,l=t.widgets;i<l.length;++i){var u=l[i],s=x("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||s.setAttribute("cm-ignore-events","true"),Hn(u,s,n,r),e.display.input.setUneditable(s),o&&u.above?a.insertBefore(s,n.gutter||n.text):a.appendChild(s),xn(u,"redraw")}}function Hn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(o-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function zn(t){if(null!=t.height)return t.height;var n=t.doc.cm;if(!n)return 0;if(!N(e.body,t.node)){var r="position: relative;";t.coverGutter&&(r+="margin-left: -"+n.display.gutters.offsetWidth+"px;"),t.noHScroll&&(r+="width: "+n.display.wrapper.clientWidth+"px;"),j(n.display.measure,x("div",[t.node],null,r))}return t.height=t.node.parentNode.offsetHeight}function qn(e,t){for(var n=Te(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Kn(e){return e.lineSpace.offsetTop}function $n(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Yn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=j(e.measure,x("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Xn(e){return G-e.display.nativeBarWidth}function Jn(e){return e.display.scroller.clientWidth-Xn(e)-e.display.barWidth}function Qn(e){return e.display.scroller.clientHeight-Xn(e)-e.display.barHeight}function Zn(e,t,n){var r=e.options.lineWrapping,o=r&&Jn(e);if(!t.measure.heights||r&&t.measure.width!=o){var a=t.measure.heights=[];if(r){t.measure.width=o;for(var i=t.text.firstChild.getClientRects(),l=0;l<i.length-1;l++){var u=i[l],s=i[l+1];Math.abs(u.bottom-s.bottom)>2&&a.push((u.bottom+s.top)/2-n.top)}}a.push(n.bottom-n.top)}}function er(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var o=0;o<e.rest.length;o++)if(rt(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function tr(e,t){var n=rt(t=en(t)),r=e.display.externalMeasured=new Sn(e.doc,t,n);r.lineN=n;var o=r.built=gn(e,r);return r.text=o.pre,j(e.display.lineMeasure,o.pre),r}function nr(e,t,n,r){return ar(e,or(e,t),n,r)}function rr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Br(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function or(e,t){var n=rt(t),r=rr(e,n);r&&!r.text?r=null:r&&r.changes&&(Nn(e,r,n,Nr(e)),e.curOp.forceUpdate=!0),r||(r=tr(e,t));var o=er(r,t,n);return{line:t,view:r,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function ar(e,t,n,r,o){t.before&&(n=-1);var a,i=n+(r||"");return t.cache.hasOwnProperty(i)?a=t.cache[i]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Zn(e,t.view,t.rect),t.hasHeights=!0),(a=cr(e,t,n,r)).bogus||(t.cache[i]=a)),{left:a.left,right:a.right,top:o?a.rtop:a.top,bottom:o?a.rbottom:a.bottom}}var ir,lr={left:0,right:0,top:0,bottom:0};function ur(e,t,n){for(var r,o,a,i,l,u,s=0;s<e.length;s+=3)if(l=e[s],u=e[s+1],t<l?(o=0,a=1,i="left"):t<u?a=1+(o=t-l):(s==e.length-3||t==u&&e[s+3]>t)&&(o=(a=u-l)-1,t>=u&&(i="right")),null!=o){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(i=n),"left"==n&&0==o)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[2+(s-=3)],i="left";if("right"==n&&o==u-l)for(;s<e.length-3&&e[s+3]==e[s+4]&&!e[s+5].insertLeft;)r=e[(s+=3)+2],i="right";break}return{node:r,start:o,end:a,collapse:i,coverStart:l,coverEnd:u}}function sr(e,t){var n=lr;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function cr(e,t,n,r){var o,a=ur(t.map,n,r),i=a.node,s=a.start,c=a.end,d=a.collapse;if(3==i.nodeType){for(var f=0;f<4;f++){for(;s&&le(t.line.text.charAt(a.coverStart+s));)--s;for(;a.coverStart+c<a.coverEnd&&le(t.line.text.charAt(a.coverStart+c));)++c;if((o=l&&u<9&&0==s&&c==a.coverEnd-a.coverStart?i.parentNode.getBoundingClientRect():sr(P(i,s,c).getClientRects(),r)).left||o.right||0==s)break;c=s,s-=1,d="right"}l&&u<11&&(o=dr(e.display.measure,o))}else{var p;s>0&&(d=r="right"),o=e.options.lineWrapping&&(p=i.getClientRects()).length>1?p["right"==r?p.length-1:0]:i.getBoundingClientRect()}if(l&&u<9&&!s&&(!o||!o.left&&!o.right)){var h=i.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+Dr(e.display),top:h.top,bottom:h.bottom}:lr}for(var m=o.top-t.rect.top,y=o.bottom-t.rect.top,g=(m+y)/2,b=t.view.measure.heights,v=0;v<b.length-1&&!(g<b[v]);v++);var _=v?b[v-1]:0,w=b[v],O={left:("right"==d?o.right:o.left)-t.rect.left,right:("left"==d?o.left:o.right)-t.rect.left,top:_,bottom:w};return o.left||o.right||(O.bogus=!0),e.options.singleCursorHeightPerLine||(O.rtop=m,O.rbottom=y),O}function dr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!We(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function fr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function pr(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)fr(e.display.view[t])}function hr(e){pr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function mr(){return d&&b?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):window.pageXOffset||(e.documentElement||e.body).scrollLeft}function yr(){return d&&b?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):window.pageYOffset||(e.documentElement||e.body).scrollTop}function gr(e){var t=en(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=zn(t[r]));return n}function br(e,t,n,r,o){if(!o){var a=gr(t);n.top+=a,n.bottom+=a}if("line"==r)return n;r||(r="local");var i=un(t);if("local"==r?i+=Kn(e.display):i-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();i+=l.top+("window"==r?0:yr());var u=l.left+("window"==r?0:mr());n.left+=u,n.right+=u}return n.top+=i,n.bottom+=i,n}function vr(e,t,n){if("div"==n)return t;var r=t.left,o=t.top;if("page"==n)r-=mr(),o-=yr();else if("local"==n||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,o+=a.top}var i=e.display.lineSpace.getBoundingClientRect();return{left:r-i.left,top:o-i.top}}function _r(e,t,n,r,o){return r||(r=Ze(e.doc,t.line)),br(e,r,nr(e,r,t.ch,o),n)}function wr(e,t,n,r,o,a){function i(t,i){var l=ar(e,o,t,i?"right":"left",a);return i?l.left=l.right:l.right=l.left,br(e,r,l,n)}r=r||Ze(e.doc,t.line),o||(o=or(e,r));var l=he(r,e.doc.direction),u=t.ch,s=t.sticky;if(u>=r.text.length?(u=r.text.length,s="before"):u<=0&&(u=0,s="after"),!l)return i("before"==s?u-1:u,"before"==s);function c(e,t,n){return i(n?e-1:e,1==l[t].level!=n)}var d=fe(l,u,s),f=de,p=c(u,d,"before"==s);return null!=f&&(p.other=c(u,f,"before"!=s)),p}function Or(e,t){var n=0;t=ht(e.doc,t),e.options.lineWrapping||(n=Dr(e.display)*t.ch);var r=Ze(e.doc,t.line),o=un(r)+Kn(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function kr(e,t,n,r,o){var a=lt(e,t,n);return a.xRel=o,r&&(a.outside=r),a}function Sr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return kr(r.first,0,null,-1,-1);var o=ot(r,n),a=r.first+r.size-1;if(o>a)return kr(r.first+r.size-1,Ze(r,a).text.length,null,1,1);t<0&&(t=0);for(var i=Ze(r,o);;){var l=Tr(e,i,o,t,n),u=Qt(i,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var s=u.find(1);if(s.line==o)return s;i=Ze(r,o=s.line)}}function Cr(e,t,n,r){r-=gr(t);var o=t.text.length,a=se((function(t){return ar(e,n,t-1).bottom<=r}),o,0);return{begin:a,end:o=se((function(t){return ar(e,n,t).top>r}),a,o)}}function Er(e,t,n,r){return n||(n=or(e,t)),Cr(e,t,n,br(e,t,ar(e,n,r),"line").top)}function Pr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Tr(e,t,n,r,o){o-=un(t);var a=or(e,t),i=gr(t),l=0,u=t.text.length,s=!0,c=he(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?jr:Mr)(e,t,n,a,c,r,o);l=(s=1!=d.level)?d.from:d.to-1,u=s?d.to:d.from-1}var f,p,h=null,m=null,y=se((function(t){var n=ar(e,a,t);return n.top+=i,n.bottom+=i,!!Pr(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,m=n),!0)}),l,u),g=!1;if(m){var b=r-m.left<m.right-r,v=b==s;y=h+(v?0:1),p=v?"after":"before",f=b?m.left:m.right}else{s||y!=u&&y!=l||y++,p=0==y?"after":y==t.text.length?"before":ar(e,a,y-(s?1:0)).bottom+i<=o==s?"after":"before";var _=wr(e,lt(n,y,p),"line",t,a);f=_.left,g=o<_.top?-1:o>=_.bottom?1:0}return kr(n,y=ue(t.text,y,1),p,g,r-f)}function Mr(e,t,n,r,o,a,i){var l=se((function(l){var u=o[l],s=1!=u.level;return Pr(wr(e,lt(n,s?u.to:u.from,s?"before":"after"),"line",t,r),a,i,!0)}),0,o.length-1),u=o[l];if(l>0){var s=1!=u.level,c=wr(e,lt(n,s?u.from:u.to,s?"after":"before"),"line",t,r);Pr(c,a,i,!0)&&c.top>i&&(u=o[l-1])}return u}function jr(e,t,n,r,o,a,i){var l=Cr(e,t,r,i),u=l.begin,s=l.end;/\s/.test(t.text.charAt(s-1))&&s--;for(var c=null,d=null,f=0;f<o.length;f++){var p=o[f];if(!(p.from>=s||p.to<=u)){var h=ar(e,r,1!=p.level?Math.min(s,p.to)-1:Math.max(u,p.from)).right,m=h<a?a-h+1e9:h-a;(!c||d>m)&&(c=p,d=m)}}return c||(c=o[o.length-1]),c.from<u&&(c={from:u,to:c.to,level:c.level}),c.to>s&&(c={from:c.from,to:s,level:c.level}),c}function xr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ir){ir=x("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)ir.appendChild(e.createTextNode("x")),ir.appendChild(x("br"));ir.appendChild(e.createTextNode("x"))}j(t.measure,ir);var r=ir.offsetHeight/50;return r>3&&(t.cachedTextHeight=r),M(t.measure),r||1}function Dr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=x("span","xxxxxxxxxx"),n=x("pre",[t],"CodeMirror-line-like");j(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function Nr(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,a=t.gutters.firstChild,i=0;a;a=a.nextSibling,++i){var l=e.display.gutterSpecs[i].className;n[l]=a.offsetLeft+a.clientLeft+o,r[l]=a.clientWidth}return{fixedPos:Lr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Lr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Rr(e){var t=xr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Dr(e.display)-3);return function(o){if(an(e.doc,o))return 0;var a=0;if(o.widgets)for(var i=0;i<o.widgets.length;i++)o.widgets[i].height&&(a+=o.widgets[i].height);return n?a+(Math.ceil(o.text.length/r)||1)*t:a+t}}function Ar(e){var t=e.doc,n=Rr(e);t.iter((function(e){var t=n(e);t!=e.height&&nt(e,t)}))}function Ir(e,t,n,r){var o=e.display;if(!n&&"true"==Te(t).getAttribute("cm-not-content"))return null;var a,i,l=o.lineSpace.getBoundingClientRect();try{a=t.clientX-l.left,i=t.clientY-l.top}catch(e){return null}var u,s=Sr(e,a,i);if(r&&s.xRel>0&&(u=Ze(e.doc,s.line).text).length==s.ch){var c=W(u,u.length,e.options.tabSize)-u.length;s=lt(s.line,Math.max(0,Math.round((a-Yn(e.display).left)/Dr(e.display))-c))}return s}function Br(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Fr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var o=e.display;if(r&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Dt&&rn(e.doc,t)<o.viewTo&&Vr(e);else if(n<=o.viewFrom)Dt&&on(e.doc,n+r)>o.viewFrom?Vr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)Vr(e);else if(t<=o.viewFrom){var a=Ur(e,n,n+r,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=r):Vr(e)}else if(n>=o.viewTo){var i=Ur(e,t,t,-1);i?(o.view=o.view.slice(0,i.index),o.viewTo=i.lineN):Vr(e)}else{var l=Ur(e,t,t,-1),u=Ur(e,n,n+r,1);l&&u?(o.view=o.view.slice(0,l.index).concat(Cn(e,l.lineN,u.lineN)).concat(o.view.slice(u.index)),o.viewTo+=r):Vr(e)}var s=o.externalMeasured;s&&(n<s.lineN?s.lineN+=r:t<s.lineN+s.size&&(o.externalMeasured=null))}function Wr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[Br(e,t)];if(null!=a.node){var i=a.changes||(a.changes=[]);-1==U(i,n)&&i.push(n)}}}function Vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ur(e,t,n,r){var o,a=Br(e,t),i=e.display.view;if(!Dt||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var l=e.display.viewFrom,u=0;u<a;u++)l+=i[u].size;if(l!=t){if(r>0){if(a==i.length-1)return null;o=l+i[a].size-t,a++}else o=l-t;t+=o,n+=o}for(;rn(e.doc,n)!=n;){if(a==(r<0?0:i.length-1))return null;n+=r*i[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function Gr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Cn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Cn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Br(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Cn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Br(e,n)))),r.viewTo=n}function Hr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var o=t[r];o.hidden||o.node&&!o.changes||++n}return n}function zr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function qr(t,n){void 0===n&&(n=!0);var r=t.doc,o={},a=o.cursors=e.createDocumentFragment(),i=o.selection=e.createDocumentFragment(),l=t.options.$customCursor;l&&(n=!0);for(var u=0;u<r.sel.ranges.length;u++)if(n||u!=r.sel.primIndex){var s=r.sel.ranges[u];if(!(s.from().line>=t.display.viewTo||s.to().line<t.display.viewFrom)){var c=s.empty();if(l){var d=l(t,s);d&&Kr(t,d,a)}else(c||t.options.showCursorWhenSelecting)&&Kr(t,s.head,a);c||Yr(t,s,i)}}return o}function Kr(e,t,n){var r=wr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(x("div","\xa0","CodeMirror-cursor"));if(o.style.left=r.left+"px",o.style.top=r.top+"px",o.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=_r(e,t,"div",null,null),i=a.right-a.left;o.style.width=(i>0?i:e.defaultCharWidth())+"px"}if(r.other){var l=n.appendChild(x("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=r.other.left+"px",l.style.top=r.other.top+"px",l.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function $r(e,t){return e.top-t.top||e.left-t.left}function Yr(t,n,r){var o=t.display,a=t.doc,i=e.createDocumentFragment(),l=Yn(t.display),u=l.left,s=Math.max(o.sizerWidth,Jn(t)-o.sizer.offsetLeft)-l.right,c="ltr"==a.direction;function d(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(x("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function f(e,n,r){var o,i,l=Ze(a,e),f=l.text.length;function p(n,r){return _r(t,lt(e,n),"div",l,r)}function h(e,n,r){var o=Er(t,l,null,e),a="ltr"==n==("after"==r)?"left":"right";return p("after"==r?o.begin:o.end-(/\s/.test(l.text.charAt(o.end-1))?2:1),a)[a]}var m=he(l,a.direction);return ce(m,n||0,null==r?f:r,(function(e,t,a,l){var y="ltr"==a,g=p(e,y?"left":"right"),b=p(t-1,y?"right":"left"),v=null==n&&0==e,_=null==r&&t==f,w=0==l,O=!m||l==m.length-1;if(b.top-g.top<=3){var k=(c?_:v)&&O,S=(c?v:_)&&w?u:(y?g:b).left,C=k?s:(y?b:g).right;d(S,g.top,C-S,g.bottom)}else{var E,P,T,M;y?(E=c&&v&&w?u:g.left,P=c?s:h(e,a,"before"),T=c?u:h(t,a,"after"),M=c&&_&&O?s:b.right):(E=c?h(e,a,"before"):u,P=!c&&v&&w?s:g.right,T=!c&&_&&O?u:b.left,M=c?h(t,a,"after"):s),d(E,g.top,P-E,g.bottom),g.bottom<b.top&&d(u,g.bottom,null,b.top),d(T,b.top,M-T,b.bottom)}(!o||$r(g,o)<0)&&(o=g),$r(b,o)<0&&(o=b),(!i||$r(g,i)<0)&&(i=g),$r(b,i)<0&&(i=b)})),{start:o,end:i}}var p=n.from(),h=n.to();if(p.line==h.line)f(p.line,p.ch,h.ch);else{var m=Ze(a,p.line),y=Ze(a,h.line),g=en(m)==en(y),b=f(p.line,p.ch,g?m.text.length+1:null).end,v=f(h.line,g?0:null,h.ch).start;g&&(b.top<v.top-2?(d(b.right,b.top,null,b.bottom),d(u,v.top,v.left,v.bottom)):d(b.right,b.top,v.left-b.right,b.bottom)),b.bottom<v.top&&d(u,b.bottom,null,v.top)}r.appendChild(i)}function Xr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||eo(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Jr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Zr(e))}function Qr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&eo(e))}),100)}function Zr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Xr(e))}function eo(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function to(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,a=0,i=0;i<t.view.length;i++){var s=t.view[i],c=e.options.lineWrapping,d=void 0,f=0;if(!s.hidden){if(o+=s.line.height,l&&u<8){var p=s.node.offsetTop+s.node.offsetHeight;d=p-n,n=p}else{var h=s.node.getBoundingClientRect();d=h.bottom-h.top,!c&&s.text.firstChild&&(f=s.text.firstChild.getBoundingClientRect().right-h.left-1)}var m=s.line.height-d;if((m>.005||m<-.005)&&(o<r&&(a-=m),nt(s.line,d),no(s.line),s.rest))for(var y=0;y<s.rest.length;y++)no(s.rest[y]);if(f>e.display.sizerWidth){var g=Math.ceil(f/Dr(e.display));g>e.display.maxLineLength&&(e.display.maxLineLength=g,e.display.maxLine=s.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function no(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ro(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Kn(e));var o=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,a=ot(t,r),i=ot(t,o);if(n&&n.ensure){var l=n.ensure.from.line,u=n.ensure.to.line;l<a?(a=l,i=ot(t,un(Ze(t,l))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=i&&(a=ot(t,un(Ze(t,u))-e.wrapper.clientHeight),i=u)}return{from:a,to:Math.max(i,a+1)}}function oo(t,n){if(!_e(t,"scrollCursorIntoView")){var r=ET_Builder.Frames.top,o=t.display,a=o.sizer.getBoundingClientRect(),i=null;if(n.top+a.top<0?i=!0:n.bottom+a.top>(r.innerHeight||e.documentElement.clientHeight)&&(i=!1),null!=i&&!y){var l=x("div","\u200b",null,"position: absolute;\n top: "+(n.top-o.viewOffset-Kn(t.display))+"px;\n height: "+(n.bottom-n.top+Xn(t)+o.barHeight)+"px;\n left: "+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");t.display.lineSpace.appendChild(l),l.scrollIntoView(i),t.display.lineSpace.removeChild(l)}}}function ao(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?lt(t.line,t.ch+1,"before"):t,t=t.ch?lt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var i=!1,l=wr(e,t),u=n&&n!=t?wr(e,n):l,s=lo(e,o={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-r,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=s.scrollTop&&(mo(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(i=!0)),null!=s.scrollLeft&&(go(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(i=!0)),!i)break}return o}function io(e,t){var n=lo(e,t);null!=n.scrollTop&&mo(e,n.scrollTop),null!=n.scrollLeft&&go(e,n.scrollLeft)}function lo(e,t){var n=e.display,r=xr(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=Qn(e),i={};t.bottom-t.top>a&&(t.bottom=t.top+a);var l=e.doc.height+$n(n),u=t.top<r,s=t.bottom>l-r;if(t.top<o)i.scrollTop=u?0:t.top;else if(t.bottom>o+a){var c=Math.min(t.top,(s?l:t.bottom)-a);c!=o&&(i.scrollTop=c)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Jn(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?i.scrollLeft=0:t.left<f?i.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>p+f-3&&(i.scrollLeft=t.right+(h?0:10)-p),i}function uo(e,t){null!=t&&(po(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function so(e){po(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function co(e,t,n){null==t&&null==n||po(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function fo(e,t){po(e),e.curOp.scrollToPos=t}function po(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,ho(e,Or(e,t.from),Or(e,t.to),t.margin))}function ho(e,t,n,r){var o=lo(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});co(e,o.scrollLeft,o.scrollTop)}function mo(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||qo(e,{top:t}),yo(e,t,!0),r&&qo(e),Bo(e,100))}function yo(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function go(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Xo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function bo(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+$n(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Xn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var vo=function(e,t,n){this.cm=n;var r=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),ye(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),ye(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&u<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vo.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},vo.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vo.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vo.prototype.zeroWidthHack=function(){var e=_&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},vo.prototype.enableZeroWidthBar=function(t,n,r){function o(){var a=t.getBoundingClientRect();("vert"==r?e.elementFromPoint(a.right-1,(a.top+a.bottom)/2):e.elementFromPoint((a.right+a.left)/2,a.bottom-1))!=t?t.style.pointerEvents="none":n.set(1e3,o)}t.style.pointerEvents="auto",n.set(1e3,o)},vo.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var _o=function(){};function wo(e,t){t||(t=bo(e));var n=e.display.barWidth,r=e.display.barHeight;Oo(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&to(e),Oo(e,bo(e)),n=e.display.barWidth,r=e.display.barHeight}function Oo(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}_o.prototype.update=function(){return{bottom:0,right:0}},_o.prototype.setScrollLeft=function(){},_o.prototype.setScrollTop=function(){},_o.prototype.clear=function(){};var ko={native:vo,null:_o};function So(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ko[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ye(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?go(e,t):mo(e,t)}),e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Co=0;function Eo(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Co,markArrays:null},Pn(e.curOp)}function Po(e){var t=e.curOp;t&&Mn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;To(e)}))}function To(e){for(var t=e.ops,n=0;n<t.length;n++)Mo(t[n]);for(var r=0;r<t.length;r++)jo(t[r]);for(var o=0;o<t.length;o++)xo(t[o]);for(var a=0;a<t.length;a++)Do(t[a]);for(var i=0;i<t.length;i++)No(t[i])}function Mo(e){var t=e.cm,n=t.display;Vo(t),e.updateMaxLine&&cn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Wo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function jo(e){e.updatedDisplay=e.mustUpdate&&Ho(e.cm,e.update)}function xo(e){var t=e.cm,n=t.display;e.updatedDisplay&&to(t),e.barMeasure=bo(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=nr(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Xn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Jn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Do(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&go(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==L();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&wo(t,e.barMeasure),e.updatedDisplay&&Yo(t,e.barMeasure),e.selectionChanged&&Xr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Jr(e.cm)}function No(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&zo(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&yo(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&go(t,e.scrollLeft,!0,!0),e.scrollToPos&&oo(t,ao(t,ht(r,e.scrollToPos.from),ht(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var i=0;i<o.length;++i)o[i].lines.length||ve(o[i],"hide");if(a)for(var l=0;l<a.length;++l)a[l].lines.length&&ve(a[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Lo(e,t){if(e.curOp)return t();Eo(e);try{return t()}finally{Po(e)}}function Ro(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Eo(e);try{return t.apply(e,arguments)}finally{Po(e)}}}function Ao(e){return function(){if(this.curOp)return e.apply(this,arguments);Eo(this);try{return e.apply(this,arguments)}finally{Po(this)}}}function Io(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Eo(t);try{return e.apply(this,arguments)}finally{Po(t)}}}function Bo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(Fo,e))}function Fo(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=wt(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var i=a.styles,l=a.text.length>e.options.maxHighlightLength?Ye(t.mode,r.state):null,u=vt(e,a,r,!0);l&&(r.state=l),a.styles=u.styles;var s=a.styleClasses,c=u.classes;c?a.styleClasses=c:s&&(a.styleClasses=null);for(var d=!i||i.length!=a.styles.length||s!=c&&(!s||!c||s.bgClass!=c.bgClass||s.textClass!=c.textClass),f=0;!d&&f<i.length;++f)d=i[f]!=a.styles[f];d&&o.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Ot(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Bo(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&Lo(e,(function(){for(var t=0;t<o.length;t++)Wr(e,o[t],"text")}))}}var Wo=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ro(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Jn(e),this.force=n,this.dims=Nr(e),this.events=[]};function Vo(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Xn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Xn(e)+"px",t.scrollbarsClipped=!0)}function Uo(e){if(e.hasFocus())return null;var t=L();if(!t||!N(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&N(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Go(t){if(t&&t.activeElt&&t.activeElt!=L()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&N(e.body,t.anchorNode)&&N(e.body,t.focusNode))){var n=window.getSelection(),r=e.createRange();r.setEnd(t.anchorNode,t.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(t.focusNode,t.focusOffset)}}function Ho(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Vr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Hr(e))return!1;Jo(e)&&(Vr(e),t.dims=Nr(e));var o=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),i=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>i&&n.viewTo-i<20&&(i=Math.min(o,n.viewTo)),Dt&&(a=rn(e.doc,a),i=on(e.doc,i));var l=a!=n.viewFrom||i!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Gr(e,a,i),n.viewOffset=un(Ze(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Hr(e);if(!l&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var s=Uo(e);return u>4&&(n.lineDiv.style.display="none"),Ko(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Go(s),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Bo(e,400)),n.updateLineNumbers=null,!0}function zo(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Jn(e))r&&(t.visible=ro(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+$n(e.display)-Qn(e),n.top)}),t.visible=ro(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ho(e,t))break;to(e);var o=bo(e);zr(e),wo(e,o),Yo(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function qo(e,t){var n=new Wo(e,t);if(Ho(e,n)){to(e),zo(e,n);var r=bo(e);zr(e),wo(e,r),Yo(e,r),n.finish()}}function Ko(t,n,r){var o=t.display,a=t.options.lineNumbers,i=o.lineDiv,l=i.firstChild;function u(e){var n=e.nextSibling;return s&&_&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=o.view,d=o.viewFrom,f=0;f<c.length;f++){var p=c[f];if(p.hidden);else if(p.node&&p.node.parentNode==i){for(;l!=p.node;)l=u(l);var h=a&&null!=n&&n<=d&&p.lineNumber;p.changes&&(U(p.changes,"gutter")>-1&&(h=!1),Nn(t,p,d,r)),h&&(M(p.lineNumber),p.lineNumber.appendChild(e.createTextNode(it(t.options,d)))),l=p.node.nextSibling}else{var m=Vn(t,p,d,r);i.insertBefore(m,l)}d+=p.size}for(;l;)l=u(l)}function $o(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",xn(e,"gutterChanged",e)}function Yo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Xn(e)+"px"}function Xo(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Lr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,a=r+"px",i=0;i<n.length;i++)if(!n[i].hidden){e.options.fixedGutter&&(n[i].gutter&&(n[i].gutter.style.left=a),n[i].gutterBackground&&(n[i].gutterBackground.style.left=a));var l=n[i].alignable;if(l)for(var u=0;u<l.length;u++)l[u].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+o+"px")}}function Jo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=it(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var o=r.measure.appendChild(x("div",[x("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,i=o.offsetWidth-a;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-i)+1,r.lineNumWidth=r.lineNumInnerWidth+i,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",$o(e.display),!0}return!1}function Qo(e,t){for(var n=[],r=!1,o=0;o<e.length;o++){var a=e[o],i=null;if("string"!=typeof a&&(i=a.style,a=a.className),"CodeMirror-linenumbers"==a){if(!t)continue;r=!0}n.push({className:a,style:i})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Zo(e){var t=e.gutters,n=e.gutterSpecs;M(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var o=n[r],a=o.className,i=o.style,l=t.appendChild(x("div",null,"CodeMirror-gutter "+a));i&&(l.style.cssText=i),"CodeMirror-linenumbers"==a&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",$o(e)}function ea(e){Zo(e.display),Fr(e),Xo(e)}function ta(e,t,n,o){var a=this;this.input=n,a.scrollbarFiller=x("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=x("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=D("div",null,"CodeMirror-code"),a.selectionDiv=x("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=x("div",null,"CodeMirror-cursors"),a.measure=x("div",null,"CodeMirror-measure"),a.lineMeasure=x("div",null,"CodeMirror-measure"),a.lineSpace=D("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var i=D("div",[a.lineSpace],"CodeMirror-lines");a.mover=x("div",[i],null,"position: relative"),a.sizer=x("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=x("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),a.gutters=x("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=x("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=x("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),a.wrapper.setAttribute("translate","no"),l&&u<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),s||r&&v||(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=Qo(o.gutters,o.lineNumbers),Zo(a),n.init(a)}Wo.prototype.signal=function(e,t){Oe(e,t)&&this.events.push(arguments)},Wo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};var na=0,ra=null;function oa(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function aa(e){var t=oa(e);return t.x*=ra,t.y*=ra,t}function ia(e,t){d&&f>=102&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var n=oa(t),o=n.x,a=n.y,i=ra;0===t.deltaMode&&(o=t.deltaX,a=t.deltaY,i=1);var l=e.display,u=l.scroller,c=u.scrollWidth>u.clientWidth,h=u.scrollHeight>u.clientHeight;if(o&&c||a&&h){if(a&&_&&s)e:for(var m=t.target,y=l.view;m!=u;m=m.parentNode)for(var g=0;g<y.length;g++)if(y[g].node==m){e.display.currentWheelTarget=m;break e}if(o&&!r&&!p&&null!=i)return a&&h&&mo(e,Math.max(0,u.scrollTop+a*i)),go(e,Math.max(0,u.scrollLeft+o*i)),(!a||a&&h)&&Se(t),void(l.wheelStartX=null);if(a&&null!=i){var b=a*i,v=e.doc.scrollTop,w=v+l.wrapper.clientHeight;b<0?v=Math.max(0,v+b-50):w=Math.min(e.doc.height,w+b+50),qo(e,{top:v,bottom:w})}na<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=u.scrollLeft,l.wheelStartY=u.scrollTop,l.wheelDX=o,l.wheelDY=a,setTimeout((function(){if(null!=l.wheelStartX){var e=u.scrollLeft-l.wheelStartX,t=u.scrollTop-l.wheelStartY,n=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,n&&(ra=(ra*na+n)/(na+1),++na)}}),200)):(l.wheelDX+=o,l.wheelDY+=a))}}l?ra=-.53:r?ra=15:d?ra=-.7:h&&(ra=-1/3);var la=function(e,t){this.ranges=e,this.primIndex=t};la.prototype.primary=function(){return this.ranges[this.primIndex]},la.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!st(n.anchor,r.anchor)||!st(n.head,r.head))return!1}return!0},la.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ua(ct(this.ranges[t].anchor),ct(this.ranges[t].head));return new la(e,this.primIndex)},la.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},la.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ut(t,r.from())>=0&&ut(e,r.to())<=0)return n}return-1};var ua=function(e,t){this.anchor=e,this.head=t};function sa(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return ut(e.from(),t.from())})),n=U(t,o);for(var a=1;a<t.length;a++){var i=t[a],l=t[a-1],u=ut(l.to(),i.from());if(r&&!i.empty()?u>0:u>=0){var s=ft(l.from(),i.from()),c=dt(l.to(),i.to()),d=l.empty()?i.from()==i.head:l.from()==l.head;a<=n&&--n,t.splice(--a,2,new ua(d?c:s,d?s:c))}}return new la(t,n)}function ca(e,t){return new la([new ua(e,t||e)],0)}function da(e){return e.text?lt(e.from.line+e.text.length-1,J(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function fa(e,t){if(ut(e,t.from)<0)return e;if(ut(e,t.to)<=0)return da(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=da(t).ch-t.to.ch),lt(n,r)}function pa(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var o=e.sel.ranges[r];n.push(new ua(fa(o.anchor,t),fa(o.head,t)))}return sa(e.cm,n,e.sel.primIndex)}function ha(e,t,n){return e.line==t.line?lt(n.line,e.ch-t.ch+n.ch):lt(n.line+(e.line-t.line),e.ch)}function ma(e,t,n){for(var r=[],o=lt(e.first,0),a=o,i=0;i<t.length;i++){var l=t[i],u=ha(l.from,o,a),s=ha(da(l),o,a);if(o=l.to,a=s,"around"==n){var c=e.sel.ranges[i],d=ut(c.head,c.anchor)<0;r[i]=new ua(d?s:u,d?u:s)}else r[i]=new ua(u,u)}return new la(r,e.sel.primIndex)}function ya(e){e.doc.mode=qe(e.options,e.doc.modeOption),ga(e)}function ga(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Bo(e,100),e.state.modeGen++,e.curOp&&Fr(e)}function ba(e,t){return 0==t.from.ch&&0==t.to.ch&&""==J(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function va(e,t,n,r){function o(e){return n?n[e]:null}function a(e,n,o){fn(e,n,o,r),xn(e,"change",e,t)}function i(e,t){for(var n=[],a=e;a<t;++a)n.push(new dn(s[a],o(a),r));return n}var l=t.from,u=t.to,s=t.text,c=Ze(e,l.line),d=Ze(e,u.line),f=J(s),p=o(s.length-1),h=u.line-l.line;if(t.full)e.insert(0,i(0,s.length)),e.remove(s.length,e.size-s.length);else if(ba(e,t)){var m=i(0,s.length-1);a(d,d.text,p),h&&e.remove(l.line,h),m.length&&e.insert(l.line,m)}else if(c==d)if(1==s.length)a(c,c.text.slice(0,l.ch)+f+c.text.slice(u.ch),p);else{var y=i(1,s.length-1);y.push(new dn(f+c.text.slice(u.ch),p,r)),a(c,c.text.slice(0,l.ch)+s[0],o(0)),e.insert(l.line+1,y)}else if(1==s.length)a(c,c.text.slice(0,l.ch)+s[0]+d.text.slice(u.ch),o(0)),e.remove(l.line+1,h);else{a(c,c.text.slice(0,l.ch)+s[0],o(0)),a(d,f+d.text.slice(u.ch),p);var g=i(1,s.length-1);h>1&&e.remove(l.line+1,h-1),e.insert(l.line+1,g)}xn(e,"change",e,t)}function _a(e,t,n){function r(e,o,a){if(e.linked)for(var i=0;i<e.linked.length;++i){var l=e.linked[i];if(l.doc!=o){var u=a&&l.sharedHist;n&&!u||(t(l.doc,u),r(l.doc,e,u))}}}r(e,null,!0)}function wa(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ar(e),ya(e),Oa(e),e.options.direction=t.direction,e.options.lineWrapping||cn(e),e.options.mode=t.modeOption,Fr(e)}function Oa(e){("rtl"==e.doc.direction?R:T)(e.display.lineDiv,"CodeMirror-rtl")}function ka(e){Lo(e,(function(){Oa(e),Fr(e)}))}function Sa(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Ca(e,t){var n={from:ct(t.from),to:da(t),text:et(e,t.from,t.to)};return Da(e,n,t.from.line,t.to.line+1),_a(e,(function(e){return Da(e,n,t.from.line,t.to.line+1)}),!0),n}function Ea(e){for(;e.length&&J(e).ranges;)e.pop()}function Pa(e,t){return t?(Ea(e.done),J(e.done)):e.done.length&&!J(e.done).ranges?J(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),J(e.done)):void 0}function Ta(e,t,n,r){var o=e.history;o.undone.length=0;var a,i,l=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=Pa(o,o.lastOp==r)))i=J(a.changes),0==ut(t.from,t.to)&&0==ut(t.from,i.to)?i.to=da(t):a.changes.push(Ca(e,t));else{var u=J(o.done);for(u&&u.ranges||xa(e.sel,o.done),a={changes:[Ca(e,t)],generation:o.generation},o.done.push(a);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,i||ve(e,"historyAdded")}function Ma(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ja(e,t,n,r){var o=e.history,a=r&&r.origin;n==o.lastSelOp||a&&o.lastSelOrigin==a&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==a||Ma(e,a,J(o.done),t))?o.done[o.done.length-1]=t:xa(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=n,r&&!1!==r.clearRedo&&Ea(o.undone)}function xa(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Da(e,t,n,r){var o=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function Na(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function La(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],o=0;o<t.text.length;++o)r.push(Na(n[o]));return r}function Ra(e,t){var n=La(e,t),r=Vt(e,t);if(!n)return r;if(!r)return n;for(var o=0;o<n.length;++o){var a=n[o],i=r[o];if(a&&i)e:for(var l=0;l<i.length;++l){for(var u=i[l],s=0;s<a.length;++s)if(a[s].marker==u.marker)continue e;a.push(u)}else i&&(n[o]=i)}return n}function Aa(e,t,n){for(var r=[],o=0;o<e.length;++o){var a=e[o];if(a.ranges)r.push(n?la.prototype.deepCopy.call(a):a);else{var i=a.changes,l=[];r.push({changes:l});for(var u=0;u<i.length;++u){var s=i[u],c=void 0;if(l.push({from:s.from,to:s.to,text:s.text}),t)for(var d in s)(c=d.match(/^spans_(\d+)$/))&&U(t,Number(c[1]))>-1&&(J(l)[d]=s[d],delete s[d])}}}return r}function Ia(e,t,n,r){if(r){var o=e.anchor;if(n){var a=ut(t,o)<0;a!=ut(n,o)<0?(o=t,t=n):a!=ut(t,n)<0&&(t=n)}return new ua(o,t)}return new ua(n||t,t)}function Ba(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Ha(e,new la([Ia(e.sel.primary(),t,n,o)],0),r)}function Fa(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=Ia(e.sel.ranges[a],t[a],null,o);Ha(e,sa(e.cm,r,e.sel.primIndex),n)}function Wa(e,t,n,r){var o=e.sel.ranges.slice(0);o[t]=n,Ha(e,sa(e.cm,o,e.sel.primIndex),r)}function Va(e,t,n,r){Ha(e,ca(t,n),r)}function Ua(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new ua(ht(e,t[n].anchor),ht(e,t[n].head))},origin:n&&n.origin};return ve(e,"beforeSelectionChange",e,r),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?sa(e.cm,r.ranges,r.ranges.length-1):t}function Ga(e,t,n){var r=e.history.done,o=J(r);o&&o.ranges?(r[r.length-1]=t,za(e,t,n)):Ha(e,t,n)}function Ha(e,t,n){za(e,t,n),ja(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function za(e,t,n){(Oe(e,"beforeSelectionChange")||e.cm&&Oe(e.cm,"beforeSelectionChange"))&&(t=Ua(e,t,n));var r=n&&n.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);qa(e,$a(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||so(e.cm)}function qa(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,we(e.cm)),xn(e,"cursorActivity",e))}function Ka(e){qa(e,$a(e,e.sel,null,!1))}function $a(e,t,n,r){for(var o,a=0;a<t.ranges.length;a++){var i=t.ranges[a],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],u=Xa(e,i.anchor,l&&l.anchor,n,r),s=Xa(e,i.head,l&&l.head,n,r);(o||u!=i.anchor||s!=i.head)&&(o||(o=t.ranges.slice(0,a)),o[a]=new ua(u,s))}return o?sa(e.cm,o,t.primIndex):t}function Ya(e,t,n,r,o){var a=Ze(e,t.line);if(a.markedSpans)for(var i=0;i<a.markedSpans.length;++i){var l=a.markedSpans[i],u=l.marker,s="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,c="selectRight"in u?!u.selectRight:u.inclusiveRight;if((null==l.from||(s?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(c?l.to>=t.ch:l.to>t.ch))){if(o&&(ve(u,"beforeCursorEnter"),u.explicitlyCleared)){if(a.markedSpans){--i;continue}break}if(!u.atomic)continue;if(n){var d=u.find(r<0?1:-1),f=void 0;if((r<0?c:s)&&(d=Ja(e,d,-r,d&&d.line==t.line?a:null)),d&&d.line==t.line&&(f=ut(d,n))&&(r<0?f<0:f>0))return Ya(e,d,t,r,o)}var p=u.find(r<0?-1:1);return(r<0?s:c)&&(p=Ja(e,p,r,p.line==t.line?a:null)),p?Ya(e,p,t,r,o):null}}return t}function Xa(e,t,n,r,o){var a=r||1,i=Ya(e,t,n,a,o)||!o&&Ya(e,t,n,a,!0)||Ya(e,t,n,-a,o)||!o&&Ya(e,t,n,-a,!0);return i||(e.cantEdit=!0,lt(e.first,0))}function Ja(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ht(e,lt(t.line-1)):null:n>0&&t.ch==(r||Ze(e,t.line)).text.length?t.line<e.first+e.size-1?lt(t.line+1,0):null:new lt(t.line,t.ch+n)}function Qa(e){e.setSelection(lt(e.firstLine(),0),lt(e.lastLine()),z)}function Za(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,o,a){t&&(r.from=ht(e,t)),n&&(r.to=ht(e,n)),o&&(r.text=o),void 0!==a&&(r.origin=a)}),ve(e,"beforeChange",e,r),e.cm&&ve(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ei(e,t,n){if(e.cm){if(!e.cm.curOp)return Ro(e.cm,ei)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"))||(t=Za(e,t,!0))){var r=xt&&!n&&Gt(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)ti(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else ti(e,t)}}function ti(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ut(t.from,t.to)){var n=pa(e,t);Ta(e,t,n,e.cm?e.cm.curOp.id:NaN),oi(e,t,n,Vt(e,t));var r=[];_a(e,(function(e,n){n||-1!=U(r,e.history)||(si(e.history,t),r.push(e.history)),oi(e,t,null,Vt(e,t))}))}}function ni(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,a=e.history,i=e.sel,l="undo"==t?a.done:a.undone,u="undo"==t?a.undone:a.done,s=0;s<l.length&&(o=l[s],n?!o.ranges||o.equals(e.sel):o.ranges);s++);if(s!=l.length){for(a.lastOrigin=a.lastSelOrigin=null;;){if(!(o=l.pop()).ranges){if(r)return void l.push(o);break}if(xa(o,u),n&&!o.equals(e.sel))return void Ha(e,o,{clearRedo:!1});i=o}var c=[];xa(i,u),u.push({changes:c,generation:a.generation}),a.generation=o.generation||++a.maxGeneration;for(var d=Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"),f=function(n){var r=o.changes[n];if(r.origin=t,d&&!Za(e,r,!1))return l.length=0,{};c.push(Ca(e,r));var a=n?pa(e,r):J(l);oi(e,r,a,Ra(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:da(r)});var i=[];_a(e,(function(e,t){t||-1!=U(i,e.history)||(si(e.history,r),i.push(e.history)),oi(e,r,null,Ra(e,r))}))},p=o.changes.length-1;p>=0;--p){var h=f(p);if(h)return h.v}}}}function ri(e,t){if(0!=t&&(e.first+=t,e.sel=new la(Q(e.sel.ranges,(function(e){return new ua(lt(e.anchor.line+t,e.anchor.ch),lt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Fr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Wr(e.cm,r,"gutter")}}function oi(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ro(e.cm,oi)(e,t,n,r);if(t.to.line<e.first)ri(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);ri(e,o),t={from:lt(e.first,0),to:lt(t.to.line+o,t.to.ch),text:[J(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:lt(a,Ze(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=et(e,t.from,t.to),n||(n=pa(e,t)),e.cm?ai(e.cm,t,r):va(e,t,r),za(e,n,z),e.cantEdit&&Xa(e,lt(e.firstLine(),0))&&(e.cantEdit=!1)}}function ai(e,t,n){var r=e.doc,o=e.display,a=t.from,i=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=rt(en(Ze(r,a.line))),r.iter(u,i.line+1,(function(e){if(e==o.maxLine)return l=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&we(e),va(r,t,n,Rr(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,(function(e){var t=sn(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),jt(r,a.line),Bo(e,400);var s=t.text.length-(i.line-a.line)-1;t.full?Fr(e):a.line!=i.line||1!=t.text.length||ba(e.doc,t)?Fr(e,a.line,i.line+1,s):Wr(e,a.line,"text");var c=Oe(e,"changes"),d=Oe(e,"change");if(d||c){var f={from:a,to:i,text:t.text,removed:t.removed,origin:t.origin};d&&xn(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function ii(e,t,n,r,o){var a;r||(r=n),ut(r,n)<0&&(n=(a=[r,n])[0],r=a[1]),"string"==typeof t&&(t=e.splitLines(t)),ei(e,{from:n,to:r,text:t,origin:o})}function li(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function ui(e,t,n,r){for(var o=0;o<e.length;++o){var a=e[o],i=!0;if(a.ranges){a.copied||((a=e[o]=a.deepCopy()).copied=!0);for(var l=0;l<a.ranges.length;l++)li(a.ranges[l].anchor,t,n,r),li(a.ranges[l].head,t,n,r)}else{for(var u=0;u<a.changes.length;++u){var s=a.changes[u];if(n<s.from.line)s.from=lt(s.from.line+r,s.from.ch),s.to=lt(s.to.line+r,s.to.ch);else if(t<=s.to.line){i=!1;break}}i||(e.splice(0,o+1),o=0)}}}function si(e,t){var n=t.from.line,r=t.to.line,o=t.text.length-(r-n)-1;ui(e.done,n,r,o),ui(e.undone,n,r,o)}function ci(e,t,n,r){var o=t,a=t;return"number"==typeof t?a=Ze(e,pt(e,t)):o=rt(t),null==o?null:(r(a,o)&&e.cm&&Wr(e.cm,o,n),a)}function di(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function fi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var o=e[r];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}ua.prototype.from=function(){return ft(this.anchor,this.head)},ua.prototype.to=function(){return dt(this.anchor,this.head)},ua.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},di.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var o=this.lines[n];this.height-=o.height,pn(o),xn(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},fi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<o){var a=Math.min(t,o-e),i=r.height;if(r.removeInner(e,a),this.height-=i-r.height,o==a&&(this.children.splice(n--,1),r.parent=null),0==(t-=a))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof di))){var l=[];this.collapse(l),this.children=[new di(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=this.children[r],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var i=o.lines.length%25+25,l=i;l<o.lines.length;){var u=new di(o.lines.slice(l,l+=25));o.height-=u.height,this.children.splice(++r,0,u),u.parent=this}o.lines=o.lines.slice(0,i),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new fi(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=U(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new fi(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var o=this.children[r],a=o.chunkSize();if(e<a){var i=Math.min(t,a-e);if(o.iterN(e,i,n))return!0;if(0==(t-=i))break;e=0}else e-=a}}};var pi=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function hi(e,t,n){un(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&uo(e,n)}function mi(e,t,n,r){var o=new pi(e,n,r),a=e.cm;return a&&o.noHScroll&&(a.display.alignWidgets=!0),ci(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length,Math.max(0,o.insertAt)),0,o),o.line=t,a&&!an(e,t)){var r=un(t)<e.scrollTop;nt(t,t.height+zn(o)),r&&uo(a,o.height),a.curOp.forceUpdate=!0}return!0})),a&&xn(a,"lineWidgetAdded",a,o,"number"==typeof t?t:rt(t)),o}pi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=rt(n);if(null!=r&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var a=zn(this);nt(n,Math.max(0,n.height-a)),e&&(Lo(e,(function(){hi(e,n,-a),Wr(e,r,"widget")})),xn(e,"lineWidgetCleared",e,this,r))}},pi.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var o=zn(this)-t;o&&(an(this.doc,r)||nt(r,r.height+o),n&&Lo(n,(function(){n.curOp.forceUpdate=!0,hi(n,r,o),xn(n,"lineWidgetChanged",n,e,rt(r))})))},ke(pi);var yi=0,gi=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++yi};function bi(e,t,n,r,o){if(r&&r.shared)return _i(e,t,n,r,o);if(e.cm&&!e.cm.curOp)return Ro(e.cm,bi)(e,t,n,r,o);var a=new gi(e,o),i=ut(t,n);if(r&&F(r,a,!1),i>0||0==i&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=D("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Zt(e,t.line,t,n,a)||t.line!=n.line&&Zt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Lt()}a.addToHistory&&Ta(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,u=t.line,s=e.cm;if(e.iter(u,n.line+1,(function(r){s&&a.collapsed&&!s.options.lineWrapping&&en(r)==s.display.maxLine&&(l=!0),a.collapsed&&u!=t.line&&nt(r,0),Bt(r,new Rt(a,u==t.line?t.ch:null,u==n.line?n.ch:null),e.cm&&e.cm.curOp),++u})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){an(e,t)&&nt(t,0)})),a.clearOnEnter&&ye(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(Nt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++yi,a.atomic=!0),s){if(l&&(s.curOp.updateMaxLine=!0),a.collapsed)Fr(s,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var c=t.line;c<=n.line;c++)Wr(s,c,"text");a.atomic&&Ka(s.doc),xn(s,"markerAdded",s,a)}return a}gi.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Eo(e),Oe(this,"clear")){var n=this.find();n&&xn(this,"clear",n.from,n.to)}for(var r=null,o=null,a=0;a<this.lines.length;++a){var i=this.lines[a],l=At(i.markedSpans,this);e&&!this.collapsed?Wr(e,rt(i),"text"):e&&(null!=l.to&&(o=rt(i)),null!=l.from&&(r=rt(i))),i.markedSpans=It(i.markedSpans,l),null==l.from&&this.collapsed&&!an(this.doc,i)&&e&&nt(i,xr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var s=en(this.lines[u]),c=sn(s);c>e.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Fr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ka(e.doc)),e&&xn(e,"markerCleared",e,this,r,o),t&&Po(e),this.parent&&this.parent.clear()}},gi.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var a=this.lines[o],i=At(a.markedSpans,this);if(null!=i.from&&(n=lt(t?a:rt(a),i.from),-1==e))return n;if(null!=i.to&&(r=lt(t?a:rt(a),i.to),1==e))return r}return n&&{from:n,to:r}},gi.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Lo(r,(function(){var o=t.line,a=rt(t.line),i=rr(r,a);if(i&&(fr(i),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!an(n.doc,o)&&null!=n.height){var l=n.height;n.height=null;var u=zn(n)-l;u&&nt(o,o.height+u)}xn(r,"markerChanged",r,e)}))},gi.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=U(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},gi.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ke(gi);var vi=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function _i(e,t,n,r,o){(r=F(r)).shared=!1;var a=[bi(e,t,n,r,o)],i=a[0],l=r.widgetNode;return _a(e,(function(e){l&&(r.widgetNode=l.cloneNode(!0)),a.push(bi(e,ht(e,t),ht(e,n),r,o));for(var u=0;u<e.linked.length;++u)if(e.linked[u].isParent)return;i=J(a)})),new vi(a,i)}function wi(e){return e.findMarks(lt(e.first,0),e.clipPos(lt(e.lastLine())),(function(e){return e.parent}))}function Oi(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=r.find(),a=e.clipPos(o.from),i=e.clipPos(o.to);if(ut(a,i)){var l=bi(e,a,i,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function ki(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];_a(n.primary.doc,(function(e){return r.push(e)}));for(var o=0;o<n.markers.length;o++){var a=n.markers[o];-1==U(r,a.doc)&&(a.parent=null,n.markers.splice(o--,1))}},n=0;n<e.length;n++)t(n)}vi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();xn(this,"clear")}},vi.prototype.find=function(e,t){return this.primary.find(e,t)},ke(vi);var Si=0,Ci=function(e,t,n,r,o){if(!(this instanceof Ci))return new Ci(e,t,n,r,o);null==n&&(n=0),fi.call(this,[new di([new dn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=lt(n,0);this.sel=ca(a),this.history=new Sa(null),this.id=++Si,this.modeOption=t,this.lineSep=r,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),va(this,{from:a,to:a,text:e}),Ha(this,ca(a),z)};Ci.prototype=te(fi.prototype,{constructor:Ci,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=tt(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Io((function(e){var t=lt(this.first,0),n=this.first+this.size-1;ei(this,{from:t,to:lt(n,Ze(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&co(this.cm,0,0),Ha(this,ca(t),z)})),replaceRange:function(e,t,n,r){ii(this,e,t=ht(this,t),n=n?ht(this,n):t,r)},getRange:function(e,t,n){var r=et(this,ht(this,e),ht(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(at(this,e))return Ze(this,e)},getLineNumber:function(e){return rt(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ze(this,e)),en(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ht(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Io((function(e,t,n){Va(this,ht(this,"number"==typeof e?lt(e,t||0):e),null,n)})),setSelection:Io((function(e,t,n){Va(this,ht(this,e),ht(this,t||e),n)})),extendSelection:Io((function(e,t,n){Ba(this,ht(this,e),t&&ht(this,t),n)})),extendSelections:Io((function(e,t){Fa(this,yt(this,e),t)})),extendSelectionsBy:Io((function(e,t){Fa(this,yt(this,Q(this.sel.ranges,e)),t)})),setSelections:Io((function(e,t,n){if(e.length){for(var r=[],o=0;o<e.length;o++)r[o]=new ua(ht(this,e[o].anchor),ht(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Ha(this,sa(this.cm,r,t),n)}})),addSelection:Io((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new ua(ht(this,e),ht(this,t||e))),Ha(this,sa(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var o=et(this,n[r].from(),n[r].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var o=et(this,n[r].from(),n[r].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[r]=o}return t},replaceSelection:function(e,t,n){for(var r=[],o=0;o<this.sel.ranges.length;o++)r[o]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Io((function(e,t,n){for(var r=[],o=this.sel,a=0;a<o.ranges.length;a++){var i=o.ranges[a];r[a]={from:i.from(),to:i.to(),text:this.splitLines(e[a]),origin:n}}for(var l=t&&"end"!=t&&ma(this,r,t),u=r.length-1;u>=0;u--)ei(this,r[u]);l?Ga(this,l):this.cm&&so(this.cm)})),undo:Io((function(){ni(this,"undo")})),redo:Io((function(){ni(this,"redo")})),undoSelection:Io((function(){ni(this,"undo",!0)})),redoSelection:Io((function(){ni(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Sa(this.history),_a(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Aa(this.history.done),undone:Aa(this.history.undone)}},setHistory:function(e){var t=this.history=new Sa(this.history);t.done=Aa(e.done.slice(0),null,!0),t.undone=Aa(e.undone.slice(0),null,!0)},setGutterMarker:Io((function(e,t,n){return ci(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&ae(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Io((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&ci(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,ae(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!at(this,e))return null;if(t=e,!(e=Ze(this,e)))return null}else if(null==(t=rt(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Io((function(e,t,n){return ci(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(E(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Io((function(e,t,n){return ci(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[r];if(!o)return!1;if(null==n)e[r]=null;else{var a=o.match(E(n));if(!a)return!1;var i=a.index+a[0].length;e[r]=o.slice(0,a.index)+(a.index&&i!=o.length?" ":"")+o.slice(i)||null}return!0}))})),addLineWidget:Io((function(e,t,n){return mi(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return bi(this,ht(this,e),ht(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return bi(this,e=ht(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ze(this,(e=ht(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=ht(this,e),t=ht(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(a){var i=a.markedSpans;if(i)for(var l=0;l<i.length;l++){var u=i[l];null!=u.to&&o==e.line&&e.ch>=u.to||null==u.from&&o!=e.line||null!=u.from&&o==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(o){var a=o.text.length+r;if(a>e)return t=e,!0;e-=a,++n})),ht(this,lt(n,t))},indexFromPos:function(e){var t=(e=ht(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ci(tt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ci(tt(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Oi(r,wi(this)),r},unlinkDoc:function(e){if(e instanceof Fl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),ki(wi(this));break}if(e.history==this.history){var n=[e.id];_a(e,(function(e){return n.push(e.id)}),!0),e.history=new Sa(null),e.history.done=Aa(this.history.done,n),e.history.undone=Aa(this.history.undone,n)}},iterLinkedDocs:function(e){_a(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ae(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Io((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&ka(this.cm))}))}),Ci.prototype.eachLine=Ci.prototype.iter;var Ei=0;function Pi(e){var t=this;if(ji(t),!_e(t,e)&&!qn(t.display,e)){Se(e),l&&(Ei=+new Date);var n=Ir(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var o=r.length,a=Array(o),i=0,u=function(){++i==o&&Ro(t,(function(){var e={from:n=ht(t.doc,n),to:n,text:t.doc.splitLines(a.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ei(t.doc,e),Ga(t.doc,ca(ht(t.doc,n),ht(t.doc,da(e))))}))()},s=function(e,n){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))u();else{var r=new FileReader;r.onerror=function(){return u()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(a[n]=e),u()},r.readAsText(e)}},c=0;c<r.length;c++)s(r[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),za(t.doc,ca(n,n)),f)for(var p=0;p<f.length;++p)ii(t.doc,"",f[p].anchor,f[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ti(e,t){if(l&&(!e.state.draggingText||+new Date-Ei<100))Pe(t);else if(!_e(e,t)&&!qn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=x("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),p&&n.parentNode.removeChild(n)}}function Mi(t,n){var r=Ir(t,n);if(r){var o=e.createDocumentFragment();Kr(t,r,o),t.display.dragCursor||(t.display.dragCursor=x("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),j(t.display.dragCursor,o)}}function ji(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function xi(t){if(e.getElementsByClassName){for(var n=e.getElementsByClassName("CodeMirror"),r=[],o=0;o<n.length;o++){var a=n[o].CodeMirror;a&&r.push(a)}r.length&&r[0].operation((function(){for(var e=0;e<r.length;e++)t(r[e])}))}}var Di=!1;function Ni(){Di||(Li(),Di=!0)}function Li(){var e;ye(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,xi(Ri)}),100))})),ye(window,"blur",(function(){return xi(eo)}))}function Ri(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ai={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ii=0;Ii<10;Ii++)Ai[Ii+48]=Ai[Ii+96]=String(Ii);for(var Bi=65;Bi<=90;Bi++)Ai[Bi]=String.fromCharCode(Bi);for(var Fi=1;Fi<=12;Fi++)Ai[Fi+111]=Ai[Fi+63235]="F"+Fi;var Wi={};function Vi(e){var t,n,r,o,a=e.split(/-(?!$)/);e=a[a.length-1];for(var i=0;i<a.length-1;i++){var l=a[i];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ui(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var o=Q(n.split(" "),Vi),a=0;a<o.length;a++){var i=void 0,l=void 0;a==o.length-1?(l=o.join(" "),i=r):(l=o.slice(0,a+1).join(" "),i="...");var u=t[l];if(u){if(u!=i)throw new Error("Inconsistent bindings for "+l)}else t[l]=i}delete e[n]}for(var s in t)e[s]=t[s];return e}function Gi(e,t,n,r){var o=(t=Ki(t)).call?t.call(e,r):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Gi(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var i=Gi(e,t.fallthrough[a],n,r);if(i)return i}}}function Hi(e){var t="string"==typeof e?e:Ai[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function zi(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(S?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(S?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function qi(e,t){if(p&&34==e.keyCode&&e.char)return!1;var n=Ai[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),zi(n,e,t))}function Ki(e){return"string"==typeof e?Wi[e]:e}function $i(e,t){for(var n=e.doc.sel.ranges,r=[],o=0;o<n.length;o++){for(var a=t(n[o]);r.length&&ut(a.from,J(r).to)<=0;){var i=r.pop();if(ut(i.from,a.from)<0){a.from=i.from;break}}r.push(a)}Lo(e,(function(){for(var t=r.length-1;t>=0;t--)ii(e.doc,"",r[t].from,r[t].to,"+delete");so(e)}))}function Yi(e,t,n){var r=ue(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Xi(e,t,n){var r=Yi(e,t.ch,n);return null==r?null:new lt(t.line,r,n<0?"after":"before")}function Ji(e,t,n,r,o){if(e){"rtl"==t.doc.direction&&(o=-o);var a=he(n,t.doc.direction);if(a){var i,l=o<0?J(a):a[0],u=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var s=or(t,n);i=o<0?n.text.length-1:0;var c=ar(t,s,i).top;i=se((function(e){return ar(t,s,e).top==c}),o<0==(1==l.level)?l.from:l.to-1,i),"before"==u&&(i=Yi(n,i,1))}else i=o<0?l.to:l.from;return new lt(r,i,u)}}return new lt(r,o<0?n.text.length:0,o<0?"before":"after")}function Qi(e,t,n,r){var o=he(t,e.doc.direction);if(!o)return Xi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=fe(o,n.ch,n.sticky),i=o[a];if("ltr"==e.doc.direction&&i.level%2==0&&(r>0?i.to>n.ch:i.from<n.ch))return Xi(t,n,r);var l,u=function(e,n){return Yi(t,e instanceof lt?e.ch:e,n)},s=function(n){return e.options.lineWrapping?(l=l||or(e,t),Er(e,t,l,n)):{begin:0,end:t.text.length}},c=s("before"==n.sticky?u(n,-1):n.ch);if("rtl"==e.doc.direction||1==i.level){var d=1==i.level==r<0,f=u(n,d?1:-1);if(null!=f&&(d?f<=i.to&&f<=c.end:f>=i.from&&f>=c.begin)){var p=d?"before":"after";return new lt(n.line,f,p)}}var h=function(e,t,r){for(var a=function(e,t){return t?new lt(n.line,u(e,1),"before"):new lt(n.line,e,"after")};e>=0&&e<o.length;e+=t){var i=o[e],l=t>0==(1!=i.level),s=l?r.begin:u(r.end,-1);if(i.from<=s&&s<i.to)return a(s,l);if(s=l?i.from:u(i.to,-1),r.begin<=s&&s<r.end)return a(s,l)}},m=h(a+r,r,c);if(m)return m;var y=r>0?c.end:u(c.begin,-1);return null==y||r>0&&y==t.text.length||!(m=h(r>0?0:o.length-1,r,s(y)))?null:m}Wi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Wi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Wi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Wi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Wi.default=_?Wi.macDefault:Wi.pcDefault;var Zi={selectAll:Qa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return $i(e,(function(t){if(t.empty()){var n=Ze(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:lt(t.head.line+1,0)}:{from:t.head,to:lt(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return $i(e,(function(t){return{from:lt(t.from().line,0),to:ht(e.doc,lt(t.to().line+1,0))}}))},delLineLeft:function(e){return $i(e,(function(e){return{from:lt(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return $i(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return $i(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(lt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(lt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return el(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return nl(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return tl(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),K)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),K)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?nl(e,t.head):r}),K)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,o=0;o<n.length;o++){var a=n[o].from(),i=W(e.getLine(a.line),a.ch,r);t.push(X(r-i%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Lo(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var o=t[r].head,a=Ze(e.doc,o.line).text;if(a)if(o.ch==a.length&&(o=new lt(o.line,o.ch-1)),o.ch>0)o=new lt(o.line,o.ch+1),e.replaceRange(a.charAt(o.ch-1)+a.charAt(o.ch-2),lt(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var i=Ze(e.doc,o.line-1).text;i&&(o=new lt(o.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+i.charAt(i.length-1),lt(o.line-1,i.length-1),o,"+transpose"))}n.push(new ua(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return Lo(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);so(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function el(e,t){var n=Ze(e.doc,t),r=en(n);return r!=n&&(t=rt(r)),Ji(!0,e,r,t,1)}function tl(e,t){var n=Ze(e.doc,t),r=tn(n);return r!=n&&(t=rt(r)),Ji(!0,e,n,t,-1)}function nl(e,t){var n=el(e,t.line),r=Ze(e.doc,n.line),o=he(r,e.doc.direction);if(!o||0==o[0].level){var a=Math.max(n.ch,r.text.search(/\S/)),i=t.line==n.line&&t.ch<=a&&t.ch;return lt(n.line,i?0:a,n.sticky)}return n}function rl(e,t,n){if("string"==typeof t&&!(t=Zi[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=H}finally{e.display.shift=r,e.state.suppressEdits=!1}return o}function ol(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var o=Gi(t,e.state.keyMaps[r],n,e);if(o)return o}return e.options.extraKeys&&Gi(t,e.options.extraKeys,n,e)||Gi(t,e.options.keyMap,n,e)}var al=new V;function il(e,t,n,r){var o=e.state.keySeq;if(o){if(Hi(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:al.set(50,(function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())})),ll(e,o+" "+t,n,r))return!0}return ll(e,t,n,r)}function ll(e,t,n,r){var o=ol(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&xn(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(Se(n),Xr(e)),!!o}function ul(e,t){var n=qi(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?il(e,"Shift-"+n,t,(function(t){return rl(e,t,!0)}))||il(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return rl(e,t)})):il(e,n,t,(function(t){return rl(e,t)})))}function sl(e,t,n){return il(e,"'"+n+"'",t,(function(t){return rl(e,t,!0)}))}var cl=null;function dl(t){var n=this;if(!(t.target&&t.target!=n.display.input.getField()||(n.curOp.focus=L(),_e(n,t)))){l&&u<11&&27==t.keyCode&&(t.returnValue=!1);var o=t.keyCode;n.display.shift=16==o||t.shiftKey;var a=ul(n,t);p&&(cl=a?o:null,a||88!=o||Be||!(_?t.metaKey:t.ctrlKey)||n.replaceSelection("",null,"cut")),r&&!_&&!a&&46==o&&t.shiftKey&&!t.ctrlKey&&e.execCommand&&e.execCommand("cut"),18!=o||/\bCodeMirror-crosshair\b/.test(n.display.lineDiv.className)||fl(n)}}function fl(t){var n=t.display.lineDiv;function r(t){18!=t.keyCode&&t.altKey||(T(n,"CodeMirror-crosshair"),be(e,"keyup",r),be(e,"mouseover",r))}R(n,"CodeMirror-crosshair"),ye(e,"keyup",r),ye(e,"mouseover",r)}function pl(e){16==e.keyCode&&(this.doc.sel.shift=!1),_e(this,e)}function hl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||qn(t.display,e)||_e(t,e)||e.ctrlKey&&!e.altKey||_&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(p&&n==cl)return cl=null,void Se(e);if(!p||e.which&&!(e.which<10)||!ul(t,e)){var o=String.fromCharCode(null==r?n:r);"\b"!=o&&(sl(t,e,o)||t.display.input.onKeyPress(e))}}}var ml,yl,gl=400,bl=function(e,t,n){this.time=e,this.pos=t,this.button=n};function vl(e,t){var n=+new Date;return yl&&yl.compare(n,e,t)?(ml=yl=null,"triple"):ml&&ml.compare(n,e,t)?(yl=new bl(n,e,t),ml=null,"double"):(ml=new bl(n,e,t),yl=null,"single")}function _l(e){var t=this,n=t.display;if(!(_e(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,qn(n,e))s||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Ml(t,e)){var r=Ir(t,e),o=Me(e),a=r?vl(r,o):"single";window.focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),r&&wl(t,o,r,a,e)||(1==o?r?kl(t,r,a,e):Te(e)==n.scroller&&Se(e):2==o?(r&&Ba(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(C?t.display.input.onContextMenu(e):Qr(t)))}}function wl(e,t,n,r,o){var a="Click";return"double"==r?a="Double"+a:"triple"==r&&(a="Triple"+a),il(e,zi(a=(1==t?"Left":2==t?"Middle":"Right")+a,o),o,(function(t){if("string"==typeof t&&(t=Zi[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=H}finally{e.state.suppressEdits=!1}return r}))}function Ol(e,t,n){var r=e.getOption("configureMouse"),o=r?r(e,t,n):{};if(null==o.unit){var a=w?n.shiftKey&&n.metaKey:n.altKey;o.unit=a?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=_?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(_?n.altKey:n.ctrlKey)),o}function kl(e,t,n,r){l?setTimeout(B(Jr,e),0):e.curOp.focus=L();var o,a=Ol(e,n,r),i=e.doc.sel;e.options.dragDrop&&De&&!e.isReadOnly()&&"single"==n&&(o=i.contains(t))>-1&&(ut((o=i.ranges[o]).from(),t)<0||t.xRel>0)&&(ut(o.to(),t)>0||t.xRel<0)?Sl(e,r,t,a):El(e,r,t,a)}function Sl(e,t,n,r){var o=e.display,a=!1,i=Ro(e,(function(t){s&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Qr(e)),be(o.wrapper.ownerDocument,"mouseup",i),be(o.wrapper.ownerDocument,"mousemove",c),be(o.scroller,"dragstart",d),be(o.scroller,"drop",i),a||(Se(t),r.addNew||Ba(e.doc,n,null,null,r.extend),s&&!h||l&&9==u?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),c=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return a=!0};s&&(o.scroller.draggable=!0),e.state.draggingText=i,i.copy=!r.moveOnDrag,ye(o.wrapper.ownerDocument,"mouseup",i),ye(o.wrapper.ownerDocument,"mousemove",c),ye(o.scroller,"dragstart",d),ye(o.scroller,"drop",i),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}function Cl(e,t,n){if("char"==n)return new ua(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new ua(lt(t.line,0),ht(e.doc,lt(t.line+1,0)));var r=n(e,t);return new ua(r.from,r.to)}function El(e,t,n,r){l&&Qr(e);var o=e.display,a=e.doc;Se(t);var i,u,s=a.sel,c=s.ranges;if(r.addNew&&!r.extend?(u=a.sel.contains(n),i=u>-1?c[u]:new ua(n,n)):(i=a.sel.primary(),u=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(i=new ua(n,n)),n=Ir(e,t,!0,!0),u=-1;else{var d=Cl(e,n,r.unit);i=r.extend?Ia(i,d.anchor,d.head,r.extend):d}r.addNew?-1==u?(u=c.length,Ha(a,sa(e,c.concat([i]),u),{scroll:!1,origin:"*mouse"})):c.length>1&&c[u].empty()&&"char"==r.unit&&!r.extend?(Ha(a,sa(e,c.slice(0,u).concat(c.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),s=a.sel):Wa(a,u,i,q):(u=0,Ha(a,new la([i],0),q),s=a.sel);var f=n;function p(t){if(0!=ut(f,t))if(f=t,"rectangle"==r.unit){for(var o=[],l=e.options.tabSize,c=W(Ze(a,n.line).text,n.ch,l),d=W(Ze(a,t.line).text,t.ch,l),p=Math.min(c,d),h=Math.max(c,d),m=Math.min(n.line,t.line),y=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=y;m++){var g=Ze(a,m).text,b=$(g,p,l);p==h?o.push(new ua(lt(m,b),lt(m,b))):g.length>b&&o.push(new ua(lt(m,b),lt(m,$(g,h,l))))}o.length||o.push(new ua(n,n)),Ha(a,sa(e,s.ranges.slice(0,u).concat(o),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var v,_=i,w=Cl(e,t,r.unit),O=_.anchor;ut(w.anchor,O)>0?(v=w.head,O=ft(_.from(),w.anchor)):(v=w.anchor,O=dt(_.to(),w.head));var k=s.ranges.slice(0);k[u]=Pl(e,new ua(ht(a,O),v)),Ha(a,sa(e,k,u),q)}}var h=o.wrapper.getBoundingClientRect(),m=0;function y(t){var n=++m,i=Ir(e,t,!0,"rectangle"==r.unit);if(i)if(0!=ut(i,f)){e.curOp.focus=L(),p(i);var l=ro(o,a);(i.line>=l.to||i.line<l.from)&&setTimeout(Ro(e,(function(){m==n&&y(t)})),150)}else{var u=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;u&&setTimeout(Ro(e,(function(){m==n&&(o.scroller.scrollTop+=u,y(t))})),50)}}function g(t){e.state.selectingText=!1,m=1/0,t&&(Se(t),o.input.focus()),be(o.wrapper.ownerDocument,"mousemove",b),be(o.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var b=Ro(e,(function(e){0!==e.buttons&&Me(e)?y(e):g(e)})),v=Ro(e,g);e.state.selectingText=v,ye(o.wrapper.ownerDocument,"mousemove",b),ye(o.wrapper.ownerDocument,"mouseup",v)}function Pl(e,t){var n=t.anchor,r=t.head,o=Ze(e.doc,n.line);if(0==ut(n,r)&&n.sticky==r.sticky)return t;var a=he(o);if(!a)return t;var i=fe(a,n.ch,n.sticky),l=a[i];if(l.from!=n.ch&&l.to!=n.ch)return t;var u,s=i+(l.from==n.ch==(1!=l.level)?0:1);if(0==s||s==a.length)return t;if(r.line!=n.line)u=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=fe(a,r.ch,r.sticky),d=c-i||(r.ch-n.ch)*(1==l.level?-1:1);u=c==s-1||c==s?d<0:d>0}var f=a[s+(u?-1:0)],p=u==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new ua(new lt(n.line,h,m),r)}function Tl(e,t,n,r){var o,a;if(t.touches)o=t.touches[0].clientX,a=t.touches[0].clientY;else try{o=t.clientX,a=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Se(t);var i=e.display,l=i.lineDiv.getBoundingClientRect();if(a>l.bottom||!Oe(e,n))return Ee(t);a-=l.top-i.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var s=i.gutters.childNodes[u];if(s&&s.getBoundingClientRect().right>=o)return ve(e,n,e,ot(e.doc,a),e.display.gutterSpecs[u].className,t),Ee(t)}}function Ml(e,t){return Tl(e,t,"gutterClick",!0)}function jl(e,t){qn(e.display,t)||xl(e,t)||_e(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function xl(e,t){return!!Oe(e,"gutterContextMenu")&&Tl(e,t,"gutterContextMenu",!1)}function Dl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),hr(e)}bl.prototype.compare=function(e,t,n){return this.time+gl>e&&0==ut(t,this.pos)&&n==this.button};var Nl={toString:function(){return"CodeMirror.Init"}},Ll={},Rl={};function Al(e){var t=e.optionHandlers;function n(n,r,o,a){e.defaults[n]=r,o&&(t[n]=a?function(e,t,n){n!=Nl&&o(e,t,n)}:o)}e.defineOption=n,e.Init=Nl,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,ya(e)}),!0),n("indentUnit",2,ya,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){ga(e),hr(e),Fr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var a=e.text.indexOf(t,o);if(-1==a)break;o=a+t.length,n.push(lt(r,a))}r++}));for(var o=n.length-1;o>=0;o--)ii(e.doc,t,n[o],lt(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Nl&&e.refresh()})),n("specialCharPlaceholder",bn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!O),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Dl(e),ea(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Ki(t),o=n!=Nl&&Ki(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Bl,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Qo(t,e.options.lineNumbers),ea(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Lr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return wo(e)}),!0),n("scrollbarStyle","native",(function(e){So(e),wo(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Qo(e.options.gutters,t),ea(e)}),!0),n("firstLineNumber",1,ea,!0),n("lineNumberFormatter",(function(e){return e}),ea,!0),n("showCursorWhenSelecting",!1,zr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(eo(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Il),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,zr,!0),n("singleCursorHeightPerLine",!0,zr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,ga,!0),n("addModeClass",!1,ga,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,ga,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Il(e,t,n){if(!t!=!(n&&n!=Nl)){var r=e.display.dragFunctions,o=t?ye:be;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Bl(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),cn(e)),Ar(e),Fr(e),hr(e),setTimeout((function(){return wo(e)}),100)}function Fl(e,t){var n=this;if(!(this instanceof Fl))return new Fl(e,t);this.options=t=t?F(t):{},F(Ll,t,!1);var r=t.value;"string"==typeof r?r=new Ci(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new Fl.inputStyles[t.inputStyle](this),a=this.display=new ta(e,r,o,t);for(var i in a.wrapper.CodeMirror=this,Dl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),So(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new V,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),l&&u<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Wl(this),Ni(),Eo(this),this.curOp.forceUpdate=!0,wa(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Zr(n)}),20):eo(this),Rl)Rl.hasOwnProperty(i)&&Rl[i](this,t[i],Nl);Jo(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Vl.length;++c)Vl[c](this);Po(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}function Wl(e){var t=e.display;ye(t.scroller,"mousedown",Ro(e,_l)),ye(t.scroller,"dblclick",l&&u<11?Ro(e,(function(t){if(!_e(e,t)){var n=Ir(e,t);if(n&&!Ml(e,t)&&!qn(e.display,t)){Se(t);var r=e.findWordAt(n);Ba(e.doc,r.anchor,r.head)}}})):function(t){return _e(e,t)||Se(t)}),ye(t.scroller,"contextmenu",(function(t){return jl(e,t)})),ye(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||jl(e,n)}));var n,r={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function i(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}ye(t.scroller,"touchstart",(function(o){if(!_e(e,o)&&!a(o)&&!Ml(e,o)){t.input.ensurePolled(),clearTimeout(n);var i=+new Date;t.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),ye(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),ye(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!qn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,l=e.coordsChar(t.activeTouch,"page");a=!r.prev||i(r,r.prev)?new ua(l,l):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(l):new ua(lt(l.line,0),ht(e.doc,lt(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Se(n)}o()})),ye(t.scroller,"touchcancel",o),ye(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(mo(e,t.scroller.scrollTop),go(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),ye(t.scroller,"mousewheel",(function(t){return ia(e,t)})),ye(t.scroller,"DOMMouseScroll",(function(t){return ia(e,t)})),ye(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){_e(e,t)||Pe(t)},over:function(t){_e(e,t)||(Mi(e,t),Pe(t))},start:function(t){return Ti(e,t)},drop:Ro(e,Pi),leave:function(t){_e(e,t)||ji(e)}};var s=t.input.getField();ye(s,"keyup",(function(t){return pl.call(e,t)})),ye(s,"keydown",Ro(e,dl)),ye(s,"keypress",Ro(e,hl)),ye(s,"focus",(function(t){return Zr(e,t)})),ye(s,"blur",(function(t){return eo(e,t)}))}Fl.defaults=Ll,Fl.optionHandlers=Rl;var Vl=[];function Ul(e,t,n,r){var o,a=e.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?o=wt(e,t).state:n="prev");var i=e.options.tabSize,l=Ze(a,t),u=W(l.text,null,i);l.stateAfter&&(l.stateAfter=null);var s,c=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((s=a.mode.indent(o,l.text.slice(c.length),l.text))==H||s>150)){if(!r)return;n="prev"}}else s=0,n="not";"prev"==n?s=t>a.first?W(Ze(a,t-1).text,null,i):0:"add"==n?s=u+e.options.indentUnit:"subtract"==n?s=u-e.options.indentUnit:"number"==typeof n&&(s=u+n),s=Math.max(0,s);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(s/i);p;--p)f+=i,d+="\t";if(f<s&&(d+=X(s-f)),d!=c)return ii(a,d,lt(t,0),lt(t,c.length),"+input"),l.stateAfter=null,!0;for(var h=0;h<a.sel.ranges.length;h++){var m=a.sel.ranges[h];if(m.head.line==t&&m.head.ch<c.length){var y=lt(t,c.length);Wa(a,h,new ua(y,y));break}}}Fl.defineInitHook=function(e){return Vl.push(e)};var Gl=null;function Hl(e){Gl=e}function zl(e,t,n,r,o){var a=e.doc;e.display.shift=!1,r||(r=a.sel);var i=+new Date-200,l="paste"==o||e.state.pasteIncoming>i,u=Ae(t),s=null;if(l&&r.ranges.length>1)if(Gl&&Gl.text.join("\n")==t){if(r.ranges.length%Gl.text.length==0){s=[];for(var c=0;c<Gl.text.length;c++)s.push(a.splitLines(Gl.text[c]))}}else u.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(s=Q(u,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=lt(h.line,h.ch-n):e.state.overwrite&&!l?m=lt(m.line,Math.min(Ze(a,m.line).text.length,m.ch+J(u).length)):l&&Gl&&Gl.lineWise&&Gl.text.join("\n")==u.join("\n")&&(h=m=lt(h.line,0)));var y={from:h,to:m,text:s?s[f%s.length]:u,origin:o||(l?"paste":e.state.cutIncoming>i?"cut":"+input")};ei(e.doc,y),xn(e,"inputRead",e,y)}t&&!l&&Kl(e,t),so(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ql(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Lo(t,(function(){return zl(t,n,0,null,"paste")})),!0}function Kl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var a=e.getModeAt(o.head),i=!1;if(a.electricChars){for(var l=0;l<a.electricChars.length;l++)if(t.indexOf(a.electricChars.charAt(l))>-1){i=Ul(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ze(e.doc,o.head.line).text.slice(0,o.head.ch))&&(i=Ul(e,o.head.line,"smart"));i&&xn(e,"electricInput",e,o.head.line)}}}function $l(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var o=e.doc.sel.ranges[r].head.line,a={anchor:lt(o,0),head:lt(o+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function Yl(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Xl(){var e=x("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=x("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Yl(e),t}function Jl(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ro(this,t[e])(this,n,o),ve(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ki(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Ao((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");Z(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,Fr(this)})),removeOverlay:Ao((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Fr(this)}})),indentLine:Ao((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),at(this.doc,e)&&Ul(this,e,t,n)})),indentSelection:Ao((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var o=t[r];if(o.empty())o.head.line>n&&(Ul(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&so(this));else{var a=o.from(),i=o.to(),l=Math.max(n,a.line);n=Math.min(this.lastLine(),i.line-(i.ch?0:1))+1;for(var u=l;u<n;++u)Ul(this,u,e);var s=this.doc.sel.ranges;0==a.ch&&t.length==s.length&&s[r].from().ch>0&&Wa(this.doc,r,new ua(a,s[r].to()),z)}}})),getTokenAt:function(e,t){return Et(this,e,t)},getLineTokens:function(e,t){return Et(this,lt(e),t,!0)},getTokenTypeAt:function(e){e=ht(this.doc,e);var t,n=_t(this,Ze(this.doc,e.line)),r=0,o=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var i=r+o>>1;if((i?n[2*i-1]:0)>=a)o=i;else{if(!(n[2*i+1]<a)){t=n[2*i+2];break}r=i+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var o=n[t],a=this.getModeAt(e);if("string"==typeof a[t])o[a[t]]&&r.push(o[a[t]]);else if(a[t])for(var i=0;i<a[t].length;i++){var l=o[a[t][i]];l&&r.push(l)}else a.helperType&&o[a.helperType]?r.push(o[a.helperType]):o[a.name]&&r.push(o[a.name]);for(var u=0;u<o._global.length;u++){var s=o._global[u];s.pred(a,this)&&-1==U(r,s.val)&&r.push(s.val)}return r},getStateAfter:function(e,t){var n=this.doc;return wt(this,(e=pt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return wr(this,null==e?n.head:"object"==typeof e?ht(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return _r(this,ht(this.doc,e),t||"page")},coordsChar:function(e,t){return Sr(this,(e=vr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=vr(this,{top:e,left:0},t||"page").top,ot(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,o=!1;if("number"==typeof e){var a=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>a&&(e=a,o=!0),r=Ze(this.doc,e)}else r=e;return br(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-un(r):0)},defaultTextHeight:function(){return xr(this.display)},defaultCharWidth:function(){return Dr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var a=this.display,i=(e=wr(this,ht(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==r)i=e.top;else if("above"==r||"near"==r){var u=Math.max(a.wrapper.clientHeight,this.doc.height),s=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?i=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(i=e.bottom),l+t.offsetWidth>s&&(l=s-t.offsetWidth)}t.style.top=i+"px",t.style.left=t.style.right="","right"==o?(l=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?l=0:"middle"==o&&(l=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&io(this,{left:l,top:i,right:l+t.offsetWidth,bottom:i+t.offsetHeight})},triggerOnKeyDown:Ao(dl),triggerOnKeyPress:Ao(hl),triggerOnKeyUp:pl,triggerOnMouseDown:Ao(_l),execCommand:function(e){if(Zi.hasOwnProperty(e))return Zi[e].call(null,this)},triggerElectric:Ao((function(e){Kl(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var a=ht(this.doc,e),i=0;i<t&&!(a=Ql(this.doc,a,o,n,r)).hitSide;++i);return a},moveH:Ao((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Ql(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),K)})),deleteH:Ao((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):$i(this,(function(n){var o=Ql(r,n.head,e,t,!1);return e<0?{from:o,to:n.head}:{from:n.head,to:o}}))})),findPosV:function(e,t,n,r){var o=1,a=r;t<0&&(o=-1,t=-t);for(var i=ht(this.doc,e),l=0;l<t;++l){var u=wr(this,i,"div");if(null==a?a=u.left:u.left=a,(i=Zl(this,u,o,n)).hitSide)break}return i},moveV:Ao((function(e,t){var n=this,r=this.doc,o=[],a=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(i){if(a)return e<0?i.from():i.to();var l=wr(n,i.head,"div");null!=i.goalColumn&&(l.left=i.goalColumn),o.push(l.left);var u=Zl(n,l,e,t);return"page"==t&&i==r.sel.primary()&&uo(n,_r(n,u,"div").top-l.top),u}),K),o.length)for(var i=0;i<r.sel.ranges.length;i++)r.sel.ranges[i].goalColumn=o[i]})),findWordAt:function(e){var t=Ze(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var a=t.charAt(n),i=oe(a,o)?function(e){return oe(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!oe(e)};n>0&&i(t.charAt(n-1));)--n;for(;r<t.length&&i(t.charAt(r));)++r}return new ua(lt(e.line,n),lt(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?R(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),ve(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==L()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ao((function(e,t){co(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Xn(this)-this.display.barHeight,width:e.scrollWidth-Xn(this)-this.display.barWidth,clientHeight:Qn(this),clientWidth:Jn(this)}},scrollIntoView:Ao((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:lt(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?fo(this,e):ho(this,e.from,e.to,e.margin)})),setSize:Ao((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&pr(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Wr(n,o,"widget");break}++o})),this.curOp.forceUpdate=!0,ve(this,"refresh",this)})),operation:function(e){return Lo(this,e)},startOperation:function(){return Eo(this)},endOperation:function(){return Po(this)},refresh:Ao((function(){var e=this.display.cachedTextHeight;Fr(this),this.curOp.forceUpdate=!0,hr(this),co(this,this.doc.scrollLeft,this.doc.scrollTop),$o(this.display),(null==e||Math.abs(e-xr(this.display))>.5||this.options.lineWrapping)&&Ar(this),ve(this,"refresh",this)})),swapDoc:Ao((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),wa(this,e),hr(this),this.display.input.reset(),co(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,xn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ke(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,a){e.registerHelper(t,r,a),n[t]._global.push({pred:o,val:a})}}function Ql(e,t,n,r,o){var a=t,i=n,l=Ze(e,t.line),u=o&&"rtl"==e.direction?-n:n;function s(){var n=t.line+u;return!(n<e.first||n>=e.first+e.size)&&(t=new lt(n,t.ch,t.sticky),l=Ze(e,n))}function c(a){var i;if("codepoint"==r){var c=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))i=null;else{var d=n>0?c>=55296&&c<56320:c>=56320&&c<57343;i=new lt(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(d?2:1))),-n)}}else i=o?Qi(e.cm,l,t,n):Xi(l,t,n);if(null==i){if(a||!s())return!1;t=Ji(o,e.cm,l,t.line,u)}else t=i;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||c(!h);h=!1){var m=l.text.charAt(t.ch)||"\n",y=oe(m,p)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||h||y||(y="s"),d&&d!=y){n<0&&(n=1,c(),t.sticky="after");break}if(y&&(d=y),n>0&&!c(!h))break}var g=Xa(e,t,a,i,!0);return st(a,g)&&(g.hitSide=!0),g}function Zl(t,n,r,o){var a,i,l=t.doc,u=n.left;if("page"==o){var s=Math.min(t.display.wrapper.clientHeight,window.innerHeight||e.documentElement.clientHeight),c=Math.max(s-.5*xr(t.display),3);a=(r>0?n.bottom:n.top)+r*c}else"line"==o&&(a=r>0?n.bottom+3:n.top-3);for(;(i=Sr(t,u,a)).outside;){if(r<0?a<=0:a>=l.height){i.hitSide=!0;break}a+=5*r}return i}var eu=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function tu(e,t){var n=rr(e,t.line);if(!n||n.hidden)return null;var r=Ze(e.doc,t.line),o=er(n,r,t.line),a=he(r,e.doc.direction),i="left";a&&(i=fe(a,t.ch)%2?"right":"left");var l=ur(o.map,t.ch,i);return l.offset="right"==l.collapse?l.end:l.start,l}function nu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ru(e,t){return t&&(e.bad=!0),e}function ou(e,t,n,r,o){var a="",i=!1,l=e.doc.lineSeparator(),u=!1;function s(e){return function(t){return t.id==e}}function c(){i&&(a+=l,u&&(a+=l),i=u=!1)}function d(e){e&&(c(),a+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var a,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(lt(r,0),lt(o+1,0),s(+p));return void(h.length&&(a=h[0].find(0))&&d(et(e.doc,a.from,a.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var y=0;y<t.childNodes.length;y++)f(t.childNodes[y]);/^(pre|p)$/i.test(t.nodeName)&&(u=!0),m&&(i=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;f(t),t!=n;)t=t.nextSibling,u=!1;return a}function au(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return ru(e.clipPos(lt(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var a=e.display.view[o];if(a.node==r)return iu(a,t,n)}}function iu(e,t,n){var r=e.text.firstChild,o=!1;if(!t||!N(r,t))return ru(lt(rt(e.line),0),!0);if(t==r&&(o=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?J(e.rest):e.line;return ru(lt(rt(a),a.text.length),o)}var i=3==t.nodeType?t:null,l=t;for(i||1!=t.childNodes.length||3!=t.firstChild.nodeType||(i=t.firstChild,n&&(n=i.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var u=e.measure,s=u.maps;function c(t,n,r){for(var o=-1;o<(s?s.length:0);o++)for(var a=o<0?u.map:s[o],i=0;i<a.length;i+=3){var l=a[i+2];if(l==t||l==n){var c=rt(o<0?e.line:e.rest[o]),d=a[i]+r;return(r<0||l!=t)&&(d=a[i+(r?1:0)]),lt(c,d)}}}var d=c(i,l,n);if(d)return ru(d,o);for(var f=l.nextSibling,p=i?i.nodeValue.length-n:0;f;f=f.nextSibling){if(d=c(f,f.firstChild,0))return ru(lt(d.line,d.ch-p),o);p+=f.textContent.length}for(var h=l.previousSibling,m=n;h;h=h.previousSibling){if(d=c(h,h.firstChild,-1))return ru(lt(d.line,d.ch+m),o);m+=h.textContent.length}}eu.prototype.init=function(e){var t=this,n=this,r=n.cm,o=n.div=e.lineDiv;function a(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function i(e){if(a(e)&&!_e(r,e)){if(r.somethingSelected())Hl({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=$l(r);Hl({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,z),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var i=Gl.text.join("\n");if(e.clipboardData.setData("Text",i),e.clipboardData.getData("Text")==i)return void e.preventDefault()}var l=Xl(),u=l.firstChild;r.display.lineSpace.insertBefore(l,r.display.lineSpace.firstChild),u.value=Gl.text.join("\n");var s=L();I(u),setTimeout((function(){r.display.lineSpace.removeChild(l),s.focus(),s==o&&n.showPrimarySelection()}),50)}}o.contentEditable=!0,Yl(o,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),ye(o,"paste",(function(e){!a(e)||_e(r,e)||ql(e,r)||u<=11&&setTimeout(Ro(r,(function(){return t.updateFromDOM()})),20)})),ye(o,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),ye(o,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),ye(o,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),ye(o,"touchstart",(function(){return n.forceCompositionEnd()})),ye(o,"input",(function(){t.composing||t.readFromDOMSoon()})),ye(o,"copy",i),ye(o,"cut",i)},eu.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},eu.prototype.prepareSelection=function(){var e=qr(this.cm,!1);return e.focus=L()==this.div,e},eu.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},eu.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},eu.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),o=n.from(),a=n.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||a.line<t.display.viewFrom)e.removeAllRanges();else{var i=au(t,e.anchorNode,e.anchorOffset),l=au(t,e.focusNode,e.focusOffset);if(!i||i.bad||!l||l.bad||0!=ut(ft(i,l),o)||0!=ut(dt(i,l),a)){var u=t.display.view,s=o.line>=t.display.viewFrom&&tu(t,o)||{node:u[0].measure.map[2],offset:0},c=a.line<t.display.viewTo&&tu(t,a);if(!c){var d=u[u.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;c={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(s&&c){var p,h=e.rangeCount&&e.getRangeAt(0);try{p=P(s.node,s.offset,c.offset,c.node)}catch(e){}p&&(!r&&t.state.focused?(e.collapse(s.node,s.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},eu.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},eu.prototype.showMultipleSelections=function(e){j(this.cm.display.cursorDiv,e.cursors),j(this.cm.display.selectionDiv,e.selection)},eu.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},eu.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return N(this.div,t)},eu.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&L()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},eu.prototype.blur=function(){this.div.blur()},eu.prototype.getField=function(){return this.div},eu.prototype.supportsTouch=function(){return!0},eu.prototype.receivedFocus=function(){var e=this,t=this;function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Lo(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,n)},eu.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},eu.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(b&&d&&this.cm.display.gutterSpecs.length&&nu(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=au(t,e.anchorNode,e.anchorOffset),r=au(t,e.focusNode,e.focusOffset);n&&r&&Lo(t,(function(){Ha(t.doc,ca(n,r),z),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},eu.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,o=r.display,a=r.doc.sel.primary(),i=a.from(),l=a.to();if(0==i.ch&&i.line>r.firstLine()&&(i=lt(i.line-1,Ze(r.doc,i.line-1).length)),l.ch==Ze(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=lt(l.line+1,0)),i.line<o.viewFrom||l.line>o.viewTo-1)return!1;i.line==o.viewFrom||0==(e=Br(r,i.line))?(t=rt(o.view[0].line),n=o.view[0].node):(t=rt(o.view[e].line),n=o.view[e-1].node.nextSibling);var u,s,c=Br(r,l.line);if(c==o.view.length-1?(u=o.viewTo-1,s=o.lineDiv.lastChild):(u=rt(o.view[c+1].line)-1,s=o.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(ou(r,n,s,t,u)),f=et(r.doc,lt(t,0),lt(u,Ze(r.doc,u).text.length));d.length>1&&f.length>1;)if(J(d)==J(f))d.pop(),f.pop(),u--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],y=f[0],g=Math.min(m.length,y.length);p<g&&m.charCodeAt(p)==y.charCodeAt(p);)++p;for(var b=J(d),v=J(f),_=Math.min(b.length-(1==d.length?p:0),v.length-(1==f.length?p:0));h<_&&b.charCodeAt(b.length-h-1)==v.charCodeAt(v.length-h-1);)++h;if(1==d.length&&1==f.length&&t==i.line)for(;p&&p>i.ch&&b.charCodeAt(b.length-h-1)==v.charCodeAt(v.length-h-1);)p--,h++;d[d.length-1]=b.slice(0,b.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=lt(t,p),O=lt(u,f.length?J(f).length-h:0);return d.length>1||d[0]||ut(w,O)?(ii(r.doc,d,w,O,"+input"),!0):void 0},eu.prototype.ensurePolled=function(){this.forceCompositionEnd()},eu.prototype.reset=function(){this.forceCompositionEnd()},eu.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},eu.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},eu.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Lo(this.cm,(function(){return Fr(e.cm)}))},eu.prototype.setUneditable=function(e){e.contentEditable="false"},eu.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ro(this.cm,zl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},eu.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},eu.prototype.onContextMenu=function(){},eu.prototype.resetPosition=function(){},eu.prototype.needsContentAttribute=!0;var lu=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null};function uu(t,n){if((n=n?F(n):{}).value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),null==n.autofocus){var r=L();n.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==e.body}function o(){t.value=u.getValue()}var a;if(t.form&&(ye(t.form,"submit",o),!n.leaveSubmitMethodAlone)){var i=t.form;a=i.submit;try{var l=i.submit=function(){o(),i.submit=a,i.submit(),i.submit=l}}catch(e){}}n.finishInit=function(e){e.save=o,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,o(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(be(t.form,"submit",o),n.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=a))}},t.style.display="none";var u=Fl((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),n);return u}function su(e){e.off=be,e.on=ye,e.wheelEventPixels=aa,e.Doc=Ci,e.splitLines=Ae,e.countColumn=W,e.findColumn=$,e.isWordChar=re,e.Pass=H,e.signal=ve,e.Line=dn,e.changeEnd=da,e.scrollbarModel=ko,e.Pos=lt,e.cmpPos=ut,e.modes=Ve,e.mimeModes=Ue,e.resolveMode=ze,e.getMode=qe,e.modeExtensions=Ke,e.extendMode=$e,e.copyState=Ye,e.startState=Je,e.innerMode=Xe,e.commands=Zi,e.keyMap=Wi,e.keyName=qi,e.isModifierKey=Hi,e.lookupKey=Gi,e.normalizeKeyMap=Ui,e.StringStream=Qe,e.SharedTextMarker=vi,e.TextMarker=gi,e.LineWidget=pi,e.e_preventDefault=Se,e.e_stopPropagation=Ce,e.e_stop=Pe,e.addClass=R,e.contains=N,e.rmClass=T,e.keyNames=Ai}lu.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function a(e){if(!_e(r,e)){if(r.somethingSelected())Hl({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=$l(r);Hl({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",o.value=t.text.join("\n"),I(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(o.style.width="0px"),ye(o,"input",(function(){l&&u>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),ye(o,"paste",(function(e){_e(r,e)||ql(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ye(o,"cut",a),ye(o,"copy",a),ye(e.scroller,"paste",(function(t){if(!qn(e,t)&&!_e(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,o.dispatchEvent(a)}})),ye(e.lineSpace,"selectstart",(function(t){qn(e,t)||Se(t)})),ye(o,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ye(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},lu.prototype.createField=function(e){this.wrapper=Xl(),this.textarea=this.wrapper.firstChild},lu.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},lu.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=qr(e);if(e.options.moveInputWithCursor){var o=wr(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),i=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+i.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+i.left-a.left))}return r},lu.prototype.showSelection=function(e){var t=this.cm.display;j(t.cursorDiv,e.cursors),j(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},lu.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&I(this.textarea),l&&u>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&u>=9&&(this.hasSelection=null))}},lu.prototype.getField=function(){return this.textarea},lu.prototype.supportsTouch=function(){return!1},lu.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||L()!=this.textarea))try{this.textarea.focus()}catch(e){}},lu.prototype.blur=function(){this.textarea.blur()},lu.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lu.prototype.receivedFocus=function(){this.slowPoll()},lu.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},lu.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},lu.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ie(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(l&&u>=9&&this.hasSelection===o||_&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=o.charCodeAt(0);if(8203!=a||r||(r="\u200b"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var i=0,s=Math.min(r.length,o.length);i<s&&r.charCodeAt(i)==o.charCodeAt(i);)++i;return Lo(t,(function(){zl(t,o.slice(i),r.length-i,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},lu.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lu.prototype.onKeyPress=function(){l&&u>=9&&(this.hasSelection=null),this.fastPoll()},lu.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Ir(n,e),i=r.scroller.scrollTop;if(a&&!p){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&Ro(n,Ha)(n.doc,ca(a),z);var c,d=o.style.cssText,f=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=window.scrollY),r.input.focus(),s&&window.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),l&&u>=9&&y(),C){Pe(e);var m=function(){be(window,"mouseup",m),setTimeout(g,20)};ye(window,"mouseup",m)}else setTimeout(g,50)}function y(){if(null!=o.selectionStart){var e=n.somethingSelected(),a="\u200b"+(e?o.value:"");o.value="\u21da",o.value=a,t.prevInput=e?"":"\u200b",o.selectionStart=1,o.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,o.style.cssText=d,l&&u<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=i),null!=o.selectionStart)){(!l||l&&u<9)&&y();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"\u200b"==t.prevInput?Ro(n,Qa)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},lu.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},lu.prototype.setUneditable=function(){},lu.prototype.needsContentAttribute=!1,Al(Fl),Jl(Fl);var cu="iter insert remove copy getEditor constructor".split(" ");for(var du in Ci.prototype)Ci.prototype.hasOwnProperty(du)&&U(cu,du)<0&&(Fl.prototype[du]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ci.prototype[du]));return ke(Ci),Fl.inputStyles={textarea:lu,contenteditable:eu},Fl.defineMode=function(e){Fl.defaults.mode||"null"==e||(Fl.defaults.mode=e),Ge.apply(this,arguments)},Fl.defineMIME=He,Fl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Fl.defineMIME("text/plain","null"),Fl.defineExtension=function(e,t){Fl.prototype[e]=t},Fl.defineDocExtension=function(e,t){Ci.prototype[e]=t},Fl.fromTextArea=uu,su(Fl),Fl.version="5.65.5",Fl}()},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,a,i,l],c=0;(u=new Error(t.replace(/%s/g,(function(){return s[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=pe(n(1)),o=pe(n(34)),a=pe(n(11)),i=pe(n(5)),l=pe(n(7)),u=n(1504),s=pe(n(839)),c=pe(n(632)),d=pe(n(1505)),f=pe(n(792)),p=pe(n(1531)),h=pe(n(1633)),m=pe(n(1640)),y=pe(n(1642)),g=pe(n(1507)),b=pe(n(1532)),v=pe(n(1533)),_=pe(n(1646)),w=pe(n(1488)),O=pe(n(1538)),k=pe(n(1539)),S=pe(n(616)),C=pe(n(1673)),E=pe(n(1676)),P=pe(n(1677)),T=pe(n(1678)),M=pe(n(1679)),j=pe(n(1684)),x=pe(n(1686)),D=pe(n(457)),N=pe(n(1688)),L=pe(n(1489)),R=pe(n(1691)),A=pe(n(1693)),I=pe(n(1695)),B=pe(n(1540)),F=pe(n(1697)),W=pe(n(1542)),V=pe(n(1704)),U=pe(n(1716)),G=pe(n(1718)),H=pe(n(1720)),z=pe(n(1740)),q=pe(n(1550)),K=pe(n(1746)),$=pe(n(1748)),Y=pe(n(1750)),X=pe(n(1555)),J=pe(n(1752)),Q=n(1557),Z=n(1755),ee=pe(n(1756)),te=pe(n(1758)),ne=pe(n(1773)),re=pe(n(1836)),oe=pe(n(1487)),ae=pe(n(1839)),ie=pe(n(1840)),le=pe(n(1841)),ue=pe(n(1842)),se=pe(n(1844)),ce=pe(n(1845)),de=pe(n(1846)),fe=pe(n(1847));function pe(e){return e&&e.__esModule?e:{default:e}}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var me=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,u;return t=e,u=[{key:"getControl",value:function(t){return!(0,a.default)(t)&&""!==t&&!(0,l.default)(["skip","computed","hidden","column_settings_background","column_settings_padding","et_builder_generate_pin_zoom_level_input"],t)&&((0,o.default)(e._map,t)?(0,r.default)(e._map,t):(0,i.default)(c.default.findComponentBySlug(t,"field"))?Y.default:s.default)}}],(n=null)&&he(t.prototype,n),u&&he(t,u),Object.defineProperty(t,"prototype",{writable:!1}),e}();me._map={transform:X.default,position:J.default,color:f.default,"color-alpha":f.default,gradient:p.default,"gradient-stops":f.default,background:H.default,"background-field":H.default,"border-radius":z.default,custom_margin:h.default,custom_padding:h.default,composite:q.default,date_picker:m.default,divider:E.default,"column-structure":P.default,categories:y.default,center_map:U.default,upload_gallery:V.default,"upload-gallery":V.default,select_icon:M.default,select_sidebar:T.default,font:j.default,number:D.default,multiple_buttons:k.default,multiple_checkboxes:w.default,checkboxes:g.default,checkboxes_advanced_woocommerce:ee.default,presets:d.default,presets_shadow:F.default,range:b.default,select:S.default,"select-mask":O.default,"select-pattern":O.default,select_product:C.default,text:D.default,input:D.default,textarea:v.default,codemirror:_.default,text_align:x.default,tiny_mce:N.default,upload:W.default,yes_no_button:L.default,options_list:u.ETCoreSortableList,conditional_logic:R.default,select_animation:A.default,select_box_shadow:I.default,warning:G.default,select_with_option_groups:K.default,text_api_key:$.default,sortable_list:u.ETCoreSortableList,select_post:B.default,icon_picker:Q.ETBuilderControlIconPicker,align:Z.ETBuilderControlAlign,motion:te.default,display_conditions:ne.default,input_time:re.default,searchable_list:oe.default,searchable_posts:ae.default,multiselect_post_types:ie.default,multiselect_authors:le.default,multiselect_user_roles:de.default,multiselect_categories:ue.default,multiselect_tags:se.default,multiselect_products:ce.default,select_conditional_meta_field:fe.default};var ye=me;t.default=ye},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trackLv3=t.trackLv2=t.trackLv1=t.track=t.startMiddle=t.startLimit=t.singleMiddle=t.rangeWrapper=t.rangeLabel=t.range=t.isSingleMiddle=t.inputsList=t.inputs=t.inputStart=t.inputMiddle=t.inputEnd=t.input=t.handler=t.endMiddle=t.endLimit=t.dragging=t.counters=t.counterMulti=t.counter=t.className=t.atMinBound=t.atMaxBound=void 0;var r="et-fb-settings-option-motion";t.className=r;var o="".concat(r,"__label");t.rangeLabel=o;var a="".concat(r,"__range");t.range=a;var i="".concat(r,"__handler");t.handler=i;var l="".concat(r,"--start-limit");t.startLimit=l;var u="".concat(r,"--end-limit");t.endLimit=u;var s="".concat(r,"--start-middle");t.startMiddle=s;var c="".concat(r,"--end-middle");t.endMiddle=c;var d="".concat(r,"--single-middle");t.singleMiddle=d;var f="".concat(r,"--is-single-middle");t.isSingleMiddle=f;var p="".concat(r,"__range-wrapper");t.rangeWrapper=p;var h="".concat(r,"--dragging");t.dragging=h;var m="".concat(r,"--at-min-bound");t.atMinBound=m;var y="".concat(r,"--at-max-bound");t.atMaxBound=y;var g="".concat(r,"__track");t.track=g;var b="".concat(r,"__track--lv1");t.trackLv1=b;var v="".concat(r,"__track--lv2");t.trackLv2=v;var _="".concat(r,"__track--lv3");t.trackLv3=_;var w="".concat(r,"__counter");t.counter=w;var O="".concat(r,"__counters");t.counters=O;var k="".concat(r,"__counter--multi");t.counterMulti=k;var S="".concat(r,"__input");t.input=S;var C="".concat(r,"__input-start");t.inputStart=C;var E="".concat(r,"__input-middle");t.inputMiddle=E;var P="".concat(r,"__input-end");t.inputEnd=P;var T="".concat(r,"__inputs");t.inputs=T;var M="".concat(r,"__inputs-list");t.inputsList=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useGetAuthors",{enumerable:!0,get:function(){return o.useGetAuthors}}),Object.defineProperty(t,"useGetCategories",{enumerable:!0,get:function(){return i.useGetCategories}}),Object.defineProperty(t,"useGetPostTypes",{enumerable:!0,get:function(){return a.useGetPostTypes}}),Object.defineProperty(t,"useGetTags",{enumerable:!0,get:function(){return l.useGetTags}}),Object.defineProperty(t,"useGetUserRoles",{enumerable:!0,get:function(){return s.useGetUserRoles}}),Object.defineProperty(t,"useSearchPosts",{enumerable:!0,get:function(){return r.useSearchPosts}}),Object.defineProperty(t,"useSearchProducts",{enumerable:!0,get:function(){return u.useSearchProducts}});var r=n(1829),o=n(1830),a=n(1831),i=n(1832),l=n(1833),u=n(1834),s=n(1835)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=c(n(41)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=c(n(3)),l=c(n(457)),u=c(n(1507));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e){return e&&e.__esModule?e:{default:e}}function d(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(1838);var m=function(e){var t=f((0,a.useState)(!1),2),n=t[0],r=t[1],i=f((0,a.useState)(e.value?e.value.map((function(e){return e.value})):[]),2),s=i[0],c=i[1],p=f((0,a.useState)(e.value?e.value:[]),2),h=p[0],m=p[1];(0,a.useEffect)((function(){setTimeout((function(){e.onUpdate(h)}),0)}),[h]),(0,a.useEffect)((function(){e.items.length>10&&r(!0)}),[e.items]);var y=(0,o.default)((function(t){t.scrollHeight-t.scrollTop-100<=t.clientHeight&&!e.isLoading&&e.currentPage<e.totalPages&&e.onScrollLoad()}),300),g=(0,o.default)((function(t,n){e.onSearch(n)}),300),b=e.items,v=b.filter((function(e){return!s.includes(e.value)}));return a.default.createElement("div",{className:"et-fb-settings-option-multiselect ".concat(e.className)},a.default.createElement("div",{className:"et-fb-multiselect-wrap"},e.isSearchable&&n&&a.default.createElement(l.default,{type:"text",value:"Search",default:"Search",defaultIfEmpty:!0,className:"et-fb-multiselect-search-input",name:"multiselect-search-input",_onChange:g}),a.default.createElement("div",{className:"et-fb-multiselect-items",onScroll:function(e){y(e.target)}},h.length>0&&a.default.createElement(u.default,{name:"multiselect-selected-checkboxes",className:"et-fb-multiselect-selected-items",options:h,_onChange:function(t,n){var r=n.split("|").filter((function(e){return e}));c(d(r));var o=h.filter((function(e){return r.includes(e.value)}));m(o),e.onDeselect()},value:s.join("|")}),v.length>0||e.isLoading?a.default.createElement(u.default,{name:"multiselect-deselected-checkboxes",className:"et-fb-multiselect-deselected-items",options:v,_onChange:function(t,n){var r=n.split("|").filter((function(e){return e}));c((function(e){return[].concat(d(e),d(r))}));var o=b.filter((function(e){return r.includes(e.value)}));m((function(e){return[].concat(d(e),d(o))})),e.onSelect()},loading:e.isLoading,"data-testid":"deselected-checkboxes"}):a.default.createElement("div",{className:"et-fb-multiselect-not-found"},"No results found."))))};m.propTypes={onSelect:i.default.func,onDeselect:i.default.func,onSearch:i.default.func,onScrollLoad:i.default.func,onUpdate:i.default.func,isLoading:i.default.bool,isSearchable:i.default.bool,currentPage:i.default.number,totalPages:i.default.number,items:i.default.array.isRequired,value:i.default.array,className:i.default.string},m.defaultProps={onSelect:function(){},onDeselect:function(){},onSearch:function(){},onScrollLoad:function(){},onUpdate:function(){},isLoading:!1,isSearchable:!0,currentPage:1,totalPages:1,items:[],value:[],className:""},m.displayName="ETBuilderMultiselect";var y=m;t.default=y},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=b(n(3)),i=b(n(5)),l=b(n(10)),u=b(n(332)),s=b(n(31)),c=b(n(335)),d=b(n(125)),f=b(n(11)),p=b(n(37)),h=b(n(849)),m=b(n(7)),y=b(n(16)),g=b(n(2));function b(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_.apply(this,arguments)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function k(e){var t=function(){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}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C(e)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}n(1496);var P=function(e){!function(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&&O(e,t)}(b,e);var t,n,r,a=k(b);function b(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(t=a.call(this,e)).shouldComponentUpdate=y.default.shouldComponentUpdate.bind(C(t)),t._getDefaults=t._getDefaults.bind(C(t)),t._getValue=t._getValue.bind(C(t)),t._onChange=t._onChange.bind(C(t)),t}return t=b,(n=[{key:"_getDefaults",value:function(){var e=this.props.options,t=this.props.defaults;return(0,f.default)(t)?(0,s.default)((0,c.default)((0,d.default)(e)),(function(){return"off"})):t}},{key:"_getValue",value:function(){var e=this._getDefaults(),t=this.props.value,n=(0,f.default)(t)?e:(0,s.default)(t.split("|"),(function(e){return g.default.hasValue(e)?e:"off"}));return(0,d.default)(n)<(0,d.default)(e)&&(n=(0,l.default)(e,n)),n}},{key:"_onChange",value:function(e){var t=e.target.checked?"on":"off",n=e.target.getAttribute("data-index"),r=this._getValue();r[n]=t;var o=r.join("|");this.props._onChange(this.props.name,o)}},{key:"render",value:function(){var e=this,t=this._getValue(),n=this.props,r=n.options,a=n.name,l=n.shortcut_index,s=n.readonly,c=n.markedCategories,d=n.categoryMark,y={};s&&(y.readOnly=!0);var b="";return(0,i.default)(r)||(b=(0,u.default)(r).map((function(n,r){var u=(0,p.default)(n)?n:n.value,s=(0,p.default)(n)?n:n.label,b=l?"-".concat(l):"",v="et-fb-multiple-checkbox-".concat(a).concat(b,"-").concat(r),w=!(0,f.default)(t[r])&&g.default.isOn(t[r]),O=c&&!(0,i.default)(c)&&(0,m.default)(c,s)?d:"",k=(0,p.default)(n)?"":"-".concat((0,h.default)(n.className));return u||(k="-hidden"),o.default.createElement("p",{key:v,className:"et-fb-multiple-checkbox".concat(k)},o.default.createElement("label",{htmlFor:v},o.default.createElement("input",_({type:"checkbox",id:v,name:"et_fb_multiple_checkboxes[".concat(r,"]"),value:u,onChange:e._onChange,checked:w,"data-index":r},y))," ",O,s))}))),o.default.createElement("div",{className:"et-fb-multiple-checkboxes-wrap"},b)}}])&&w(t.prototype,n),r&&w(t,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.Component);P.propTypes={options:a.default.oneOfType([a.default.array,a.default.object]),defaults:a.default.array,value:a.default.string,name:a.default.string,_onChange:a.default.func};var T=P;t.default=T},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=s(n(3)),i=s(n(13)),l=s(n(40)),u=s(n(11));function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1573);var _=function(e){!function(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&&h(e,t)}(l,e);var t,n,r,a=m(l);function l(){var e;f(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v(g(e=a.call.apply(a,[this].concat(n))),"_onChange",(function(){var t=e.props,n=t.name,r=t.value,o=t._onChange,a=t.readonly,i=e._getDefaultValue();a||o(n,"on"===(!r&&i?i:r)?"off":"on")})),e}return t=l,(n=[{key:"_getDefaultValue",value:function(){return this.props.defaultValue||this.props.default}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.onClick,r=e.value,a=e.name,l=e.id,s=e.dataCy,c=this._getDefaultValue(),f=!(0,u.default)(this.props.button_options)&&"equal"===this.props.button_options.button_type,p=!r&&c?c:r,h=(0,i.default)({"et-core-control-toggle":!0,"et-core-control-toggle--equal":f,"et-core-control-toggle--on":"on"===p,"et-core-control-toggle--off":!p||"off"===p},t);!l&&a&&(l="et-fb-".concat(a));var m={};return this.props.readonly&&(m.disabled=!0),o.default.createElement("div",d({className:h,"data-cy":s,onClick:n||this._onChange},m),o.default.createElement("div",{className:"et-core-control-toggle__label et-core-control-toggle__label--on"},o.default.createElement("div",{className:"et-core-control-toggle__text"},this.props.options.on),o.default.createElement("div",{className:"et-core-control-toggle__handle"})),o.default.createElement("div",{className:"et-core-control-toggle__label et-core-control-toggle__label--off"},o.default.createElement("div",{className:"et-core-control-toggle__text"},this.props.options.off),o.default.createElement("div",{className:"et-core-control-toggle__handle"})),o.default.createElement("input",{type:"hidden",id:l,name:a,value:r}))}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.PureComponent);v(_,"propTypes",{dataCy:a.default.string}),v(_,"defaultProps",{value:"off",_onChange:l.default});var w=_;t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1525);Object.defineProperty(t,"DragDropContext",{enumerable:!0,get:function(){return u(r).default}});var o=n(1600);Object.defineProperty(t,"DragDropContextProvider",{enumerable:!0,get:function(){return u(o).default}});var a=n(1601);Object.defineProperty(t,"DragLayer",{enumerable:!0,get:function(){return u(a).default}});var i=n(1602);Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return u(i).default}});var l=n(1612);function u(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return u(l).default}})},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=h(n(197)),a=h(n(306)),i=h(n(146)),l=h(n(1)),u=h(n(17)),s=h(n(5)),c=h(n(31)),d=h(n(0)),f=h(n(1515)),p=h(n(1500));function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function b(e){var t=function(){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}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}var w=function(e){!function(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&&g(e,t)}(h,e);var t,n,r,f=b(h);function h(){return m(this,h),f.apply(this,arguments)}return t=h,n=[{key:"_render_options",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=(0,u.default)(e),r=this.props;if(!(0,s.default)(r.order)){var f=(0,c.default)(r.order,String);n=(0,i.default)((0,o.default)(f,n),(0,a.default)(n,f))}return(0,c.default)(n,(function(n){var r=(0,l.default)(e,n),o=n;return""!==t&&(o="".concat(t,"-").concat(n)),d.default.createElement(p.default,{key:o,value:n,name:r})}))}}],n&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(f.default),O=w;t.default=O},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=c(n(3)),l=n(1518),u=c(n(1522)),s=n(286);function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var b,v,_,w=function(e){!function(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&&h(e,t)}(c,e);var t,n,r,i=m(c);function c(){return f(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getChildContext",value:function(){return{dragDropManager:o||(o=new l.DragDropManager(u.default,{window:s.top_window}))}}},{key:"render",value:function(){return a.default.createElement("div",null,this.props.children)}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(a.Component);b=w,v="childContextTypes",_={dragDropManager:i.default.object.isRequired},v in b?Object.defineProperty(b,v,{value:_,enumerable:!0,configurable:!0,writable:!0}):b[v]=_;var O=w;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.END_DRAG=t.DROP=t.HOVER=t.PUBLISH_DRAG_SOURCE=t.BEGIN_DRAG=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.beginDrag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0,clientOffset:null},n=t.publishSource,r=t.clientOffset,l=t.getSourceClientOffset;(0,o.default)((0,a.default)(e),"Expected sourceIds to be an array.");var u=this.getMonitor(),c=this.getRegistry();(0,o.default)(!u.isDragging(),"Cannot call beginDrag while dragging.");for(var d=0;d<e.length;d++)(0,o.default)(c.getSource(e[d]),"Expected sourceIds to be registered.");for(var f=null,p=e.length-1;p>=0;p--)if(u.canDragSource(e[p])){f=e[p];break}if(null===f)return;var h=null;r&&((0,o.default)("function"==typeof l,"When clientOffset is provided, getSourceClientOffset must be a function."),h=l(f));var m=c.getSource(f),y=m.beginDrag(u,f);(0,o.default)((0,i.default)(y),"Item must be an object."),c.pinSource(f);var g=c.getSourceType(f);return{type:s,itemType:g,item:y,sourceId:f,clientOffset:r,sourceClientOffset:h,isSourcePublic:n}},t.publishDragSource=function(){if(!this.getMonitor().isDragging())return;return{type:c}},t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clientOffset,r=void 0===n?null:n;(0,o.default)((0,a.default)(e),"Expected targetIds to be an array.");var i=e.slice(0),u=this.getMonitor(),s=this.getRegistry();(0,o.default)(u.isDragging(),"Cannot call hover while not dragging."),(0,o.default)(!u.didDrop(),"Cannot call hover after drop.");for(var c=0;c<i.length;c++){var f=i[c];(0,o.default)(i.lastIndexOf(f)===c,"Expected targetIds to be unique in the passed array.");var p=s.getTarget(f);(0,o.default)(p,"Expected targetIds to be registered.")}for(var h=u.getItemType(),m=i.length-1;m>=0;m--){var y=i[m],g=s.getTargetType(y);(0,l.default)(g,h)||i.splice(m,1)}for(var b=0;b<i.length;b++){var v=i[b],_=s.getTarget(v);_.hover(u,v)}return{type:d,targetIds:i,clientOffset:r}},t.drop=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.getMonitor(),a=this.getRegistry();(0,o.default)(n.isDragging(),"Cannot call drop while not dragging."),(0,o.default)(!n.didDrop(),"Cannot call drop twice during one drag operation.");var l=n.getTargetIds().filter(n.canDropOnTarget,n);l.reverse(),l.forEach((function(l,u){var s=a.getTarget(l).drop(n,l);(0,o.default)(void 0===s||(0,i.default)(s),"Drop result must either be an object or undefined."),void 0===s&&(s=0===u?{}:n.getDropResult()),e.store.dispatch({type:f,dropResult:r({},t,s)})}))},t.endDrag=function(){var e=this.getMonitor(),t=this.getRegistry();(0,o.default)(e.isDragging(),"Cannot call endDrag while not dragging.");var n=e.getSourceId();return t.getSource(n,true).endDrag(e,n),t.unpinSource(),{type:p}};var o=u(n(1483)),a=u(n(4)),i=u(n(12)),l=u(n(1520));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.BEGIN_DRAG="dnd-core/BEGIN_DRAG",c=t.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",d=t.HOVER="dnd-core/HOVER",f=t.DROP="dnd-core/DROP",p=t.END_DRAG="dnd-core/END_DRAG"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSource=function(e){return{type:r,sourceId:e}},t.addTarget=function(e){return{type:o,targetId:e}},t.removeSource=function(e){return{type:a,sourceId:e}},t.removeTarget=function(e){return{type:i,targetId:e}};var r=t.ADD_SOURCE="dnd-core/ADD_SOURCE",o=t.ADD_TARGET="dnd-core/ADD_TARGET",a=t.REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",i=t.REMOVE_TARGET="dnd-core/REMOVE_TARGET"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){0}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(3));function a(e){return e&&e.__esModule?e:{default:e}}var i=function(e){return r.default.createElement("iframe",e)};i.propTypes={src:o.default.string.isRequired};var l=i;t.default=l},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=j(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=M(n(27)),i=M(n(3)),l=M(n(13)),u=M(n(10)),s=M(n(65)),c=M(n(9)),d=M(n(5)),f=M(n(11)),p=M(n(7)),h=M(n(17)),m=M(n(107)),y=M(n(40)),g=M(n(305)),b=M(n(1)),v=M(n(851)),_=n(60),w=M(n(1547)),O=M(n(616)),k=M(n(1732)),S=M(n(1548));n(1739);var C=M(n(2)),E=M(n(807)),P=n(400),T=n(511);function M(e){return e&&e.__esModule?e:{default:e}}function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(j=function(e){return e?n:t})(e)}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function N(e){var t=function(){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}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var B=C.default.condition("is_bfb"),F=function(e){!function(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&&D(e,t)}(y,e);var t,n,r,i=N(y);function y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),I(R(t=i.call(this,e)),"selectRef",null),I(R(t),"controlRef",null),I(R(t),"buttonRef",null),I(R(t),"AIButtonRef",null),I(R(t),"AISelectRef",null),I(R(t),"AISelectedTextSelectRef",null),I(R(t),"selectionPlaceholderRef",null),I(R(t),"state",{settingsOpen:!1,classModifier:"",selectedText:"",selectionStart:null,selectionEnd:null,isAISelectOpen:!1,isAIModalOpen:!1,fullText:"",characterLimit:0}),I(R(t),"isTinyMCE",(function(){return"tiny_mce"===(0,b.default)(R(t),"props.fieldType")})),I(R(t),"isSelectionEnabled",(function(){return(!t.isTinyMCE()||"tinymce"!==(0,b.default)(R(t),"controlRef.state.editorMode"))&&t.state.selectedText})),I(R(t),"getFieldValue",(function(){var e,n,r=t.props,o=r.value,a=r.fieldName,i=r.moduleType;return o===(t.props.defaultValue||(null===(e=ETBuilderBackend.defaults)||void 0===e||null===(n=e[i])||void 0===n?void 0:n[a]))?"":o})),I(R(t),"handleEnable",(function(){t.selectRef.toggleMenu({target:null})})),I(R(t),"updateSelectionRage",(function(){var e,n,r;if(t.controlRef){if(t.isTinyMCE()){if("tinymce"===t.controlRef.state.editorMode){var o=t.controlRef.editor.selection.getContent({format:"text"});return void t.setState({selectedText:o})}r=t.controlRef.refs.textarea}else r=a.default.findDOMNode(t.controlRef);if("number"==typeof(null===(e=r)||void 0===e?void 0:e.selectionStart)&&"number"==typeof(null===(n=r)||void 0===n?void 0:n.selectionEnd)){var i=r,l=i.selectionStart,u=i.selectionEnd;t.setState({selectedText:r.value.substring(l,u),fullText:r.value,selectionStart:l,selectionEnd:u,characterLimit:(0,T.getMaxCharacterLimit)(r)})}}})),I(R(t),"handleOnAIShowModal",(function(){return t.setState({isAIModalOpen:!0})})),I(R(t),"handleOnAIHideModal",(function(){return t.setState({isAIModalOpen:!1})})),I(R(t),"handleDisable",(function(){t.props.isContentField?t.props.onChange(t.props.fieldName,"",t.props.fieldType,t.props.isContentField):t.props.onReset(t.props.fieldName),t.handleEnabledDynamicAttributesChange((0,s.default)(t.props.dynamicAttributes,(function(e){return t.props.fieldName!==e})))})),I(R(t),"handleInherit",(function(){t.props.onInherit(t.props.fieldName),t.handleEnabledDynamicAttributesChange((0,s.default)(t.props.dynamicAttributes,(function(e){return t.props.fieldName!==e})))})),I(R(t),"handleDynamicContentChange",(function(e){t.props.onChange(t.props.fieldName,(0,_.encodeDynamicContent)({dynamic:!0,content:e,settings:t.getDynamicContentFieldDefaultSettings(e)}),t.props.fieldType,t.props.isContentField),-1===t.props.dynamicAttributes.indexOf(t.props.fieldName)&&t.handleEnabledDynamicAttributesChange(t.props.dynamicAttributes.concat([t.props.fieldName]))})),I(R(t),"openSettings",(function(){var e=t.getDynamicContentSettingsFields((0,_.getDynamicContent)(t.props.value).content,t.props.type);(0,d.default)(e)||t.setState({settingsOpen:!0})})),I(R(t),"closeSettings",(function(){t.setState({settingsOpen:!1})})),I(R(t),"handleSettingsChange",(function(e){var n=(0,_.getDynamicContent)(t.props.value);t.props.onChange(t.props.fieldName,(0,_.encodeDynamicContent)((0,u.default)({},n,{settings:e})),t.props.fieldType,t.props.isContentField)})),I(R(t),"handleSettingsSave",(function(){t.closeSettings()})),I(R(t),"handleEnabledDynamicAttributesChange",(function(e){t.props.onChange("_dynamic_attributes",e.join(","),"multiple_checkboxes",!1)})),I(R(t),"updateButtonPositionForTinyMCE",(function(e){if(t.isTinyMCE()){t.setState({classModifier:"tinymce-mode-".concat(e)});var n=C.default.$topWindow(a.default.findDOMNode(t.buttonRef)),r=C.default.$topWindow(a.default.findDOMNode(t.controlRef)),o=C.default.$topWindow(t.AIButtonRef.current),i=r.find(".mce-tinymce .mce-toolbar-grp").first().height(),l=Math.max(0,r.find(".et-fb-tinymce-media-buttons").first().height()-38),u=50+(i>0&&n.length>0?i:0)+l;n.css({top:"".concat(u,"px")}),o.css({top:"".concat(u,"px")})}})),I(R(t),"isEnabledDynamicContent",(function(e){var t=e.dynamicAttributes,n=e.fieldName,r=e.value;return(0,p.default)(t,n)&&(0,_.isDynamicContent)(r)})),I(R(t),"getDynamicContentSettingsFields",(function(e,n){var r=t.getDynamicContentField(e).fields||{};return(0,g.default)(r,(function(e){return!(0,f.default)(e.show_on)&&e.show_on!==n}))})),I(R(t),"renderSelectionPlaceholderInput",(function(){var e="",n="";if(t.isTinyMCE()||t.state.fullText.length<t.state.characterLimit)e=t.state.fullText.substring(0,t.state.selectionStart),n=t.state.fullText.substring(t.state.selectionEnd);else if(t.state.selectedText.length<t.state.characterLimit){var r=t.state.characterLimit-t.state.selectedText.length,a=Math.floor(r/2);e=t.state.fullText.substring(0,t.state.selectionStart),n=t.state.fullText.substring(t.state.selectionEnd),e=e.slice(-a),n=n.substring(0,a)}return o.default.createElement("div",{className:"et-fb-settings-option-".concat(t.props.fieldType,"--placeholder")},e,o.default.createElement("span",{ref:t.selectionPlaceholderRef,className:"et-fb-settings-option-input__selection"},t.state.selectedText),n)})),t.selectionPlaceholderRef=(0,o.createRef)(),t.AIButtonRef=(0,o.createRef)(),t}return t=y,(n=[{key:"getDynamicContentField",value:function(e){return ETBuilderBackend.dynamicContentFields[e]||{label:ETBuilderBackend.i18n.dynamicContent.invalidField,type:"text",fields:{}}}},{key:"getDynamicContentFieldLabel",value:function(e){if("post_meta_key"===e){var t=(0,_.getDynamicContent)(this.props.value).settings.meta_key||ETBuilderBackend.i18n.dynamicContent.manualCustomField;return(0,v.default)(t)}return this.getDynamicContentField(e).label}},{key:"getDynamicContentFieldDefaultSettings",value:function(e){return(0,m.default)(this.getDynamicContentField(e).fields,(function(e){return e.default||""}))}},{key:"getDynamicContentFieldOptions",value:function(e){var t={};return(0,c.default)(ETBuilderBackend.dynamicContentFields,(function(n,r){if("any"===n.type||n.type===e){var o=n.group?n.group:"Default";(0,f.default)(t[o])&&(t[o]={}),t[o][r]=n.label}})),t}},{key:"componentDidMount",value:function(){C.default.$topWindow().on("wp-toolbar-toggle",this.updateButtonPositionForTinyMCE),C.default.appWindow().addEventListener("ai_prompt_show_modal",this.handleOnAIShowModal),C.default.appWindow().addEventListener("ai_prompt_hide_modal",this.handleOnAIHideModal)}},{key:"componentWillUnmount",value:function(){C.default.appWindow().removeEventListener("ai_prompt_show_modal",this.handleOnAIShowModal),C.default.appWindow().removeEventListener("ai_prompt_hide_modal",this.handleOnAIHideModal)}},{key:"componentDidUpdate",value:function(e){var t,n=(0,_.isDynamicContent)(e.value),r=this.isEnabledDynamicContent(e),o=this.isEnabledDynamicContent(this.props),a=this.props.fieldName===e.fieldName;if(!r&&o&&a){var i=(0,_.getDynamicContent)(this.props.value),l=this.getDynamicContentSettingsFields(i.content,this.props.type),u="text"===this.props.type?3:1;(0,h.default)(l).length>=u&&this.openSettings()}n&&!o&&((0,f.default)(this.controlRef.focus)||this.controlRef.focus()),this.isSelectionEnabled()&&this.isTinyMCE()&&(null===(t=this.selectionPlaceholderRef.current)||void 0===t||t.scrollIntoView({block:"center"})),this.updateButtonPositionForTinyMCE()}},{key:"render",value:function(){var e,t=this,n=(0,p.default)(["upload","background"],this.props.fieldType),r=this.isEnabledDynamicContent(this.props),a=(0,_.getDynamicContent)(this.props.value),i=this.getDynamicContentFieldOptions(this.props.type),u=!n||(0,d.default)(this.props.value),s=this.props,c=s.fieldName,f=(s.fieldType,s.children,o.default.cloneElement(this.props.children,{ref:function(e){return t.controlRef=e}}));if((0,d.default)(i))return o.default.createElement(o.Fragment,null,this.props.children);var h="";return"ETBuilderControlTinyMCE"===f.type.displayName&&(f=o.default.cloneElement(f,{onModeSwitch:this.updateButtonPositionForTinyMCE}),B||(0,d.default)(this.state.classModifier)||(this.props.modalWidth>=538&&this.props.modalWidth<998?h="".concat(this.state.classModifier,"-medium"):this.props.modalWidth>=998&&this.props.modalWidth<1202&&(h="".concat(this.state.classModifier,"-wide")))),o.default.createElement("div",{className:(0,l.default)((e={"et-fb-settings-option-dynamic":!0,"et-fb-settings-option-ai":!0},I(e,"et-fb-settings-option-dynamic--".concat(this.props.fieldType),!0),I(e,"et-fb-settings-option-dynamic--".concat(this.state.classModifier),this.state.classModifier),I(e,"et-fb-settings-option-dynamic--".concat(h),!!h),e))},r&&this.state.settingsOpen&&o.default.createElement(w.default,{title:this.getDynamicContentFieldLabel(a.content),fields:this.getDynamicContentSettingsFields(a.content,this.props.type),values:a.settings,onChange:this.handleSettingsChange,onSave:this.handleSettingsSave,onClose:this.closeSettings}),r&&o.default.createElement(k.default,{fieldType:this.props.fieldType,value:this.props.value,label:this.getDynamicContentFieldLabel(a.content),mode:this.props.previewMode,attributes:this.props.previewAttributes,settingsFields:this.props.showSettingsButton?this.getDynamicContentSettingsFields(a.content,this.props.type):{},showDisableButton:this.props.showDisableButton,showInheritButton:this.props.showInheritButton,dynamicEnabled:-1!==this.props.dynamicAttributes.indexOf(this.props.fieldName),onSettings:this.openSettings,onDisable:this.handleDisable,onInherit:this.handleInherit}),!r&&o.default.createElement(o.Fragment,null,o.default.createElement("div",{className:"et-fb-settings-option-select-discrete"},o.default.createElement(O.default,{ref:function(e){return t.selectRef=e},name:"".concat(this.props.fieldName,"_dynamic_content"),value:r?a.content:"",options:this.getDynamicContentFieldOptions(this.props.type),__onChange:this.handleDynamicContentChange,selectFirst:!1})),!this.isSelectionEnabled()&&f,this.isSelectionEnabled()&&this.renderSelectionPlaceholderInput(),u&&o.default.createElement(o.Fragment,null,o.default.createElement(S.default,{key:"dynamic-options",ref:function(e){return t.buttonRef=e},type:this.props.fieldType,icon:"dynamic",tooltip:ETBuilderBackend.i18n.dynamicContent.tooltips.enable,className:(0,l.default)("et-fb-settings-option-dynamic__enable","et-fb-settings-option-dynamic__enable--".concat(this.props.fieldType)),onClick:this.handleEnable}),!(0,P.shouldAvoidFieldForAI)(c)&&o.default.createElement(E.default,{ref:this.AIButtonRef,type:this.props.fieldType,className:(0,l.default)("et-fb-settings-option-ai__enable","et-fb-settings-option-ai__enable--".concat(this.props.fieldType)),selectedText:this.state.selectedText,onOpen:this.updateSelectionRage,onClose:function(){return t.setState({selectedText:""})},name:this.props.fieldName,value:r?a.content:this.getFieldValue(),label:this.props.children.props.label,tooltip:ETBuilderBackend.i18n.ai.tooltips.divi_ai_options}))))}}])&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),y}(o.PureComponent);F.supportedFieldTypes=["text","tiny_mce","upload"],F.propTypes={children:i.default.element.isRequired,type:i.default.string.isRequired,fieldName:i.default.string.isRequired,fieldType:i.default.oneOf(F.supportedFieldTypes).isRequired,previewMode:i.default.oneOf(["image","background"]),previewAttributes:i.default.object,isContentField:i.default.bool,dynamicAttributes:i.default.arrayOf(i.default.string).isRequired,value:i.default.string.isRequired,showSettingsButton:i.default.bool,showDisableButton:i.default.bool,showInheritButton:i.default.bool,onChange:i.default.func,onReset:i.default.func,onInherit:i.default.func,modalWidth:i.default.number,defaultValue:i.default.oneOfType([i.default.string,i.default.number,i.default.bool])},F.defaultProps={previewMode:"image",previewAttributes:{},isContentField:!1,showSettingsButton:!0,showDisableButton:!0,showInheritButton:!1,defaultValue:"",onChange:y.default,onReset:y.default,onInherit:y.default};var W=F;t.default=W},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},t.findInArray=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},t.int=function(e){return parseInt(e,10)},t.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},t.isNum=function(e){return"number"==typeof e&&!isNaN(e)}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var u=i?Object.getOwnPropertyDescriptor(e,l):null;u&&(u.get||u.set)?Object.defineProperty(o,l,u):o[l]=e[l]}o.default=e,n&&n.set(e,o);return o}(n(0));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){var t=function(){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}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var f=function(e){!function(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&&u(e,t)}(c,e);var t,n,r,a=s(c);function c(){return i(this,c),a.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){return o.default.createElement("option",{value:this.props.value},this.props.name)}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.PureComponent),p=f;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.FILE="__NATIVE_FILE__",t.URL="__NATIVE_URL__",t.TEXT="__NATIVE_TEXT__"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a<n.length;a+=1){if(!o.call(t,n[a])||e[n[a]]!==t[n[a]])return!1;var i=e[n[a]],l=t[n[a]];if(i!==l)return!1}return!0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return Boolean(e&&"function"==typeof e.dispose)},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ETCommonControlSelectOptgroup",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"ETCommonControlSelectOption",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"ETCoreButton",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"ETCoreButtonGroup",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"ETCoreInput",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ETCoreRange",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ETCoreSelect",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ETCoreSortableList",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"ETCoreToggle",{enumerable:!0,get:function(){return c.default}}),t.getControl=function(e){return p[e]};var r=f(n(1619)),o=f(n(198)),a=f(n(1621)),i=f(n(1491)),l=f(n(1500)),u=f(n(1516)),s=f(n(1623)),c=f(n(1489)),d=f(n(1628));function f(e){return e&&e.__esModule?e:{default:e}}var p={button:r.default,text:a.default,select:i.default,sortable_list:s.default,toggle:c.default,yes_no_button:c.default,range:d.default}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=h(n(0)),a=h(n(3)),i=h(n(16)),l=h(n(13)),u=h(n(11)),s=h(n(58)),c=h(n(1)),d=h(n(9)),f=h(n(43)),p=h(n(1630));h(n(6));function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e){var t=function(){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}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}n(1631);var w=function(e){!function(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&&y(e,t)}(h,e);var t,n,r,a=g(h);function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(t=a.call(this,e)).tag="a",t.classes={icon:"et-fb-preset__icon",title:"et-fb-preset__title",content:"et-fb-preset__content"},t.onClick=t.onClick.bind(v(t)),t.renderPreset=t.renderPreset.bind(v(t)),t.shouldComponentUpdate=i.default.shouldComponentUpdate.bind(v(t)),t}return t=h,(n=[{key:"onClick",value:function(e){var t=this.props,n=t._onChange,r=t.presets,o=t.name,a=t.type;n(o,e,a);var i=(0,c.default)((0,s.default)(r,{value:e}),"fields",{});(0,d.default)(i,(function(e,t){return n(t,e,"preset_field")}))}},{key:"renderTitle",value:function(e){return(0,u.default)(e)?null:o.default.createElement("span",{className:this.classes.title},e)}},{key:"renderIcon",value:function(e){return(0,u.default)(e)?null:o.default.createElement("span",{className:this.classes.icon},o.default.createElement(f.default,{icon:e}))}},{key:"renderContent",value:function(e){return(0,u.default)(e)?null:o.default.createElement("span",{className:this.classes.content,dangerouslySetInnerHTML:{__html:e}})}},{key:"renderPreset",value:function(e,t){var n=e.title,r=e.icon,a=e.content,i=e.value,u=(0,l.default)({"et-fb-preset":!0,"et-fb-preset--active":i===this.props.value});return o.default.createElement(p.default,{tag:this.tag,className:u,key:t,value:i,onClick:this.onClick},this.renderTitle(n),this.renderIcon(r),this.renderContent(a))}},{key:"render",value:function(){return o.default.createElement("div",{className:"et-fb-preset-container"},this.props.presets.map(this.renderPreset))}}])&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(o.default.Component);w.propTypes={name:a.default.string.isRequired,value:a.default.string.isRequired,presets:a.default.arrayOf(a.default.object).isRequired,_onChange:a.default.func.isRequired};var O=w;t.default=O},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=v(n(3));n(1634);var i=v(n(196)),l=v(n(787)),u=v(n(361)),s=v(n(793)),c=v(n(1635)),d=v(n(1)),f=v(n(11)),p=v(n(1636)),h=n(115),m=v(n(307)),y=n(95),g=v(n(835)),b=v(n(836));n(2);function v(e){return e&&e.__esModule?e:{default:e}}function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function k(e){var t=function(){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}}();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var E=function(e){!function(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&&O(e,t)}(v,e);var t,n,r,a=k(v);function v(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),(e=a.call(this)).state={active:!1},e}return t=v,(n=[{key:"UNSAFE_componentWillMount",value:function(){var e=this;this.sanitize=this.sanitize.bind(this),this.onChange=this.onChange.bind(this),this.onIncrease=this.onIncrease.bind(this),this.onDecrease=this.onDecrease.bind(this),this.handleSpinnerChange=this.handleSpinnerChange.bind(this),this.makeActive=this.makeActive.bind(this),this.makeInactive=this.makeInactive.bind(this),this.sanitizeIncrease=(0,i.default)(this.sanitize,(function(t){return t+e.getStep()*(m.default.isPressedShift({strict:!1})?10:1)})),this.sanitizeDecrease=(0,i.default)(this.sanitize,(function(t){return t-e.getStep()*(m.default.isPressedShift({strict:!1})?10:1)})),this.getNumericValue=(0,i.default)(parseFloat,this.sanitize,this.getValue)}},{key:"normalize",value:function(e){return(this.normalizer||(this.normalizer=(new h.Normalizer)(this.getSpeed())))(e)*(this.getStep()>1?1:this.getStep())}},{key:"onChange",value:function(e){this.props.readonly||(this.setUpdateSource(1),this.props.onChange((0,b.default)(this.getDefaultUnit(),e,this.sanitize,this.props.allowedUnits)))}},{key:"onIncrease",value:function(){this.props.readonly||(this.setUpdateSource(2),this.props.onChange((0,b.default)(this.getDefaultUnit(),this.getValue(),this.sanitizeIncrease,this.props.allowedUnits)))}},{key:"onDecrease",value:function(){this.props.readonly||(this.setUpdateSource(2),this.props.onChange((0,b.default)(this.getDefaultUnit(),this.getValue(),this.sanitizeDecrease,this.props.allowedUnits)))}},{key:"handleSpinnerChange",value:function(e,t){var n=t.shiftKey;this.setUpdateSource(3);var r=this.normalize((0,h.maybeInt)(e,0))*(n?10:1);0!==r&&this.props.onChange((0,b.default)(this.getDefaultUnit(),this.getValue(),(0,i.default)(this.sanitize,(0,c.default)(r)),this.props.allowedUnits))}},{key:"renderLabel",value:function(){return!(0,l.default)(this.props.label)&&o.default.createElement("span",{className:"et-fb-settings-option-input-label"},this.props.label)}},{key:"getValue",value:function(){var e=this.props.value||this.props.defaultValue||0;return(0,f.default)((0,h.maybeFloat)(e))?0:e}},{key:"getSpeed",value:function(){return Math.abs(this.props.speed)*(this.getStep()>=1?1:.1)}},{key:"getStep",value:function(){return this._step||this.props.step}},{key:"getDefaultUnit",value:function(){return(0,y.getUnit)(this.props.defaultValue,this.props.defaultUnit)}},{key:"makeActive",value:function(){this.setState({active:!0})}},{key:"makeInactive",value:function(){this.setState({active:!1})}},{key:"sanitize",value:function(e){return(0,h.range)(this.props.min,this.props.max,(0,h.toFixed)((0,h.getPrecision)(this.props.precision),e))}},{key:"setUpdateSource",value:function(e){this._updateSource=[e,(0,u.default)(this._updateSource||[void 0])];var t=this.getStep(),n=this.props.step,r=(0,h.getPrecision)(this.getNumericValue()),o=r>(0,h.getPrecision)(n)?(0,h.toPrecision)(r,n):this.isSameSource()?t:n;this._step=o}},{key:"isSameSource",value:function(){var e=this._updateSource||[void 0,void 0];return(0,u.default)(e)===(0,s.default)(e)}},{key:"render",value:function(){var e=this.state.active?"active":"";return o.default.createElement("div",{className:"et-fb-settings-option--numeric-spinner-control ".concat(e)},o.default.createElement(g.default,{id:this.props.id,onChange:this.onChange,onIncrease:this.onIncrease,onDecrease:this.onDecrease,value:this.props.value,step:this.getStep(),onFocus:this.makeActive,onBlur:this.makeInactive,placeholder:this.props.defaultValue,readonly:(0,d.default)(this.props,"readonly",!1)}),o.default.createElement("div",{className:"numeric-spinner-control-label-wrapper"},!this.props.readonly&&o.default.createElement(p.default,{onChange:this.handleSpinnerChange}),this.renderLabel()))}}])&&w(t.prototype,n),r&&w(t,r),Object.defineProperty(t,"prototype",{writable:!1}),v}(o.Component);E.propTypes={onChange:a.default.func.isRequired,step:a.default.number,precision:a.default.number,min:a.default.number,max:a.default.number,value:a.default.string,placeholder:a.default.string,defaultValue:a.default.string,defaultUnit:a.default.string,speed:a.default.number},E.defaultProps={step:1,min:-9999999999,max:9999999999,defaultValue:"",speed:.5,precision:.01};var P=E;t.default=P},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=g(n(332)),a=g(n(394)),i=g(n(40)),l=g(n(31)),u=g(n(37)),s=g(n(5)),c=g(n(7)),d=g(n(1)),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),p=g(n(16)),h=g(n(3)),m=n(2);function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function g(e){return e&&e.__esModule?e:{default:e}}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function w(e){var t=function(){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}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function O(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1496);var E=function(e){!function(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&&_(e,t)}(h,e);var t,n,r,i=w(h);function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),C(k(t=i.call(this,e)),"onChange",(function(e){var n=e.target.checked,r=e.target.value,o=(0,l.default)(t.props.options,(function(e){return e.value})),i=t.props.value.split("|");n&&!(0,c.default)(i,r)?i.push(r):n||(i=(0,a.default)(i,(function(e){return e!==r})));var u=(0,l.default)(o,(function(e){return(0,c.default)(i,e)?e:""})).join("|");!(0,m.hasValue)(u)&&(0,m.hasValue)((0,d.default)(t.props,"default"))&&(u="|"),t.props._onChange(t.props.name,u)})),C(k(t),"getValue",(function(){var e=t.props.value;return(0,m.hasValue)(e)?e.split("|"):(0,d.default)(t.props,"default","").split("|")})),C(k(t),"renderLoading",(function(){return f.default.createElement("div",{className:"et-fb-multiple-checkboxes-spinner"})})),t.shouldComponentUpdate=p.default.shouldComponentUpdate.bind(k(t)),t}return t=h,(n=[{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.options,a=t.readonly,i=t.shortcut_index,l={readOnly:a},p="",h=(0,o.default)(r);return(0,s.default)(r)||(p=h.map((function(t,r){var o=(0,u.default)(t)?t:t.value,a=(0,u.default)(t)?t:t.label,s="et-fb-multiple-checkbox-".concat(n,"-").concat(i,"-").concat(r),p=(0,c.default)(e.getValue(),o),m=(0,d.default)(t,"group",""),y=m===(0,d.default)(h[r-1],"group","")?"":m;return f.default.createElement(f.Fragment,{key:s},y&&f.default.createElement("p",{className:"et-fb-multiple-checkbox-group-name"},y),f.default.createElement("p",null,f.default.createElement("label",{htmlFor:s},f.default.createElement("input",b({type:"checkbox",id:s,name:"et_fb_multiple_checkboxes[".concat(r,"]"),value:o,onChange:e.onChange,checked:p,"data-index":r},l))," ",a)))}))),f.default.createElement("div",{className:"et-fb-multiple-checkboxes-wrap ".concat(this.props.className)},p,this.props.loading&&this.renderLoading())}}])&&v(t.prototype,n),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(f.Component);C(E,"defaultProps",{defaults:[],value:"",_onChange:i.default,readonly:!1,loading:!1,className:""}),C(E,"propTypes",{options:h.default.oneOfType([h.default.object.isRequired,h.default.array.isRequired]).isRequired,defaults:h.default.array,value:h.default.string,name:h.default.string.isRequired,_onChange:h.default.func,readonly:h.default.bool,loading:h.default.bool,className:h.default.string});var P=E;t.default=P},function(e,t,n){!function(e){"use strict";var t,n,r=e.Pos;function o(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function a(e,t){for(var n=o(e),r=n,a=0;a<t.length;a++)-1==r.indexOf(t.charAt(a))&&(r+=t.charAt(a));return n==r?e:new RegExp(e.source,r)}function i(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function l(e,t,n){t=a(t,"g");for(var o=n.line,i=n.ch,l=e.lastLine();o<=l;o++,i=0){t.lastIndex=i;var u=e.getLine(o),s=t.exec(u);if(s)return{from:r(o,s.index),to:r(o,s.index+s[0].length),match:s}}}function u(e,t,n){if(!i(t))return l(e,t,n);t=a(t,"gm");for(var o,u=1,s=n.line,c=e.lastLine();s<=c;){for(var d=0;d<u&&!(s>c);d++){var f=e.getLine(s++);o=null==o?f:o+"\n"+f}u*=2,t.lastIndex=n.ch;var p=t.exec(o);if(p){var h=o.slice(0,p.index).split("\n"),m=p[0].split("\n"),y=n.line+h.length-1,g=h[h.length-1].length;return{from:r(y,g),to:r(y+m.length-1,1==m.length?g+m[0].length:m[m.length-1].length),match:p}}}}function s(e,t,n){for(var r,o=0;o<=e.length;){t.lastIndex=o;var a=t.exec(e);if(!a)break;var i=a.index+a[0].length;if(i>e.length-n)break;(!r||i>r.index+r[0].length)&&(r=a),o=a.index+1}return r}function c(e,t,n){t=a(t,"g");for(var o=n.line,i=n.ch,l=e.firstLine();o>=l;o--,i=-1){var u=e.getLine(o),c=s(u,t,i<0?0:u.length-i);if(c)return{from:r(o,c.index),to:r(o,c.index+c[0].length),match:c}}}function d(e,t,n){if(!i(t))return c(e,t,n);t=a(t,"gm");for(var o,l=1,u=e.getLine(n.line).length-n.ch,d=n.line,f=e.firstLine();d>=f;){for(var p=0;p<l&&d>=f;p++){var h=e.getLine(d--);o=null==o?h:h+"\n"+o}l*=2;var m=s(o,t,u);if(m){var y=o.slice(0,m.index).split("\n"),g=m[0].split("\n"),b=d+y.length,v=y[y.length-1].length;return{from:r(b,v),to:r(b+g.length-1,1==g.length?v+g[0].length:g[g.length-1].length),match:m}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var o=0,a=n+Math.max(0,e.length-t.length);;){if(o==a)return o;var i=o+a>>1,l=r(e.slice(0,i)).length;if(l==n)return i;l>n?a=i:o=i+1}}function p(e,o,a,i){if(!o.length)return null;var l=i?t:n,u=l(o).split(/\r|\n\r?/);e:for(var s=a.line,c=a.ch,d=e.lastLine()+1-u.length;s<=d;s++,c=0){var p=e.getLine(s).slice(c),h=l(p);if(1==u.length){var m=h.indexOf(u[0]);if(-1==m)continue e;return a=f(p,h,m,l)+c,{from:r(s,f(p,h,m,l)+c),to:r(s,f(p,h,m+u[0].length,l)+c)}}var y=h.length-u[0].length;if(h.slice(y)==u[0]){for(var g=1;g<u.length-1;g++)if(l(e.getLine(s+g))!=u[g])continue e;var b=e.getLine(s+u.length-1),v=l(b),_=u[u.length-1];if(v.slice(0,_.length)==_)return{from:r(s,f(p,h,y,l)+c),to:r(s+u.length-1,f(b,v,_.length,l))}}}}function h(e,o,a,i){if(!o.length)return null;var l=i?t:n,u=l(o).split(/\r|\n\r?/);e:for(var s=a.line,c=a.ch,d=e.firstLine()-1+u.length;s>=d;s--,c=-1){var p=e.getLine(s);c>-1&&(p=p.slice(0,c));var h=l(p);if(1==u.length){var m=h.lastIndexOf(u[0]);if(-1==m)continue e;return{from:r(s,f(p,h,m,l)),to:r(s,f(p,h,m+u[0].length,l))}}var y=u[u.length-1];if(h.slice(0,y.length)==y){var g=1;for(a=s-u.length+1;g<u.length-1;g++)if(l(e.getLine(a+g))!=u[g])continue e;var b=e.getLine(s+1-u.length),v=l(b);if(v.slice(v.length-u[0].length)==u[0])return{from:r(s+1-u.length,f(b,v,b.length-u[0].length,l)),to:r(s,f(p,h,y.length,l))}}}}function m(e,t,n,o){var i;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):r(0,0),this.pos={from:n,to:n},"object"==typeof o?i=o.caseFold:(i=o,o=null),"string"==typeof t?(null==i&&(i=!1),this.matches=function(n,r){return(n?h:p)(e,t,r,i)}):(t=a(t,"gm"),o&&!1===o.multiline?this.matches=function(n,r){return(n?c:l)(e,t,r)}:this.matches=function(n,r){return(n?d:u)(e,t,r)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),m.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=r(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var o=this.matches(t,n);if(this.afterEmptyMatch=o&&0==e.cmpPos(o.from,o.to),o)return this.pos=o,this.atOccurrence=!0,this.pos.match||!0;var a=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:a,to:a},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var o=e.splitLines(t);this.doc.replaceRange(o,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+o.length-1,o[o.length-1].length+(1==o.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new m(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new m(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],o=this.getSearchCursor(t,this.getCursor("from"),n);o.findNext()&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)r.push({anchor:o.from(),head:o.to()});r.length&&this.setSelections(r,0)}))}(n(1482))},function(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var o,a,i=t.indentUnit,l=n.tokenHooks,u=n.documentTypes||{},s=n.mediaTypes||{},c=n.mediaFeatures||{},d=n.mediaValueKeywords||{},f=n.propertyKeywords||{},p=n.nonStandardPropertyKeywords||{},h=n.fontProperties||{},m=n.counterDescriptors||{},y=n.colorKeywords||{},g=n.valueKeywords||{},b=n.allowNested,v=n.lineComment,_=!0===n.supportsAtComponent,w=!1!==t.highlightNonStandardPropertyKeywords;function O(e,t){return o=t,e}function k(e,t){var n=e.next();if(l[n]){var r=l[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),O("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?O(null,"compare"):'"'==n||"'"==n?(t.tokenize=S(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),O("atom","hash")):"!"==n?(e.match(/^\s*\w*/),O("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),O("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?O(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?O("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?O(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=C),O("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),O("property","word")):O(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),O("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?O("variable-2","variable-definition"):O("variable-2","variable")):e.match(/^\w+-/)?O("meta","meta"):void 0}function S(e){return function(t,n){for(var r,o=!1;null!=(r=t.next());){if(r==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==r}return(r==e||!o&&")"!=e)&&(n.tokenize=null),O("string","string")}}function C(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=S(")"),O(null,"(")}function E(e,t,n){this.type=e,this.indent=t,this.prev=n}function P(e,t,n,r){return e.context=new E(n,t.indentation()+(!1===r?0:i),e.context),n}function T(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function M(e,t,n){return D[n.context.type](e,t,n)}function j(e,t,n,r){for(var o=r||1;o>0;o--)n.context=n.context.prev;return M(e,t,n)}function x(e){var t=e.current().toLowerCase();a=g.hasOwnProperty(t)?"atom":y.hasOwnProperty(t)?"keyword":"variable"}var D={top:function(e,t,n){if("{"==e)return P(n,t,"block");if("}"==e&&n.context.prev)return T(n);if(_&&/@component/i.test(e))return P(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return P(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return P(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return P(n,t,"at");if("hash"==e)a="builtin";else if("word"==e)a="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return P(n,t,"interpolation");if(":"==e)return"pseudo";if(b&&"("==e)return P(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return f.hasOwnProperty(r)?(a="property","maybeprop"):p.hasOwnProperty(r)?(a=w?"string-2":"property","maybeprop"):b?(a=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(a+=" error","maybeprop")}return"meta"==e?"block":b||"hash"!=e&&"qualifier"!=e?D.top(e,t,n):(a="error","block")},maybeprop:function(e,t,n){return":"==e?P(n,t,"prop"):M(e,t,n)},prop:function(e,t,n){if(";"==e)return T(n);if("{"==e&&b)return P(n,t,"propBlock");if("}"==e||"{"==e)return j(e,t,n);if("("==e)return P(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)x(t);else if("interpolation"==e)return P(n,t,"interpolation")}else a+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?T(n):"word"==e?(a="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?j(e,t,n):")"==e?T(n):"("==e?P(n,t,"parens"):"interpolation"==e?P(n,t,"interpolation"):("word"==e&&x(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(a="variable-3",n.context.type):M(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&u.hasOwnProperty(t.current())?(a="tag",n.context.type):D.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return P(n,t,"atBlock_parens");if("}"==e||";"==e)return j(e,t,n);if("{"==e)return T(n)&&P(n,t,b?"block":"top");if("interpolation"==e)return P(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();a="only"==r||"not"==r||"and"==r||"or"==r?"keyword":s.hasOwnProperty(r)?"attribute":c.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":f.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?w?"string-2":"property":g.hasOwnProperty(r)?"atom":y.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?j(e,t,n):"{"==e?T(n)&&P(n,t,b?"block":"top",!1):("word"==e&&(a="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?T(n):"{"==e||"}"==e?j(e,t,n,2):D.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?P(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(a="variable","restricted_atBlock_before"):M(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,T(n)):"word"==e?(a="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(a="variable","keyframes"):"{"==e?P(n,t,"top"):M(e,t,n)},at:function(e,t,n){return";"==e?T(n):"{"==e||"}"==e?j(e,t,n):("word"==e?a="tag":"hash"==e&&(a="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?T(n):"{"==e||";"==e?j(e,t,n):("word"==e?a="variable":"variable"!=e&&"("!=e&&")"!=e&&(a="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new E(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||k)(e,t);return n&&"object"==typeof n&&(o=n[1],n=n[0]),a=n,"comment"!=o&&(t.state=D[t.state](o,e,t)),a},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),o=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(o=Math.max(0,n.indent-i)):o=(n=n.prev).indent),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:v,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),i=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],l=t(i),u=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],s=t(u),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(c),f=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],p=t(f),h=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),y=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],g=t(y),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],v=t(b),_=n.concat(o).concat(i).concat(u).concat(c).concat(f).concat(y).concat(b);function w(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",_),e.defineMIME("text/css",{documentTypes:r,mediaTypes:a,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:g,valueKeywords:v,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:g,valueKeywords:v,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:g,valueKeywords:v,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:a,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:g,valueKeywords:v,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css",helperType:"gss"})}(n(1482))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addEventListener=function(e,t,n){e.addEventListener&&e.addEventListener(t,n);return{remove:function(){e.removeEventListener&&e.removeEventListener(t,n)}}},t.compareAsc=function(e,t){var n=e-t;0===n&&(n=(e[i]||0)-(t[i]||0));return n},t.findNearestIndex=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return e.reduce((function(e,r,o){if(o===n)return e;var a=Math.abs(r-t);return a<=e.distance?{index:o,distance:a}:e}),{index:-1,distance:1/0})},t.getElementOwner=function(e){return e.ownerDocument||document},t.isPrimaryClick=function(e){return"contextmenu"!==(null==e?void 0:e.type)&&0===(null==e?void 0:e.button)},t.limitValueRange=function(e,t,n){return Math.min(Math.max(e,n),t)},t.percentToValue=function(e,t,n){return n/100*(t-e)+e},t.prepareNewValue=function(e,t){if((0,o.default)(e)){var n=(0,r.default)(e);return n.value=+t,n[i]=Date.now(),n}return t},t.roundValueToStep=function(e,t,n){return Math.round((e-n)/t)*t+n},t.valueToPercent=function(e,t,n){return 100*(n-e)/(t-e)};var r=a(n(116)),o=a(n(12));function a(e){return e&&e.__esModule?e:{default:e}}var i=Symbol("ETCoreSliderLastModified")},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=D(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=x(n(13)),i=x(n(7)),l=x(n(11)),u=x(n(31)),s=x(n(10)),c=x(n(1)),d=x(n(9)),f=x(n(42)),p=x(n(17)),h=x(n(34)),m=x(n(88)),y=n(618),g=x(n(5)),b=x(n(6)),v=x(n(2)),_=x(n(18)),w=x(n(39)),O=x(n(15)),k=x(n(789)),S=x(n(790)),C=x(n(804)),E=x(n(803)),P=x(n(1551)),T=x(n(1553)),M=x(n(1484)),j=x(n(281));function x(e){return e&&e.__esModule?e:{default:e}}function D(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(D=function(e){return e?n:t})(e)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function I(e){var t=function(){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}}();return function(){var n,r=W(e);if(t){var o=W(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}function B(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return F(e)}function F(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var U=function(e){return(0,m.default)(e.split("."))},G=function(e){return v.default.get((0,c.default)(e,"default_on_front"),v.default.get((0,c.default)(e,"defaultValue"),v.default.get((0,c.default)(e,"default"),"")))},H=function(e){!function(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&&A(e,t)}(x,e);var t,n,r,m=I(x);function x(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,x),V(F(t=m.call(this,e)),"getTabs",(function(){return(0,c.default)(F(t),"props.composite_structure",{})})),V(F(t),"getTabSettings",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,c.default)(t.getTabs(),"".concat(e,".controls"),{});if(!n)return r;var o={};return(0,d.default)(r,(function(e,t){(0,l.default)(e.main_tab_setting)||"on"!==e.main_tab_setting||(o[t]=e)})),(0,g.default)(o)?r:o})),V(F(t),"getSettings",(function(){return(0,p.default)(t.getTabs()).reduce((function(e,n){return L(L({},e),t.getTabSettings(n))}),{})})),V(F(t),"getSetting",(function(e){return(0,c.default)(t.getSettings(),e)})),V(F(t),"isTabModified",(function(e){return(0,p.default)(t.getTabSettings(e,!0)).reduce((function(e,n){return e||t.isSettingModified(n)}),!1)})),V(F(t),"isModified",(function(){return(0,p.default)(t.getTabs()).reduce((function(e,n){return e||t.isTabModified(n)}),!1)})),V(F(t),"handleTabHover",(function(e,n,r,o){var a={fieldName:(0,p.default)((0,c.default)(t.props.composite_structure,[n,"controls"],[])).join(" "),fieldLabel:r||o,fieldType:"composite_tab",toggleId:t.props.toggle_slug,toggleGroupId:t.props.tab_slug};if("enter"===e){var i=_.default.getFieldBaseName(t.props.name),l=L(L({},a),{fieldName:i,fieldLabel:t.props.label,fieldType:t.props.type});t.props.onMouseLeaveGroup(l),setTimeout((function(){t.props.onMouseEnterGroup(a)}))}else t.props.onMouseLeaveGroup(a)})),t.state={activeTabIndex:0},t._onChange=t._onChange.bind(F(t)),t._onClickReset=t._onClickReset.bind(F(t)),t._onTabChange=t._onTabChange.bind(F(t)),t}return t=x,n=[{key:"getModule",value:function(){return(0,c.default)(this,"props.module.props.module")}},{key:"getAttrs",value:function(){return(0,c.default)(this,"props.moduleAttrs",{})}},{key:"getFieldDefault",value:function(e){var t=this.getSetting(e),n=(0,h.default)(t,"default"),r=(0,h.default)(t,"default_from")&&!n?G((0,c.default)(this.getSettings(),U((0,c.default)(t,"default_from")))):void 0;return v.default.get(r,G(t))}},{key:"getDefault",value:function(e){var t=O.default.getFieldBaseName(e);_.default.isHoverMode()?t=_.default.getFieldBaseName(this.props.name):w.default.isStickyMode()&&(t=w.default.getFieldBaseName(this.props.name));var n=this.getSetting(t),r=this.getFieldDefault(t),o=(0,h.default)(n,"default"),a=(0,h.default)(n,"default_from")&&!o?U((0,c.default)(n,"default_from")):void 0,i=a?(0,c.default)(this.getAttrs(),a):void 0,l=_.default.isHoverMode()&&_.default.isEnabled(t,this.getAttrs()),u=w.default.isStickyMode()&&w.default.isEnabled(t,this.getAttrs()),s=v.default.get(i,v.default.get(r,""));if(O.default.isMobile(this.props,!1)&&!l&&!u){var d=O.default.isResponsiveEnabled(this.getAttrs(),O.default.getFieldBaseName(e)),f=n["default_".concat(this.props.activeTabMode)]||O.default.getDefaultValue(this.getAttrs(),"".concat(e,"_").concat(this.props.activeTabMode));return s=(0,c.default)(this.getAttrs(),"".concat(a,"_").concat(this.props.activeTabMode),s),d?f:(0,c.default)(this.getAttrs(),e,s)}return l?v.default.get((0,c.default)(n,"default__hover"),(0,c.default)(this.getAttrs(),t,s)):u?v.default.get((0,c.default)(n,"default__sticky"),(0,c.default)(this.getAttrs(),t,s)):s}},{key:"getValue",value:function(e){var t=this.getAttrs(),n=_.default.isHoverMode()&&_.default.isEnabled(e,t),r=w.default.isStickyMode()&&w.default.isEnabled(e,t),o=(0,c.default)(t,e,"");if(O.default.isMobile(this.props,!1)&&!n&&!r){var a=O.default.isResponsiveEnabled(t,e),i=O.default.getAnyValue(t,"".concat(e,"_").concat(this.props.activeTabMode));return a?i:""}return n?_.default.getHoverOrNormalOnHover(e,t):r?(0,c.default)(t,w.default.getStickyField(e),o):o}},{key:"isSettingModified",value:function(e){return""!==v.default.get(this.getValue(e),"")}},{key:"_onChange",value:function(e,t,n,r){var o=v.default.get(t,this.getDefault(e))===this.getDefault(e);this.props._onChange(e,t,n,r,o)}},{key:"_onClickReset",value:function(){var e=this;(0,p.default)(this.getSettings()).map((function(t){e._onChange(_.default.getHoverFieldOnHover(t,e.getAttrs()),"")})),this.setState({activeTabIndex:0})}},{key:"_onTabChange",value:function(e){this.setState({activeTabIndex:e})}},{key:"_renderTabPreviewArea",value:function(e){return!1}},{key:"_renderOutsidePreviewArea",value:function(){return!1}},{key:"_renderTabs",value:function(){var e=this,t=this.getModule(),n=this.getAttrs(),r=this.props.module._getOptionsFields("advanced"),d=[],p=this.props,m=p.name,g=p.label;return o.default.createElement(P.default,{_onTabChange:this._onTabChange,activeTab:this.state.activeTabIndex},(0,u.default)(this.props.composite_structure,(function(p,P){return o.default.createElement(T.default,{icon:p.icon,key:P,isModified:e.isTabModified(P),label:p.label,tooltip:p.tooltip,tabName:P,handleTabHover:e.handleTabHover},e._renderTabPreviewArea(p),(0,u.default)(p.controls,(function(u,p){var P=w.default.isStickyMode()&&w.default.isEnabled(p,n)?w.default.getStickyField(p,n):_.default.getHoverFieldOnHover(p,n),T=u;u.name=P;var x={};if((0,l.default)(u.type)||!M.default.getControl(u.type))return!1;if("top_divider_style"===P&&(x.dividerFlip=n.top_divider_flip),"bottom_divider_style"===P&&(x.dividerFlip=n.bottom_divider_flip),!(0,l.default)(u.depends_on)&&!e.props.module._isVisible(P,r))return d.push(P),!1;if(!((0,l.default)(u.show_if)&&(0,l.default)(u.show_if_not)||(0,y.canShowField)(u,e.props.setting_resolver)))return d.push(P),!1;if(!(0,l.default)(u.depends_on)&&(0,f.default)(u.depends_on,intersection(u.depends_on,d)))return!1;if(!e.props.module._isOptionMatchesFilter(u.label,u.description,e.props.label))return!1;var D,N=_.default.getFieldBaseName(p),R=!(0,l.default)(u.description)&&""!==u.description,A=(0,c.default)(u,"context_menu",!0),I=O.default.isResponsiveEnabled(n,N),B=w.default.doesSupport(u)&&w.default.hasStickyOptions((0,c.default)(t,"props",{})),F=(0,l.default)(u.label)||""===u.label?"":o.default.createElement(k.default,{name:P,key:"general-form-label-".concat(e.props.uniqueKey,"-").concat(_.default.getFieldBaseName(P)),onClickHelp:!!R&&e.props.onClickHelp,activeHelp:e.props.isDescriptionVisible(P),hoveredGroup:e.props.isHoveredGroup(P),hasHoverOptions:_.default.doesSupport(u),hasStickyOptions:B,onClickResponsive:e.props.onClickResponsive,hasResponsiveOptions:u.mobile_options,activeHover:_.default.isEnabled(P,n),activeSticky:w.default.isEnabled(P,n),onClickHover:!!_.default.hasTabs(u)&&e.props.onClickHover,onClickSticky:!!B&&e.props.onClickSticky,onClickReset:e.props.onClickReset,isResetActive:e.props.isResetActive(u),isResponsiveEnabled:I,onToggleRightMenu:!!A&&e.props.onToggleRightMenu},u.label),W=R?o.default.createElement(S.default,{active:e.props.isDescriptionVisible(P),key:"general-form-description-".concat(e.props.uniqueKey,"-").concat(P)},u.description):"",V=(0,a.default)("et-fb-settings-options","et-fb-option--".concat(u.type.replace("_","-"))),U="",G={};if(u.mobile_options&&(0,i.default)(["custom_margin","custom_padding"],u.type)){var H=(0,c.default)(n,"".concat(P,"_last_edited"),""),z=(0,l.default)(H)?["off","desktop"]:H.split("|"),q=v.default.hasValue(n[P])?n[P]:"",K=(0,c.default)(n,"".concat(P,"_tablet"),""),$=(0,c.default)(n,"".concat(P,"_phone"),"");if(K&&!(0,h.default)(u,"default_phone")&&(u.default_phone=K),K||!(0,h.default)(u,"default_tablet")||(0,h.default)(u,"default_phone")||(u.default_phone=u.default_tablet),q&&((0,h.default)(u,"default_tablet")||(u.default_tablet=q),(0,h.default)(u,"default_phone")||(u.default_phone=q)),!(0,l.default)(u.default_from)){var Y=u.default_from.split(".").pop(),X=(0,c.default)(n,"".concat(Y),"");""!==X&&(0,l.default)(u.default)&&(u.default=X);var J=(0,c.default)(n,"".concat(Y,"_tablet"),"");""!==J&&(u.default_tablet=J);var Q=(0,c.default)(n,"".concat(Y,"_phone"),"");""!==Q&&(u.default_phone=Q)}D={desktop:q,tablet:K,phone:$,isResponsive:I,activeTab:z[1]},U=b.default.getPreviewMode()}else if(u.mobile_options){var Z=e.props.activeTabMode,ee=I,te=(0,i.default)(["tablet","phone"],Z)&&ee,ne=te?"_".concat(Z):"";U=b.default.getPreviewMode();var re=(0,c.default)(n,P,""),oe=(0,c.default)(n,"".concat(P,"_tablet"),"");(0,c.default)(n,"".concat(P,"_phone"),""),""===re&&!(0,l.default)(u.default_from)&&te&&(re=(0,c.default)(n,u.default_from.split(".").pop(),"")),oe&&!(0,h.default)(u,"default_phone")&&(u.default_phone=oe),oe||!(0,h.default)(u,"default_tablet")||(0,h.default)(u,"default_phone")||(u.default_phone=u.default_tablet),re&&((0,h.default)(u,"default_tablet")||(u.default_tablet=re),(0,h.default)(u,"default_phone")||(u.default_phone=re)),D=te?(0,c.default)(n,"".concat(u.name).concat(ne),""):re,te&&(G.default=(0,c.default)(u,"default".concat(ne),(0,c.default)(u,"default","")),G.name="".concat(u.name).concat(ne),G.baseName=u.name,"yes_no_button"===u.type?G.defaultValue=G.default:"background-field"===u.type?G.name=void 0:"multiple_buttons"===u.type&&u.toggleable&&u.multi_selection&&(G.emptyMobileNone=!0))}else D=(0,c.default)(n,P,e.getDefault(p));var ae={slug:u.type,type:"field"},ie=u.mobile_options&&I||_.default.hasTabs(u)&&_.default.isEnabled(N,n)||B&&w.default.isEnabled(N,n)?o.default.createElement(j.default,null,o.default.createElement(C.default,{module:e.getModule(),moduleAttrs:n,fieldName:N,activeTabMode:e.props.activeTabMode,isGlobalPresetsMode:e.props.isGlobalPresetsMode,isResponsiveEnabled:I,isHoverEnabled:_.default.isEnabled(N,n),isStickyEnabled:B&&w.default.isEnabled(N,n),isItemSelected:e.props.isItemSelected})):"",le={fieldName:P,fieldLabel:u.label,fieldType:u.type,toggleId:e.props.toggle_slug,toggleGroupId:e.props.tab_slug,fieldContextMenu:A},ue=L(L({},le),{fieldName:m,fieldLabel:g});return o.default.createElement(E.default,{name:P,key:"advanced-form-group-".concat(e.props.uniqueKey,"-").concat(_.default.getFieldBaseName(P)),onMouseEnterGroup:function(){e.props.onMouseEnterGroup(le)},onMouseLeaveGroup:function(){e.props.onMouseLeaveGroup(le),e.props.onMouseEnterGroup(ue)},isSelectiveSyncAvailable:e.props.isSelectiveSyncAvailable(),isGlobalOptionSynced:e.props.isGlobalOptionSynced(P),_unsyncGlobalSetting:e.props._unsyncGlobalSetting,className:e.props.productTourClass},F,ie,W,o.default.createElement("div",{className:V,key:"et-fb-option-advanced_".concat(e.props.uniqueKey,"-").concat(P)},o.default.createElement("div",{className:"et-fb-option-container",key:"et-fb-option-container-".concat(e.props.uniqueKey,"-").concat(P)},(0,o.createElement)(M.default.getControl(u.type),(0,s.default)({key:"".concat(e.props.uniqueKey,"-").concat(P),value:D,module:e.props.module,name:P,resetValue:!1,_onChange:e._onChange,visible:!0,previewMode:U,animate:e.props.animate,additionalProps:x,isResponsive:I,activeTabMode:e.props.activeTabMode,fieldDefinition:T,matching:ae},u,{default:e.getDefault(p)},G)))))})))})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.label,a=!1;if((0,d.default)(this.props.composite_structure,(function(t){(0,d.default)(t.controls,(function(t){if(!(0,l.default)(t.type)&&M.default.getControl(t.type))return e.props.module._isOptionMatchesFilter(t.label,t.description,e.props.label)?(a=!0,!1):void 0}))})),!a)return!1;var i=_.default.getFieldBaseName(n),u=this.props.isHoveredGroup(i),s=!(0,l.default)(this.props.description)&&""!==this.props.description,f=(0,c.default)(this.props,"context_menu",!0),p=(0,l.default)(r)||""===r?"":o.default.createElement(k.default,{name:n,onClickHelp:!!s&&this.props.onClickHelp,key:"advanced-form-label-".concat(this.props.uniqueKey),isResetActive:this.isModified(),onClickReset:this._onClickReset,onClickHover:this.props.onClickHover,activeHover:this.props.activeHover,hoveredGroup:u,onToggleRightMenu:!!f&&this.props.onToggleRightMenu},r),h=!1===this.props.activeHover?"":o.default.createElement(j.default,null,o.default.createElement(C.default,{module:this.getModule(),moduleAttrs:this.getAttrs(),fieldName:this.props.name,activeTabMode:this.props.activeTabMode,isGlobalPresetsMode:this.props.isGlobalPresetsMode,isHoverEnabled:this.props.activeHover,isItemSelected:this.props.isItemSelected})),m=s?o.default.createElement(S.default,{active:this.props.isDescriptionVisible(n),key:"general-form-description-".concat(n)},this.props.description):"",y=this.props.name,g={fieldName:i,fieldLabel:r,fieldType:this.props.type,toggleId:this.props.toggleId,toggleGroupId:this.props.toggleGroupId,fieldContextMenu:f};return o.default.createElement(E.default,{name:y,key:"advanced-form-group-".concat(this.props.uniqueKey,"-").concat(y),onMouseEnterGroup:function(){return e.props.onMouseEnterGroup(g)},onMouseLeaveGroup:function(){return e.props.onMouseLeaveGroup(g)}},p,h,m,this._renderOutsidePreviewArea(),this._renderTabs())}}],n&&R(t.prototype,n),r&&R(t,r),Object.defineProperty(t,"prototype",{writable:!1}),x}(o.default.Component),z=H;t.default=z},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isSingle=t.isMinBound=t.isMaxBound=t.hasTrack=t.getTrackWidth=t.getStartLimitTitle=t.getMinBoundClass=t.getMaxBoundClass=t.getInputs=t.getEndLimitTitle=t.getCounters=t.emptyOnDefault=void 0;var o=n(365),a=n(1768),i=n(115),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(1485)),u=n(1558);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var c=function(e){return(0,o.getStartMiddle)(e)===(0,o.getEndMiddle)(e)};t.isSingle=c;var d=function(e){return(0,o.getStartLimit)(e)===(0,o.getEndMiddle)(e)};t.isMinBound=d;var f=function(e){return(0,o.getEndLimit)(e)===(0,o.getStartMiddle)(e)};t.isMaxBound=f;t.getMinBoundClass=function(e){return d(e)?l.atMinBound:""};t.getMaxBoundClass=function(e){return f(e)?l.atMaxBound:""};t.getStartLimitTitle=function(e){return(0,o.getStartLimit)(e)>(0,o.getStartLimit)((0,o.getDefaultValue)())?"".concat((0,o.getStartLimit)(e),"%"):""};t.getEndLimitTitle=function(e){return(0,o.getEndLimit)(e)<(0,o.getEndLimit)((0,o.getDefaultValue)())?"".concat((0,o.getEndLimit)(e),"%"):""};t.hasTrack=function(e){return!c(e)};t.getTrackWidth=function(e){return(0,o.getEndMiddle)(e)-(0,o.getStartMiddle)(e)};t.getCounters=function(e,t){var n=Math.round((0,i.getAmount)(1,t)),r=function(e){return n*e},l=(0,o.getStartLimit)(e),s=(0,o.getEndLimit)(e),d=c(e)?[l,(0,o.getStartMiddle)(e),s]:[l,(0,o.getStartMiddle)(e),(0,o.getEndMiddle)(e),s];return(0,o.getStartLimit)((0,o.getDefaultValue)())===l&&d.shift(),(0,o.getEndLimit)((0,o.getDefaultValue)())===s&&d.pop(),(0,a.groupBy)((function(e,t){return r(t)-r(e)<=u.counterWidth}),d)};t.getInputs=function(e,t){var n=Math.round((0,i.getAmount)(1,t)),r=function(e){return n*e},l=[(0,o.getStartLimit)(e),(0,i.average)([(0,o.getEndMiddle)(e),(0,o.getStartMiddle)(e)]),(0,o.getEndLimit)(e)];return(0,a.groupBy)((function(e,t){return r(t)-r(e)<=56}),l)};t.emptyOnDefault=function(e,t,n){if(""===n)return"";var r=e(n);return e(t)===r?"":r}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=p,t.addEvent=function(e,t,n,r){if(!e)return;var o=u({capture:!0},r);e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&p(e.body,"react-draggable-transparent-selection")},t.createCSSTransform=function(e,t){var n=f(e,t,"px");return s({},(0,a.browserPrefixToKey)("transform",a.default),n)},t.createSVGTransform=function(e,t){return f(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,o.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,o.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.getTranslation=f,t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingTop),t-=(0,o.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingLeft),t-=(0,o.int)(n.paddingRight)},t.matchesSelector=d,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(d(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,a=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:a}},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderTopWidth),t+=(0,o.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderLeftWidth),t+=(0,o.int)(n.borderRightWidth)},t.removeClassName=h,t.removeEvent=function(e,t,n,r){if(!e)return;var o=u({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&h(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var o=n(1499),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var u=a?Object.getOwnPropertyDescriptor(e,l):null;u&&(u.get||u.set)?Object.defineProperty(o,l,u):o[l]=e[l]}o.default=e,n&&n.set(e,o);return o}(n(1898));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c="";function d(e,t){return c||(c=(0,o.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,o.isFunction)(e[t])}))),!!(0,o.isFunction)(e[c])&&e[c](t)}function f(e,t,n){var r=e.x,o=e.y,a="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(t){var i="".concat("string"==typeof t.x?t.x:t.x+n),l="".concat("string"==typeof t.y?t.y:t.y+n);a="translate(".concat(i,", ").concat(l,")")+a}return a}function p(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function h(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildRegExpFromDelimiters=function(e){var t=e.map((function(e){var t=e-48*Math.floor(e/48);return String.fromCharCode(96<=e?t:e)})).join(""),n=(0,a.default)(t);return new RegExp("["+n+"]+")},t.canDrag=function(e){var t=e.moveTag,n=e.readOnly,r=e.allowDragDrop;return void 0!==t&&!n&&r},t.canDrop=function(e){var t=e.readOnly,n=e.allowDragDrop;return!t&&n};var r,o=n(848),a=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=g(n(3)),i=g(n(13)),l=g(n(31)),u=g(n(28)),s=g(n(11)),c=g(n(4)),d=g(n(12)),f=g(n(7)),p=g(n(17)),h=g(n(1)),m=g(n(1500)),y=g(n(1516));function g(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(this,arguments)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function k(e){var t=function(){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}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C(e)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1572);var T=function(t){!function(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&&O(e,t)}(b,t);var n,r,a,g=k(b);function b(){var t;_(this,b);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return P(C(t=g.call.apply(g,[this].concat(r))),"getGroupForSelected",(function(){return e(t.node).find(":selected").parent().attr("label")})),P(C(t),"_onChange",(function(e){var n=t.props.name,r=t.getGroupForSelected(),o=t.props.overwrite_onchange,a=t.props.value_overwrite,i=e.target.value;r&&((0,h.default)(C(t),"props.parseGroupValue",!0)&&(i="".concat(r,"|").concat(i)),t.props.group_prop&&t.props._onChange(t.props.group_prop,r)),t.props._onChange(n,i),o&&(0,c.default)(o)&&a&&(0,d.default)(a)&&(0,l.default)(t.props.overwrite_onchange,(function(e){(0,s.default)(a[i])||t.props._onChange(e,a[i])}))})),t}return n=b,r=[{key:"componentDidMount",value:function(){this.props.group_prop&&this.props._onChange(this.props.group_prop,this.getGroupForSelected())}},{key:"_render_options",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,l.default)(e,(function(e,n){var r=(0,h.default)(e,"name"),a=(0,h.default)(e,"id"),i=n;return""!==t&&(i="".concat(t,"-").concat(n)),o.default.createElement(m.default,{key:i,value:a,name:r})}))}},{key:"render",value:function(){var e,t=this,n=(0,u.default)(this.props.value)?this.props.value:this.props.default;!(0,f.default)((0,p.default)(this.props.options),n)&&(0,f.default)((0,p.default)(this.props.options),(0,u.default)(n))&&(n=(0,u.default)(n));var r={"et-core-control-select":!0,"et-fb-settings-option-select":!0};this.props.className&&(r[this.props.className]=!0),e=this.props.groups?(0,l.default)(this.props.options,(function(e,n){return"0"===n?t._render_options(e,n):o.default.createElement(y.default,{label:n,key:"option-group-".concat(n)},t._render_options(e,n))})):this._render_options(this.props.options);var a={};this.props.readonly&&(a.disabled=!0);var s=this.props.id;return s||(s="et-fb-".concat(this.props.name)),o.default.createElement("select",v({ref:function(e){return t.node=e},className:(0,i.default)(r),value:n,name:this.props.name,id:s,onChange:this._onChange},a),e)}}],r&&w(n.prototype,r),a&&w(n,a),Object.defineProperty(n,"prototype",{writable:!1}),b}(o.PureComponent);P(T,"propTypes",{name:a.default.string.isRequired});var M=T;t.default=M}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var u=i?Object.getOwnPropertyDescriptor(e,l):null;u&&(u.get||u.set)?Object.defineProperty(o,l,u):o[l]=e[l]}o.default=e,n&&n.set(e,o);return o}(n(0));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){var t=function(){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}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var f=function(e){!function(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&&u(e,t)}(c,e);var t,n,r,a=s(c);function c(){return i(this,c),a.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){return o.default.createElement("optgroup",{label:this.props.label},this.props.children)}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.PureComponent),p=f;t.default=p},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=d(n(3)),i=d(n(13)),l=d(n(1)),u=d(n(63)),s=d(n(303)),c=d(n(2));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}n(1574);var v=function(t){!function(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&&h(e,t)}(f,t);var n,r,a,d=m(f);function f(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(e=d.call(this)).state={loading:!1},e._onClickChangeApiKey=e._onClickChangeApiKey.bind(g(e)),e._onClickGenerateImageUrlFromVideo=e._onClickGenerateImageUrlFromVideo.bind(g(e)),e}return n=f,r=[{key:"_onClickChangeApiKey",value:function(){c.default.topWindow().open(ETBuilderBackend.urls.themeOptionsUrl,"_blank").focus()}},{key:"_onClickGenerateImageUrlFromVideo",value:function(){var t=this,n=t.props.module,r=(0,l.default)(t,"props.module.props.attrs.__oembed_thumbnail");c.default.hasValue(r)?t.props._onChange(t.props.name,r):(this.setState({loading:!0}),e.ajax({type:"POST",url:ETBuilderBackend.ajaxUrl,data:{action:"et_pb_video_get_oembed_thumbnail",et_admin_load_nonce:ETBuilderBackend.nonces.et_admin_load,et_video_url:n.props.attrs[t.props.attrs.video_source]},success:function(e){t.props._onChange(t.props.name,e),t.setState({loading:!1})}}))}},{key:"render",value:function(){var e="";switch(this.props.type){case"change_google_api_key":e=o.default.createElement(u.default,{_onClick:this._onClickChangeApiKey,className:(0,i.default)(["et-fb-settings-button--additional-button","et-fb-settings-button--change-api-key"]),inverse:!0},ETBuilderBackend.i18n.controls.additionalButton.changeApiKey);break;case"generate_image_url_from_video":e=o.default.createElement(u.default,{_onClick:this._onClickGenerateImageUrlFromVideo,className:(0,i.default)(["et-fb-settings-button--additional-button","et-fb-settings-button--generate-image-url-from-video"]),inverse:!0},ETBuilderBackend.i18n.controls.additionalButton.generateImageUrlFromVideo)}return o.default.createElement(s.default,{useWrapper:!1,isLoading:this.state.loading},e)}}],r&&p(n.prototype,r),a&&p(n,a),Object.defineProperty(n,"prototype",{writable:!1}),f}(o.Component);v.propTypes={attrs:a.default.object,module:a.default.object,name:a.default.string,type:a.default.string,_onChange:a.default.func};var _=v;t.default=_}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1576);Object.defineProperty(t,"DragDropManager",{enumerable:!0,get:function(){return l(r).default}});var o=n(1589);Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return l(o).default}});var a=n(1590);Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return l(a).default}});var i=n(1591);function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"createTestBackend",{enumerable:!0,get:function(){return l(i).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments[1];switch(t.type){case o.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case o.HOVER:return i(e.clientOffset,t.clientOffset)?e:r({},e,{clientOffset:t.clientOffset});case o.END_DRAG:case o.DROP:return a;default:return e}},t.getSourceClientOffset=function(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;if(!t||!n||!r)return null;return{x:t.x+r.x-n.x,y:t.y+r.y-n.y}},t.getDifferenceFromInitialOffset=function(e){var t=e.clientOffset,n=e.initialClientOffset;if(!t||!n)return null;return{x:t.x-n.x,y:t.y-n.y}};var o=n(1493),a={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function i(e,t){return e===t||e&&t&&e.x===t.x&&e.y===t.y}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,a.default)(e)?e.some((function(e){return e===t})):e===t};var r,o=n(4),a=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments[1],t=arguments[2];switch(e.type){case a.HOVER:break;case i.ADD_SOURCE:case i.ADD_TARGET:case i.REMOVE_TARGET:case i.REMOVE_SOURCE:return u;case a.BEGIN_DRAG:case a.PUBLISH_DRAG_SOURCE:case a.END_DRAG:case a.DROP:default:return s}var n=e.targetIds,o=t.targetIds,l=(0,r.default)(n,o),c=!1;if(0===l.length){for(var d=0;d<n.length;d++)if(n[d]!==o[d]){c=!0;break}}else c=!0;if(!c)return u;var f=o[o.length-1],p=n[n.length-1];f!==p&&(f&&l.push(f),p&&l.push(p));return l},t.areDirty=function(e,t){if(e===u)return!1;if(e===s||void 0===t)return!0;return(0,o.default)(t,e).length>0};var r=l(n(847)),o=l(n(197)),a=n(1493),i=n(1494);function l(e){return e&&e.__esModule?e:{default:e}}var u=[],s=[]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyImage=t.NativeTypes=void 0,t.default=function(e){return new r.default(e)};var r=i(n(1592)),o=i(n(1598)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1501));function i(e){return e&&e.__esModule?e:{default:e}}t.NativeTypes=a,t.getEmptyImage=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSafari=t.isFirefox=void 0;var r,o=n(149),a=(r=o)&&r.__esModule?r:{default:r};t.isFirefox=(0,a.default)((function(){return/firefox/i.test(navigator.userAgent)})),t.isSafari=(0,a.default)((function(){return Boolean(window.safari)}))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(0)),a=s(n(3)),i=n(1490),l=s(n(1617)),u=s(n(22));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){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}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var m=!1,y=function(e){!function(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&&d(e,t)}(i,e);var t,n,r,a=f(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),a.call(this,e)}return t=i,(n=[{key:"render",value:function(){return this.props.connectDragSource(this.props.connectDropTarget(o.default.createElement("div",null,o.default.cloneElement(this.props.children,{isDragging:this.props.isDragging}))))}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.default.Component);y.propTypes={connectDragSource:a.default.func.isRequired,connectDropTarget:a.default.func.isRequired,moveItem:a.default.func.isRequired,isDragging:a.default.bool.isRequired,id:a.default.any.isRequired};var g={beginDrag:function(e){return{id:e.id}},endDrag:function(e){u.default.moduleItemDragEnd(e,m),m=!1,"function"==typeof e.onEndDrag&&e.onEndDrag()}},b={hover:function(e,t){var n=t.getItem().id;n!==e.id&&(m=!0,e.moveItem(n,e.id))}},v=(0,i.DragSource)(l.default.MODULE_ITEM,g,(function(e,t){return{connectDragSource:e.dragSource(),isDragging:t.isDragging()}})),_=(0,i.DropTarget)(l.default.MODULE_ITEM,b,(function(e){return{connectDropTarget:e.dropTarget()}}))(v(y));t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unpackBackendForEs5Users=t.createChildContext=t.CHILD_CONTEXT_TYPES=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a="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};t.default=function(e){f.default.apply(void 0,["DragDropContext","backend"].concat(Array.prototype.slice.call(arguments)));var t=v(e),n=b(t);return function(e){var t,a,u=e.displayName||e.name||"Component",s=(a=t=function(t){function a(){return h(this,a),m(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return y(a,t),o(a,[{key:"getDecoratedComponentInstance",value:function(){return(0,c.default)(this.child,"In order to access an instance of the decorated component it can not be a stateless component."),this.child}},{key:"getManager",value:function(){return n.dragDropManager}},{key:"getChildContext",value:function(){return n}},{key:"render",value:function(){var t=this;return l.default.createElement(e,r({},this.props,{ref:function(e){t.child=e}}))}}]),a}(i.Component),t.DecoratedComponent=e,t.displayName="DragDropContext("+u+")",t.childContextTypes=g,a);return(0,d.default)(s,e)}};var i=n(0),l=p(i),u=p(n(3)),s=n(1518),c=p(n(1483)),d=p(n(622)),f=p(n(1495));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=t.CHILD_CONTEXT_TYPES={dragDropManager:u.default.object.isRequired},b=t.createChildContext=function(e,t){return{dragDropManager:new s.DragDropManager(e,t)}},v=t.unpackBackendForEs5Users=function(e){var t=e;return"object"===(void 0===t?"undefined":a(t))&&"function"==typeof t.default&&(t=t.default),(0,c.default)("function"==typeof t,"Expected the backend to be a function or an ES6 module exporting a default function. Read more: http://react-dnd.github.io/react-dnd/docs-drag-drop-context.html"),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=function(e,t){if(e===t)return!0;if("object"!==(void 0===e?"undefined":r(e))||null===e||"object"!==(void 0===t?"undefined":r(t))||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=Object.prototype.hasOwnProperty,i=0;i<n.length;i+=1){if(!a.call(t,n[i]))return!1;var l=e[n[i]],u=t[n[i]];if(l!==u||"object"===(void 0===l?"undefined":r(l))||"object"===(void 0===u?"undefined":r(u)))return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="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},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){var t,n,h=e.DecoratedComponent,y=e.createHandler,g=e.createMonitor,b=e.createConnector,v=e.registerHandler,_=e.containerDisplayName,w=e.getType,O=e.collect,k=e.options.arePropsEqual,S=void 0===k?p.default:k,C=h.displayName||h.name||"Component",E=(n=t=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.handleChange=r.handleChange.bind(r),r.handleChildRef=r.handleChildRef.bind(r),(0,c.default)("object"===o(r.context.dragDropManager),"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",C,C),r.manager=r.context.dragDropManager,r.handlerMonitor=g(r.manager),r.handlerConnector=b(r.manager.getBackend()),r.handler=y(r.handlerMonitor),r.disposable=new s.SerialDisposable,r.receiveProps(e),r.state=r.getCurrentState(),r.dispose(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return this.decoratedComponentInstance}},{key:"shouldComponentUpdate",value:function(e,t){return!S(e,this.props)||!(0,f.default)(t,this.state)}}]),a(t,[{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0,this.disposable=new s.SerialDisposable,this.currentType=null,this.receiveProps(this.props),this.handleChange()}},{key:"componentWillReceiveProps",value:function(e){S(e,this.props)||(this.receiveProps(e),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose(),this.isCurrentlyMounted=!1}},{key:"receiveProps",value:function(e){this.handler.receiveProps(e),this.receiveType(w(e))}},{key:"receiveType",value:function(e){if(e!==this.currentType){this.currentType=e;var t=v(e,this.handler,this.manager),n=t.handlerId,r=t.unregister;this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new s.CompositeDisposable(new s.Disposable(o),new s.Disposable(r)))}}},{key:"handleChange",value:function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();(0,f.default)(e,this.state)||this.setState(e)}}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)}},{key:"handleChildRef",value:function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)}},{key:"getCurrentState",value:function(){return O(this.handlerConnector.hooks,this.handlerMonitor)}},{key:"render",value:function(){return l.default.createElement(h,r({},this.props,this.state,{ref:m(h)?this.handleChildRef:null}))}}]),t}(i.Component),t.DecoratedComponent=h,t.displayName=_+"("+C+")",t.contextTypes={dragDropManager:u.default.object.isRequired},n);return(0,d.default)(E,h)};var i=n(0),l=h(i),u=h(n(3)),s=n(1603),c=(h(n(134)),h(n(1483))),d=h(n(622)),f=h(n(1502)),p=h(n(1526));function h(e){return e&&e.__esModule?e:{default:e}}var m=function(e){return Boolean(e&&e.prototype&&"function"==typeof e.prototype.render)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};return Object.keys(e).forEach((function(n){var r=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((0,o.isValidElement)(t)){var r=t;l(r);var a=n?function(t){return e(t,n)}:e;return(0,i.default)(r,a)}e(t,n)}}(e[n]);t[n]=function(){return r}})),t};var r,o=n(0),a=n(1611),i=(r=a)&&r.__esModule?r:{default:r};function l(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors.You can either wrap "+t+" into a <div>, or turn it into a drag source or a drop target itself.")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t===e)return!0;return null!==t&&null!==e&&(0,a.default)(t,e)};var r,o=n(1502),a=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=function e(t,n){return"string"==typeof t||"symbol"===(void 0===t?"undefined":r(t))||n&&(0,i.default)(t)&&t.every((function(t){return e(t,!1)}))};var o,a=n(4),i=(o=a)&&o.__esModule?o:{default:o}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=x(n(0)),a=M(n(3)),i=M(n(13)),l=M(n(58)),u=M(n(9)),s=M(n(1)),c=M(n(7)),d=M(n(5)),f=M(n(42)),p=M(n(35)),h=M(n(163)),m=M(n(12)),y=M(n(31)),g=M(n(40)),b=M(n(135)),v=M(n(69)),_=M(n(72)),w=M(n(41)),O=M(n(14)),k=M(n(164)),S=x(n(2)),C=M(n(398)),E=M(n(829)),P=n(783);n(1632);var T=M(n(10));function M(e){return e&&e.__esModule?e:{default:e}}function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(j=function(e){return e?n:t})(e)}function x(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=j(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(this,arguments)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}function A(e){var t=function(){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}}();return function(){var n,r=F(e);if(t){var o=F(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return B(e)}function B(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var V=function(e){!function(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&&R(e,t)}(g,e);var t,n,r,a=A(g);function g(e){var t,n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),W(B(n=a.call(this,e)),"_getGradientStopIDs",(function(){var e=n.state.parsedGradientStops;return(0,y.default)(e,(function(e){return e.uuid}))})),W(B(n),"_getParsedGradientStops",(function(){return n.state.parsedGradientStops})),W(B(n),"_getGradientStopColorUpdated",(function(e,t){var r=n.props,o=r.readonly,a=r.value,i=n.state.parsedGradientStops;if(!t||o)return!1;var l={color:n._normalizeColor(e),uuid:t};return(0,P.updateStopWithinGradient)(l,i,null==a?void 0:a.unit)||i})),W(B(n),"_onClickPreviewCanvas",(function(){var e=n.props,t=e._onChange,r=e.readonly,o=n.state.parsedGradientStops;if(!r)if((0,d.default)(n._getValue()))n._onClickPreviewAddButton();else{var a=o[0].uuid,i=n.colorPickerLastActive||a;i===a&&t("gradientStopOpenClose",i),n.setState({colorPicker:i})}})),W(B(n),"_onClickPreviewAddButton",(function(){n.props.readonly||n._emitChange("on")})),W(B(n),"_onClickPreviewRemoveButton",(function(){n._emitChange()})),W(B(n),"_onClickPreviewResetButton",(function(){n._emitChange((0,T.default)({},n._getDefaultValue()))})),W(B(n),"_onChangeColorPicker",(function(e,t,r){var o=n.props,a=o.activeGradientStop,i=o.readonly,l=n.state.parsedGradientStops;if(t&&!i){var u=n._getGradientStopColorUpdated(n._normalizeColor(e),t);if(u&&!(0,f.default)(l,u)||r)if(r){var s=n._getGradientStopColorUpdated(n._normalizeColor(r),t);n._emitChange({color:r,uuid:a,parsedGradient:s,stops:(0,P.toGradientString)(s)},"gradientStopSingleColor"),n.throttledUpdate({color:e,uuid:a,parsedGradient:u,stops:(0,P.toGradientString)(u)})}else n._emitChange({color:e,uuid:a,parsedGradient:u,stops:(0,P.toGradientString)(u)},"gradientStopSingleColor")}})),W(B(n),"_onClearColorPicker",(function(e){n._onChangeColorPicker("",e)})),W(B(n),"_onCloseColorPicker",(function(){var e=n.props,t=e._onChange,r=e.activeGradientStop,o=n.state.colorPicker;n.colorPickerLastActive=o,t("gradientStopOpenClose",null!=r&&r)})),W(B(n),"_onSelectColorManagerPalette",(function(e,t){var r=n.props,o=r.activeGradientStop,a=r.readonly,i=r.value,l=n.state.parsedGradientStops;if(t&&!a)if(!!o){var u=n._getGradientStopColorUpdated(e,t);if(!u||(0,f.default)(l,u))return;n._emitChange({color:e,uuid:o,parsedGradient:u,stops:(0,P.toGradientString)(u)},"gradientStopSingleColor")}else n._emitChange(W({},t,n._normalizeColor(i)))})),W(B(n),"_onMouseEnterPreview",(function(){var e=n.props,t=e.name,r=e._onMouseEnterPreview,o=e._onMouseEnter;(0,p.default)(r)&&r(t),(0,p.default)(o)&&o(t,"preview")})),W(B(n),"_onMouseLeavePreview",(function(){var e=n.props,t=e.name,r=e._onMouseLeavePreview,o=e._onMouseLeave;(0,p.default)(r)&&r(t),(0,p.default)(o)&&o(t,"preview")})),W(B(n),"_emitChange",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=n.props,o=r.name,a=r._onChange,i=t||o;(0,p.default)(a)&&a(i,e)})),W(B(n),"_setColorPickerState",(function(e){n.setState({colorPicker:e})})),n.state={colorPicker:!1,parsedGradientStops:null!==(t=e.parsedGradient)&&void 0!==t?t:[]},n.colorPickerLastActive=!1,n._classNameBase="et-fb-settings-option-color-gradient",n._wrapperRef=o.default.createRef(),n.throttledUpdate=(0,w.default)((function(e){return n._emitChange(e,"gradientStopSingleColor")}),100,{leading:!1}),n}return t=g,n=[{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.activeGradientStop,o=n.parsedGradient,a=this.state.colorPicker;e.activeGradientStop===r&&a===r||this._setColorPickerState(r),(0,f.default)(t.parsedGradientStops,o)||this.setState({parsedGradientStops:o})}},{key:"_normalizeColor",value:function(e){return(0,_.default)(e,"gcid-")?e:C.default.normalize(e)}},{key:"_getGradientStopValue",value:function(e){var t=this.state.parsedGradientStops,n=(0,l.default)(t,(function(t,n){return t.uuid===e}))||{};return!!n.hasOwnProperty("color")&&n.color}},{key:"_getValue",value:function(e){var t=this.props.value;return e?this._getGradientStopValue(e):t}},{key:"_getDefaultValue",value:function(e){var t=this.props.defaultValue;return e?(0,s.default)(t,e):t}},{key:"_getRealColorValue",value:function(e){return k.default.getColorValue(e)||e}},{key:"_getClassName",value:function(e){return e?"".concat(this._classNameBase,"-").concat(e):this._classNameBase}},{key:"_getPreviewStyle",value:function(){var e=this,t=this._getValue();if((0,h.default)(t)||(0,d.default)(t)||!(0,m.default)(t))return{};var n={},r=k.default.getColors();return(0,u.default)(t,(function(t,r){var o=e._getGradientStopIDs();(0,d.default)(t)&&(0,c.default)(o,r)?n[r]=C.default.transparent:n[r]=k.default.getColorValue(t)||t})),{backgroundImage:S.default.getGradient(n,r)}}},{key:"isStopValueChanged",value:function(e,t){var n=this,r=this._getParsedGradientStops();return(0,v.default)(r,(function(r){var o=n._normalizeColor((0,s.default)(e,r)),a=n._normalizeColor((0,s.default)(t,r)),i=n._normalizeColor((0,s.default)(S.default.gradientDefault(),r)),l=(0,S.hasValue)(a);return!(!l||o===a)||!l&&o!==i}))}},{key:"_renderColorGradientShared",value:function(){var e=this.state.colorPicker,t=this.props,n=t.readonly,r=t.showPalettes,a=t.hideAddButton,i=t.disableCurrent,l=t.hideSwapButton,u=t.hideResetButton,s=t.hasColorManager,c=t.hideRemoveButton,f=(0,b.default)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.props),["name","value"]),p=e||this.colorPickerLastActive,h=e?this._getValue(p):"",m=this._getDefaultValue(),y=!(0,d.default)(this._getValue()),g=y&&this.isStopValueChanged(h,m),v=!n&&!a&&!y,_=!n&&!l&&y,w=!n&&!c&&y,k=!n&&!u&&y&&g;return o.default.createElement(E.default,D({},f,{isGradient:!0,name:p,value:h,colorPicker:e,onChangeColorPicker:this._onChangeColorPicker,showPickerPalettes:r&&!s,setColorPickerState:this._setColorPickerState,onClickPreviewCanvas:this._onClickPreviewCanvas,onCloseColorPicker:this._onCloseColorPicker,parsedGradient:this._getParsedGradientStops(),addTitle:O.default.getI18n("controls.background.addGradient"),previewStyle:this._getPreviewStyle(),showAddButton:v,showSwapButton:_,showResetButton:k,showRemoveButton:w,onClickRemoveButton:this._onClickPreviewRemoveButton,onClickPreviewAddButton:this._onClickPreviewAddButton,onMouseEnterPreview:this._onMouseEnterPreview,onMouseLeavePreview:this._onMouseLeavePreview,isVisible:!!e,disableCurrent:i,onSelectColorManagerPalette:this._onSelectColorManagerPalette}))}},{key:"render",value:function(){var e,t=this.props,n=t.hasPreview,r=t.hasColorManager,a=(W(e={},this._getClassName(),!0),W(e,this._getClassName("-has-preview"),n),W(e,this._getClassName("-has-color-manager"),r),e);return o.default.createElement("div",{ref:this._wrapperRef,className:(0,i.default)(a)},this._renderColorGradientShared())}}],n&&L(t.prototype,n),r&&L(t,r),Object.defineProperty(t,"prototype",{writable:!1}),g}(o.PureComponent),U=a.default.oneOfType([a.default.string,a.default.shape({stops:a.default.string,colorEnd:a.default.string,colorStart:a.default.string,direction:a.default.string,endPosition:a.default.string,overlaysImage:a.default.string,radialDirection:a.default.string,startPosition:a.default.string,type:a.default.string})]);V.propTypes={name:a.default.oneOfType([a.default.bool,a.default.string]).isRequired,hasPreview:a.default.bool,hasColorManager:a.default.bool,showColorManagerOnPickerActive:a.default.bool,disableCurrent:a.default.bool,showPalettes:a.default.bool,isAlpha:a.default.bool,readonly:a.default.bool,animate:a.default.bool,value:U.isRequired,defaultValue:U,hideAddButton:a.default.bool,hideSwapButton:a.default.bool,hideRemoveButton:a.default.bool,hideResetButton:a.default.bool,_onChange:a.default.func,_onMouseEnter:a.default.func,_onMouseLeave:a.default.func,_onMouseEnterPreview:a.default.func,_onMouseLeavePreview:a.default.func,activeGradientStop:a.default.oneOfType([a.default.bool,a.default.string]),parsedGradient:a.default.arrayOf(a.default.shape({color:a.default.string,position:a.default.number,index:a.default.number,uuid:a.default.string,unit:a.default.string}))},V.defaultProps={hasPreview:!1,hasColorManager:!0,showColorManagerOnPickerActive:!0,disableCurrent:!1,showPalettes:!0,isAlpha:!0,readonly:!1,animate:!1,hideAddButton:!1,hideSwapButton:!1,hideRemoveButton:!1,hideResetButton:!1,_onChange:g.default,_onMouseEnter:g.default,_onMouseLeave:g.default,_onMouseEnterPreview:g.default,_onMouseLeavePreview:g.default,activeGradientStop:!1};var G=V;t.default=G},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=E(n(0)),a=E(n(3)),i=E(n(270)),l=E(n(13)),u=E(n(40)),s=E(n(11)),c=E(n(41)),d=(E(n(12)),E(n(4))),f=E(n(37)),p=E(n(7)),h=(E(n(9)),E(n(184)),E(n(28))),m=(E(n(34)),E(n(1))),y=E(n(217)),g=E(n(64)),b=E(n(16)),v=E(n(2)),_=E(n(307)),w=E(n(6)),O=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(95)),k=(E(n(22)),E(n(834)));n(1644);E(n(18));var S=E(n(15));function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function E(e){return e&&e.__esModule?e:{default:e}}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(this,arguments)}var T=E(n(216)).default.instance(),M="desktop";v.default.$appWindow().on("resize",(0,c.default)((function(){M=T.getViewModeByWidth(v.default.$appWindow().width()),v.default.$appWindow().trigger("et_builder_range_resize")}),400));var j=(0,i.default)({displayName:"ETBuilderControlRange",mixins:[b.default],isChangingRange:!1,getRangeSettings:function(){return(0,s.default)(this.props.range_settings)?{min:0,max:100,step:1}:this.props.range_settings},getInitialState:function(){var e=this.getRangeSettings();return{rangeMin:e.min,rangeMax:e.max,rangeStep:e.step,value:this.props.value,rangeFocus:!1}},componentDidMount:function(){var e=this.props.value;this.deferredUpdate=(0,c.default)(this.updateOptionAndState,700),parseFloat(this.state.rangeStep)>.1&&parseFloat(e)%1>0&&this.setState({rangeStep:"0.1"}),this.checkRangeBoundaries(this.state.value)},componentDidUpdate:function(e){(this.props.previewMode&&this.props.previewMode!==e.previewMode||this.state.value!==e.value)&&this.setState({value:this.emptyIfDefault(this.getCurrentInputValue())})},componentWillUnmount:function(){this.deferredUpdate.cancel()},_calculatePreviewMode:function(){var e=w.default.getPreviewMode();return"zoom"===e?"desktop":"wireframe"===e?"wireframe":M},getCurrentInputValue:function(){var e=this.props.value;if((0,f.default)(this.props.isTransformOrigin)){if("50%"===this.props.value)return"center";if("x"===this.props.isTransformOrigin){if("0%"===this.props.value)return"left";if("100%"===this.props.value)return"right"}else if("y"===this.props.isTransformOrigin){if("0%"===this.props.value)return"top";if("100%"===this.props.value)return"bottom"}}return(0,s.default)(e)||(0,g.default)(e)||(0,y.default)(e)?"":e},getDefaultValue:function(){var e=(0,m.default)(this,"props.allow_empty",!1)?void 0:0,t=(0,m.default)(this,"props.additionalAttrs.getDefaultFrom",!1),n=(0,m.default)(this,"props.default_values_mapping",!1),r=S.default.isMobile(this.props),o=this.props.default,a=this.props.allowed_values;return t&&n&&!r&&(o=(0,m.default)(n,t,o)),(0,p.default)(a,o)||v.default.hasValue(o)?o:e},getDefaultUnit:function(){var e=this.getDefaultValue();return(0,O.getUnit)(e,this.props.default_unit)},emptyIfDefault:function(e){return e===this.getDefaultValue()?"":e},isFixedUnit:function(){return v.default.hasValue(this.props.fixed_unit)},isAllowedUnit:function(){return v.default.hasValue(this.props.allowed_units)&&(0,d.default)(this.props.allowed_units)},isValidateUnit:function(){return!1!==this.props.validate_unit},validateValue:function(e){if((0,p.default)(this.props.allowed_values,e))return e;var t=this.props.value||this.props.default,n=O.default.getUnit(this.isChangingRange?t:e,this.props.default_unit);this.isAllowedUnit()&&!(0,p.default)(this.props.allowed_units,n)&&(n=this.props.default_unit||"px");var r=this.isFixedUnit()?this.props.fixed_unit:n,o=this.isValidateUnit()&&!0!==this.props.unitless?r:"";return O.default.sanitizeInputUnit((0,h.default)(parseFloat(e)),!1,o)},reset:function(e){e.preventDefault(),this.updateOptionAndState("")},onRangeFocus:function(){this.setState({rangeFocus:!0})},onRangeBlur:function(){this.setState({rangeFocus:!1})},inputsWrap:function(){var e="et-fb-".concat(this.props.name),t=this.props.name,n=(0,s.default)(this.getDefaultValue())?"0":this.validateValue(this.getDefaultValue()),r=this.validateValue(this.getCurrentInputValue())===n?"":this.validateValue(this.getCurrentInputValue()),a=""===r?n:r;if((0,f.default)(this.props.isTransformOrigin))switch(r){case"center":a=50;break;case"top":case"left":a=0;break;case"right":case"bottom":a=100}var i=(0,p.default)(["image_width","image_height","pattern_width","pattern_height","mask_width","mask_height"],this.props.field_template);i&&(0,p.default)(this.props.allowed_values,r)&&(a=0);var l={};v.default.hasValue(this.getRangeSettings().min_limit)&&(l.min=parseFloat(this.getRangeSettings().min_limit)),v.default.hasValue(this.getRangeSettings().max_limit)&&(l.max=parseFloat(this.getRangeSettings().max_limit)),isNaN(parseFloat(a))&&(a=this.state.rangeMax);var c={};return c.onInput=this._updateFromRange,c.onChange=u.default,o.default.createElement("div",{className:"et-fb-settings-option-inputs-wrap"},o.default.createElement("input",P({id:e,name:t,type:"range",min:this.state.rangeMin,max:this.state.rangeMax,step:this.getRangeStep(),className:"et-fb-range",value:parseFloat(a),"data-shortcuts-allowed":!0},c,{onFocus:this.onRangeFocus,onBlur:this.onRangeBlur})),o.default.createElement("div",{className:"et-fb-range-number et-fb-settings-option-input"},o.default.createElement(k.default,P({id:"".concat(e,"-number")},l,{value:r,onChange:this._onChange,defaultValue:n,defaultUnit:this.getDefaultUnit(),step:parseFloat(this.getRangeSettings().step),precision:this.props.precision,isTransformOrigin:this.props.isTransformOrigin,convertStringToZero:i,allowed_values:this.props.allowed_values}))))},render:function(){var e=this.getDefaultValue(),t=this.props.value,n=this.inputsWrap();return!t||t===e||this.props.readonly||this.props.disableReset||o.default.createElement("button",{className:"et-fb-settings-option-button--reset",onClick:this.reset}),o.default.createElement("div",{className:(0,l.default)({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-range":!0})},n)},updateOptionAndState:function(e){e=(0,s.default)(e)?this.state.value:e;var t=this.validateValue(e);this.setState({value:this.emptyIfDefault(t)}),this.props._onChange(this.props.name,t,this.props.type)},_updateFromRange:function(e){this.props.readonly||(this.isChangingRange=!0,this.updateOptionAndState(e.target.value),this.isChangingRange=!1)},_onChange:function(e){this.props.readonly||(this.updateOptionAndState(e),this.checkRangeBoundaries(e))},checkRangeBoundaries:function(e){if(v.default.hasValue(e)){var t=parseFloat(e);!v.default.hasValue(this.getRangeSettings().max_limit)&&t>this.state.rangeMax&&this.setState({rangeMax:t}),!v.default.hasValue(this.getRangeSettings().min_limit)&&t<this.state.rangeMin&&this.setState({rangeMin:t}),parseFloat(this.state.rangeStep)>.1&&t%1>0?this.setState({rangeStep:"0.1"}):parseFloat(this.state.rangeStep)<1&&0==t%1&&this.setState({rangeStep:this.getRangeSettings().step})}},getRangeStep:function(){return parseFloat(this.state.rangeStep)*(this.state.rangeFocus&&_.default.isPressedShift({strict:!1})?10:1)}});j.propTypes={default_unit:a.default.string,precision:a.default.number,name:a.default.string,value:a.default.oneOfType([a.default.string,a.default.object,a.default.array]),range_settings:a.default.object,mobile_options:a.default.bool,reset_animation:a.default.bool,previewMode:a.default.string,default:a.default.oneOfType([a.default.string,a.default.number]),default_tablet:a.default.string,default_phone:a.default.string,type:a.default.string,fixed_unit:a.default.string,validate_unit:a.default.bool,readonly:a.default.bool,_onChange:a.default.func,unitless:a.default.bool,isTransformOrigin:a.default.oneOfType([a.default.string,a.default.bool])},j.defaultProps={default_unit:"",allowed_values:[],isTransformOrigin:!1};var x=j;t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(0)),o=d(n(270)),a=d(n(13)),i=d(n(16)),l=d(n(40)),u=d(n(11)),s=d(n(184)),c=d(n(1));d(n(22));function d(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}n(1645);var p=(0,o.default)({displayName:"ETBuilderControlTextarea",mixins:[i.default],getInitialState:function(){return this.isEditing=!1,this.getNewState()},getModuleAddres:function(){return(0,c.default)(this,"props.module.props.module.props.address")},getNewState:function(){var e=this.props.is_fb_content?this.props.content:this.props.value;return{value:this.processValue(e),id:this.getModuleAddres()}},componentDidMount:function(){this.saveValue=(0,s.default)(this.updateOptionValue,0,{leading:!1})},componentDidUpdate:function(){this.getModuleAddres()!==this.state.id&&this.setState(this.getNewState())},UNSAFE_componentWillReceiveProps:function(e){if(this.isEditing)this.isEditing=!1;else{var t=this.props,n=t.is_fb_content?t.content:t.value,r=t.is_fb_content?e.content:e.value;n!=r&&this.setState({value:this.processValue(r)})}},processValue:function(e){return"string"!=typeof e||e?("raw_content"===this.props.name&&(e=e.split("\x3c!-- [et_pb_line_break_holder] --\x3e").join("\n")),"custom_message"!==this.props.name||(0,u.default)(e)||(e=e.split("||et_pb_line_break_holder||").join("\r\n")),e):new String("")},render:function(){var e=this.props.additional_attrs?this.props.additional_attrs:{},t={"et-fb-settings-option-textarea":!0};return this.props.className?t[this.props.className]=!0:(t["et-fb-main-setting"]=!0,t["regular-text"]=!0),r.default.createElement("textarea",f({className:(0,a.default)(t),value:this.state.value,name:this.props.name,id:"et-fb-".concat(this.props.name),onChange:l.default,onInput:this._onInput},e))},_onInput:function(e){var t=e.target.value;this.setState({value:this.processValue(t)}),this.saveValue.cancel(),this.saveValue()},updateOptionValue:function(){var e=this.state.value;this.isEditing=!0,this.props._onChange(this.props.name,e,this.props.type)}});t.default=p},function(e,t,n){!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function o(e){return e&&e.bracketRegex||/[(){}[\]]/}function a(e,t,a){var l=e.getLineHandle(t.line),u=t.ch-1,s=a&&a.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=o(a),d=!s&&u>=0&&c.test(l.text.charAt(u))&&r[l.text.charAt(u)]||c.test(l.text.charAt(u+1))&&r[l.text.charAt(++u)];if(!d)return null;var f=">"==d.charAt(1)?1:-1;if(a&&a.strict&&f>0!=(u==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,u+1)),h=i(e,n(t.line,u+(f>0?1:0)),f,p,a);return null==h?null:{from:n(t.line,u),to:h&&h.pos,match:h&&h.ch==d.charAt(0),forward:f>0}}function i(e,t,a,i,l){for(var u=l&&l.maxScanLineLength||1e4,s=l&&l.maxScanLines||1e3,c=[],d=o(l),f=a>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),p=t.line;p!=f;p+=a){var h=e.getLine(p);if(h){var m=a>0?0:h.length-1,y=a>0?h.length:-1;if(!(h.length>u))for(p==t.line&&(m=t.ch-(a<0?1:0));m!=y;m+=a){var g=h.charAt(m);if(d.test(g)&&(void 0===i||(e.getTokenTypeAt(n(p,m+1))||"")==(i||""))){var b=r[g];if(b&&">"==b.charAt(1)==a>0)c.push(g);else{if(!c.length)return{pos:n(p,m),ch:g};c.pop()}}}}}return p-a!=(a>0?e.lastLine():e.firstLine())&&null}function l(e,r,o){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,l=o&&o.highlightNonMatching,u=[],s=e.listSelections(),c=0;c<s.length;c++){var d=s[c].empty()&&a(e,s[c].head,o);if(d&&(d.match||!1!==l)&&e.getLine(d.from.line).length<=i){var f=d.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";u.push(e.markText(d.from,n(d.from.line,d.from.ch+1),{className:f})),d.to&&e.getLine(d.to.line).length<=i&&u.push(e.markText(d.to,n(d.to.line,d.to.ch+1),{className:f}))}}if(u.length){t&&e.state.focused&&e.focus();var p=function(){e.operation((function(){for(var e=0;e<u.length;e++)u[e].clear()}))};if(!r)return p;setTimeout(p,800)}}function u(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=l(e,!1,e.state.matchBrackets)}))}function s(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",u),t.off("focus",u),t.off("blur",s),s(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",u),t.on("focus",u),t.on("blur",s))})),e.defineExtension("matchBrackets",(function(){l(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),a(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return i(this,e,t,n,r)}))}(n(1482))},function(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function i(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function l(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function u(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(l(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(u(e))continue;return}if(i(e,t+1)){o.lastIndex=t,e.ch=t;var n=o.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){o.lastIndex=e.ch;var t=o.exec(e.text);if(!t){if(l(e))continue;return}if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(u(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var r=[];;){var o,a=d(e),i=e.line,l=e.ch-(a?a[0].length:0);if(!a||!(o=s(e)))return;if("selfClose"!=o)if(a[1]){for(var u=r.length-1;u>=0;--u)if(r[u]==a[2]){r.length=u;break}if(u<0&&(!n||n==a[2]))return{tag:a[2],from:t(i,l),to:t(e.line,e.ch)}}else r.push(a[2])}}function h(e,n){for(var r=[];;){var o=f(e);if(!o)return;if("selfClose"!=o){var a=e.line,i=e.ch,l=c(e);if(!l)return;if(l[1])r.push(l[2]);else{for(var u=r.length-1;u>=0;--u)if(r[u]==l[2]){r.length=u;break}if(u<0&&(!n||n==l[2]))return{tag:l[2],from:t(e.line,e.ch),to:t(a,i)}}}else c(e)}}e.registerHelper("fold","xml",(function(e,r){for(var o=new a(e,r.line,0);;){var i=d(o);if(!i||o.line!=r.line)return;var l=s(o);if(!l)return;if(!i[1]&&"selfClose"!=l){var u=t(o.line,o.ch),c=p(o,i[2]);return c&&n(c.from,u)>0?{from:u,to:c.from}:null}}})),e.findMatchingTag=function(e,r,o){var i=new a(e,r.line,r.ch,o);if(-1!=i.text.indexOf(">")||-1!=i.text.indexOf("<")){var l=s(i),u=l&&t(i.line,i.ch),d=l&&c(i);if(l&&d&&!(n(i,r)>0)){var f={from:t(i.line,i.ch),to:u,tag:d[2]};return"selfClose"==l?{open:f,close:null,at:"open"}:d[1]?{open:h(i,d[2]),close:f,at:"close"}:{open:f,close:p(i=new a(e,u.line,u.ch,o),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var o=new a(e,t.line,t.ch,n);;){var i=h(o,r);if(!i)break;var l=p(new a(e,t.line,t.ch,n),i.tag);if(l)return{open:i,close:l}}},e.scanForClosingTag=function(e,t,n,r){return p(new a(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(1482))},function(e,t,n){!function(e){function t(t,n,r){var o,a=t.getWrapperElement();return(o=a.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?o.innerHTML=n:o.appendChild(n),e.addClass(a,"dialog-opened"),o}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,o,a){a||(a={}),n(this,null);var i=t(this,r,a.bottom),l=!1,u=this;function s(t){if("string"==typeof t)d.value=t;else{if(l)return;l=!0,e.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),u.focus(),a.onClose&&a.onClose(i)}}var c,d=i.getElementsByTagName("input")[0];return d?(d.focus(),a.value&&(d.value=a.value,!1!==a.selectValueOnOpen&&d.select()),a.onInput&&e.on(d,"input",(function(e){a.onInput(e,d.value,s)})),a.onKeyUp&&e.on(d,"keyup",(function(e){a.onKeyUp(e,d.value,s)})),e.on(d,"keydown",(function(t){a&&a.onKeyDown&&a.onKeyDown(t,d.value,s)||((27==t.keyCode||!1!==a.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),s()),13==t.keyCode&&o(d.value,t))})),!1!==a.closeOnBlur&&e.on(i,"focusout",(function(e){null!==e.relatedTarget&&s()}))):(c=i.getElementsByTagName("button")[0])&&(e.on(c,"click",(function(){s(),u.focus()})),!1!==a.closeOnBlur&&e.on(c,"blur",s),c.focus()),s})),e.defineExtension("openConfirm",(function(r,o,a){n(this,null);var i=t(this,r,a&&a.bottom),l=i.getElementsByTagName("button"),u=!1,s=this,c=1;function d(){u||(u=!0,e.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),s.focus())}l[0].focus();for(var f=0;f<l.length;++f){var p=l[f];!function(t){e.on(p,"click",(function(n){e.e_preventDefault(n),d(),t&&t(s)}))}(o[f]),e.on(p,"blur",(function(){--c,setTimeout((function(){c<=0&&d()}),200)})),e.on(p,"focus",(function(){++c}))}})),e.defineExtension("openNotification",(function(r,o){n(this,s);var a,i=t(this,r,o&&o.bottom),l=!1,u=o&&void 0!==o.duration?o.duration:5e3;function s(){l||(l=!0,clearTimeout(a),e.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i))}return e.on(i,"click",(function(t){e.e_preventDefault(t),s()})),u&&(a=setTimeout(s,u)),s}))}(n(1482))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=d(n(37)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=d(n(123)),l=d(n(3)),u=d(n(6)),s=d(n(2));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1670);var w=ETBuilderBackend.i18n.library,O=function(t){!function(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&&m(e,t)}(d,t);var n,r,l,c=y(d);function d(t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),_(b(n=c.call(this,t)),"state",{showLibraryModal:!1,showSaveToLibraryModal:!1,content:""}),_(b(n),"getCodeSnippetsAppPreferences",(function(){var e,t=n.props.context,r="";switch(t){case"code_css":case"code_css_no_selector":e=w["CSS Snippet"];break;case"code_html":e=w["HTML/JS Snippet"],r=w["Code Snippet"]}return{containerId:"et-code-snippets-container",context:t,insertCodeCallback:n.insertCodeIntoField,itemsLabel:e,modalType:"add",showHelpButton:!1,sidebarLabel:r}})),_(b(n),"loadCodeSnippetsApp",(function(t){var n=window.parent.document;window.parent.jQuery("body").first().append('<div id="et-code-snippets-container" class="snippets-modals-portal"></div>'),e(window).trigger("et_code_snippets_container_ready",[t,n])})),_(b(n),"openSaveLibraryModal",(function(){if(!n.saveButtonRef.current.classList.contains("et-code-snippets-btn--disabled")){var e=n.props.editor,t="",r="";if((0,o.default)(e)){if(t=s.default.topDocument().getElementById(e).value,s.default.topWindow().getSelection)try{var a=s.default.topDocument().getElementById(e);r=a.value.substring(a.selectionStart,a.selectionEnd)}catch(e){console.log("Something went wrong")}}else e&&(t=e.getValue(),r=e.getSelection());var i=p(p({},n.getCodeSnippetsAppPreferences()),{},{modalType:"save",content:t,selectedContent:r});n.loadCodeSnippetsApp(i)}})),_(b(n),"openPortabilityModal",(function(){var e=n.props,t=e.editor,r=e.activateEditor;r&&r();var a="";(0,o.default)(t)?a=s.default.topDocument().getElementById(t).value:t&&(a=t.getValue());var i=p(p({},n.getCodeSnippetsAppPreferences()),{},{modalType:"portability",content:a});n.loadCodeSnippetsApp(i)})),_(b(n),"getEditorContent",(function(){var e=n.props,t=e.editor,r=e.activateEditor;r&&r();var a="";return(0,o.default)(t)?a=s.default.topDocument().getElementById(t).value:t&&(a=t.getValue()),a})),_(b(n),"handleSaveButtonMouseOver",(function(){""===n.getEditorContent()?n.saveButtonRef.current.classList.add("et-code-snippets-btn--disabled"):n.saveButtonRef.current.classList.remove("et-code-snippets-btn--disabled")})),n.openLibraryModal=n.openLibraryModal.bind(b(n)),n.closeLibraryModal=n.closeLibraryModal.bind(b(n)),n.insertCodeIntoField=n.insertCodeIntoField.bind(b(n)),n.saveButtonRef=a.default.createRef(),n}return n=d,r=[{key:"componentDidMount",value:function(){i.default.rebuild()}},{key:"insertCodeIntoField",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.props,r=n.getEditor,a=n.updateContent,i=n.editor;if(i&&(0,o.default)(i)){var l=s.default.topDocument().getElementById(i),u=e;if(t){var c=l.value;u="".concat(c," ").concat(e)}a(u)}else{var d=r(),f=d.getDoc();t?(e=f.getValue()?"\n"+e:e,f.replaceRange(e,{line:f.lastLine()})):f.setValue(e)}}},{key:"openLibraryModal",value:function(e){var t=this.props.activateEditor,n=p(p({},this.getCodeSnippetsAppPreferences()),{},{modalType:"add"});t&&t(),this.loadCodeSnippetsApp(n)}},{key:"closeLibraryModal",value:function(){this.setState({showLibraryModal:!1})}},{key:"isLibraryAllowed",value:function(){return u.default.isAllowedAction("divi_library")}},{key:"isLibraryAddAllowed",value:function(){return this.isLibraryAllowed()&&u.default.isAllowedAction("add_library")}},{key:"isLibrarySaveAllowed",value:function(){return this.isLibraryAllowed()&&u.default.isAllowedAction("save_library")}},{key:"isPortabilityAllowed",value:function(){return!!u.default.isAllowedAction("portability")&&u.default.isAllowedAction("et_code_snippets_portability")}},{key:"render",value:function(){return this.isLibraryAddAllowed()||this.isPortabilityAllowed()?a.default.createElement(a.default.Fragment,null,this.isLibraryAddAllowed()&&a.default.createElement("li",{className:"et-code-snippets-btn snippet-add","data-tip":w["Add From Library"],onClick:this.openLibraryModal},a.default.createElement("span",{className:"add"})),this.isLibrarySaveAllowed()&&a.default.createElement("li",{ref:this.saveButtonRef,className:"et-code-snippets-btn snippet-save","data-tip":w["Save To Library"],onClick:this.openSaveLibraryModal,onMouseOver:this.handleSaveButtonMouseOver},a.default.createElement("span",{className:"save"})),this.isPortabilityAllowed()&&a.default.createElement("li",{className:"et-code-snippets-btn snippet-portability","data-tip":w.Portability,onClick:this.openPortabilityModal},a.default.createElement("span",{className:"portability"}))):null}}],r&&h(n.prototype,r),l&&h(n,l),Object.defineProperty(n,"prototype",{writable:!1}),d}(a.PureComponent);_(O,"propTypes",{context:l.default.string.isRequired});var k=O;t.default=k}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=S(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=k(n(3)),i=k(n(16)),l=k(n(13)),u=k(n(363)),s=k(n(1)),c=k(n(7)),d=k(n(5)),f=k(n(11)),p=n(808),h=n(621),m=n(94),y=k(n(84)),g=k(n(805)),b=k(n(616)),v=n(2),_=n(60),w=n(49);n(1671);var O=["className"];function k(e){return e&&e.__esModule?e:{default:e}}function S(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(S=function(e){return e?n:t})(e)}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(this,arguments)}function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}function M(e){var t=function(){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}}();return function(){var n,r=D(e);if(t){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A=(0,u.default)((function(e,t,n){var r="data:image/svg+xml;utf8,".concat(t);return o.default.createElement("img",{alt:e,src:r,style:L({},n)})})),I=function(e,t,n,r){var o,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=t?y.default.inverse:y.default.inactiveGrey,l=(0,h.getTransformState)(r,"horizontal"),u=(0,h.getTransformState)(r,"vertical"),s=(0,h.getTransformState)(r,"rotate"),c=(0,h.getTransformState)(r,"invert"),d=(0,h.getTransformCSS)(l,u),f=a?"100%":"",m={transform:d,width:f};return o="select-mask"===n?(0,p.getSvgMask)(e,i,"thumbnail",s,c,"stretch"):(0,p.getSvgPattern)(e,i,"thumbnail",s,c),A(e,o,m)},B=function(e){return"et-fb-settings-option-preview--".concat(e)},F=function(e){!function(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&&T(e,t)}(u,e);var t,n,r,a=M(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=a.call(this,e))._selectRef=o.default.createRef(),t.shouldComponentUpdate=i.default.shouldComponentUpdate.bind(x(t)),t._onChange=t._onChange.bind(x(t)),t._onClick=t._onClick.bind(x(t)),t._onClickRemove=t._onClickRemove.bind(x(t)),t._onClickReset=t._onClickReset.bind(x(t)),t._onClickSelect=t._onClickSelect.bind(x(t)),t._getAddTitle=t._getAddTitle.bind(x(t)),t._getBackgroundStyle=t._getBackgroundStyle.bind(x(t)),t._getPreviewContent=t._getPreviewContent.bind(x(t)),t._getSvgType=t._getSvgType.bind(x(t)),t._renderPreview=t._renderPreview.bind(x(t)),t}return t=u,(n=[{key:"_onChange",value:function(e){var t=this.props,n=t._onChange;n(t.name,e.target.value)}},{key:"_onClick",value:function(){var e=this.props;(0,e._onChange)(e.name,"default")}},{key:"_onClickRemove",value:function(){var e=this.props;(0,e._onChange)(e.name,"")}},{key:"_onClickReset",value:function(){var e=this.props;(0,e._onChange)(e.name,"default")}},{key:"_onClickSelect",value:function(){var e=(0,v.$appWindow)(ReactDOM.findDOMNode(this._selectRef.current)).find("li.select-option-item.et-fb-selected-item").first();e.length&&e.trigger("click",[e.data("value")])}},{key:"_getAddTitle",value:function(){var e=ETBuilderBackend.i18n.controls.background,t="mask"===this._getSvgType()?e.addMask:e.addPattern;return(0,s.default)(this,"props.addTitle",t)}},{key:"_getBackgroundStyle",value:function(e){if(!(0,m.hasValue)(e))return{};var t=this.props.imageField,n=(0,s.default)(this,"props.imagePreviewAttrs",{}),r=(0,s.default)(this,"props.module.props.module.props"),o=(0,c.default)(ETBuilderBackend.modulesFeaturedImageBackground,(0,s.default)(r,"type"))&&(0,m.isOn)((0,s.default)(r,"attrs.featured_image"))&&"background"===(0,s.default)(r,"attrs.featured_placement"),a=(0,s.default)(t,"value","");o?o&&(a=ETBuilderBackend.currentPage.thumbnailUrl):(0,s.default)(this,"props.dynamic.image.dynamic",!1)&&(a=(0,s.default)(this,"props.dynamic.image.value",""));var i={};if((0,m.hasValue)(a)){if(i.backgroundImage="url(".concat(encodeURI(a),")"),n.parallax)i.backgroundRepeat="no-repeat",i.backgroundSize="cover",i.backgroundPosition="center",n.gradient&&(0,m.isOn)(n.gradientOverlaysImage)&&(i.backgroundBlendMode=n.blend);else{i.backgroundColor=n.color,i.backgroundBlendMode=n.blend;var l=n.size;if(!(0,f.default)(l)){var u=n.image_width,d=n.image_height,p=(0,h.getBackgroundSizeCss)(l,u,d);p.size&&(i.backgroundSize=p.size)}if((0,m.hasValue)(l)&&"stretch"!==l&&(i.backgroundRepeat=n.repeat,(0,m.hasValue)(n.repeat)&&"space"!==n.repeat)){var y=n.position;if((0,m.hasValue)(y)){var g=n.horizontal_offset,b=n.vertical_offset,v=(0,h.getBackgroundPositionCss)(y,g,b);i.backgroundPosition=v.position}}}n.gradient&&(a&&(i.backgroundColor="initial"),(0,m.isOn)(n.gradientOverlaysImage)?i.backgroundImage="".concat(n.gradient,", url(").concat(a,")"):i.backgroundImage="url(".concat(a,"), ").concat(n.gradient))}else(0,m.hasValue)(n.gradient)?i.backgroundImage=n.gradient:i.backgroundColor=n.color;return i}},{key:"_getPreviewContent",value:function(e){if(!(0,m.hasValue)(e))return null;var t,n,r,a,i=this.props,u=i.isExtendStylesModal,c=i.maskPreviewStyle,f=i.patternPreviewStyle,p=i.videoNode,h=i.type;if(u){var y=(0,s.default)(this.props,"transformValues","");return I(e,!1,h,y,!0)}return o.default.createElement(o.Fragment,null,(0,d.default)(p)?null:(r=p,o.default.createElement("div",{className:(0,l.default)((a={},R(a,"".concat(B("background-content")),!0),R(a,"".concat(B("background-video")),!0),a))},r)),(0,d.default)(f)?null:(t=f,o.default.createElement("div",{className:(0,l.default)((n={},R(n,"".concat(B("background-content")),!0),R(n,"".concat(B("background-pattern")),!0),n)),style:t})),(0,d.default)(c)?null:function(e){var t;return o.default.createElement("div",{className:(0,l.default)((t={},R(t,"".concat(B("background-content")),!0),R(t,"".concat(B("background-mask")),!0),t)),style:e})}(c))}},{key:"_getSvgType",value:function(){return"select-mask"===this.props.type?"mask":"pattern"}},{key:"_renderPreview",value:function(e,t){var n=this.props,r=n.hideAddButton,a=n.hideEditButton,i=n.hideRemoveButton,u=n.hideResetButton,c=n.readonly,d=n.name,f=(0,m.hasValue)(e),p=!c&&!r&&!f,h=!c&&!a&&f,y=!c&&!i&&f,b=!c&&!u&&f&&e!==t,v=["background_mask_style","background_pattern_style"].includes(d);if(f&&(0,s.default)(this,"props.dynamic.image.loading",!1))return o.default.createElement("div",{className:"et-fb-control-image-preview__preview et-fb-control-image-preview__preview--background"},(0,_.renderLoading)("image"));var w=R({"et-fb-settings-option-preview--svg":!0},"et-fb-settings-option-preview--svg-".concat(this._getSvgType()),!0);return o.default.createElement(g.default,{className:(0,l.default)(w),addTitle:this._getAddTitle(),previewStyle:this._getBackgroundStyle(e),showAddButton:p,showEditButton:h,showRemoveButton:y,showResetButton:b,onClickCanvas:p?this._onClick:this._onClickSelect,onClickAddButton:this._onClick,onClickEditButton:this._onClick,onClickRemoveButton:this._onClickRemove,onClickResetButton:this._onClickReset,hideAIButton:v},this._getPreviewContent(e))}},{key:"render",value:function(){var e=(0,s.default)(this.props,"default",""),t=(0,s.default)(this.props,"value",e),n=this.props,r=n.className,a=E(n,O),i=["et-fb-settings-option-select--svg",["et-fb-settings-option-select--".concat(this._getSvgType())],r].join(" "),u=o.default.createElement(b.default,C({ref:this._selectRef,className:i,getSvgContent:I,isControlSelectSVG:!0},a));return o.default.createElement("div",{className:(0,l.default)({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-svg":!0,"et-fb-settings-option-inner-svg--previewable":!0})},this._renderPreview(t,e),(0,m.hasValue)(t)?u:null)}}])&&P(t.prototype,n),r&&P(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Component),W=a.default.objectOf(a.default.oneOfType([a.default.bool,a.default.number,a.default.string]));F.propTypes={_onChange:a.default.func.isRequired,className:a.default.string,default:a.default.string.isRequired,hideAddButton:a.default.bool,hideEditButton:a.default.bool,hideRemoveButton:a.default.bool,hideResetButton:a.default.bool,imageField:W,imagePreviewAttrs:W,maskPreviewStyle:W,moduleAttrs:W,name:a.default.string.isRequired,patternPreviewStyle:W,readonly:a.default.bool,type:a.default.string.isRequired,value:a.default.string.isRequired,videoNode:a.default.node},F.defaultProps={className:"",hideAddButton:!1,hideEditButton:!0,hideRemoveButton:!1,hideResetButton:!1,imagePreviewAttrs:{},maskPreviewStyle:{},moduleAttrs:{},patternPreviewStyle:{},readonly:!1,videoNode:null};var V=(0,w.withDynamicContent)((function(e){return{image:{attribute:(0,s.default)(e,"imageField.name","background_image"),type:"image",value:(0,s.default)(e,"imageField.value","")}}}),(function(e){return{_dynamic_attributes:(0,s.default)(e,"imageField.dynamic",!1)?(0,s.default)(e,"imageField.name",""):""}}))(F);t.default=V},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=m(n(0)),a=(m(n(3)),m(n(13))),i=m(n(1)),l=m(n(31)),u=m(n(125)),s=m(n(42)),c=m(n(7)),d=m(n(794)),f=(m(n(116)),m(n(11))),p=m(n(84)),h=m(n(43));function m(e){return e&&e.__esModule?e:{default:e}}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function b(e){var t=function(){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}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}n(1672);var O=function(t){!function(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&&g(e,t)}(w,t);var n,r,m,v=b(w);function w(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),(e=v.call(this)).state={activeOption:[]},e._onChange=e._onChange.bind(_(e)),e.switchButton=e.switchButton.bind(_(e)),e.getProcessedValue=e.getProcessedValue.bind(_(e)),e}return n=w,(r=[{key:"shouldComponentUpdate",value:function(e,t){return!(0,s.default)(e,this.props)||!(0,s.default)(t,this.state)}},{key:"componentDidMount",value:function(){this.setState({activeOption:this.getProcessedValue()})}},{key:"componentDidUpdate",value:function(){this.setState({activeOption:this.getProcessedValue()})}},{key:"getProcessedValue",value:function(){var e=this.props.value||this.props.default;return(0,f.default)(e)||""===e||this.props.emptyMobileNone&&"none"===e?[]:e.split("|")}},{key:"switchButton",value:function(t){t.preventDefault();var n=e(t.target).closest(".et-fb-multiple-buttons-toggle").data("option_value"),r=this.state.activeOption;this.props.toggleable&&(0,c.default)(this.state.activeOption,n)?r=this.props.multi_selection?(0,d.default)(r,n).join("|"):this.props.default:(this.props.multi_selection&&r.push(n),r=this.props.multi_selection?r.join("|"):n),this.props.emptyMobileNone&&""===r&&(r="none"),this._onChange(r)}},{key:"_onChange",value:function(e){var t=this.props,n=t.name,r=t._onChange,o=e;this.props.emptyMobileNone&&"none"===e&&(o=""),this.setState({activeOption:o.split("|")}),r(n,e)}},{key:"render",value:function(){var e=this,t=e.props.options,n=(0,u.default)(this.props.options),r=100/n,s="".concat(r-r*(3*(n-1)/100),"%"),d=(0,l.default)(t,(function(t,n){var r=(0,i.default)(t,"icon",!1),l=(0,c.default)(e.state.activeOption,n),u=l?p.default.activeTabIcon:p.default.optionTabIcon,d=(0,a.default)({"et-fb-multiple-buttons-toggle-internal":!0,"et-fb-multiple-buttons-toggle-internal__active":l}),f=r?o.default.createElement(h.default,{icon:t.icon,color:u}):t.title;return o.default.createElement("li",{className:"et-fb-multiple-buttons-toggle",style:{width:s},"data-option_value":n,onClick:e.switchButton,key:n},o.default.createElement("span",{className:d},f))}));return o.default.createElement("div",{className:"et-fb-multiple-buttons-outer"},o.default.createElement("ul",{className:"et-fb-multiple-buttons-container"},d))}}])&&y(n.prototype,r),m&&y(n,m),Object.defineProperty(n,"prototype",{writable:!1}),w}(o.default.Component);t.default=O}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=(c(n(3)),c(n(58))),i=c(n(11)),l=c(n(1674)),u=c(n(14)),s=["post_type","include_latest_post","include_current_post","current_post_type","defaultOption"];function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e){var t=function(){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}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(e){!function(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&&y(e,t)}(c,e);var t,n,r,u=g(c);function c(){var e;h(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(v(e=u.call.apply(u,[this].concat(n))),"filterOptionLabel",(function(e,t,n){var r=(0,a.default)(n,(function(e){return e.value.toString()===t.toString()}));return(0,i.default)(r)?e:o.default.createElement(o.Fragment,null,o.default.createElement("span",{className:"et-fb-select-ajaxified__item-label"},e))})),w(v(e),"getArguments",(function(t,n,r){var o=e.props,a=o.post_type,i=o.include_latest_post,l=o.include_current_post,u=o.current_post_type;return{action:"et_builder_search_posts",nonce:ETBuilderBackend.nonces.searchPosts,post_type:a,include_latest_post:i,include_current_post:l,current_post_type:u,value:t,search:n,page:r}})),e}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=(e.post_type,e.include_latest_post,e.include_current_post,e.current_post_type,e.defaultOption),n=p(e,s);return o.default.createElement(l.default,f({},n,{labelFilter:this.filterOptionLabel,defaultOption:t,arguments:this.getArguments}))}}])&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.PureComponent);w(O,"defaultProps",{include_latest_post:"0",include_current_post:"0",current_post_type:u.default.postType,defaultOption:!1});var k=O;t.default=k},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=k(n(148)),a=k(n(136)),i=k(n(5)),l=k(n(7)),u=k(n(34)),s=k(n(9)),c=k(n(65)),d=k(n(0)),f=k(n(13)),p=k(n(27)),h=k(n(1680)),m=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(2)),y=k(n(457)),g=k(n(63)),b=k(n(198)),v=k(n(616)),_=k(n(43)),w=k(n(84));function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}function k(e){return e&&e.__esModule?e:{default:e}}function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function T(e){var t=function(){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}}();return function(){var n,r=x(e);if(t){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return M(this,n)}}function M(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1682);var N=function(t){!function(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&&P(e,t)}(M,t);var n,r,O,k=T(M);function M(){var t;C(this,M);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return D(j(t=k.call.apply(k,[this].concat(r))),"iconsBufferStepSize",100),D(j(t),"_key_suffix","icon_picker_el"),D(j(t),"state",{iconSearchString:t.iconSearchString||"",fontIcons:ETBuilderBackend.fontIconsExtended,toolTipActive:!1,hasMoreIcons:!0,iconsBufferSize:t.iconsBufferStepSize}),D(j(t),"componentDidMount",(function(){m.default.topWindow().addEventListener("mousedown",t.maybeCloseDropdown),t.scrollContainer=e(p.default.findDOMNode(j(t))).find(".et-fb-font-icon-list")[0],t._key_suffix=t.props._key_suffix?t.props._key_suffix:t._key_suffix})),D(j(t),"_onFilterReset",(function(){var e=void 0,n=t.getFilteredSearchIcons(t.state.iconSearchString,e);t.setState({filterSelected:e,filterDropdownActive:!1,fontIcons:n}),t.refreshScrollContainer(n)})),D(j(t),"_onFilterSelect",(function(e){var n=t.getFilteredSearchIcons(t.state.iconSearchString,e);t.setState({filterSelected:e,filterDropdownActive:!1,fontIcons:n}),t.refreshScrollContainer(n)})),D(j(t),"_onSearchInput",(function(e,n){var r=t.getFilteredSearchIcons(n,t.state.filterSelected);t.setState({iconSearchString:n,fontIcons:r}),t.refreshScrollContainer(r)})),D(j(t),"refreshScrollContainer",(function(e){t.scrollContainer.scrollTo(0,0);var n=e.length>t.iconsBufferStepSize;t.setState({iconsBufferSize:n?t.iconsBufferStepSize:e.length,hasMoreIcons:n})})),D(j(t),"_onFilterDropdownToggle",(function(){t.setState({filterDropdownActive:!t.state.filterDropdownActive})})),D(j(t),"maybeCloseDropdown",(function(n){t.state.filterDropdownActive&&e(n.target).closest(".et-fb-options-filter-dropdown-wrap, .et-fb-options-filter-button-group").length<1&&t._onFilterDropdownToggle()})),D(j(t),"orderIconlist",(function(e,t){return(0,a.default)(e,[function(e){return 1e3*e.search_terms.toLowerCase().indexOf(t)+e.search_terms.length}])})),D(j(t),"increaseBufferSize",(function(){var e=t.state.iconsBufferSize+t.iconsBufferStepSize;e>t.state.fontIcons.length?t.setState({hasMoreIcons:!1,iconsBufferSize:t.state.fontIcons.length}):t.setState({iconsBufferSize:e})})),D(j(t),"_renderFilterOutput",(function(){var e=ETBuilderBackend.searchFilterIconItems,n={show_only:ETBuilderBackend.i18n.modals.show_only},r=t.state.filterSelected?t.state.filterSelected:void 0,o=(0,u.default)(e.show_only,r)?e.show_only[r]:r,a=!(0,i.default)(r),l=(0,i.default)(t.state.filterSelected)?d.default.createElement(b.default,{className:"et-fb-options-filter-button-group"},d.default.createElement(g.default,{_onClick:t._onFilterDropdownToggle},d.default.createElement(_.default,{icon:"add",color:a?w.default.white:w.default.shuttleGrey,size:"14"})),d.default.createElement(g.default,{_onClick:t._onFilterDropdownToggle},ETBuilderBackend.i18n.modals.filter)):d.default.createElement(b.default,{className:"et-fb-options-filter-button-group"},d.default.createElement(g.default,{_onClick:t._onFilterDropdownToggle},o),d.default.createElement(g.default,{_onClick:t._onFilterReset},d.default.createElement(_.default,{icon:"exit",color:a?w.default.white:w.default.shuttleGrey,size:"10"}))),s=t.props.dropDownClassName?t.props.dropDownClassName:"",c=!!t.state.filterDropdownActive&&d.default.createElement("div",{className:"et-fb-options-filter-dropdown-wrap et-fb-icons-filter-dropdown-wrap"},d.default.createElement(v.default,{value:r,name:s,options:e,optionGroups:n,__onChange:t._onFilterSelect,iconPickerMenuCustomStyling:t.props.iconPickerMenuCustomStyling,activeOnLoad:!0}));return d.default.createElement("div",{className:(0,f.default)({"et-fb-font-icon-filter":!0,"et-fb-options-filter--has-dropdown":!0})},d.default.createElement("div",{className:"et-fb-options-filter-input-wrap et-fb-icons-filter-input-wrap"},d.default.createElement(y.default,{type:"text",value:t.state.iconSearchString,name:"icons_filter",_onChange:t._onSearchInput,additional_attrs:{placeholder:ETBuilderBackend.i18n.modals.searchIcons}})),!!e&&d.default.createElement("div",{className:"et-fb-options-filter-button-wrap"},l),c)})),t}return n=M,(r=[{key:"componentWillUnmount",value:function(){m.default.topWindow().removeEventListener("mousedown",this.maybeCloseDropdown)}},{key:"processIconSearchTerm",value:function(e){return"undefined"==typeof search_word&&(0,o.default)(e.replace(/-/g," ")).toLowerCase()}},{key:"getFilteredSearchIcons",value:function(e,t){var n=this,r=ETBuilderBackend.fontIconsExtended;if(e=this.processIconSearchTerm(e),void 0!==t&&0<t.length&&"show_only"!==t&&(r=(0,c.default)(r,(function(e){return e.styles.includes(t)}))),e&&1<e.length){var o=new RegExp("\\b".concat(e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"\\b"),"i"),a=[];(0,s.default)(r,(function(e){var t=n.processIconSearchTerm(e.search_terms);t&&o.test(t)&&a.push(e)})),a=this.orderIconlist(a,e);var i=(0,c.default)(r,(function(t){var n=!1;return(0,s.default)(a,(function(e){n=n||e.search_terms.toLowerCase()===t.search_terms.toLowerCase()})),!1===n&&(0,l.default)(t.search_terms.toLowerCase(),e)}));i=this.orderIconlist(i,e),r=a.concat(i)}return r}},{key:"getPickerClasses",value:function(){return{"et-fb-tabs__panel--css":!0,"et-fb-tabs__panel":!0,"et-fb-tabs__panel--font-icon":!0,"et-fb-tabs__panel--font-icon-active":(0,m.hasValue)(this.state.filterSelected),"et-fb-tabs__panel--filter-dropdown":!0}}},{key:"_renderBufferedFontIconsList",value:function(){for(var e=m.default.getExtendedIconData(this.props.iconValue),t=this.state.fontIcons,n=this.state.iconsBufferSize,r=this.state.iconsBufferStepSize,o=[],a=m.default.decodeIconUnicode(e.unicode),i=e.fontWeight,l=t.length<r||t.length<n?t.length:n,u=0;u<l;u++){var s=t[u];if(void 0===s)break;var c={"et-pb-fa-icon":!s.is_divi_icon,active:s.decoded_unicode===a&&Number.parseInt(i)===Number.parseInt(s.font_weight),"et-pb-black-icon":!s.is_divi_icon&&m.default.maybeBlackFontWeightIcon(s.font_weight),"et-pb-normal-icon":!s.is_divi_icon&&m.default.maybeNormalFontWeightIcon(s.font_weight)};o.push(d.default.createElement("li",{className:(0,f.default)(c),key:"".concat(this._key_suffix,"-font-icon-").concat(u),"data-icon":s.decoded_unicode,"data-icon-utf":s.unicode,"data-icon-type":s.is_divi_icon?"divi":"fa","data-icon-font-weight":s.font_weight,onClick:this.props.handleChangeIcon}))}return o}},{key:"render",value:function(){var e=this,t=this._renderBufferedFontIconsList(),n=this.props.additional_attrs?this.props.additional_attrs:{};return d.default.createElement("div",null,d.default.createElement("div",{className:(0,f.default)(this.getPickerClasses())},this._renderFilterOutput()),d.default.createElement("ul",S({id:"et-fb-".concat(this.props.name),style:this.props.listStyle,className:"et-fb-font-icon-list et-fb-modal-allow-scroll-ext et-fb-allow-mouse-wheel"},n),d.default.createElement(h.default,{pageStart:0,loadMore:this.increaseBufferSize,hasMore:this.state.hasMoreIcons,useWindow:!1,getScrollParent:function(){return e.scrollContainer}},t)))}}])&&E(n.prototype,r),O&&E(n,O),Object.defineProperty(n,"prototype",{writable:!1}),M}(d.default.Component),L=N;t.default=L}).call(this,n(8))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=w(n(3)),i=w(n(13)),l=n(93),u=w(n(1)),s=w(n(34)),c=w(n(7)),d=w(n(11)),f=w(n(40)),p=n(621),h=w(n(84)),m=w(n(805)),y=w(n(2)),g=w(n(1543)),b=n(94),v=n(785),_=w(n(6));function w(e){return e&&e.__esModule?e:{default:e}}function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function E(e){var t=function(){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}}();return function(){var n,r=M(e);if(t){var o=M(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}n(1703);var j={},x=function(t){!function(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&&C(e,t)}(O,t);var n,r,a,w=E(O);function O(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),t=w.call(this,e),n=T(t),o="ETBuilderControlUpload",(r="displayName")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t._onChange=t._onChange.bind(T(t)),t._onClick=t._onClick.bind(T(t)),t._onClickRemove=t._onClickRemove.bind(T(t)),t._onClickReset=t._onClickReset.bind(T(t)),t}return n=O,(r=[{key:"_onChange",value:function(e){this.props._onChange(this.props.name,e.target.value)}},{key:"_onClick",value:function(t){if(!this.props.readonly){t&&"function"==typeof t.preventDefault&&t.preventDefault(),t&&"function"==typeof t.stopPropagation&&t.stopPropagation();var n=(0,u.default)(y.default.topWindow(),"getUserSetting",f.default)("imgsize"),r=(0,u.default)(y.default.topWindow(),"setUserSetting",f.default),o=function(){return r("imgsize",n)},a=y.default.$topWindow(".et-cloud-item-editor").length>0;r("imgsize","full");var i,c=a?y.default.appWindow().wp.media:y.default.topWindow().wp.media,p=this.props,h=p.name,m=p.hide_metadata,g=p.attachment_id,b=p.embed,v=p.choose_text,_=p.upload_button_text,w=p._onChange,O=p._onEnableBackgroundSetting;if(!0===m&&e("body").addClass("et-bp-settings-option-upload-hide-metadata"),a&&y.default.$topWindow("body").addClass("et-bp-settings-hide-settings-modal"),void 0!==i)return i.open(),void o();(i=c.frames.file_frame=new c.view.MediaFrame.ETSelect({title:(0,l.decode)(v),library:{type:this._getDataType()},button:{text:(0,l.decode)(_)},multiple:!1,embed:b})).on("select",(function(){var e=i.state().props.get("url");w(h,e)})),i.on("close",(function(){e("body").removeClass("et-bp-settings-option-upload-hide-metadata"),y.default.$topWindow("body").removeClass("et-bp-settings-hide-settings-modal")})),i.on("insert",(function(){var e=i.state().get("selection").first();if(e){var t=e.get("alt");t&&(0,d.default)(O)&&w("alt",t);var n=e.get("title");n&&(0,d.default)(O)&&w("title_text",n);var r=e.get("url"),o=i.state().display(e).get("size");o&&(0,s.default)(e,"attributes.sizes.".concat(o))&&(r=(0,u.default)(e,"attributes.sizes.".concat(o)).url);var a=r;if(g){var l=e.get("id");j[l]=r,a=l}w(h,a)}})),i.open(),o()}}},{key:"_onClickRemove",value:function(){this.props._onChange(this.props.name,""),(0,d.default)(this.props._onEnableBackgroundSetting)||this.props._onEnableBackgroundSetting(this.props.name,"delete",this.props.type)}},{key:"_onClickReset",value:function(){this.props._onChange(this.props.name,"",void 0,void 0,!0),(0,d.default)(this.props._onEnableBackgroundSetting)||this.props._onEnableBackgroundSetting(this.props.name,"reset",this.props.type)}},{key:"_hasPreview",value:function(){return"image"===this._getDataType()||"video"===this._getDataType()}},{key:"getAddTitle",value:function(){var e=ETBuilderBackend.i18n.controls.upload,t="video"===this._getDataType()?e.addVideo:e.addImage;return(0,u.default)(this,"props.addTitle",t)}},{key:"_getDataType",value:function(){return(0,d.default)(this.props.data_type)?"image":this.props.data_type}},{key:"_getPreviewStyle",value:function(e){if(y.default.hasValue(e)&&this._hasPreview()&&"video"!==this._getDataType()){var t={};if((0,u.default)(this,"props.isBackgroundType")){var n=(0,u.default)(this,"props.imagePreviewAttrs",{});if(t.backgroundImage="url(".concat(e,")"),n.parallax)t.backgroundRepeat="no-repeat",t.backgroundSize="cover",t.backgroundPosition="center",n.gradient&&y.default.isOn(n.gradientOverlaysImage)&&(t.backgroundBlendMode=n.blend);else{t.backgroundColor=n.color,t.backgroundBlendMode=n.blend;var r=n.size;if(!(0,d.default)(r)){var o=n.image_width,a=n.image_height,i=(0,p.getBackgroundSizeCss)(r,o,a);i.size&&(t.backgroundSize=i.size)}if((0,b.hasValue)(r)&&"stretch"!==r&&(t.backgroundRepeat=n.repeat,(0,b.hasValue)(n.repeat)&&"space"!==n.repeat)){var l=n.position;if((0,b.hasValue)(l)){var s=n.horizontal_offset,c=n.vertical_offset,f=(0,p.getBackgroundPositionCss)(l,s,c);t.backgroundPosition=f.position}}}n.gradient&&(e&&(t.backgroundColor="initial"),y.default.isOn(n.gradientOverlaysImage)?t.backgroundImage="".concat(n.gradient,", url(").concat(e,")"):t.backgroundImage="url(".concat(e,"), ").concat(n.gradient))}else t.backgroundColor=h.default.uploadImagePreview;return t}}},{key:"_getPreviewContent",value:function(e){if(y.default.hasValue(e)&&this._hasPreview())return"image"!==this._getDataType()||(0,u.default)(this,"props.isBackgroundType")?"video"===this._getDataType()?o.default.createElement(g.default,{className:"et-fb-settings-option-preview-content",loop:"loop",muted:"muted",autoPlay:"autoplay",height:190,style:{width:"100%",background:"rgb(51, 59, 68)"},src:(0,v.setArgs)({width:500,controls:0,fs:0,iv_load_policy:3,modestbranding:1,showinfo:0},e)}):void 0:o.default.createElement("img",{src:e})}},{key:"_renderPreview",value:function(e,t){if(!this._hasPreview())return!1;var n=this.props,r=n.name,a=n.type,i=n.readonly,l=n.hideAddButton,u=n.hideEditButton,s=n.hideRemoveButton,c=n.hideResetButton,d=y.default.hasValue(e),f=!i&&!l&&!d,p=!i&&!u&&d,h=!i&&!s&&d,g=!i&&!c&&d&&e!==t,b=!_.default.isAllowedAction("divi_ai");return o.default.createElement(m.default,{name:r,type:a,className:"et-fb-settings-option-upload-type-".concat(this._getDataType()),addTitle:this.getAddTitle(),previewStyle:this._getPreviewStyle(e),showAddButton:f,showEditButton:p,showRemoveButton:h,showResetButton:g,onClickCanvas:this._onClick,onClickAddButton:this._onClick,onClickEditButton:this._onClick,onClickRemoveButton:this._onClickRemove,onClickResetButton:this._onClickReset,value:this.props.value,dataType:this._getDataType(),hideAIButton:b},this._getPreviewContent(e))}},{key:"render",value:function(){var e=this._hasPreview(),t=(0,u.default)(this.props,"default",""),n=(0,u.default)(this.props,"value",t),r=(0,u.default)(this.props,"additional_attrs",{}),a={"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-upload":!0,"et-fb-settings-option-inner-upload--previewable":e},l={"et-fb-settings-option-input":!0,"et-fb-settings-option-upload":!0},s=(0,u.default)(this,"props.module.props.module.props"),d="background_image"===(0,u.default)(this,"props.name")&&(0,c.default)(ETBuilderBackend.modulesFeaturedImageBackground,(0,u.default)(s,"type"))&&y.default.isOn((0,u.default)(s,"attrs.featured_image"))&&"background"===(0,u.default)(s,"attrs.featured_placement");this.props.className?l[this.props.className]=!0:(l["et-fb-main-setting"]=!0,l["regular-text"]=!0);var f=this.props,p=f.aiImageID,h=f.aiImageURL;return h&&(j[p]=h,n=p),(0,u.default)(this,"props.attachment_id")&&y.default.hasValue(n)&&(t=(0,u.default)(j,t,ETBuilderBackend.currentPage.thumbnailUrl),n=(0,u.default)(j,n,t)),d&&(n=ETBuilderBackend.currentPage.thumbnailUrl),o.default.createElement("div",{className:(0,i.default)(a)},this._renderPreview(n,t),o.default.createElement("input",k({className:(0,i.default)(l),type:"text",value:n,name:this.props.name,id:"et-fb-".concat(this.props.name),onChange:this._onChange},r)),o.default.createElement("button",{className:"et-fb-settings-option-upload-button",onClick:this._onClick},ETBuilderBackend.i18n.controls.upload.buttonText))}}])&&S(n.prototype,r),a&&S(n,a),Object.defineProperty(n,"prototype",{writable:!1}),O}(o.PureComponent);x.propTypes={choose_text:a.default.string,upload_button_text:a.default.string,embed:a.default.bool,attachment_id:a.default.bool,isBackgroundType:a.default.bool,hideAddButton:a.default.bool,hideEditButton:a.default.bool,hideRemoveButton:a.default.bool,hideResetButton:a.default.bool},x.defaultProps={choose_text:"",upload_button_text:"",embed:!0,attachment_id:!1,isBackgroundType:!1,hideAddButton:!1,hideEditButton:!1,hideRemoveButton:!1,hideResetButton:!1};var D=x;t.default=D}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(0)),o=d(n(3)),a=d(n(1699)),i=d(n(1700)),l=d(n(1701)),u=d(n(1497)),s=d(n(1702)),c=["src"];function d(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var h=function(e){var t,n=e.src,o=p(e,c),d=function(e){return null!==e.match(/[^\/]+(\/[^\/]+)+\.[a-z|0-9]{2,5}(\?.+)?$/i)}(t=n)?a.default:function(e){return null!==e.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/i)}(t)?i.default:function(e){return null!==e.match(/(https?:\/\/)?(www\.)?vimeo\.com/i)}(t)?l.default:function(e){return null!==e.match(/(https?:\/\/)?(www\.)?dailymotion\.com/i)}(t)?s.default:u.default;return r.default.createElement(d,f({},o,{src:n}))};h.propTypes={src:o.default.string.isRequired};var m=h;t.default=m},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.preLoad=t.getMany=t.default=void 0;var r=f(n(17)),o=f(n(306)),a=f(n(1711)),i=f(n(361)),l=f(n(196)),u=f(n(1712)),s=f(n(786)),c=f(n(397)),d=f(n(787));function f(e){return e&&e.__esModule?e:{default:e}}var p={},h=(0,l.default)((function(t){var n=(0,o.default)(t,(0,r.default)(p));if(!(0,d.default)(n)){var i=function(t){return new Promise((function(n){return e.ajax({type:"POST",url:ETBuilderBackend.ajaxUrl,dataType:"json",data:{action:"et_fb_fetch_attachments",et_fb_fetch_attachments:ETBuilderBackend.nonces.fetchAttachments,ids:t},success:n})}))}(n);n.map((function(e){return p[e]=i.then((0,a.default)((function(t){var n=t.ID;return e===(0,c.default)(n)})))}))}return t.map((function(e){return p[e]}))}),(0,s.default)(c.default));t.getMany=h;var m=(0,l.default)(u.default,h);t.preLoad=m;var y=(0,l.default)(i.default,h,(function(e){return[e]}));t.default=y}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SLIDER_VALUE_PROP_TYPES=void 0;var o=s(n(13)),a=s(n(40)),i=s(n(3)),l=s(n(0)),u=n(1510);function s(e){return e&&e.__esModule?e:{default:e}}function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1723);var v=["max","min","railComponent","step","thumbComponent","value","locked","activeGradientStop"],_=function(e){!function(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&&p(e,t)}(i,e);var t,n,r,a=h(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),b(y(t=a.call(this,e)),"getCleanValue",(function(e){var n=t.props.min;return Array.isArray(e)?0:[Math.max(n,e)]})),b(y(t),"getValue",(function(e,t){return null==e?t:Array.isArray(e)?e:[e]})),b(y(t),"handleStartMovingCallback",(function(e){e&&e.target&&(0,u.isPrimaryClick)(e)&&t.handleMouseDown(e)})),b(y(t),"handleMouseDown",(function(e){var n;e.preventDefault(),t.removeDisposers(),t.isMoving=!1;var r=(0,u.getElementOwner)(null===(n=t.wrapperRef)||void 0===n?void 0:n.current);if(t.handleMouseUpDisposer=(0,u.addEventListener)(r,"mouseup",t.handleMouseUp),e&&e.target&&(0,u.isPrimaryClick)(e)){var o=t.props.onMouseDown;t.isMoving=!0,t.updateValueFromPixels({event:e}),o(e),t.handleMouseMoveDisposer=(0,u.addEventListener)(r,"mousemove",t.handleMouseMove)}})),b(y(t),"handleMouseUp",(function(){t.isMoving=!1,t.removeDisposers(),t.setState({lastIndex:-1})})),b(y(t),"handleMouseMove",(function(e){t.updateValueFromPixels({event:e,move:!0})}));var n=e.value,r=void 0===n?0:n;return t.state={value:t.getCleanValue(r),lastIndex:-1},t.handleMouseMoveDisposer=null,t.handleMouseUpDisposer=null,t.wrapperRef=l.default.createRef(),t}return t=i,(n=[{key:"shouldComponentUpdate",value:function(e,t){var n=this,r=v.some((function(t){return n.props[t]!==e[t]})),o=this.state.value!==t.value||this.state.lastIndex!==t.lastIndex;return r||o}},{key:"componentWillUnmount",value:function(){this.handleMouseMoveDisposer&&this.handleMouseMoveDisposer.remove(),this.handleMouseUpDisposer&&this.handleMouseUpDisposer.remove()}},{key:"setNewValue",value:function(e,t){this.setState({value:this.getCleanValue(e),lastIndex:t}),this.props.onChange(e)}},{key:"removeDisposers",value:function(){this.handleMouseMoveDisposer&&this.handleMouseMoveDisposer.remove(),this.handleMouseUpDisposer&&this.handleMouseUpDisposer.remove()}},{key:"updateValueFromPixels",value:function(e){var t=e.event,n=e.move,r=void 0!==n&&n,o=this.props,a=o.max,i=o.min,l=o.snap,s=o.snapDistance,d=o.step,f=o.value,p=this.state,h=p.value,m=p.lastIndex,y=this.wrapperRef.current.getBoundingClientRect(),g=y.width,b=y.left,v=this.getValue(f,h),_=(t.clientX-b)/g*100,w=(0,u.percentToValue)(i,a,_);if(w=(0,u.limitValueRange)(i,a,w),d&&(w=(0,u.roundValueToStep)(w,d,i)),l&&r){var O=(0,u.findNearestIndex)(v,w,m),k=O.index;O.distance<=s&&(w=v[k])}if(v.length>1){var S=r?m:(0,u.findNearestIndex)(v,w).index,C=c(v),E=C[S];w=(0,u.prepareNewValue)(E,w),C[S]=w,C.sort(u.compareAsc);var P=C.indexOf(w);this.setNewValue(C,P)}else w=(0,u.prepareNewValue)(v[0],w),this.setNewValue([w],-1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.railComponent,r=t.thumbComponent,a=t.legacy,i=t.max,s=t.min,c=t.value,d=t.onStopClick,f=t.locked,p=t.step,h=t.snap,m=t.snapDistance,y=t.activeGradientStop,g=this.state,b=g.value,v=g.lastIndex,_=this.getValue(c,b);return l.default.createElement("div",{className:(0,o.default)({"et-core-control-slider__wrapper--legacy":a},"et-core-control-slider__wrapper"),onMouseDown:this.handleMouseDown,ref:this.wrapperRef},l.default.createElement(n,{value:_,className:"et-core-control-slider__rail",disabled:this.disabled,onStopClick:d,locked:f,min:s,max:i,step:p,snap:h,snapDistance:m}),_.map((function(t,n){var a=(0,u.valueToPercent)(s,i,t),c={left:"".concat(a,"%")};return t.index=n,l.default.createElement(r,{key:t.uuid,value:t,className:(0,o.default)({"et-core-control-slider__thumb--active":e.isMoving&&n===v,editing:t.uuid===y},"et-core-control-slider__thumb"),style:c,locked:f,onStopClick:d,onStartMoving:e.handleStartMovingCallback})})))}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(l.default.Component),w=[i.default.number,i.default.shape({valueOf:i.default.func}),i.default.shape({color:i.default.string,percent:i.default.number,index:i.default.number})],O=i.default.oneOfType([i.default.oneOfType(w),i.default.arrayOf(i.default.oneOfType(w))]);_.propTypes={legacy:i.default.bool,max:i.default.number,min:i.default.number,onChange:i.default.func,onMouseDown:i.default.func,railComponent:i.default.elementType,snap:i.default.bool,snapDistance:i.default.number,step:i.default.number,thumbComponent:i.default.elementType,value:O,onStopClick:i.default.func,locked:i.default.bool,activeGradientStop:i.default.oneOfType([i.default.bool,i.default.string])},_.defaultProps={legacy:!1,max:100,min:0,step:1,onChange:a.default,onMouseDown:a.default,railComponent:"div",snap:!1,snapDistance:3,thumbComponent:"span",value:{},onStopClick:a.default,locked:!1};var k=O;t.SLIDER_VALUE_PROP_TYPES=k;var S=_;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=h(n(0)),o=h(n(3)),a=h(n(13)),i=h(n(40)),l=h(n(22)),u=n(783),s=h(n(1724)),c=h(n(1725)),d=n(1510);n(1726);var f=h(n(43)),p=h(n(164));function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=e.value,n=e.className,o=e.style,h=e.newThumb,g=e.onStopClick,b=p.default.getColorValue(t.color)||t.color,v=(0,u.getContrastColor)(b),_=t.color!==b,w=(0,a.default)(n,{"et-builder-control-gradient__thumb":!0,"is-global-color":_});return r.default.createElement("span",{role:"slider","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t.position,onClick:function(e){e.preventDefault(),(0,d.isPrimaryClick)(e)&&g(t)},onContextMenu:i.default,onMouseEnter:function(e){e.preventDefault(),l.default.setHoveredSubElement(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t))},onMouseLeave:function(e){e.preventDefault(),l.default.setHoveredSubElement(!1)},className:w,style:o,key:t.uuid,id:t.uuid,"data-index":t.uuid,"data-position":t.position,"data-unit":t.unit,"data-color":b,"data-gcid":_?t.color:"","data-et-colorpicker-part":"true"},r.default.createElement(s.default,{backgroundColor:b,color:v},h&&r.default.createElement(f.default,{icon:"add",size:"24",color:v,style:{minWidth:"0px",width:"28px",height:"28px",margin:"-18px -9px -16px"}})),r.default.createElement(c.default,{position:t.position,unit:t.unit}))}g.propTypes={newThumb:o.default.bool,value:o.default.shape({color:o.default.string,position:o.default.number,unit:o.default.string,index:o.default.oneOfType([o.default.number,o.default.bool])}),className:o.default.string,style:o.default.shape({left:o.default.string}),onStopClick:o.default.func},g.defaultProps={newThumb:!1,value:{color:"#FFFFFF",position:0,unit:"%",index:!1},className:"",style:{},onStopClick:i.default};var b=g;t.default=b},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=S(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=k(n(27)),i=k(n(3)),l=k(n(123)),u=k(n(10)),s=k(n(1)),c=k(n(42)),d=k(n(64)),f=k(n(11)),p=k(n(31)),h=k(n(523)),m=k(n(40)),y=k(n(795)),g=k(n(1730)),b=n(1504),v=k(n(43)),_=k(n(617)),w=n(788),O=k(n(2));function k(e){return e&&e.__esModule?e:{default:e}}function S(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(S=function(e){return e?n:t})(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function P(e){var t=function(){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}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return M(e)}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1731);var D=function(t){!function(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&&E(e,t)}(k,t);var n,r,i,m=P(k);function k(t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),x(M(n=m.call(this,t)),"setValue",(function(e,t){var r=(0,u.default)({},n.props.values,x({},e,t));n.props.onChange(r)})),x(M(n),"handleSave",(function(){n.props.onSave()})),x(M(n),"handleCancel",(function(){n.props.onClose()})),x(M(n),"maybeClose",(function(t){var r=e(a.default.findDOMNode(M(n)));e(t.target).closest(r).length<1&&n.handleSave()})),n.state={positioning:null},n}return n=k,(r=[{key:"updatePositioning",value:function(){var t=e(a.default.findDOMNode(this)),n=t.find(".et-fb-field-settings-modal").first(),r=t.find(".et-fb-field-settings-modal__content").first(),o=parseInt(O.default.$topWindow("#wpadminbar").height())+30,i=O.default.condition("is_bfb")?30:100,l=(0,w.getViewportAdaptablePositioning)(O.default.$topWindow(),t,n,r.innerHeight()+40,o,i);(0,c.default)(this.state.positioning,l)||this.setState({positioning:l})}},{key:"componentDidMount",value:function(){var t=this,n={};(0,h.default)(this.props.fields,(function(e,r){n[r]=e.default,(0,f.default)(t.props.values[r])||(n[r]=t.props.values[r])})),this.props.onChange(n),e("body").first().addClass("et-fb-dynamic-content-settings-opened"),this.updatePositioning(),l.default.rebuild(),O.default.appWindow().addEventListener("mousedown",this.maybeClose)}},{key:"componentWillUnmount",value:function(){O.default.appWindow().removeEventListener("mousedown",this.maybeClose),e("body").first().removeClass("et-fb-dynamic-content-settings-opened")}},{key:"componentDidUpdate",value:function(){this.updatePositioning()}},{key:"render",value:function(){var e=this,t=new _.default(this.props.values);return o.default.createElement("div",{className:"et-fb-field-settings-modal-root"},o.default.createElement(y.default,{enabled:this.props.animation},(function(n){var r=e.state.positioning,a=n;return(0,d.default)(r)||(a.top=r.position.top,a.maxWidth=r.size.width,a.maxHeight=r.size.height),o.default.createElement("div",{className:"et-fb-field-settings-modal",style:a},o.default.createElement("div",{className:"et-fb-field-settings-modal__container"},o.default.createElement("div",{className:"et-fb-field-settings-modal__scroll"},o.default.createElement("div",{className:"et-fb-field-settings-modal__content"},e.props.title&&o.default.createElement("h4",{className:"et-fb-field-settings-modal__title"},e.props.title),(0,p.default)(e.props.fields,(function(n,r){var a=(0,s.default)(n,"default","");return(0,s.default)(n,"visibility",!0)?((0,f.default)(e.props.values[r])||(a=e.props.values[r]),o.default.createElement("div",{key:r,style:{width:"calc(100% - 60px)"},className:"et-fb-settings-option et-fb-option--".concat(n.type.replace("_","-"))},o.default.createElement("div",{className:"et-fb-option-container"},o.default.createElement(g.default,{key:r,field:n,fieldName:r,value:a,propertyResolver:t,onChange:e.setValue,animation:e.props.animation})))):""}))))),o.default.createElement(b.ETCoreButtonGroup,{block:!0},o.default.createElement(b.ETCoreButton,{block:!0,danger:!0,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel,_onClick:e.handleCancel},o.default.createElement(v.default,{icon:"exit",color:"#FFFFFF"})),o.default.createElement(b.ETCoreButton,{block:!0,success:!0,tooltip:ETBuilderBackend.i18n.tooltip.modal.save,_onClick:e.handleSave},o.default.createElement(v.default,{icon:"check",color:"#FFFFFF"}))))})))}}])&&C(n.prototype,r),i&&C(n,i),Object.defineProperty(n,"prototype",{writable:!1}),k}(o.Component);D.propTypes={title:i.default.string,fields:i.default.object.isRequired,values:i.default.object.isRequired,onChange:i.default.func,onClose:i.default.func,onSave:i.default.func},D.defaultProps={animation:!0,onChange:m.default,onClose:m.default,onSave:m.default};var N=D;t.default=N}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=s(n(3)),i=s(n(123)),l=s(n(40)),u=s(n(43));function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){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}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var g=function(e){!function(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&&p(e,t)}(l,e);var t,n,r,a=h(l);function l(){return d(this,l),a.apply(this,arguments)}return t=l,(n=[{key:"componentDidMount",value:function(){i.default.rebuild()}},{key:"render",value:function(){return o.default.createElement("button",{type:"button",className:"et-fb-settings-option-dynamic__button et-fb-settings-option-dynamic__button--".concat(this.props.type," ").concat(this.props.className),onClick:this.props.onClick,"data-tip":this.props.tooltip},o.default.createElement(u.default,{size:"14",icon:this.props.icon}))}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.PureComponent);g.propTypes={type:a.default.string.isRequired,icon:a.default.string.isRequired,tooltip:a.default.string,className:a.default.string,onClick:a.default.func},g.defaultProps={tooltip:"",className:"",onClick:l.default};var b=g;t.default=b},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(0),o=s(n(11)),a=s(n(10)),i=s(n(1743)),l=s(n(1511)),u=s(n(1745));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,i=[{key:"createControl",value:function(t,n){return!(0,o.default)(t.composite_type)&&(0,r.createElement)(e._controlTypesMap[t.composite_type],(0,a.default)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({label:t.label,key:n.uniqueKey},n),t))}}],(n=null)&&f(t.prototype,n),i&&f(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();p._controlTypesMap={default:l.default,tabbed:i.default,transforms:u.default};var h=p;t.default=h},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(n(0)),a=p(n(3)),i=p(n(16)),l=p(n(123)),u=p(n(13)),s=p(n(31)),c=p(n(5)),d=p(n(163));n(1552);var f=p(n(43));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var _,w=(_=1,function(){return _++}),O=function(e){!function(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&&m(e,t)}(p,e);var t,n,r,a=y(p);function p(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(t=a.call(this,e)).state={activeTab:e.activeTab},t.shouldComponentUpdate=i.default.shouldComponentUpdate.bind(b(t)),t._onClickTab=t._onClickTab.bind(b(t)),t._onMouseOverTab=t._onMouseOverTab.bind(b(t)),t._onMouseLeaveTab=t._onMouseLeaveTab.bind(b(t)),t}return t=p,n=[{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.setState({activeTab:e.activeTab})}},{key:"_onClickTab",value:function(e){e.preventDefault();var t=e.currentTarget.getAttribute("data-index");if(!(0,d.default)(t)){var n=parseInt(t);this.setState({activeTab:n}),this.props._onTabChange&&this.props._onTabChange(n)}}},{key:"_onMouseOverTab",value:function(e){var t=e.currentTarget.getAttribute("data-index");if(!(0,d.default)(t)){var n=parseInt(t),r=this.props.children[n];if(!(0,d.default)(r)){var o=r.props;(0,o.handleTabHover)("enter",o.tabName,o.tooltip,o.label)}}}},{key:"_onMouseLeaveTab",value:function(e){var t=e.currentTarget.getAttribute("data-index");if(!(0,d.default)(t)){var n=parseInt(t),r=this.props.children[n];if(!(0,d.default)(r)){var o=r.props;(0,o.handleTabHover)("leave",o.tabName,o.tooltip,o.label)}}}},{key:"_renderTitles",value:function(){var e=this,t=w();return o.default.createElement("ul",{className:"et-fb-settings-tab-titles"},(0,s.default)(this.props.children,(function(n,r){return o.default.createElement("li",{key:r},o.default.createElement("button",{className:(0,u.default)({"et-fb-settings-tab-title":!0,"et-fb-settings-tab-title-active":e.state.activeTab===r,"et-fb-settings-tab-title-modified":n.props.isModified}),onClick:e._onClickTab,"data-tip":n.props.tooltip,"data-index":r,"data-for":"tab-tooltip-".concat(t,"-").concat(r),onMouseOver:e._onMouseOverTab,onMouseLeave:e._onMouseLeaveTab},n.props.label,o.default.createElement(f.default,{icon:n.props.icon,color:e.props["iconColor".concat((0,u.default)({Active:e.state.activeTab===r||n.props.isModified}))]}),(0,c.default)(n.props.tooltip)?null:o.default.createElement(l.default,{id:"tab-tooltip-".concat(t,"-").concat(r)})))})))}},{key:"_renderContent",value:function(){return o.default.createElement("div",{className:"et-fb-settings-tab-content"},this.props.children[this.state.activeTab])}},{key:"render",value:function(){return o.default.createElement("div",null,this._renderTitles(),this._renderContent())}}],n&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.default.Component);O.defaultProps={activeTab:0,iconColor:"#bec9d6",iconColorActive:"#2b87da",_onTabChange:!1},O.propTypes={activeTab:a.default.number,iconColor:a.default.string,iconColorActive:a.default.string,_onTabChange:a.default.oneOfType([a.default.bool,a.default.func]),children:a.default.oneOfType([a.default.array,a.default.element]).isRequired};var k=O;t.default=k},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(n(0)),a=l(n(3)),i=l(n(16));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){var t=function(){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}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var h=function(e){!function(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&&s(e,t)}(l,e);var t,n,r,a=c(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).shouldComponentUpdate=i.default.shouldComponentUpdate.bind(f(t)),t}return t=l,(n=[{key:"render",value:function(){return o.default.createElement("div",null,this.props.children)}}])&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.default.Component);h.defaultProps={icon:"",isModified:!1,tabName:""},h.propTypes={icon:a.default.string,tabName:a.default.string,isModified:a.default.bool,handleTabHover:a.default.func};var m=h;t.default=m},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=g(n(3)),i=g(n(1)),l=g(n(7)),u=g(n(10)),s=g(n(40)),c=g(n(42)),d=g(n(11));n(1554);var f=n(2),p=g(n(43)),h=g(n(1484)),m=n(95),y=g(n(84));function g(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(this,arguments)}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function S(e){var t=function(){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}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M="#C9D2DD",j="#e7eef5",x="#0287e0",D=50,N=function(e){var t="";switch(e){case"ew":t=o.default.createElement("path",{fill:y.default.white,d:"M12.29 6.29L9.85 3.85a.5.5 0 0 0-.85.36V6H5V4.21a.5.5 0 0 0-.85-.35L1.71 6.29a1 1 0 0 0 0 1.41l2.44 2.44A.5.5 0 0 0 5 9.79V8h4v1.79a.5.5 0 0 0 .85.35l2.44-2.44a1 1 0 0 0 0-1.41z",fillRule:"evenodd"});break;case"nesw":t=o.default.createElement("path",{fill:y.default.white,d:"M10 3H6.51a.51.51 0 0 0-.36.86l1.27 1.3-2.28 2.29-1.28-1.28a.51.51 0 0 0-.86.36V10a1 1 0 0 0 1 1h3.49a.51.51 0 0 0 .36-.86l-1.3-1.3 2.29-2.26 1.3 1.3a.51.51 0 0 0 .86-.36V4a1 1 0 0 0-1-1z",fillRule:"evenodd"});break;case"nwse":t=o.default.createElement("path",{fill:y.default.white,d:"M10.85 6.17a.51.51 0 0 0-.71 0L8.86 7.45 6.58 5.16l1.27-1.27A.51.51 0 0 0 7.49 3H4a1 1 0 0 0-1 1v3.52a.51.51 0 0 0 .86.36l1.3-1.3 2.29 2.28-1.3 1.3a.51.51 0 0 0 .36.86H10a1 1 0 0 0 1-1V6.53a.5.5 0 0 0-.15-.36z",fillRule:"evenodd"});break;default:t=o.default.createElement("path",{fill:y.default.white,d:"M9.79 9H8V5h1.79a.5.5 0 0 0 .35-.85L7.71 1.73a1 1 0 0 0-1.41 0L3.85 4.17a.5.5 0 0 0 .36.83H6v4H4.21a.5.5 0 0 0-.35.85l2.44 2.44a1 1 0 0 0 1.41 0l2.44-2.44A.5.5 0 0 0 9.79 9z",fillRule:"evenodd"})}return o.default.createElement("svg",{viewBox:"0 0 14 14",preserveAspectRatio:"xMidYMid meet",shapeRendering:"geometricPrecision"},t)},L=function(e){var t,n,r,a,i=(0,f.hasValue)(e.angle)?parseFloat(e.angle)*Math.PI/180:0;switch(e.type){case"rotate_z":n={x:(t={x:40,y:40}).x+1.5+7,y:t.y+1.5+7},r="m ".concat(n.x,",").concat(n.y," 0,0"),a="m ".concat(n.x,",").concat(n.y," 0,0");break;case"rotate_y":n={x:(t={x:42.4681,y:21.3538076}).x+1.5+7,y:t.y+1.5+7+t.y},r="m ".concat(n.x,",").concat(n.y," 0,-").concat(2*t.y),a="m ".concat(n.x,",").concat(n.y+t.y," 0,").concat(t.y);break;case"rotate_x":n={x:(t={x:21.3538076,y:42.4681}).x+1.5+7+t.x,y:t.y+1.5+7},r="m ".concat(n.x,",").concat(n.y," -").concat(2*t.x,",0"),a="m ".concat(n.x+t.x,",").concat(n.y," ").concat(t.x,",0")}var l={x:t.x*Math.cos(i)+n.x,y:t.y*Math.sin(i)+n.y};return o.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:2*n.x,height:2*n.y},o.default.createElement("circle",{fill:M,cx:n.x,cy:n.y,r:3.5}),o.default.createElement("path",{fill:"none",stroke:M,strokeWidth:2,strokeDasharray:"".concat(4,",").concat(4),d:"m ".concat(n.x,",").concat(n.y," ").concat(l.x-n.x,",").concat(l.y-n.y)}),o.default.createElement("ellipse",{fill:"none",stroke:j,strokeWidth:3.5,cx:n.x,cy:n.y,rx:t.x,ry:t.y}),o.default.createElement("path",{fill:"none",stroke:M,strokeWidth:3,d:r}),o.default.createElement("path",{fill:"none",stroke:M,strokeWidth:3,d:a}),o.default.createElement("circle",{fill:x,cx:l.x,cy:l.y,r:7,"data-transform_type":e.type,onMouseDown:e.handleOnMouseDown,style:{cursor:"pointer"}}))};L.propTypes={type:a.default.string,angle:a.default.string,handleOnMouseDown:a.default.func},L.defaultProps={angle:"0",type:"rotate_x",handleOnMouseDown:s.default};var R=function(e){return o.default.createElement("div",{id:"et-fb-settings-transform-container",className:"et-fb-settings-transform-container",style:(0,u.default)({},e.style)},e.hideRuler?null:o.default.createElement("div",{className:"et-fb-settings-transform-hr"}),e.hideRuler?null:o.default.createElement("div",{className:"et-fb-settings-transform-vr"}),e.hideDotSquare?null:o.default.createElement("div",{className:"et-fb-settings-transform-square-dotted"}),e.children)};R.propTypes={hideRuler:a.default.bool,hideDotSquare:a.default.bool,children:a.default.node,style:a.default.object,onMouseLeave:a.default.func},R.defaultProps={hideRuler:!1,hideDotSquare:!1,children:o.default.createElement("span",null),style:{},onMouseLeave:s.default};var A=function(e){var t="".concat(e).split("_");return{type:t[0],axis:t[1],index:(0,i.default)({x:0,y:1,z:2},t[1],0)}},I=function(t){!function(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&&k(e,t)}(s,t);var n,r,a,u=S(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),T(E(t=u.call(this,e)),"state",{dragHandle:"",values:[],scaleLinked:!0,skewLinked:!0,translateLinked:!0,controllerCenter:{x:0,y:0},containerDimensions:{width:170,height:170}}),t._handleMouseMove=t._handleMouseMove.bind(E(t)),t._handleMouseUp=t._handleMouseUp.bind(E(t)),t._handleOnMouseDown=t._handleOnMouseDown.bind(E(t)),t._handleOriginClick=t._handleOriginClick.bind(E(t)),t._setOption=t._setOption.bind(E(t)),t._handleLinkedClick=t._handleLinkedClick.bind(E(t)),t._handleWrapperEnter=t._handleWrapperEnter.bind(E(t)),t._handleWrapperLeave=t._handleWrapperLeave.bind(E(t)),t}return n=s,r=[{key:"shouldComponentUpdate",value:function(e){return!(0,c.default)(this.props,e)}},{key:"UNSAFE_componentWillMount",value:function(){this.setState({values:this._getValues(),scaleLinked:this.props.scaleLinked,skewLinked:this.props.skewLinked,translateLinked:this.props.translateLinked})}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){(0,f.hasValue)(e.value)&&e.value!==e.default?this.state.values.join("|")!==e.value&&this.setState({values:"".concat(e.value).split("|")}):this.setState({values:"".concat(e.default).split("|")})}},{key:"componentDidMount",value:function(){(0,f.topWindow)().addEventListener("mousemove",this._handleMouseMove),(0,f.topWindow)().addEventListener("mouseup",this._handleMouseUp)}},{key:"componentWillUnmount",value:function(){(0,f.topWindow)().removeEventListener("mousemove",this._handleMouseMove),(0,f.topWindow)().removeEventListener("mouseup",this._handleMouseUp)}},{key:"_handleOnMouseDown",value:function(t){if(!(0,f.hasValue)(this.props.readonly)){var n=t.currentTarget.dataset.transform_type;if(this.setState({dragHandle:n}),"rotate"===A(n).type){var r=e(t.target.parentElement),o=r.position();this.setState({controllerCenter:{x:o.left+r.width()/2,y:o.top+r.height()/2}})}}}},{key:"_handleMouseMove",value:function(e){if(!(0,f.hasValue)(this.props.readonly)&&(0,f.hasValue)(this.state.dragHandle)&&(0!==e.movementX||0!==e.movementY))switch(A(this.state.dragHandle).type){case"scale":var t=this.props.scaleLinked,n=-1*e.movementY,r=e.movementX,o="".concat(100*n/D+parseFloat(this._getOption("scale_y")),"%"),a="".concat(100*r/D+parseFloat(this._getOption("scale_x")),"%");if("scale_y"===this.state.dragHandle)0!==e.movementY&&this._setOption("scale_y",o);else if("scale_x"===this.state.dragHandle)0!==e.movementX&&this._setOption("scale_x",a);else if(t){var i="".concat(100*(r+n)/D+parseFloat(this._getOption("scale_x")),"%");this._setOption("scale_x",i)}else this._setOption("scale_y",o),this._setOption("scale_x",a);break;case"skew":var l=180,u=(2*e.movementX+this.state.containerDimensions.width)*l/this.state.containerDimensions.width-l,s=(2*e.movementY*-1+this.state.containerDimensions.height)*l/this.state.containerDimensions.height-l,c="".concat(Math.round(s)+parseFloat(this._getOption("skew_y")),"deg"),d="".concat(Math.round(u)+parseFloat(this._getOption("skew_x")),"deg");"skew_y"===this.state.dragHandle?0!==e.movementY&&this._setOption("skew_y",c):"skew_x"===this.state.dragHandle&&0!==e.movementX&&this._setOption("skew_x",d);break;case"translate":var p=(0,m.getUnit)(this._getOption("translate_y")),h=(0,m.getUnit)(this._getOption("translate_x")),y=300,g=(2*e.movementX+this.state.containerDimensions.width)*y/this.state.containerDimensions.width-y,b=(2*e.movementY+this.state.containerDimensions.height)*y/this.state.containerDimensions.height-y,v="".concat(Math.round(b)+parseFloat(this._getOption("translate_y"))).concat(p),_="".concat(Math.round(g)+parseFloat(this._getOption("translate_x"))).concat(h);0!==e.movementY&&this._setOption("translate_y",v),0!==e.movementX&&this._setOption("translate_x",_);break;case"origin":var w=(0,m.getUnit)(this._getOption("origin_y")),O=(0,m.getUnit)(this._getOption("origin_x")),k=e.movementY,S=e.movementX;"%"===w&&(k*=100/D),"%"===O&&(S*=100/D);var C=k+parseFloat(this._getOption("origin_y"))+w,E=S+parseFloat(this._getOption("origin_x"))+O;0!==e.movementY&&this._setOption("origin_y",C),0!==e.movementX&&this._setOption("origin_x",E);break;case"rotate":var P=this.state.controllerCenter,T=Math.atan2(e.pageY-P.y,e.pageX-P.x)*(180/Math.PI);T<0&&(T+=360),360===T&&(T=0);var M="".concat(T.toFixed(0),"deg");this._setOption(this.state.dragHandle,M)}}},{key:"_handleMouseUp",value:function(e){this.setState({dragHandle:!1})}},{key:"_handleLinkedClick",value:function(e){var t=e.currentTarget.dataset.linked_type;(0,l.default)(["scale","skew","translate"],t)&&this.props.onClickLink(t),e.preventDefault()}},{key:"_handleOriginClick",value:function(e){if(e.preventDefault(),e.stopPropagation(),!(0,f.hasValue)(this.props.readonly)){var t=e.currentTarget.dataset.origin_type,n={1:{x:0,y:0},2:{x:50,y:0},3:{x:100,y:0},4:{x:0,y:50},5:{x:50,y:50},6:{x:100,y:50},7:{x:0,y:100},8:{x:50,y:100},9:{x:100,y:100}};(0,f.hasValue)((0,i.default)(n,t,!1))&&(this._setOption("origin_x","".concat(n[t].x,"%")),this._setOption("origin_y","".concat(n[t].y,"%")))}}},{key:"_handleWrapperEnter",value:function(){this.current=e('[data-address="'.concat(this.props.module.props.address,'"]'))[0],(0,d.default)(this.current)||(this.current.style.transition="transform 0s ease",this.current.firstChild instanceof Element&&(this.current.firstChild.style.transition="transform 0s ease"))}},{key:"_handleWrapperLeave",value:function(){(0,d.default)(this.current)||(this.current.style.removeProperty("transition"),0===this.current.style.length&&this.current.removeAttribute("style"),this.current.firstChild instanceof Element&&(this.current.firstChild.style.removeProperty("transition"),0===this.current.firstChild.style.length&&this.current.firstChild.removeAttribute("style")))}},{key:"_setOption",value:function(e,t,n){var r=A(e),o=this.state.values[r.index];if(o!==t){var a=this._sanitization(t,e),i=a.value-parseFloat(o),u=this.state.values;if(u[r.index]=a.value+a.unit,((0,f.hasValue)(n)||(0,l.default)(["skew","scale"],r.type))&&(this.props.scaleLinked&&"scale"===r.type||this.props.skewLinked&&"skew"===r.type||this.props.translateLinked&&"translate"===r.type)){var s="x"===r.axis?"".concat(r.type,"_y"):"".concat(r.type,"_x"),c=this._getOption(s),d=c;0!==i&&(d=parseFloat(c)+i+a.unit);var p=this._sanitization(d,s);u["x"===r.axis?1:0]=p.value+p.unit}var h=u.join("|"),m=h===this.props.default;this.setState({values:u}),this.props._onChange(this.props.name,h,n,null,m)}}},{key:"_getValues",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t="".concat(e.default).split("|"),n=t;return(0,f.hasValue)(e.value)&&(n="".concat(e.value).split("|")),t.forEach((function(e,t){(0,f.hasValue)(n[t])||(n[t]=e)})),n}},{key:"_getOption",value:function(e){return this.state.values[A(e).index]}},{key:"_getOptionDefault",value:function(e){return"".concat(this.props.default).split("|")[A(e).index]}},{key:"_sanitization",value:function(e,t){var n=this._getOptionDefault(t),r={value:parseFloat(n),unit:this.props.default_unit};if(!(0,f.hasValue)(e))return r;var o=isNaN(parseFloat(e))?parseFloat(n):parseFloat(e);switch(r.value=o,t){case"skew_x":case"skew_y":var a=this._getOption(t),i=isNaN(parseFloat(a))?o:parseFloat(a),u=0===Math.sign(i)?1:Math.sign(i),s=Math.abs(o);if(90===s){var c=Math.abs(i);c<90?r.value=91*u:c>=90&&(r.value=89*u)}s>180&&(r.value=180*u);break;case"rotate_x":case"rotate_y":case"rotate_z":r.value=o%360;break;default:r.unit=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px",n=["em","rem","px","%","vw","vh"],r=(0,m.getUnit)(e,t);return(0,l.default)(n,r)?r:t}(e,this.props.default_unit)}return r}},{key:"_renderField",value:function(e){var t=A(e),n=!1;"origin"===t.type&&(n=t.axis);var r={name:e,type:"range",value:this._getOption(e),default:this._getOptionDefault(e),default_unit:this.props.default_unit,range_settings:this.props.range_settings,key:"".concat(this.props.name,"-").concat(e),_onChange:this._setOption,visible:!0,previewMode:"desktop",readonly:this.props.readonly,isTransformOrigin:n,allowed_values:!1!==n?["top","left","right","bottom","center"]:[]};return(0,o.createElement)(h.default.getControl("range"),r)}},{key:"render",value:function(){var e=this,t=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{minWidth:"25px",width:"25px",height:"25px",margin:"0",fill:e?y.default.info:y.default.default}},n=(0,f.hasValue)(this.props.transform_type)?this.props.transform_type:"".concat(e.props.name).replace(/(transform_|__hover|_tablet|_phone)/g,""),r={onMouseEnter:this._handleWrapperEnter,onMouseLeave:this._handleWrapperLeave};switch(n){case"scale":var a=this._getOption("scale_x"),i=this._getOption("scale_y"),l=this.props.scaleLinked?{display:"none"}:{},u={};return u=a?w(w({},u),{},{width:"".concat(D*parseFloat(a)/100,"px")}):u,u=i?w(w({},u),{},{height:"".concat(D*parseFloat(i)/100,"px")}):u,o.default.createElement("div",v({className:"et-fb-settings-transform-wrapper"},r),o.default.createElement(R,{onMouseLeave:this._handleMouseUp},o.default.createElement("div",{className:"et-fb-settings-transform-square",style:u},o.default.createElement("div",{className:"et-fb-settings-transform-square-half"},o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"scale_xy",onMouseDown:this._handleOnMouseDown,style:{margin:"-8px",cursor:"nesw-resize"}},N("nesw")),o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"scale_y",onMouseDown:this._handleOnMouseDown,style:w(w({},l),{},{marginTop:"-9px",marginLeft:"-2px",cursor:"ns-resize"})},N("ns")),o.default.createElement("div",null)),o.default.createElement("div",{className:"et-fb-settings-transform-square-half"},o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"scale_x",onMouseDown:this._handleOnMouseDown,style:w(w({},l),{},{marginTop:"-7px",marginRight:"-9px",cursor:"ew-resize"})},N("ew"))))),o.default.createElement("div",{className:"et-fb-settings-transform-vertical-range"},this._renderField("scale_y")),o.default.createElement("div",{className:"et-fb-settings-transform-horizontal-range"},this._renderField("scale_x")),o.default.createElement("button",{disabled:(0,f.hasValue)(this.props.readonly),"data-linked_type":"scale",onClick:this._handleLinkedClick,className:"et-fb-settings-transform-linked"},o.default.createElement(p.default,{icon:this.props.scaleLinked?"linked":"unlinked",style:t(this.props.scaleLinked)})));case"skew":var s=this._getOption("skew_x"),c=this._getOption("skew_y"),d="";d+=s?"skewX(".concat(s,")"):d;var h={transform:d+=c?" skewY(".concat(c,")"):d},g=(parseFloat(s)+180)*this.state.containerDimensions.width/360,b=(parseFloat(c)+180)*this.state.containerDimensions.height/360,_=g-this.state.containerDimensions.width/2,O=b-this.state.containerDimensions.height/2;return o.default.createElement("div",v({className:"et-fb-settings-transform-wrapper"},r),o.default.createElement(R,{onMouseLeave:this._handleMouseUp},o.default.createElement("div",{className:"et-fb-settings-transform-square",style:h}),o.default.createElement("div",{className:"et-fb-settings-transform-square-transparent"},o.default.createElement("div",{className:"et-fb-settings-transform-square-half-skew"},o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"skew_y",onMouseDown:this._handleOnMouseDown,style:{marginLeft:"-20px",marginBottom:"-6px",cursor:"ns-resize",transform:"translateY(".concat(-1*O,"px)")}},N("ns")),o.default.createElement("div",null)),o.default.createElement("div",{className:"et-fb-settings-transform-square-half-skew",style:{justifyContent:"center",alignItems:"flex-end"}},o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"skew_x",onMouseDown:this._handleOnMouseDown,style:{marginBottom:"-20px",cursor:"ew-resize",transform:"translateX(".concat(_,"px)")}},N("ew"))))),o.default.createElement("div",{className:"et-fb-settings-transform-vertical-range"},this._renderField("skew_y")),o.default.createElement("div",{className:"et-fb-settings-transform-horizontal-range"},this._renderField("skew_x")),o.default.createElement("button",{disabled:(0,f.hasValue)(this.props.readonly),"data-linked_type":"skew",onClick:this._handleLinkedClick,className:"et-fb-settings-transform-linked"},o.default.createElement(p.default,{icon:this.props.skewLinked?"linked":"unlinked",style:t(this.props.skewLinked)})));case"translate":var k=300,S=180,C=parseFloat(this._getOption("translate_x")),E=parseFloat(this._getOption("translate_y")),P=(E+k)*S/600-90,T="";T+=C?"translateX(".concat((C+k)*S/600-90,"px)"):"";var M={transform:T+=E?" translateY(".concat(P,"px)"):""};return o.default.createElement("div",v({className:"et-fb-settings-transform-wrapper"},r),o.default.createElement(R,{onMouseLeave:this._handleMouseUp},o.default.createElement("option",{className:"et-fb-settings-transform-square-translate",style:M,"data-transform_type":"translate",onMouseDown:this._handleOnMouseDown})),o.default.createElement("div",{className:"et-fb-settings-transform-vertical-range et-fb-settings-transform-vertical-range-inverted"},this._renderField("translate_y")),o.default.createElement("div",{className:"et-fb-settings-transform-horizontal-range"},this._renderField("translate_x")),o.default.createElement("button",{disabled:(0,f.hasValue)(this.props.readonly),"data-linked_type":"translate",onClick:this._handleLinkedClick,className:"et-fb-settings-transform-linked"},o.default.createElement(p.default,{icon:this.props.translateLinked?"linked":"unlinked",style:t(this.props.translateLinked)})));case"origin":var j=this._getOption("origin_x"),x=this._getOption("origin_y"),A="";"%"===(0,m.getUnit)(j,"%")&&(j="".concat(D/100*parseFloat(j)-25,"px")),"%"===(0,m.getUnit)(x,"%")&&(x="".concat(D/100*parseFloat(x)-25,"px")),A+=j?"translateX(".concat(j,")"):A;var I={transform:A+=x?" translateY(".concat(x,")"):A};return o.default.createElement("div",v({className:"et-fb-settings-transform-wrapper"},r),o.default.createElement(R,{hideDotSquare:!0,onMouseLeave:this._handleMouseUp},o.default.createElement("div",{className:"et-fb-settings-transform-square-origin"}),o.default.createElement("div",{className:"et-fb-settings-transform-square-transparent-origin",style:{width:"52.5px",height:"52.5px"}},o.default.createElement("div",{className:"et-fb-settings-transform-square-half",style:{flexDirection:"row",alignItems:"flex-start"}},o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"1",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"2",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"3",onMouseDown:this._handleOriginClick})),o.default.createElement("div",{className:"et-fb-settings-transform-square-half",style:{flexDirection:"row",alignItems:"center"}},o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"4",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"5",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"6",onMouseDown:this._handleOriginClick})),o.default.createElement("div",{className:"et-fb-settings-transform-square-half",style:{flexDirection:"row",alignItems:"flex-end"}},o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"7",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"8",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"9",onMouseDown:this._handleOriginClick}))),o.default.createElement("div",{className:"et-fb-settings-transform-origin-dot",style:I,"data-transform_type":"origin",onMouseDown:this._handleOnMouseDown})),o.default.createElement("div",{className:"et-fb-settings-transform-vertical-range et-fb-settings-transform-vertical-range-inverted"},this._renderField("origin_y")),o.default.createElement("div",{className:"et-fb-settings-transform-horizontal-range"},this._renderField("origin_x")));case"rotate":var B=this._getOption("rotate_x"),F=this._getOption("rotate_y"),W=this._getOption("rotate_z");return o.default.createElement("div",r,o.default.createElement(R,{style:{justifyContent:"space-around",width:"100%"},hideDotSquare:!0,hideRuler:!0,onMouseLeave:this._handleMouseUp},o.default.createElement(L,{type:"rotate_z",angle:W,handleOnMouseDown:this._handleOnMouseDown}),o.default.createElement(L,{type:"rotate_x",angle:B,handleOnMouseDown:this._handleOnMouseDown}),o.default.createElement(L,{type:"rotate_y",angle:F,handleOnMouseDown:this._handleOnMouseDown})),o.default.createElement("div",{className:"et-fb-settings-transform-rotate"},o.default.createElement("div",{className:"et-fb-settings-transform-rotate-range"},this._renderField("rotate_z")),o.default.createElement("div",{className:"et-fb-settings-transform-rotate-range"},this._renderField("rotate_x")),o.default.createElement("div",{className:"et-fb-settings-transform-rotate-range"},this._renderField("rotate_y"))));default:return o.default.createElement("div",null,"".concat(n," is not a registered Transform type"))}}}],r&&O(n.prototype,r),a&&O(n,a),Object.defineProperty(n,"prototype",{writable:!1}),s}(o.default.Component);I.propTypes={name:a.default.string,default:a.default.string,default_unit:a.default.string,transform_type:a.default.string,range_settings:a.default.object,value:a.default.string,uniqueKey:a.default.string,_onChange:a.default.func,onClickLink:a.default.func,scaleLinked:a.default.bool,skewLinked:a.default.bool,translateLinked:a.default.bool,readonly:a.default.bool},I.defaultProps={name:"transform_scale",default:"100%|100%",default_unit:"%",transform_type:"scale",range_settings:{min:-100,max:300,step:1},value:"100%|100%",uniqueKey:"",_onChange:s.default,onClickLink:s.default,scaleLinked:!0,skewLinked:!0,translateLinked:!0,readonly:!1};var B=I;t.default=B}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTextAlignIconName=t.getModule=t.getAlignIconName=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};t.getAlignIconName=function(e){switch(e){case"force_left":case"left":return"align-left";case"center":return"align-center";case"right":return"align-right";default:return e}};t.getTextAlignIconName=function(e){switch(e){case"justified":return"text-justify";case"force_left":case"left":return"text-left";case"center":return"text-center";case"right":return"text-right";default:return e}};t.getModule=function(e){return(0,o.default)(e,"props.module.props.module",!1)}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ETBuilderControlIconPicker=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=c(n(3)),i=c(n(31)),l=c(n(42)),u=c(n(43)),s=c(n(84));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1754);var _=function(e,t){return e===t?"":e},w=function(e){!function(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&&h(e,t)}(c,e);var t,n,r,a=m(c);function c(){var e;f(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v(g(e=a.call.apply(a,[this].concat(n))),"onClick",(function(t){return e.props._onChange(e.props.name,_(t,e.props.value))})),e}return t=c,(n=[{key:"shouldComponentUpdate",value:function(e){return this.props.name!==e.name||this.props.value!==e.value||this.props.size!==e.size||this.props.className!==e.className||!(0,l.default)(this.props.options,e.options)}},{key:"render",value:function(){var e=this;return o.default.createElement("div",{className:"et-fb-settings-option-icon-picker ".concat(this.props.className)},(0,i.default)(this.props.options,(function(t,n){var r=n===e.props.value?s.default.uiActiveIcon:s.default.uiInactiveIcon;return o.default.createElement("span",{className:"et-fb-settings-option-icon-picker-button",key:n,onClick:e.onClick.bind(null,n)},o.default.createElement(u.default,{size:e.props.size,color:r,icon:t}))})))}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Component);t.ETBuilderControlIconPicker=w,v(w,"propTypes",{name:a.default.string.isRequired,value:a.default.oneOfType([a.default.string,a.default.number]),size:a.default.number,options:a.default.object.isRequired,className:a.default.string,_onChange:a.default.func.isRequired}),v(w,"defaultProps",{value:"",size:12,className:""})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitDistance=t.inputWidth=t.counterWidth=void 0;t.counterWidth=20;t.inputWidth=60;t.splitDistance=5},function(e,t,n){var r=n(54)("set",n(56));r.placeholder=n(48),e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatEndOptions=t.onSpecificDaysRepeatEndOptions=t.dateTimeFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i=new Date,l="".concat(i.getFullYear(),"-").concat(i.getMonth()+1,"-").concat(i.getDate()),u={never:(0,o.default)(a,"Never"),untilDate:(0,o.default)(a,"Until Date"),afterNumberOfTimes:(0,o.default)(a,"After Number of Times")};t.repeatEndOptions=u;var s={never:(0,o.default)(a,"Never"),untilDate:(0,o.default)(a,"Until Date")};t.onSpecificDaysRepeatEndOptions=s;var c={displayRule:{label:(0,o.default)(a,"Display Only If Current Date"),type:"select",options:{isAfter:(0,o.default)(a,"Is After"),isBefore:(0,o.default)(a,"Is Before"),isOnSpecificDate:(0,o.default)(a,"Is On a Specific Date"),isNotOnSpecificDate:(0,o.default)(a,"Is Not a Specific Date"),isOnSpecificDays:(0,o.default)(a,"Is On Specific Day(s) of the Week"),isFirstDayOfMonth:(0,o.default)(a,"Is the First Day of the Month"),isLastDayOfMonth:(0,o.default)(a,"Is the Last Day of the Month")},default:"isAfter"},date:{type:"date_picker",showTimeSelect:!1,default:l},time:{hourLabel:(0,o.default)(a,"Hour"),minuteLabel:(0,o.default)(a,"Minute"),type:"input_time",default:"00:00"},weekdays:{type:"checkboxes",visibility:!1,options:{monday:{label:(0,o.default)(a,"Monday"),value:"monday"},tuesday:{label:(0,o.default)(a,"Tuesday"),value:"tuesday"},wednesday:{label:(0,o.default)(a,"Wednesday"),value:"wednesday"},thursday:{label:(0,o.default)(a,"Thursday"),value:"thursday"},friday:{label:(0,o.default)(a,"Friday"),value:"friday"},saturday:{label:(0,o.default)(a,"Saturday"),value:"saturday"},sunday:{label:(0,o.default)(a,"Sunday"),value:"sunday"}},default:"|"},allDay:{label:(0,o.default)(a,"All Day"),type:"yes_no_button",options:{on:"Yes",off:"No"},default:"on",visibility:!1},fromTime:{hourLabel:(0,o.default)(a,"From Hour"),minuteLabel:(0,o.default)(a,"From Minute"),type:"input_time",default:"00:00",visibility:!1},untilTime:{hourLabel:(0,o.default)(a,"Until Hour"),minuteLabel:(0,o.default)(a,"Until Minute"),type:"input_time",default:"00:00",visibility:!1},repeat:{label:(0,o.default)(a,"Repeat"),type:"yes_no_button",options:{on:"Yes",off:"No"},default:"off"},repeatFrequency:{label:(0,o.default)(a,"Repeat Frequency"),type:"select",options:{monthly:(0,o.default)(a,"Monthly"),annually:(0,o.default)(a,"Annually")},default:"monthly"},repeatFrequencySpecificDays:{label:(0,o.default)(a,"Repeat Frequency"),type:"select",options:{weekly:(0,o.default)(a,"Weekly"),firstInstanceOfMonth:(0,o.default)(a,"First Instance of Every Month"),lastInstanceOfMonth:(0,o.default)(a,"Last Instance of Every Month"),everyOther:(0,o.default)(a,"Every Other")},default:"weekly",visibility:!1},repeatEnd:{label:(0,o.default)(a,"Repeat End"),type:"select",options:u,default:"never"},repeatUntilDate:{type:"date_picker",showTimeSelect:!1,default:l,visibility:!1},repeatTimes:{label:(0,o.default)(a,"Repeat Times"),type:"range",default:"3",unitless:!0,range_settings:{min:0,max:10,step:1},visibility:!1},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Date & Time").replace(/&amp;/g,"&")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.dateTimeFields=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ETCoreDropdown",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"ETCoreMenu",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"ETCoreMenuDivider",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ETCoreMenuItem",{enumerable:!0,get:function(){return a.default}}),t.default=void 0;var r=l(n(1856)),o=l(n(1862)),a=l(n(1864)),i=l(n(1866));function l(e){return e&&e.__esModule?e:{default:e}}var u=r.default;t.default=u},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ETCorePopup=t.ANIMATION_POPUP=t.ANIMATION_FOLD=void 0;var o,a=f(n(0)),i=f(n(3)),l=f(n(40)),u=n(1857),s=f(n(1858)),c=f(n(1859)),d=n(358);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e){var t=function(){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}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1860);var O="popup";t.ANIMATION_POPUP=O;var k="fold";t.ANIMATION_FOLD=k;var S=(w(o={},k,{points:["tl","bl"]}),w(o,O,{points:["tl","tl"],offset:["50%","50%"]}),o),C=function(e,t,n){var r=ReactDOM.unstable_batchedUpdates?function(e){ReactDOM.unstable_batchedUpdates(n,e)}:n;return e.addEventListener&&e.addEventListener(t,r),{remove:function(){e.removeEventListener(t,r)}}},E=function(e){!function(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&&y(e,t)}(i,e);var t,n,r,o=g(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),w(v(t=o.call(this,e)),"handleDocumentClick",(function(e){var n=e.target;t.props.ignoreDocumentClicks||(0,d.doesDomElementContain)(t.props.anchor.current,n)||(0,d.doesDomElementContain)(t.popupRef.current,n)||t.props.onClose()})),t.handlerOutsideClick=null,t.handlerOutsideTouch=null,t.popupRef=a.default.createRef(),t}return t=i,(n=[{key:"componentDidMount",value:function(){var e=this.props.getDocument();this.handlerOutsideClick=C(e,"mousedown",this.handleDocumentClick),this.handlerOutsideTouch=C(e,"touchstart",this.handleDocumentClick),this.alignPopup()}},{key:"componentWillUnmount",value:function(){this.handlerOutsideClick.remove(),this.handlerOutsideTouch.remove()}},{key:"componentDidUpdate",value:function(e){e.visible!==this.props.visible&&this.alignPopup()}},{key:"alignPopup",value:function(){var e=this.props,t=e.animation,n=e.anchor,r=e.offsetH,o=e.offsetV;if(e.visible){var a=h(h({},S[t]),{},{targetOffset:[-r,-o]});(0,u.alignElement)(this.popupRef.current,n.current,a)}}},{key:"renderPopup",value:function(){var e=this.props,t=e.anchor,n=e.style,r=e.onMouseEnter,o=e.onMouseLeave,i=e.children,l=t.current?t.current.offsetWidth:0;return a.default.createElement("div",{className:"et-core-popup__wrapper",ref:this.popupRef,onMouseEnter:r,onMouseLeave:o,style:h({width:l},n)},i)}},{key:"render",value:function(){var e=this.props,t=e.animation,n=e.animationEnabled;if(!e.visible)return null;var r=this.renderPopup();return t===O?a.default.createElement(s.default,{enabled:n},r):a.default.createElement(c.default,{enabled:n},r)}}])&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.default.PureComponent);t.ETCorePopup=E,w(E,"propTypes",{anchor:i.default.shape({current:d.validateRefType}),animation:i.default.oneOf([O,k]),animationEnabled:i.default.bool,getDocument:i.default.func,ignoreDocumentClicks:i.default.bool,offsetH:i.default.number,offsetV:i.default.number,onClose:i.default.func,onMouseEnter:i.default.func,onMouseLeave:i.default.func,style:i.default.object,visible:i.default.bool}),w(E,"defaultProps",{animation:O,animationEnabled:!0,getDocument:function(){return window.document},ignoreDocumentClicks:!1,offsetH:0,offsetV:0,onClose:l.default,onMouseEnter:l.default,onMouseLeave:l.default,style:{},visible:!0});var P=E;t.default=P},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=s(n(3)),i=s(n(10)),l=s(n(40)),u=["singleClick","doubleClick","children"];function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=function(e){!function(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&&h(e,t)}(l,e);var t,n,r,a=m(l);function l(){var e;f(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v(g(e=a.call.apply(a,[this].concat(n))),"lastEvent",0),v(g(e),"handleClick",(function(t){var n=t.timeStamp-e.lastEvent;e.lastEvent=t.timeStamp,t.persist(),n<300?e.props.doubleClick(t):e.props.singleClick(t)})),e}return t=l,(n=[{key:"render",value:function(){var e=this.props,t=(e.singleClick,e.doubleClick,e.children),n=d(e,u),r=(0,i.default)(n,{onClick:this.handleClick});return o.default.cloneElement(t,r)}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.PureComponent);v(_,"displayName","WithDoubleClick(".concat(_.displayName||_.name||"Component",")")),v(_,"propTypes",{singleClick:a.default.func.isRequired,doubleClick:a.default.func,children:a.default.element.isRequired}),v(_,"defaultProps",{doubleClick:l.default}),v(_,"defaultTypes",void 0);var w=_;t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"withOneRender",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"withPortability",{enumerable:!0,get:function(){return o.default}});var r=a(n(811)),o=a(n(1890));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(0),a=n(67),i=u(n(1)),l=u(n(22));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function d(e){var t=function(){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}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var h,m,y,g=function(t){!function(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&&c(e,t)}(f,t);var n,r,o,u=d(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=u.call(this,e)).state={isCompleted:!1},t}return n=f,(r=[{key:"componentDidUpdate",value:function(e,t){var n=this;!t.isCompleted&&this.state.isCompleted&&setTimeout((function(){l.default.togglePortabilityProgressBar(n.props.name,!1)}),1e3),100!==e.progress&&100===this.props.progress&&setTimeout((function(){n.setState({isCompleted:!0})}),1e3)}},{key:"render",value:function(){var t=this.props,n=t.progress,r=t.time_remaining;if(t.renderStart>n)return!1;var o={width:(0,a.spring)(n,{stiffness:300,damping:30})},l=(0,i.default)(this.props,"name",""),u=(0,i.default)(e.appWindow(),"etCore.portability.text.".concat(l,"ing"),"");return this.state.isCompleted?React.createElement("span",{className:"et-fb-tooltip-modal--loader et-core-loader et-core-loader-success"}):React.createElement("div",{className:"et-fb-tooltip-modal--progress"},React.createElement("div",{className:"et-fb-tooltip-modal--progress-bar"},React.createElement(a.Motion,{defaultStyle:{width:0,opacity:100},style:o},(function(e){return React.createElement("div",{className:"et-fb-tooltip-modal--progress-chart",style:{width:"".concat(e.width,"%")}},React.createElement("div",{className:"et-fb-tooltip-modal--progress-label"},parseInt(e.width),"%"))}))),React.createElement("div",{className:"et-fb-tooltip-modal--time-estimation"},r>0&&u.replace("<span>1</span>",r)))}}])&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),f}(o.Component);y={name:"",progress:0,time_remaining:1,renderStart:1},(m="defaultProps")in(h=g)?Object.defineProperty(h,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):h[m]=y;var b=g;t.default=b}).call(this,n(2))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=P(n(845)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=P(n(13)),l=P(n(1)),u=P(n(5)),s=(P(n(96)),P(n(11))),c=P(n(31)),d=P(n(124)),f=P(n(85)),p=P(n(40)),h=n(93),m=P(n(22)),y=P(n(6)),g=P(n(303)),b=P(n(1565)),v=P(n(457)),_=P(n(784)),w=P(n(43)),O=P(n(1488)),k=P(n(2)),S=n(1564);n(1894);var C=["addToLibrary"];function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}function P(e){return e&&e.__esModule?e:{default:e}}function T(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function R(e){var t=function(){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}}();return function(){var n,r=B(e);if(t){var o=B(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return A(this,n)}}function A(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return I(e)}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var W=ETBuilderBackend.i18n.tooltips,V=y.default.getLibraryTerms(),U=function(e){!function(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&&L(e,t)}(S,e);var t,n,r,y=R(S);function S(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,S),F(I(t=y.call(this,e)),"_getFilePlaceholderClassName",(function(){return(0,i.default)({"et-core-portability-import-placeholder":!0,"et-core-portability-bulk-import-placeholder":t.props.bulkImport,"et-fb-portability-import-placeholder--active":!(0,u.default)((0,l.default)(t.props,"importFile.name",""))})})),F(I(t),"_onChange",(function(e,n){var r;switch(e){case"importOptions":var o=j(n.split("|"),3);r={importOptions:{addToLibrary:"off",replaceLayout:o[0],importBackUp:o[1],includeGlobalPresets:o[2]}};break;case"exportOptions":r={exportOptions:{applyGlobalPresets:j(n.split("|"),1)[0]}};case"importToCloud":r={importToCloud:j(n.split("|"),1)[0]}}t.props._onChange(r)})),F(I(t),"onImportLayout",(function(e){var n=t.props,r=n.importLayout,o=n.importOptions,a=t.props.importPreferences;if(e.preventDefault(),a){if(!(0,l.default)(a,"importOptions.includeGlobalPresets")){var i=o.includeGlobalPresets;a.importOptions.includeGlobalPresets=i}r(a)}else r()})),F(I(t),"onExportLayout",(function(e){e.preventDefault(),t.props.exportLayout()})),F(I(t),"onFileUpload",(function(e){var n,r;if(t.props.bulkImport){var o=e.target.files,a=Array.from(o).filter((function(e){return"application/json"===e.type}));n=(0,l.default)(t.props,"importFile",[]),n=a.concat(Array.from(n))}else r=(n=(0,l.default)(e,"target.files[0]",""))?n.name.replace(".json",""):"";t.props._onChange({importFile:n,importLayoutName:r})})),F(I(t),"removeUploadedFile",(function(e){var n=t.props.importFile,r=(0,o.default)(n,e);t.props._onChange({updatedFile:r})})),F(I(t),"getTabName",(function(){var e=t.props,n=e.importOnly,r=e.exportOnly,o=e.active_tab;return n?"import":r||"modules_all"===o?"export":"import"})),F(I(t),"componentDidMount",(function(){var e=t.props,n=e._onChange,r=e.exportFileName;r&&""!==r&&n({exportFileName:r})})),F(I(t),"componentDidUpdate",(function(e){var n=t.props.cloudImportSupport&&"on"===(0,l.default)(t.props,"importToCloud","off");100!==t.props.importProgress||!e.hasProgressBar||t.props.hasProgressBar||n||t.setState({hasImportCompletedCheckmark:!0}),!e.importError&&t.props.importError&&m.default.togglePortabilityProgressBar("import",!1)})),F(I(t),"_renderCategories",(function(){return!(!V||0===V.length)&&a.default.createElement(a.Fragment,null,a.default.createElement("div",{className:"et-fb-import-categories-field"},a.default.createElement("h3",null,ETBuilderBackend.i18n.saveModuleLibraryAttrs.addToCatText,":"),a.default.createElement("div",{className:"et-fb-settings-option-container"},a.default.createElement(O.default,{value:t.props.importCategories,name:"importCategories",options:(0,c.default)(V,(function(e){return e.name})),shortcut_index:"import-categories",_onChange:t.props._onChange}))),a.default.createElement("div",{className:"et-fb-export-file-name-field"},a.default.createElement("h3",null,ETBuilderBackend.i18n.saveModuleLibraryAttrs.createCatText),a.default.createElement(v.default,{type:"text",value:t.props.importNewCategory,name:"importNewCategory",_onChange:t.props._onChange})))})),F(I(t),"_renderExportTab",(function(){var e=(0,l.default)(window,"et_gd_extras.apply_on_export",!1),n=(0,d.default)(t.props.exportOptions,(function(t,n){return"applyGlobalPresets"!==n||e})),r=(0,c.default)(n,(function(e,t){return{value:W.portabilityTabs.export[t],label:W.portabilityTabs.export[t],className:t}})),o=(0,f.default)(n).join("|");return a.default.createElement("div",{className:t.props.tabClassName("modules_all")},a.default.createElement("div",{className:"et-fb-export-file-name-field"},a.default.createElement("h3",null,W.exportName),a.default.createElement(v.default,{type:"text",value:t.props.exportFileName,name:"exportFileName",_onChange:t.props._onChange})),a.default.createElement("div",{className:"et-fb-export-error-container"},t.props.exportError),r.length?a.default.createElement("div",{className:"et-fb-portability-options-field"},a.default.createElement("h3",null,W.portabilityOptions),a.default.createElement(O.default,{value:o,name:"exportOptions",options:r,_onChange:t._onChange})):null,a.default.createElement(_.default,{videoListId:"et_pb_portability",trigger:"tooltip"}),a.default.createElement("a",{href:"#",className:"et-fb-save-library-button",onClick:t.onExportLayout},W.exportButton))})),F(I(t),"_renderImportErrorMessage",(function(){var e=t.props.importError;return Array.isArray(e)?a.default.createElement("ul",null,e.map((function(e){return a.default.createElement("li",{key:e.file.name},"".concat(e.file.name,": ").concat(e.error))}))):e})),F(I(t),"_renderImportTab",(function(){var e=t.props.importOptions,n=e.addToLibrary,r=M(e,C),o=t.props.cloudImportSupport,i=t.props.cloudImportLock,d=i?"on":(0,l.default)(t.props,"importToCloud","off"),m=(0,c.default)(r,(function(e,t){return(!o||"includeGlobalPresets"===t&&"on"!==d)&&{value:W.portabilityTabs.import[t],label:(0,h.decode)(W.portabilityTabs.import[t]),className:t}})),y=(0,f.default)(r),g=y.join("|"),b=t.props.importButtonName||W.importButton;return a.default.createElement("div",{className:t.props.tabClassName("modules_library")},a.default.createElement("div",{className:"et-fb-upload-file-container"},a.default.createElement("h3",null,!t.props.bulkImport&&W.chooseFile,t.props.bulkImport&&W.portabilityTabs.import.selectFiles),a.default.createElement("span",{className:t._getFilePlaceholderClassName()},!t.props.bulkImport&&t.props.importFileName(),t.props.bulkImport&&W.portabilityTabs.import.drageFiles),t.props.bulkImport&&a.default.createElement("button",{className:"et-fb-button et-fb-button--upload-font et-fb-button--inverse et-fb-settings-button--additional-button et-core-portability-bulk-import-choose-files"},W.chooseFiles),a.default.createElement("input",{type:"file",className:"et-fb-import-file",onChange:t.onFileUpload,multiple:!0,accept:"application/JSON"}),t.props.bulkImport&&t.generateFilesListPreview()),a.default.createElement("div",{className:"et-fb-import-error-container"},t._renderImportErrorMessage()),!(0,u.default)(m)&&a.default.createElement("div",{className:"et-fb-portability-options-field"},a.default.createElement("h3",null,W.portabilityOptions),a.default.createElement(O.default,{value:g,name:"importOptions",options:m,_onChange:t._onChange}),o&&((0,s.default)(y[2])||"off"===y[2])&&window.ETCloudApp.hasTeamPermissions("add")&&a.default.createElement(O.default,{value:d,name:"importToCloud",options:[{value:W.portabilityTabs.import.ImportToCloud,label:t.props.cloudImoirtCheckboxLabel||(0,h.decode)(W.portabilityTabs.import.ImportToCloud),className:"ImportToCloud"}],_onChange:i?p.default:t._onChange})),k.default.isOn(n)&&t._renderImportNameField(),k.default.isOn(n)&&t._renderCategories(),a.default.createElement(_.default,{videoListId:"et_pb_portability",trigger:"tooltip"}),a.default.createElement("a",{href:"#",className:"et-fb-save-library-button",onClick:t.onImportLayout},b))})),F(I(t),"_renderImportNameField",(function(){return a.default.createElement("div",{className:"et-fb-export-file-name-field"},a.default.createElement("h3",null,W.layoutName),a.default.createElement(v.default,{type:"text",value:t.props.importLayoutName,default:t.props.importLayoutName,name:"importLayoutName",_onChange:t.props._onChange}))})),F(I(t),"_renderProgress",(function(){var e=t.getTabName(),n=t.props.cloudImportSupport&&"on"===(0,l.default)(t.props,"importToCloud","off")?t.props.cloudImportProgress:(0,l.default)(t.props,"".concat(e,"Progress"),0);return n=t.props.disableCheckmark&&100===n?99:n,a.default.createElement(b.default,{name:e,progress:n,time_remaining:(0,l.default)(t.props,"".concat(e,"Estimation"),1),renderStart:0})})),F(I(t),"_renderModalContent",(function(){return t.props.hasProgressBar||t.props.preloadingItems||t.state.hasImportCompletedCheckmark?t._renderProgress():a.default.createElement(g.default,{isLoading:t.props.preloadingItems},!t.props.importOnly&&t._renderExportTab(),!t.props.exportOnly&&t._renderImportTab())})),t.state={hasImportCompletedCheckmark:!1},t.tabs=[{name:"tooltips.export",className:"modules_all"},{name:"tooltips.import",className:"modules_library"}],t}return t=S,(n=[{key:"generateFilesListPreview",value:function(){var e,t=this;if(null===(e=this.props.importFile)||void 0===e||!e.length)return null;var n=(0,c.default)(this.props.importFile,(function(e,n){return a.default.createElement("div",{className:"et-fb-import-files-list-item",key:e.name},a.default.createElement("span",{className:"et-fb-import-files-list-item-remove",onClick:function(){return t.removeUploadedFile(n)}},a.default.createElement(w.default,{icon:"delete",color:"#EF5555"})),e.name)}));return a.default.createElement("div",{className:"et-fb-import-files-list"},a.default.createElement("label",{className:"et-fb-form__label"},a.default.createElement("span",{className:"et-fb-form__label-text"},W.portabilityTabs.import.selectedFiles)),n)}},{key:"render",value:function(){var e,t=!(0,s.default)(this.props.maxHeight)&&this.props.maxHeight>0?{maxHeight:this.props.maxHeight}:"",n=this.props.hasProgressBar||this.state.hasImportCompletedCheckmark?{height:(0,l.default)(t,"maxHeight",200),position:"relative"}:{};return a.default.createElement("div",{className:"et-fb-main-settings et-fb-main-settings--portability"},(e=this.props)._renderTabs.apply(e,T(this.tabs)),a.default.createElement("div",{className:"et-fb-settings-options-wrap et_fb_save_module_modal",style:t},a.default.createElement("div",{className:"et-fb-settings-options",style:n},this._renderModalContent())))}}])&&N(t.prototype,n),r&&N(t,r),Object.defineProperty(t,"prototype",{writable:!1}),S}(a.default.Component);F(U,"displayName","ETBuilderPortabilityModal"),F(U,"defaultProps",{hasProgressBar:!1,importProgress:0,importEstimation:1,exportProgress:0,exportEstimation:1,layoutId:0,disableCheckmark:!1,bulkImport:!1});var G=(0,S.withPortability)(U);t.default=G},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=m(n(35)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=m(n(3)),l=m(n(5)),u=m(n(13)),s=m(n(1895));n(1900);var c=m(n(795)),d=m(n(507)),f=m(n(620)),p=m(n(814));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function m(e){return e&&e.__esModule?e:{default:e}}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=a.default.forwardRef((function(e,t){var n=e.animation,r=e.modalKey,o=e.children,i=e.draggable,d=g((0,a.useState)({x:0,y:0}),2),f=d[0],h=d[1],m=(0,a.useRef)(),b={enabled:n};(0,l.default)(r)||(b.key=r);var v=function(){if(m.current){var e=window.top,t=m.current.getBoundingClientRect(),n=t.left,r=t.top;if(t.right>e.innerWidth&&(n=e.innerWidth-t.width),t.bottom>e.innerHeight&&(r=e.innerHeight-t.height),t.left<0&&(n=0),t.top<0&&(r=0),n!==t.left||r!==t.top){var o=n-t.left,a=r-t.top,i=m.current.style.transform.replace(/translate\((.*)px, (.*)px\)/,(function(e,t,n){var r=parseInt(t,10)+o,i=parseInt(n,10)+a;return h({x:r,y:i}),"translate(".concat(r,"px, ").concat(i,"px)")}));m.current.style.transform=i}}};(0,a.useEffect)((function(){var e=localStorage.getItem("".concat(r,"_position"));e&&h(JSON.parse(e));var t=m.current,n=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting||v()}))}),{root:null,rootMargin:"0px",threshold:0});t&&n.observe(t);var o=new ResizeObserver((function(){v()}));return t&&o.observe(t),function(){t&&(n.unobserve(t),o.unobserve(t))}}),[]);var _=function(e,t){var n={x:t.lastX,y:t.lastY};localStorage.setItem("".concat(r,"_position"),JSON.stringify(n)),h(n)},w=function(){return a.default.createElement("div",{className:"et-common-prompt__container",ref:m},o)},O=(0,u.default)({"et-common-prompt":!0,"et-common-prompt-draggable":i});return a.default.createElement("div",{className:O,ref:t},!i&&a.default.createElement("div",{className:"et-common-prompt__overlay"}),a.default.createElement(c.default,y({},b,{onRest:v}),(function(e){return a.default.createElement("div",{className:"et-common-prompt__modal",style:e},i&&a.default.createElement(s.default,{handle:".react-draggable > .et-common-prompt__header",bounds:"parent",position:f,onStop:_},w()),!i&&w())})),a.default.createElement(p.default,{lockId:"common-prompt"}))}));v.propTypes={animation:i.default.bool,modalKey:i.default.oneOfType([i.default.string,i.default.number]),draggable:i.default.bool},v.defaultProps={animation:!0,modalKey:"",draggable:!1},v.Header=a.default.memo((function(e){var t=e.children,n=e.render,r=e.onBack,i=e.onClose,l=e.className,s=void 0===l?"":l,c=(0,u.default)({"et-common-prompt__header":!0,"et-common-prompt__header-back":r})+" ".concat(s);return a.default.createElement("div",{className:c},(0,o.default)(r)&&a.default.createElement(d.default,{className:"et-common-button--round",onClick:r},a.default.createElement(f.default,{icon:"back",color:"#ffffff"})),a.default.createElement("span",null,t),(0,o.default)(n)&&n(),(0,o.default)(i)&&a.default.createElement("div",{className:"et-common-prompt__header-actions"},a.default.createElement(d.default,{className:"et-common-button--round",onClick:i,"data-testid":"ClosePrompt"},a.default.createElement(f.default,{icon:"close",color:"#ffffff"}))))})),v.Content=a.default.memo((function(e){var t=e.style,n=e.children;return a.default.createElement("div",{className:"et-common-prompt__body"},a.default.createElement("div",{className:"et-common-prompt__content",style:t},n))})),v.Content.propTypes={style:i.default.object},v.Content.defaultProps={style:{}},v.Actions=a.default.memo((function(e){var t=e.children;return a.default.createElement("div",{className:"et-common-prompt__footer"},t)}));var _=v;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.createCoreData=function(e,t,n){var o=e.state,i=!(0,r.isNum)(o.lastX),l=a(e);return i?{node:l,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:l,deltaX:t-o.lastX,deltaY:n-o.lastY,lastX:o.lastX,lastY:o.lastY,x:t,y:n}},t.createDraggableData=function(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},t.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var i=e.props.bounds;i="string"==typeof i?i:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(i);var l=a(e);if("string"==typeof i){var u,s=l.ownerDocument,c=s.defaultView;if(!((u="parent"===i?l.parentNode:s.querySelector(i))instanceof c.HTMLElement))throw new Error('Bounds selector "'+i+'" could not find an element.');var d=u,f=c.getComputedStyle(l),p=c.getComputedStyle(d);i={left:-l.offsetLeft+(0,r.int)(p.paddingLeft)+(0,r.int)(f.marginLeft),top:-l.offsetTop+(0,r.int)(p.paddingTop)+(0,r.int)(f.marginTop),right:(0,o.innerWidth)(d)-(0,o.outerWidth)(l)-l.offsetLeft+(0,r.int)(p.paddingRight)-(0,r.int)(f.marginRight),bottom:(0,o.innerHeight)(d)-(0,o.outerHeight)(l)-l.offsetTop+(0,r.int)(p.paddingBottom)-(0,r.int)(f.marginBottom)}}(0,r.isNum)(i.right)&&(t=Math.min(t,i.right));(0,r.isNum)(i.bottom)&&(n=Math.min(n,i.bottom));(0,r.isNum)(i.left)&&(t=Math.max(t,i.left));(0,r.isNum)(i.top)&&(n=Math.max(n,i.top));return[t,n]},t.getControlPosition=function(e,t,n){var r="number"==typeof t?(0,o.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;var i=a(n),l=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return(0,o.offsetXYFromParent)(r||e,l,n.props.scale)},t.snapToGrid=function(e,t,n){var r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var r=n(1499),o=n(1513);function a(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSaveModalTitle=t.getSaveModalItemLabel=t.getSaveModalDescription=void 0;var r=i(n(163)),o=i(n(1)),a=n(57);function i(e){return e&&e.__esModule?e:{default:e}}t.getSaveModalTitle=function(e){var t=ETBuilderBackend.i18n.tooltips,n=(0,a.getType)(e),r=t.addToLayoutLibrary;return""===n?r:r=(0,a.isSection)(e)?t.addToSectionLibrary:(0,a.isRow)(e)||(0,a.isInnerRow)(e)?t.addToRowLibrary:(n.indexOf("et_pb_")>-1&&(0,a.isInnerColumn)(e),t.addToModuleLibrary)};t.getSaveModalDescription=function(e){var t=ETBuilderBackend.i18n.saveModuleLibraryAttrs,n=(0,a.getType)(e),r=t.descriptionTextLayout;return""===n?r:r=(0,a.isSection)(e)?t.descriptionSectionText:(0,a.isRow)(e)||(0,a.isInnerRow)(e)?t.descriptionRowText:(n.indexOf("et_pb_")>-1&&(0,a.isInnerColumn)(e),t.descriptionModuleText)};t.getSaveModalItemLabel=function(e,t){var n=ETBuilderBackend.i18n.saveModuleLibraryAttrs,i=(0,a.getType)(e),l=(0,o.default)(n,t);return(0,r.default)(l)?"":""===i?l:l=(0,a.isSection)(e)?(0,o.default)(n,"sectionLabel"):(0,a.isRow)(e)||(0,a.isInnerRow)(e)?(0,o.default)(n,"rowLabel"):(i.indexOf("et_pb_")>-1&&(0,a.isInnerColumn)(e),(0,o.default)(n,"moduleLabel"))}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=P(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=E(n(3)),l=E(n(11)),u=E(n(31)),s=E(n(364)),c=E(n(162)),d=E(n(1)),f=E(n(35)),p=E(n(34)),h=E(n(9)),m=E(n(1492)),y=E(n(1599)),g=E(n(1524)),b=E(n(22)),v=E(n(14)),_=E(n(6)),w=E(n(19)),O=E(n(285)),k=E(n(1618)),S=E(n(281)),C=E(n(2));function E(e){return e&&e.__esModule?e:{default:e}}function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(P=function(e){return e?n:t})(e)}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function N(e){var t=function(){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}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var B=!1,F=function(e){var t;_.default.getModuleItemDragEndWaiting()&&("function"!=typeof Event?(t=document.createEvent("Event")).initEvent("dragend",!0,!0):t=new Event("dragend"),C.default.appWindow().dispatchEvent(t))},W=function(e){B=!0},V=function(e){clearTimeout(o),o=setTimeout((function(){var e;!B&&(0,f.default)(Event)&&("function"!=typeof Event?(e=document.createEvent("Event")).initEvent("dragend",!0,!0):e=new Event("dragend"),C.default.appWindow().dispatchEvent(e));B=!1}),150)},U={module:i.default.object,_v:w.default._v,setHoveredElement:i.default.oneOfType([i.default.func,i.default.bool]),disableDuplicate:i.default.bool,disableDelete:i.default.bool,onToggleRightMenu:i.default.oneOfType([i.default.func,i.default.bool]),isGlobalPresetsMode:i.default.bool},G=C.default.condition("is_layout_block"),H=function(t){!function(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&&D(e,t)}(f,t);var n,r,o,i=N(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),I(R(t=i.call(this,e)),"disableDND",(function(){t.setState({isDNDActive:!1})})),I(R(t),"enableDND",(function(){t.setState({isDNDActive:!0})})),I(R(t),"moveItem",(function(e,n){var r=t.props.module.props.content,o=r.filter((function(t){return t._i===e}))[0],a=r.filter((function(e){return e._i===n}))[0],i=o._order;o._order=a._order,a._order=i,r.sort(t.compareItems),r=(0,u.default)((0,c.default)(r),(function(e,t){var n=e.address.split(".");return(n=(0,s.default)(n)).push(t),e.address=n.join("."),e})),b.default.moduleContentChange(t.props.module,r,!1,!0)})),I(R(t),"_onMouseEnterItem",(function(e){var n=t.props.setHoveredElement;n&&n("child_item",e.type,O.default.getHelper("child_item").preparePayload(e))})),I(R(t),"_onMouseLeaveItem",(function(e){var n=t.props.setHoveredElement;n&&n(!1,e.type)})),I(R(t),"_getItemTitleAttribute",(function(e){if("content"===e.child_title_var&&(0,d.default)(e,"content"))return{value:(0,d.default)(e,"content"),attribute:"content"};for(var t=[[(0,d.default)(e.attrs,e.child_title_var),e.child_title_var],[(0,d.default)(e.attrs,e.child_title_fallback_var),e.child_title_fallback_var],[(0,d.default)(e,"advanced_setting_title_text",ETBuilderBackend.i18n.modules.items.newItemDefaultText),"advanced_setting_title_text"],[(0,d.default)(e.attrs,"title"),"title"]],n=0;n<t.length;n++)if(t[n][0])return{value:t[n][0].trim(),attribute:t[n][1]};return{value:"",attribute:"title"}})),t.gutenbergDragStartEventListeners=G?(0,d.default)(C.default.topWindow(),"ETSavedGutenbergEventListeners.document.dragstart",[]):[],t.state={isDNDActive:!0},t}return n=f,(r=[{key:"componentDidMount",value:function(){G&&0<this.gutenbergDragStartEventListeners.length&&(0,h.default)(this.gutenbergDragStartEventListeners,(function(e){C.default.topDocument().removeEventListener("dragstart",e)})),C.default.appWindow().addEventListener("dragstart",F),C.default.appWindow().addEventListener("dragend",W),C.default.appWindow().addEventListener("drop",V),e(window).on("et_code_snippets_container_ready",this.disableDND),e(window).on("et_code_snippets_library_close",this.enableDND)}},{key:"componentWillUnmount",value:function(){C.default.appWindow().removeEventListener("dragstart",F),C.default.appWindow().removeEventListener("dragend",W),C.default.appWindow().removeEventListener("drop",V),e(window).off("et_code_snippets_container_ready",this.disableDND),e(window).off("et_code_snippets_library_close",this.enableDND),G&&0<this.gutenbergDragStartEventListeners.length&&(0,h.default)(this.gutenbergDragStartEventListeners,(function(e){C.default.topDocument().addEventListener("dragstart",e)}))}},{key:"compareItems",value:function(e,t){return e._order-t._order}},{key:"_renderModuleItems",value:function(){var t=this;if(!this.state.isDNDActive)return null;var n=a.default.createElement("ul",{className:"et-fb-settings-module-items"},(0,u.default)(this.props.module.props.content,(function(n,r){if(!(0,l.default)(n)){var o=j({},n);o.attrs=v.default.getPrefilledAttributes(o);var i=t._getItemTitleAttribute(o),u=a.default.createElement(S.default,null,a.default.createElement(k.default,{attributes:o.attrs,attribute:i.attribute,value:i.value},(function(t,n){var r;return"twitter"===(null===(r=o.attrs)||void 0===r?void 0:r.social_network)&&"twitter"===t?"X":n?e(e.parseHTML(t)).text():t}))),s=a.default.createElement(y.default,T({key:r,index:r,id:r,title:u,disableDuplicate:t.props.disableDuplicate,disableDelete:t.props.disableDelete,_onMouseEnterItem:t._onMouseEnterItem,_onMouseLeaveItem:t._onMouseLeaveItem,onToggleRightMenu:t.props.onToggleRightMenu},o));return a.default.createElement(g.default,{key:o._i,moveItem:t.moveItem.bind(t),id:o._i},s)}})));return a.default.createElement(m.default,null,n)}},{key:"_renderItemDefaults",value:function(){var e=this.props.module.props.child_slug,t=j({},this.props.module.props.content[0]),n=ETBuilderBackend.i18n,r=(0,p.default)(n.modules,"".concat(e,".name"))?"".concat((0,d.default)(n.modules,"".concat(e,".name"))," "):"",o="".concat(r).concat(n.rightClickMenuItems.item," ").concat(n.modals.globalPresets.defaults);return t.attrs=v.default.getPrefilledAttributes(t),a.default.createElement("ul",{className:"et-fb-settings-module-items"},a.default.createElement(y.default,T({key:0,index:0,id:0,title:o,_onMouseEnterItem:this._onMouseEnterItem,_onMouseLeaveItem:this._onMouseLeaveItem,onToggleRightMenu:this.props.onToggleRightMenu},t,{isGlobalPresetsMode:!0})))}},{key:"render",value:function(){return this.props.isGlobalPresetsMode?this._renderItemDefaults():this._renderModuleItems()}}])&&x(n.prototype,r),o&&x(n,o),Object.defineProperty(n,"prototype",{writable:!1}),f}(a.Component);H.propTypes=U,H.defaultProps={module:{},_v:0,setHoveredElement:!1,disableDuplicate:!1,disableDelete:!1,onToggleRightMenu:!1,isGlobalPresetsMode:!1};var z=H;t.default=z}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(1577)),a=u(n(1580)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1493)),l=u(n(1584));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,e);var r=(0,o.default)(a.default);this.context=n,this.store=r,this.monitor=new l.default(r),this.registry=this.monitor.registry,this.backend=t(this),r.subscribe(this.handleRefCountChange.bind(this))}return r(e,[{key:"handleRefCountChange",value:function(){var e=this.store.getState().refCount>0;e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)}},{key:"getContext",value:function(){return this.context}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch;return Object.keys(i).filter((function(e){return"function"==typeof i[e]})).reduce((function(n,r){var o,a=i[r];return n[r]=(o=a,function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var i=o.apply(e,r);void 0!==i&&t(i)}),n}),{})}}]),e}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.ActionTypes=void 0,t.default=function e(t,n,a){var l;"function"==typeof n&&void 0===a&&(a=n,n=void 0);if(void 0!==a){if("function"!=typeof a)throw new Error("Expected the enhancer to be a function.");return a(e)(t,n)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var u=t,s=n,c=[],d=c,f=!1;function p(){d===c&&(d=c.slice())}function h(){return s}function m(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return p(),d.push(e),function(){if(t){t=!1,p();var n=d.indexOf(e);d.splice(n,1)}}}function y(e){if(!(0,r.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,s=u(s,e)}finally{f=!1}for(var t=c=d,n=0;n<t.length;n++){(0,t[n])()}return e}return y({type:i.INIT}),(l={dispatch:y,subscribe:m,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");u=e,y({type:i.INIT})}})[o.default]=function(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(h())}return n(),{unsubscribe:t(n)}}})[o.default]=function(){return this},e},l};var r=a(n(134)),o=a(n(1578));function a(e){return e&&e.__esModule?e:{default:e}}var i=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";n.r(t),function(e,r){var o,a=n(1579);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var i=Object(a.a)(o);t.default=i}.call(this,n(89),n(838)(e))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{dirtyHandlerIds:(0,i.default)(e.dirtyHandlerIds,t,e.dragOperation),dragOffset:(0,r.default)(e.dragOffset,t),refCount:(0,a.default)(e.refCount,t),dragOperation:(0,o.default)(e.dragOperation,t),stateId:(0,l.default)(e.stateId)}};var r=u(n(1519)),o=u(n(1581)),a=u(n(1582)),i=u(n(1521)),l=u(n(1583));function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments[1];switch(t.type){case l.BEGIN_DRAG:return r({},e,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case l.PUBLISH_DRAG_SOURCE:return r({},e,{isSourcePublic:!0});case l.HOVER:return r({},e,{targetIds:t.targetIds});case u.REMOVE_TARGET:return-1===e.targetIds.indexOf(t.targetId)?e:r({},e,{targetIds:(0,i.default)(e.targetIds,t.targetId)});case l.DROP:return r({},e,{dropResult:t.dropResult,didDrop:!0,targetIds:[]});case l.END_DRAG:return r({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}};var o,a=n(794),i=(o=a)&&o.__esModule?o:{default:o},l=n(1493),u=n(1494);var s={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments[1];switch(t.type){case r.ADD_SOURCE:case r.ADD_TARGET:return e+1;case r.REMOVE_SOURCE:case r.REMOVE_TARGET:return e-1;default:return e}};var r=n(1494)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(1483)),a=c(n(4)),i=c(n(1520)),l=c(n(1585)),u=n(1519),s=n(1521);function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t,this.registry=new l.default(t)}return r(e,[{key:"subscribeToStateChange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.handlerIds;(0,o.default)("function"==typeof e,"listener must be a function."),(0,o.default)(void 0===r||(0,a.default)(r),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,l=function(){var n=t.store.getState(),o=n.stateId;try{o===i||o===i+1&&!(0,s.areDirty)(n.dirtyHandlerIds,r)||e()}finally{i=o}};return this.store.subscribe(l)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,o.default)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))}},{key:"canDragSource",value:function(e){var t=this.registry.getSource(e);return(0,o.default)(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){var t=this.registry.getTarget(e);if((0,o.default)(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),r=this.getItemType();return(0,i.default)(n,r)&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){var t=this.registry.getSource(e,!0);return(0,o.default)(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e))}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1},n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),o=this.getItemType();if(!(0,i.default)(r,o))return!1;var a=this.getTargetIds();if(!a.length)return!1;var l=a.indexOf(e);return n?l===a.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return(0,u.getSourceClientOffset)(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return(0,u.getDifferenceFromInitialOffset)(this.store.getState().dragOffset)}}]),e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o="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},a=c(n(1483)),i=c(n(4)),l=c(n(1586)),u=n(1494),s=c(n(1588));function c(e){return e&&e.__esModule?e:{default:e}}var d="SOURCE",f="TARGET";function p(e,t){t&&(0,i.default)(e)?e.forEach((function(e){return p(e,!1)})):(0,a.default)("string"==typeof e||"symbol"===(void 0===e?"undefined":o(e)),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}function h(e){switch(e[0]){case"S":return d;case"T":return f;default:(0,a.default)(!1,"Cannot parse handler ID: "+e)}}var m=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t,this.types={},this.handlers={},this.pinnedSourceId=null,this.pinnedSource=null}return r(e,[{key:"addSource",value:function(e,t){p(e),function(e){(0,a.default)("function"==typeof e.canDrag,"Expected canDrag to be a function."),(0,a.default)("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),(0,a.default)("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);var n=this.addHandler(d,e,t);return this.store.dispatch((0,u.addSource)(n)),n}},{key:"addTarget",value:function(e,t){p(e,!0),function(e){(0,a.default)("function"==typeof e.canDrop,"Expected canDrop to be a function."),(0,a.default)("function"==typeof e.hover,"Expected hover to be a function."),(0,a.default)("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);var n=this.addHandler(f,e,t);return this.store.dispatch((0,u.addTarget)(n)),n}},{key:"addHandler",value:function(e,t,n){var r=function(e){var t=(0,s.default)().toString();switch(e){case d:return"S"+t;case f:return"T"+t;default:(0,a.default)(!1,"Unknown role: "+e)}}(e);return this.types[r]=t,this.handlers[r]=n,r}},{key:"containsHandler",value:function(e){var t=this;return Object.keys(this.handlers).some((function(n){return t.handlers[n]===e}))}},{key:"getSource",value:function(e,t){return(0,a.default)(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.handlers[e]}},{key:"getTarget",value:function(e){return(0,a.default)(this.isTargetId(e),"Expected a valid target ID."),this.handlers[e]}},{key:"getSourceType",value:function(e){return(0,a.default)(this.isSourceId(e),"Expected a valid source ID."),this.types[e]}},{key:"getTargetType",value:function(e){return(0,a.default)(this.isTargetId(e),"Expected a valid target ID."),this.types[e]}},{key:"isSourceId",value:function(e){return h(e)===d}},{key:"isTargetId",value:function(e){return h(e)===f}},{key:"removeSource",value:function(e){var t=this;(0,a.default)(this.getSource(e),"Expected an existing source."),this.store.dispatch((0,u.removeSource)(e)),(0,l.default)((function(){delete t.handlers[e],delete t.types[e]}))}},{key:"removeTarget",value:function(e){var t=this;(0,a.default)(this.getTarget(e),"Expected an existing target."),this.store.dispatch((0,u.removeTarget)(e)),(0,l.default)((function(){delete t.handlers[e],delete t.types[e]}))}},{key:"pinSource",value:function(e){var t=this.getSource(e);(0,a.default)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){(0,a.default)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}}]),e}();t.default=m},function(e,t,n){"use strict";var r=n(1587),o=[],a=[],i=r.makeRequestCallFromTimer((function(){if(a.length)throw a.shift()}));function l(e){var t;(t=o.length?o.pop():new u).task=e,r(t)}function u(){this.task=null}e.exports=l,u.prototype.call=function(){try{this.task.call()}catch(e){l.onerror?l.onerror(e):(a.push(e),i())}finally{this.task=null,o[o.length]=this}}},function(e,t,n){"use strict";(function(t){function n(e){o.length||(r(),!0),o[o.length]=e}e.exports=n;var r,o=[],a=0;function i(){for(;a<o.length;){var e=a;if(a+=1,o[e].call(),a>1024){for(var t=0,n=o.length-a;t<n;t++)o[t]=o[t+a];o.length-=a,a=0}}o.length=0,a=0,!1}var l,u,s,c=void 0!==t?t:self,d=c.MutationObserver||c.WebKitMutationObserver;function f(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}"function"==typeof d?(l=1,u=new d(i),s=document.createTextNode(""),u.observe(s,{characterData:!0}),r=function(){l=-l,s.data=l}):r=f(i),n.requestFlush=r,n.makeRequestCallFromTimer=f}).call(this,n(89))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return r++};var r=0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"canDrag",value:function(){return!0}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"canDrop",value:function(){return!0}},{key:"hover",value:function(){}},{key:"drop",value:function(){}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){return new l(e)};var o,a=n(40),i=(o=a)&&o.__esModule?o:{default:o};var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.actions=t.getActions()}return r(e,[{key:"setup",value:function(){this.didCallSetup=!0}},{key:"teardown",value:function(){this.didCallTeardown=!0}},{key:"connectDragSource",value:function(){return i.default}},{key:"connectDragPreview",value:function(){return i.default}},{key:"connectDropTarget",value:function(){return i.default}},{key:"simulateBeginDrag",value:function(e,t){this.actions.beginDrag(e,t)}},{key:"simulatePublishDragSource",value:function(){this.actions.publishDragSource()}},{key:"simulateHover",value:function(e,t){this.actions.hover(e,t)}},{key:"simulateDrop",value:function(){this.actions.drop()}},{key:"simulateEndDrag",value:function(){this.actions.endDrag()}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=d(n(458)),a=d(n(1593)),i=d(n(1594)),l=n(1523),u=n(1595),s=n(1597),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1501));function d(e){return e&&e.__esModule?e:{default:e}}function f(){var e=ET_Builder.Frames.top.document.querySelectorAll(".media-modal.wp-core-ui"),t=e.length?e[e.length-1]:null;return null!==t&&"object"==typeof t&&"none"!==t.parentElement.style.display}var p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.context=t.getContext(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new i.default,this.dragStartSourceIds=[],this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.getSourceClientOffset=this.getSourceClientOffset.bind(this),this.handleTopDragStart=this.handleTopDragStart.bind(this),this.handleTopDragStartCapture=this.handleTopDragStartCapture.bind(this),this.handleTopDragEndCapture=this.handleTopDragEndCapture.bind(this),this.handleTopDragEnter=this.handleTopDragEnter.bind(this),this.handleTopDragEnterCapture=this.handleTopDragEnterCapture.bind(this),this.handleTopDragLeaveCapture=this.handleTopDragLeaveCapture.bind(this),this.handleTopDragOver=this.handleTopDragOver.bind(this),this.handleTopDragOverCapture=this.handleTopDragOverCapture.bind(this),this.handleTopDrop=this.handleTopDrop.bind(this),this.handleTopDropCapture=this.handleTopDropCapture.bind(this),this.handleSelectStart=this.handleSelectStart.bind(this),this.endDragIfSourceWasRemovedFromDOM=this.endDragIfSourceWasRemovedFromDOM.bind(this),this.endDragNativeItem=this.endDragNativeItem.bind(this),this.asyncEndDragNativeItem=this.asyncEndDragNativeItem.bind(this),this.isNodeInDocument=this.isNodeInDocument.bind(this)}return r(e,[{key:"setup",value:function(){if(void 0!==this.window){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}}},{key:"teardown",value:function(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions[e]=n,this.sourcePreviewNodes[e]=t,function(){delete r.sourcePreviewNodes[e],delete r.sourcePreviewNodeOptions[e]}}},{key:"connectDragSource",value:function(e,t,n){var r=this;this.sourceNodes[e]=t,this.sourceNodeOptions[e]=n;var o=function(t){return r.handleDragStart(t,e)},a=function(t){return r.handleSelectStart(t,e)};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",o),t.addEventListener("selectstart",a),function(){delete r.sourceNodes[e],delete r.sourceNodeOptions[e],t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",a),t.setAttribute("draggable",!1)}}},{key:"connectDropTarget",value:function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},o=function(t){return n.handleDragOver(t,e)},a=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",a),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",a)}}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return(0,o.default)(t||{},{dropEffect:this.altKeyPressed?"copy":"move"})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return(0,o.default)(t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})}},{key:"getSourceClientOffset",value:function(e){return(0,u.getNodeClientOffset)(this.sourceNodes[e])}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(c).some((function(t){return c[t]===e}))}},{key:"beginDragNativeItem",value:function(e){this.clearCurrentDragSourceNode();var t=(0,s.createNativeDragSource)(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"asyncEndDragNativeItem",value:function(){this.asyncEndDragFrameId=this.window.requestAnimationFrame(this.endDragNativeItem)}},{key:"endDragNativeItem",value:function(){this.isDraggingNativeItem()&&(this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)}},{key:"isNodeInDocument",value:function(e){return!(!ET_Builder.Frames.top.document.body.contains(e)&&!this.window)&&this.window.document.body.contains(e)}},{key:"endDragIfSourceWasRemovedFromDOM",value:function(){var e=this.currentDragSourceNode;this.isNodeInDocument(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=(0,u.getNodeClientOffset)(e),this.currentDragSourceNodeOffsetChanged=!1;this.mouseMoveTimeoutTimer=setTimeout((function(){return t.mouseMoveTimeoutId=null,t.window.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,this.window.clearTimeout(this.mouseMoveTimeoutTimer),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),this.mouseMoveTimeoutTimer=null,!0)}},{key:"checkIfCurrentDragSourceRectChanged",value:function(){var e=this.currentDragSourceNode;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!(0,a.default)((0,u.getNodeClientOffset)(e),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))}},{key:"handleTopDragStartCapture",value:function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]}},{key:"handleDragStart",value:function(e,t){this.dragStartSourceIds.unshift(t)}},{key:"handleTopDragStart",value:function(e){var t=this,n=this.dragStartSourceIds;this.dragStartSourceIds=null;var r=(0,u.getEventClientOffset)(e);this.monitor.isDragging()&&this.actions.endDrag(),this.actions.beginDrag(n,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});var o=e.dataTransfer,a=(0,s.matchNativeItemType)(o);if(this.monitor.isDragging()){if("function"==typeof o.setDragImage){var i=this.monitor.getSourceId(),l=this.sourceNodes[i],c=this.sourcePreviewNodes[i]||l,d=this.getCurrentSourcePreviewNodeOptions(),f={anchorX:d.anchorX,anchorY:d.anchorY},p={offsetX:d.offsetX,offsetY:d.offsetY},h=(0,u.getDragPreviewOffset)(l,c,r,f,p);o.setDragImage(c,h.x,h.y)}try{o.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target),this.getCurrentSourcePreviewNodeOptions().captureDraggingState?this.actions.publishDragSource():setTimeout((function(){return t.actions.publishDragSource()}))}else if(a)this.beginDragNativeItem(a);else{if(!(o.types||e.target.hasAttribute&&e.target.hasAttribute("draggable")))return;e.preventDefault()}}},{key:"handleTopDragEndCapture",value:function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()}},{key:"handleTopDragEnterCapture",value:function(e){if(this.dragEnterTargetIds=[],this.enterLeaveCounter.enter(e.target)&&!this.monitor.isDragging()){var t=e.dataTransfer,n=(0,s.matchNativeItemType)(t);n&&this.beginDragNativeItem(n)}}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleTopDragEnter",value:function(e){var t=this,n=this.dragEnterTargetIds;(this.dragEnterTargetIds=[],this.monitor.isDragging())&&(this.altKeyPressed=e.altKey,(0,l.isFirefox)()||this.actions.hover(n,{clientOffset:(0,u.getEventClientOffset)(e)}),n.some((function(e){return t.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()))}},{key:"handleTopDragOverCapture",value:function(){this.dragOverTargetIds=[]}},{key:"handleDragOver",value:function(e,t){this.dragOverTargetIds.unshift(t)}},{key:"handleTopDragOver",value:function(e){if(!f()){var t=this,n=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.altKeyPressed=e.altKey,this.actions.hover(n,{clientOffset:(0,u.getEventClientOffset)(e)}),n.some((function(e){return t.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(e.preventDefault(),e.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(e.preventDefault(),e.dataTransfer.dropEffect="move")}}},{key:"handleTopDragLeaveCapture",value:function(e){this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&this.isDraggingNativeItem()&&this.endDragNativeItem()}},{key:"handleTopDropCapture",value:function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),this.enterLeaveCounter.reset()}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}},{key:"handleTopDrop",value:function(e){if(!f()){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:(0,u.getEventClientOffset)(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()}}},{key:"handleSelectStart",value:function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))}},{key:"window",get:function(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}}]),e}();t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a<n.length;a+=1){if(!o.call(t,n[a])||e[n[a]]!==t[n[a]])return!1;var i=e[n[a]],l=t[n[a]];if(i!==l)return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=i(n(47)),a=i(n(794));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.entered=[]}return r(e,[{key:"enter",value:function(e){var t=this.entered.length;return this.entered=(0,o.default)(this.entered.filter((function(t){return document.documentElement.contains(t)&&(!t.contains||t.contains(e))})),[e]),0===t&&this.entered.length>0}},{key:"leave",value:function(e){var t=this.entered.length;return this.entered=(0,a.default)(this.entered.filter((function(e){return document.documentElement.contains(e)})),e),t>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}]),e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeClientOffset=l,t.getEventClientOffset=function(e){return{x:e.clientX,y:e.clientY}},t.getDragPreviewOffset=function(e,t,n,r,a){var u=(w=t,"IMG"===w.nodeName&&((0,o.isFirefox)()||!document.documentElement.contains(w))),s=l(u?e:t),c={x:n.x-s.x,y:n.y-s.y},d=e.offsetWidth,f=e.offsetHeight,p=r.anchorX,h=r.anchorY,m=function(e,t,n,r){var a=e?t.width:n,i=e?t.height:r;(0,o.isSafari)()&&e&&(i/=window.devicePixelRatio,a/=window.devicePixelRatio);return{dragPreviewWidth:a,dragPreviewHeight:i}}(u,t,d,f),y=m.dragPreviewWidth,g=m.dragPreviewHeight,b=a.offsetX,v=a.offsetY,_=0===v||v;var w;return{x:0===b||b?b:new i.default([0,.5,1],[c.x,c.x/d*y,c.x+y-d]).interpolate(p),y:_?v:(O=new i.default([0,.5,1],[c.y,c.y/f*g,c.y+g-f]).interpolate(h),(0,o.isSafari)()&&u&&(O+=(window.devicePixelRatio-1)*g),O)};var O};var r,o=n(1523),a=n(1596),i=(r=a)&&r.__esModule?r:{default:r};function l(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=t.length,o=[],a=0;a<r;a++)o.push(a);o.sort((function(e,n){return t[e]<t[n]?-1:1}));for(var i=[],l=[],u=[],s=void 0,c=void 0,d=0;d<r-1;d++)s=t[d+1]-t[d],c=n[d+1]-n[d],l.push(s),i.push(c),u.push(c/s);for(var f=[u[0]],p=0;p<l.length-1;p++){var h=u[p],m=u[p+1];if(h*m<=0)f.push(0);else{s=l[p];var y=l[p+1],g=s+y;f.push(3*g/((g+y)/h+(g+s)/m))}}f.push(u[u.length-1]);for(var b=[],v=[],_=void 0,w=0;w<f.length-1;w++){_=u[w];var O=f[w],k=1/l[w],S=O+f[w+1]-_-_;b.push((_-O-S)*k),v.push(S*k*k)}this.xs=t,this.ys=n,this.c1s=f,this.c2s=b,this.c3s=v}return r(e,[{key:"interpolate",value:function(e){var t=this.xs,n=this.ys,r=this.c1s,o=this.c2s,a=this.c3s,i=t.length-1;if(e===t[i])return n[i];for(var l=0,u=a.length-1,s=void 0;l<=u;){var c=t[s=Math.floor(.5*(l+u))];if(c<e)l=s+1;else{if(!(c>e))return n[s];u=s-1}}var d=e-t[i=Math.max(0,u)],f=d*d;return n[i]+r[i]*d+o[i]*f+a[i]*d*f}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.createNativeDragSource=function(e){var t=u[e],n=t.exposeProperty,r=t.matchesTypes,a=t.getData;return function(){function e(){var t,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.item=(t={},(r={})[n]=r[n]||{},r[n].get=function(){return console.warn("Browser doesn't allow reading \""+n+'" until the drop event.'),null},function(e,t){for(var n in t){var r=t[n];r.configurable=r.enumerable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n,r)}}(t,r),t)}return o(e,[{key:"mutateItemByReadingDataTransfer",value:function(e){delete this.item[n],this.item[n]=a(e,r)}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}]),e}()},t.matchNativeItemType=function(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(u).filter((function(e){return u[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null};var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1501));function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t,n){var r=t.reduce((function(t,n){return t||e.getData(n)}),null);return null!=r?r:n}var u=(i(r={},a.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),i(r,a.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return l(e,t,"").split("\n")}}),i(r,a.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return l(e,t,"")}}),r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){r||((r=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");return r};var r=void 0},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=f(n(0)),a=f(n(3)),i=f(n(1)),l=f(n(59)),u=f(n(63)),s=f(n(43)),c=f(n(22)),d=f(n(84));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={title:a.default.oneOfType([a.default.element,a.default.string]).isRequired,_onMouseEnterItem:a.default.oneOfType([a.default.func,a.default.bool]),_onMouseLeaveItem:a.default.oneOfType([a.default.func,a.default.bool]),onToggleRightMenu:a.default.oneOfType([a.default.func,a.default.bool]),disableDuplicate:a.default.bool,disableDelete:a.default.bool,isGlobalPresetsMode:a.default.bool},O=function(e){!function(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&&m(e,t)}(f,e);var t,n,r,a=y(f);function f(){var e;p(this,f);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _(b(e=a.call.apply(a,[this].concat(n))),"_handleMouseEnter",(function(){var t=e.props._onMouseEnterItem;t&&t(b(e))})),_(b(e),"_handleMouseLeave",(function(){var t=e.props._onMouseLeaveItem;t&&t(b(e))})),e}return t=f,(n=[{key:"UNSAFE_componentWillMount",value:function(){(0,i.default)(this,"props.just_created")&&c.default.openModuleSettings(this)}},{key:"render",value:function(){var e={cursor:this.props.isGlobalPresetsMode?"default":"move",opacity:this.props.isDragging?0:1};return o.default.createElement("li",{className:"et-fb-settings-module-item",style:e,onMouseEnter:this._handleMouseEnter,onMouseLeave:this._handleMouseLeave},o.default.createElement(u.default,{buttonName:this.props.isGlobalPresetsMode?l.default.BUTTON_GLOBAL_PRESETS_CHILD_ITEM_EDIT:l.default.MODULE_ITEM_EDIT,editingModule:this,className:"et-fb-settings-module-item-button et-fb-settings-module-item-button--edit",small:!0,ink:!1},o.default.createElement(s.default,{icon:"setting",color:d.default.moduleItemControlIcons})),this.props.isGlobalPresetsMode||this.props.disableDuplicate?null:o.default.createElement(u.default,{buttonName:l.default.MODULE_ITEM_COPY,editingModule:this,className:"et-fb-settings-module-item-button et-fb-settings-module-item-button--copy",small:!0,ink:!1},o.default.createElement(s.default,{icon:"copy",color:d.default.moduleItemControlIcons})),this.props.isGlobalPresetsMode||this.props.disableDelete?null:o.default.createElement(u.default,{buttonName:l.default.MODULE_ITEM_DELETE,editingModule:this,className:"et-fb-settings-module-item-button et-fb-settings-module-item-button--delete",small:!0,ink:!1},o.default.createElement(s.default,{icon:"delete",color:d.default.moduleItemControlIcons})),o.default.createElement(u.default,{buttonName:l.default.TAB_BUTTON_MODULE_RIGHT_MENU,className:"et-fb-settings-module-item-button et-fb-settings-module-item-button--menu",__onClick:this.props.onToggleRightMenu,small:!0,needEvent:!0,ink:!1},o.default.createElement(s.default,{icon:"app-setting",color:d.default.moduleItemControlIcons,viewBox:"0 0 4 17",style:{height:14,width:3,minWidth:3,margin:"2px 0"}})),o.default.createElement("span",{className:"et-fb-settings-module-item-title"},this.props.title))}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.default.Component);O.propTypes=w,O.defaultProps={_onMouseEnterItem:!1,_onMouseLeaveItem:!1,onOptionsHarmonyRightMenu:!1,disableDuplicate:!1,disableDelete:!1,isGlobalPresetsMode:!1};var k=O;t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o,a,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=n(3),s=(a=u)&&a.__esModule?a:{default:a},c=n(1525);var d=(o=r=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.backend=(0,c.unpackBackendForEs5Users)(e.backend),r.childContext=(0,c.createChildContext)(r.backend,{window:e&&e.window?e.window:n&&n.window?n.window:"undefined"!=typeof window?window:void 0}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentWillReceiveProps",value:function(e){if(e.backend!==this.props.backend||e.window!==this.props.window)throw new Error("DragDropContextProvider backend and window props must not change.")}},{key:"getChildContext",value:function(){return this.childContext}},{key:"render",value:function(){return l.Children.only(this.props.children)}}]),t}(l.Component),r.propTypes={backend:s.default.oneOfType([s.default.func,s.default.object]).isRequired,children:s.default.element.isRequired,window:s.default.object},r.defaultProps={window:void 0},r.childContextTypes=c.CHILD_CONTEXT_TYPES,r.displayName="DragDropContextProvider",r.contextTypes={window:s.default.object},o);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="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},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h.default.apply(void 0,["DragLayer","collect[, options]"].concat(Array.prototype.slice.call(arguments))),(0,d.default)("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html",e),(0,d.default)((0,c.default)(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html',t),function(n){var c,h,m=t.arePropsEqual,v=void 0===m?p.default:m,_=n.displayName||n.name||"Component",w=(h=c=function(t){function i(e,t){y(this,i);var n=g(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return n.handleChange=n.handleChange.bind(n),n.manager=t.dragDropManager,(0,d.default)("object"===o(n.manager),"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",_,_),n.state=n.getCurrentState(),n}return b(i,t),a(i,[{key:"getDecoratedComponentInstance",value:function(){return(0,d.default)(this.child,"In order to access an instance of the decorated component it can not be a stateless component."),this.child}},{key:"shouldComponentUpdate",value:function(e,t){return!v(e,this.props)||!(0,f.default)(t,this.state)}}]),a(i,[{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0;var e=this.manager.getMonitor();this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange),this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange(),this.unsubscribeFromStateChange()}},{key:"handleChange",value:function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();(0,f.default)(e,this.state)||this.setState(e)}}},{key:"getCurrentState",value:function(){var t=this.manager.getMonitor();return e(t,this.props)}},{key:"render",value:function(){var e=this;return l.default.createElement(n,r({},this.props,this.state,{ref:function(t){e.child=t}}))}}]),i}(i.Component),c.DecoratedComponent=n,c.displayName="DragLayer("+_+")",c.contextTypes={dragDropManager:u.default.object.isRequired},h);return(0,s.default)(w,n)}};var i=n(0),l=m(i),u=m(n(3)),s=m(n(622)),c=m(n(134)),d=m(n(1483)),f=m(n(1502)),p=m(n(1526)),h=m(n(1495));function m(e){return e&&e.__esModule?e:{default:e}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};a.default.apply(void 0,["DragSource","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var p=e;"function"!=typeof e&&((0,r.default)((0,d.default)(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',e),p=function(){return e});(0,r.default)((0,o.default)(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',t);var h=(0,u.default)(t);return(0,r.default)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),(0,r.default)((0,o.default)(f),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),function(e){return(0,i.default)({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"DragSource",createHandler:h,registerHandler:l.default,createMonitor:s.default,createConnector:c.default,DecoratedComponent:e,getType:p,collect:n,options:f})}};var r=f(n(1483)),o=f(n(134)),a=f(n(1495)),i=f(n(1527)),l=f(n(1607)),u=f(n(1608)),s=f(n(1609)),c=f(n(1610)),d=f(n(1530));function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=r(n(1503));t.isDisposable=o.default;var a=r(n(1604));t.Disposable=a.default;var i=r(n(1605));t.CompositeDisposable=i.default;var l=r(n(1606));t.SerialDisposable=l.default},function(e,t,n){"use strict";t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){},a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isDisposed=!1,this.action=t||o}return r(e,null,[{key:"empty",value:{dispose:o},enumerable:!0}]),e.prototype.dispose=function(){this.isDisposed||(this.action.call(null),this.isDisposed=!0)},e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o,a=n(1503),i=(o=a)&&o.__esModule?o:{default:o},l=function(){function e(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];r(this,e),Array.isArray(n[0])&&1===n.length&&(n=n[0]);for(var a=0;a<n.length;a++)if(!i.default(n[a]))throw new Error("Expected a disposable");this.disposables=n,this.isDisposed=!1}return e.prototype.add=function(e){this.isDisposed?e.dispose():this.disposables.push(e)},e.prototype.remove=function(e){if(this.isDisposed)return!1;var t=this.disposables.indexOf(e);return-1!==t&&(this.disposables.splice(t,1),e.dispose(),!0)},e.prototype.dispose=function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.isDisposed=!0,this.disposables=[],this.length=0;for(n=0;n<e;n++)t[n].dispose()}},e}();t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(1503),a=(r=o)&&r.__esModule?r:{default:r},i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isDisposed=!1,this.current=null}return e.prototype.getDisposable=function(){return this.current},e.prototype.setDisposable=function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];if(null!=e&&!a.default(e))throw new Error("Expected either an empty value or a valid disposable");var t=this.isDisposed,n=void 0;t||(n=this.current,this.current=e),n&&n.dispose(),t&&e&&e.dispose()},e.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=null,e&&e.dispose()}},e}();t.default=i,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return{handlerId:o,unregister:function(){r.removeSource(o)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){Object.keys(e).forEach((function(t){(0,o.default)(i.indexOf(t)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',i.join(", "),t),(0,o.default)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",t,t,e[t])})),l.forEach((function(t){(0,o.default)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}));var t=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.monitor=e,this.props=null,this.component=null}return r(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveComponent",value:function(e){this.component=e}},{key:"canDrag",value:function(){return!e.canDrag||e.canDrag(this.props,this.monitor)}},{key:"isDragging",value:function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()}},{key:"beginDrag",value:function(){return e.beginDrag(this.props,this.monitor,this.component)}},{key:"endDrag",value:function(){e.endDrag&&e.endDrag(this.props,this.monitor,this.component)}}]),t}();return function(e){return new t(e)}};var o=a(n(1483));a(n(134));function a(e){return e&&e.__esModule?e:{default:e}}var i=["canDrag","beginDrag","isDragging","endDrag"],l=["beginDrag"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){return new s(e)};var o,a=n(1483),i=(o=a)&&o.__esModule?o:{default:o};var l=!1,u=!1,s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.internalMonitor=t.getMonitor()}return r(e,[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"canDrag",value:function(){(0,i.default)(!l,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html");try{return l=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{l=!1}}},{key:"isDragging",value:function(){(0,i.default)(!u,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html");try{return u=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{u=!1}}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=void 0,n=void 0,a=void 0,i=void 0,l=void 0,u=void 0,s=void 0;function c(){i&&(i(),i=null),t&&n&&(i=e.connectDragSource(t,n,a))}function d(){s&&(s(),s=null),t&&l&&(s=e.connectDragPreview(t,l,u))}return{receiveHandlerId:function(e){e!==t&&(t=e,c(),d())},hooks:(0,r.default)({dragSource:function(e,t){e===n&&(0,o.default)(t,a)||(n=e,a=t,c())},dragPreview:function(e,t){e===l&&(0,o.default)(t,u)||(l=e,u=t,d())}})}};var r=a(n(1528)),o=a(n(1529));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.ref;if((0,a.default)("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),!n)return(0,i.cloneElement)(e,{ref:t});return(0,i.cloneElement)(e,{ref:function(e){t(e),n&&n(e)}})};var r,o=n(1483),a=(r=o)&&r.__esModule?r:{default:r},i=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};a.default.apply(void 0,["DropTarget","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var p=e;"function"!=typeof e&&((0,r.default)((0,d.default)(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',e),p=function(){return e});(0,r.default)((0,o.default)(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',t);var h=(0,u.default)(t);return(0,r.default)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),(0,r.default)((0,o.default)(f),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),function(e){return(0,i.default)({connectBackend:function(e,t){return e.connectDropTarget(t)},containerDisplayName:"DropTarget",createHandler:h,registerHandler:l.default,createMonitor:s.default,createConnector:c.default,DecoratedComponent:e,getType:p,collect:n,options:f})}};var r=f(n(1483)),o=f(n(134)),a=f(n(1495)),i=f(n(1527)),l=f(n(1613)),u=f(n(1614)),s=f(n(1615)),c=f(n(1616)),d=f(n(1530));function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=n.getRegistry(),o=r.addTarget(e,t);return{handlerId:o,unregister:function(){r.removeTarget(o)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){Object.keys(e).forEach((function(t){(0,o.default)(i.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',i.join(", "),t),(0,o.default)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html",t,t,e[t])}));var t=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.monitor=e,this.props=null,this.component=null}return r(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"receiveComponent",value:function(e){this.component=e}},{key:"canDrop",value:function(){return!e.canDrop||e.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){e.hover&&e.hover(this.props,this.monitor,this.component)}},{key:"drop",value:function(){if(e.drop)return e.drop(this.props,this.monitor,this.component)}}]),t}();return function(e){return new t(e)}};var o=a(n(1483));a(n(134));function a(e){return e&&e.__esModule?e:{default:e}}var i=["canDrop","hover","drop"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){return new u(e)};var o,a=n(1483),i=(o=a)&&o.__esModule?o:{default:o};var l=!1,u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.internalMonitor=t.getMonitor()}return r(e,[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"canDrop",value:function(){(0,i.default)(!l,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target-monitor.html");try{return l=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{l=!1}}},{key:"isOver",value:function(e){return this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=void 0,n=void 0,a=void 0,i=void 0;function l(){i&&(i(),i=null),t&&n&&(i=e.connectDropTarget(t,n,a))}return{receiveHandlerId:function(e){e!==t&&(t=e,l())},hooks:(0,r.default)({dropTarget:function(e,t){e===n&&(0,o.default)(t,a)||(n=e,a=t,l())}})}};var r=a(n(1528)),o=a(n(1529));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={MODULE:"module",MODULE_ITEM:"module_item"};t.default=r},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n(0)),a=u(n(3)),i=n(49),l=n(60);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){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}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var m=function(e){!function(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&&d(e,t)}(a,e);var t,n,r,o=f(a);function a(){return s(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props.dynamic.attribute;return e.loading?this.props.renderLoading(this.props.type):this.props.children(e.value,e.dynamic)}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.default.PureComponent);m.propTypes={type:a.default.oneOf(["text","image"]),attributes:a.default.object.isRequired,attribute:a.default.string.isRequired,value:a.default.oneOfType([a.default.string,a.default.number]),renderLoading:a.default.func,children:a.default.func},m.defaultProps={type:"text",value:void 0,renderLoading:l.renderLoading,children:function(e,t){return t?(0,l.renderContent)(e):e}};var y=(0,i.withDynamicContent)((function(e){return{attribute:{attribute:e.attribute,value:e.value}}}),(function(e){return e.attributes}))(m);t.default=y},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=s(n(3)),i=s(n(13)),l=s(n(40)),u=s(n(513));function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1620);var v=function(e){!function(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&&p(e,t)}(l,e);var t,n,r,a=h(l);function l(){var e;d(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(y(e=a.call.apply(a,[this].concat(n))),"defaultStyle",{width:"200%",height:"200%",top:"-50%",left:"-50%"}),b(y(e),"_onClick",(function(t){t.preventDefault(),e.props.stopPropagation&&t.stopPropagation(),e.props._onClick(y(e))})),b(y(e),"_renderRipple",(function(){return o.default.createElement(u.default,{radius:150,duration:1200,background:!1,options:{background:!1},style:e.defaultStyle})})),e}return t=l,(n=[{key:"componentDidMount",value:function(){this.props.componentDidMount(this)}},{key:"componentDidUpdate",value:function(){this.props.componentDidUpdate(this)}},{key:"render",value:function(){var e=(0,i.default)({"et-fb-button":!0,"et-fb-button--block":this.props.block,"et-fb-button--danger":this.props.danger,"et-fb-button--danger-alt":this.props.danger&&this.props.alt,"et-fb-button--elevate":this.props.elevate,"et-fb-button--globalitem":this.props.globalitem,"et-fb-button--info":this.props.info,"et-fb-button--info-alt":this.props.info&&this.props.alt,"et-fb-button--inverse":this.props.inverse,"et-fb-button--large":this.props.large,"et-fb-button--primary":this.props.primary,"et-fb-button--primary-alt":this.props.primary&&this.props.alt,"et-fb-button--round":this.props.round,"et-fb-button--small":this.props.small,"et-fb-button--success":this.props.success,"et-fb-button--active":this.props.activeButton,"et-fb-button--warning":this.props.warning,"et-fb-button--tooltip":this.props.isTooltipButton},this.props.className);return"button"===this.props.tagName?o.default.createElement("button",{type:this.props.type,"data-tip":this.props.tooltip,className:e,style:this.props.style,onClick:this._onClick,onMouseDown:this.props.onMouseDown,onMouseUp:this.props.onMouseUp,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,disabled:this.props.disabled},this.props.children,this.props.ink?this._renderRipple():null):o.default.createElement(this.props.tagName,{className:e,"data-tip":this.props.tooltip,style:this.props.style,onClick:this._onClick,onMouseDown:this.props.onMouseDown,onMouseUp:this.props.onMouseUp},this.props.children,this.props.ink?this._renderRipple():null)}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.PureComponent);b(v,"defaultProps",{type:"button",tagName:"button",block:!1,elevate:!1,ink:!0,inverse:!1,large:!1,primary:!1,success:!1,small:!1,disabled:!1,disableClick:!1,additionalAttrs:{},onMouseDown:l.default,onMouseUp:l.default,onMouseEnter:l.default,onMouseLeave:l.default,componentDidMount:l.default,componentDidUpdate:l.default,_onClick:l.default,stopPropagation:!1}),b(v,"propTypes",{block:a.default.bool,children:a.default.node,tagName:a.default.string,elevate:a.default.bool,danger:a.default.bool,ink:a.default.bool,inverse:a.default.bool,large:a.default.bool,primary:a.default.bool,round:a.default.bool,success:a.default.bool,info:a.default.bool,alt:a.default.bool,warning:a.default.bool,small:a.default.bool,disabled:a.default.bool,disableClick:a.default.bool,additionalAttrs:a.default.object,type:a.default.string,onMouseDown:a.default.func,onMouseUp:a.default.func,_onClick:a.default.func,componentDidMount:a.default.func,componentDidUpdate:a.default.func,className:a.default.oneOfType([a.default.string,a.default.object]),style:a.default.object});var _=v;t.default=_},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=h(n(3)),i=h(n(13)),l=h(n(11)),u=h(n(184)),s=h(n(40)),c=h(n(1)),d=h(n(28)),f=h(n(117)),p=h(n(358));function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function v(e){var t=function(){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}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1622);var S=function(e){!function(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&&b(e,t)}(h,e);var t,n,r,a=v(h);function h(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),k(w(t=a.call(this,e)),"emitChange",(0,u.default)(t._emitChange,0,{leading:!1})),k(w(t),"userUpdate",!1),k(w(t),"_onInput",(function(e){var n=e.target.value;t.setState({value:n}),t.emitChange.cancel(),t.emitChange()})),k(w(t),"_onBlur",(function(e){var n=p.default.decodeHtmlEntities(e.target.value);!(0,l.default)(t.props.valueMin)&&(0,f.default)(n)<t.props.valueMin&&(n=t.props.valueMin),!(0,l.default)(t.props.valueMax)&&(0,f.default)(n)>t.props.valueMax&&(n=t.props.valueMax),t.props._onChange(t.props.name,n),t.setState({value:n})}));var n=(0,d.default)(t.props.value),r=(0,d.default)(t.props.default);return t.state={value:n===r?"":n},t}return t=h,(n=[{key:"componentDidUpdate",value:function(e){var t=this.props.value;e.value===t||this.userUpdate||this.setState({value:t}),this.userUpdate=!1}},{key:"getDefaultValue",value:function(){return(0,d.default)(this.props.default)}},{key:"_emitChange",value:function(){this.userUpdate=!0,this.props._onChange(this.props.name,this.state.value)}},{key:"render",value:function(){var e=(0,c.default)(this.props,"additional_attrs",{}),t={"et-core-control-input":!0};this.props.className&&(t[this.props.className]=!0),this.props.readonly&&(e.readOnly=!0);var n=this.props,r=n.id,a=n.type;return r||(r="et-fb-".concat(this.props.name)),a||(a="text"),o.default.createElement("input",y({className:(0,i.default)(t),type:a,value:this.state.value,name:this.props.name,id:r,onChange:s.default,onInput:this._onInput,onBlur:this._onBlur,placeholder:this.getDefaultValue()},e))}}])&&g(t.prototype,n),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(o.PureComponent);k(S,"propTypes",{name:a.default.string.isRequired});var C=S;t.default=C},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=P(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=E(n(13)),i=n(67),l=E(n(31)),u=E(n(9)),s=E(n(10)),c=E(n(11)),d=E(n(96)),f=E(n(5)),p=(E(n(8)),E(n(56))),h=E(n(1)),m=E(n(34)),y=E(n(40)),g=E(n(458)),b=E(n(116)),v=E(n(123)),_=n(1504),w=E(n(43)),O=E(n(1624)),k=E(n(1492)),S=E(n(1626)),C=n(358);function E(e){return e&&e.__esModule?e:{default:e}}function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(P=function(e){return e?n:t})(e)}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function N(e){var t=function(){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}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1627);var B=function(t){!function(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&&D(e,t)}(M,t);var n,r,E,P=N(M);function M(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,M),I(R(t=P.call(this,e)),"nextDragID",-1),I(R(t),"_nextDragID",(function(){return t.nextDragID++})),I(R(t),"emitChange",(function(){return setTimeout((function(){return t.props._onChange(t.props.name,t.state.items)}),0)})),I(R(t),"focusItemInput",(function(e){setTimeout((function(){var n=t.itemsList.querySelectorAll(".et-core-control-sortable-list__row input");0!==n.length&&((!1===e||(0,c.default)(e))&&(e=n.length-1),n[e].focus())}))})),I(R(t),"moveItem",(function(e,n){var r=JSON.parse(t.state.items),o=r[e];r[e]=r[n],r[n]=o,t.userUpdate=!0,t.setState({items:JSON.stringify(r)}),t.emitChange()})),I(R(t),"onChangeLinkSettings",(function(e,n){var r=JSON.parse(t.state.items);(0,p.default)(r,e,n),t.userUpdate=!0,t.setState({items:JSON.stringify(r)}),t.emitChange()}));var n=(0,C.isJson)(t.props.value)?JSON.parse(t.props.value):[];if(0!==n.length||t.props.allowEmpty)(0,u.default)(n,(function(e){return e.dragID=t._nextDragID()}));else{var r=(0,h.default)(t.props,"module.props.module.props.attrs.field_type",!1),o=(0,h.default)(t.props,"module.props.module.props.attrs.checkbox_checked","off"),a="";"checkbox"===r&&(a=(0,h.default)(t.props,"module.props.module.props.attrs.field_title","")),n=[{value:a,checked:"on"===o?1:0,dragID:t._nextDragID()}],t.focusItemInput()}return t.state={items:JSON.stringify(n),editing_link:!1},t.emitChange(),t}return n=M,(r=[{key:"componentDidUpdate",value:function(e){var t=this.props.value;e.value===t||this.userUpdate||this.setState({items:t}),this.userUpdate=!1,v.default.rebuild()}},{key:"addItem",value:function(e,t,n){t&&t.preventDefault();var r=this.state.items||"[]",o=JSON.parse(r),a=o.length&&!1!==e&&!n?o[e]:{},i=this._nextDragID();!1!==e?o.splice(e+1,0,j(j({},a),{},{dragID:i})):o.push({value:"",checked:0,dragID:i}),this.userUpdate=!0,this.setState({items:JSON.stringify(o)}),this.emitChange(),(0,d.default)(e)?(this.focusItemInput(e+1),this.props._onAddItem(e+1)):(this.focusItemInput(),this.props._onAddItem(o.length-1))}},{key:"editItem",value:function(e,t){t.preventDefault(),this.props._onAddItem(e)}},{key:"removeItem",value:function(e,t){t.preventDefault();var n=this.state.items||"[]",r=JSON.parse(n);r.splice(e,1),0!==r.length||this.props.allowEmpty||(r=[{value:"",checked:0,dragID:0}]),this.userUpdate=!0,this.setState({items:JSON.stringify(r)}),this.emitChange()}},{key:"showLinkSettings",value:function(t,n){if(n.target){n.preventDefault();var r=this.state.items||"[]",o=JSON.parse(r);this.link_settings_backup=(0,b.default)(o[t]),(0,g.default)(this.link_settings_backup,{link_url:"",link_text:""})}else if(t=!1,S.default.SORTABLE_LIST_LINK_SETTINGS_CLOSE===n.props.buttonName){var a=this.state.items||"[]",i=JSON.parse(a);i[this.state.editing_link]=this.link_settings_backup,this.setState({items:JSON.stringify(i)}),this.emitChange()}(ET_Builder&&ET_Builder.Frames.top.jQuery("body")||e("body")).toggleClass("et-core-control-sortable-list-editing-link",!1!==t),this.setState({editing_link:t}),this.props.onEditingLink(!1!==t)}},{key:"updateItems",value:function(e,t,n,r){r.preventDefault();var o="click"===r.type,a=this.state.items||"[]",i=JSON.parse(a),l=o?t.value:r.target.value,d=!(0,c.default)(this.props.checkbox)&&!0===this.props.checkbox;(0,f.default)(i)&&i.push(t),o&&!d&&(0,u.default)(i,(function(e){return e.checked=0})),(0,s.default)(i[e],{value:l,checked:n?1:0}),this.userUpdate=!0,this.setState({items:JSON.stringify(i)}),this.emitChange()}},{key:"_renderAddNewItemButton",value:function(){var e=this,t=this.addItem.bind(this,!1,!1),n={size:(0,i.spring)(1,{stiffness:300,damping:20}),opacity:(0,i.spring)(1,{stiffness:300,damping:20})};return o.default.createElement("span",{className:"et-fb-item-button-wrap--add"},o.default.createElement(i.Motion,{defaultStyle:{size:0,opacity:0},style:n},(function(n){var r={opacity:n.opacity,transform:"scale( ".concat(n.size," )")};return o.default.createElement(_.ETCoreButton,{round:!0,style:r,tooltip:e.props.tooltip,_onClick:t},o.default.createElement(w.default,{size:"14",icon:"add",color:"#FFFFFF"}))})),o.default.createElement("label",{className:"et-fb-form__label"},this.props.buttonLabel))}},{key:"_renderItems",value:function(){var e=this,t=this.state.items||"[]",n=JSON.parse(t),r=!(0,c.default)(this.props.radio)&&!0===this.props.radio,i=!(0,c.default)(this.props.checkbox)&&!0===this.props.checkbox,u=this.props.right_actions;return this.props.readonly&&(0,m.default)(this,"props.right_actions_readonly")?u=this.props.right_actions_readonly:this.props.readonly&&!u?u="move":u||(u="move|copy|delete"),(0,l.default)(n,(function(t,n){var l=1===t.checked,s=(0,a.default)({"et-core-control-sortable-list__row":!0,"et-core-control-sortable-list__row--radio":r,"et-core-control-sortable-list__row--checkbox":i}),c=(0,a.default)({"et-core-control-sortable-list__check":!0,"et-core-control-sortable-list--checked":l}),d=e.updateItems.bind(e,n,t,!l),f=e.updateItems.bind(e,n,t,l),p=e.addItem.bind(e,n),m=e.addItem.bind(e,n,!1,!0),y=e.removeItem.bind(e,n),g=e.editItem.bind(e,n),b=e.showLinkSettings.bind(e,n),v=(0,h.default)(t,"value",""),_=(0,h.default)(t,"field_id",""),w=""===(0,h.default)(t,"field_title","")?_:(0,h.default)(t,"field_title",""),k=""===v?w:v;return o.default.createElement(O.default,{classes:s,key:t.dragID,id:t.dragID,index:n,moveItem:e.moveItem,isCheckbox:i,isRadio:r,checkClasses:c,onCheck:d,onChange:f,onAdd:m,onCopy:p,onDelete:y,onSetting:g,onLink:b,value:k,useInput:e.props.useInput||!e.props.readonly,readonly:e.props.readonly,left_actions:e.props.left_actions,right_actions:u})}))}},{key:"_renderLinkSettings",value:function(){var e=this,t=this.state.items||"[]",n=JSON.parse(t);if(!n[this.state.editing_link])return!1;var r=n[this.state.editing_link],a=this.showLinkSettings.bind(this,this.state.editing_link),l={size:this.props.animation?(0,i.spring)(1,{stiffness:300,damping:20}):1,opacity:this.props.animation?(0,i.spring)(1,{stiffness:300,damping:20}):1};return o.default.createElement(i.Motion,{defaultStyle:{size:.5,opacity:0},style:l},(function(t){return o.default.createElement("div",{className:"et-core-control-sortable-list__link-settings",style:{opacity:t.opacity,transform:"scale( ".concat(t.size," )")}},o.default.createElement("h4",null,e.props.labels.link_settings),o.default.createElement("div",null,o.default.createElement("p",{className:"et-fb-form__label"},e.props.labels.link_url),o.default.createElement(_.ETCoreInput,{className:"et-fb-settings-option-input et-fb-settings-option-input--block",type:"text",name:"".concat(e.state.editing_link,".link_url"),value:r.link_url,_onChange:e.onChangeLinkSettings})),o.default.createElement("div",null,o.default.createElement("p",{className:"et-fb-form__label"},e.props.labels.link_text),o.default.createElement(_.ETCoreInput,{className:"et-fb-settings-option-input et-fb-settings-option-input--block",type:"text",name:"".concat(e.state.editing_link,".link_text"),value:r.link_text,_onChange:e.onChangeLinkSettings})),o.default.createElement(_.ETCoreButtonGroup,{block:!0},o.default.createElement(_.ETCoreButton,{block:!0,danger:!0,buttonName:S.default.SORTABLE_LIST_LINK_SETTINGS_CLOSE,tooltip:e.props.labels.link_cancel,_onClick:a},e.props.linkSettingsShowIcon?o.default.createElement(w.default,{icon:"exit",color:"#FFFFFF"}):null,e.props.linkSettingsShowIcon?null:e.props.labels.link_cancel),o.default.createElement(_.ETCoreButton,{block:!0,success:!0,buttonName:S.default.SORTABLE_LIST_LINK_SETTINGS_SAVE,tooltip:e.props.labels.link_save,_onClick:a},e.props.linkSettingsShowIcon?o.default.createElement(w.default,{icon:"check",color:"#FFFFFF"}):null,e.props.linkSettingsShowIcon?null:e.props.labels.link_save)))}))}},{key:"render",value:function(){var e=this,t=this.props.additional_attrs?this.props.additional_attrs:{},n=this.props.id;n||(n="et-fb-".concat(this.props.name));var r=!1!==this.state.editing_link;return o.default.createElement(k.default,null,o.default.createElement("div",{className:"et-core-control-sortable-list",ref:function(t){return e.itemsList=t}},this._renderItems(),r&&this._renderLinkSettings(),o.default.createElement("textarea",T({value:this.state.items,name:this.props.name,id:n,onChange:y.default},t)),this.props.useAddNewButton&&this._renderAddNewItemButton()))}}])&&x(n.prototype,r),E&&x(n,E),Object.defineProperty(n,"prototype",{writable:!1}),M}(o.PureComponent);I(B,"defaultProps",{onEditingLink:y.default,_onAddItem:y.default,animation:!0,linkSettingsShowIcon:!0});var F=B;t.default=F}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=h(n(27)),i=h(n(13)),l=h(n(3)),u=n(1490),s=h(n(31)),c=h(n(362)),d=h(n(162)),f=h(n(1625)),p=h(n(43));function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function _(e){var t=function(){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}}();return function(){var n,r=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C={hover:function(e,t,n){var r=t.getItem().index,o=e.index;if(r!==o){var i=a.default.findDOMNode(n).getBoundingClientRect(),l=(i.bottom-i.top)/2,u=t.getClientOffset().y-i.top;r<o&&u<l||r>o&&u>l||(e.moveItem(r,o),t.getItem().index=o)}}},E=function(e){!function(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&&v(e,t)}(l,e);var t,n,r,a=_(l);function l(){var e;g(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return S(O(e=a.call.apply(a,[this].concat(n))),"preventModalKeyPress",(function(t){e.props.useInput&&"Enter"===t.key&&t.preventDefault()})),S(O(e),"handleOnKeyUp",(function(t){e.props.useInput&&"Enter"===t.key&&(t.preventDefault(),e.props.onAdd())})),S(O(e),"_renderCheckbox",(function(){return o.default.createElement("a",{href:"#",className:e.props.checkClasses,onClick:e.props.onCheck})})),e}return t=l,(n=[{key:"_renderInput",value:function(){var e={};return this.props.readonly&&(e.readOnly=!0),o.default.createElement("input",y({type:"text",value:this.props.value,onChange:this.props.onChange,onKeyPress:this.preventModalKeyPress,onKeyUp:this.handleOnKeyUp},e))}},{key:"_renderActions",value:function(e){var t=this;return(0,s.default)(e,(function(e){if("link"===e&&!t.props.isCheckbox&&!t.props.isRadio)return!1;var n="on".concat((0,c.default)(e)),r="link"===e?"text-link":e;return o.default.createElement("a",{href:"#",key:e,className:"et-core-control-sortable-list__".concat(e),onClick:t.props[n]},o.default.createElement(p.default,{icon:r,color:"rgb(163, 176, 194)"}))}))}},{key:"_renderLeftSideActions",value:function(){var e=(0,d.default)(this.props.left_actions.split("|"));return o.default.createElement("div",{className:"et-core-control-sortable-list__actions--left"},this._renderActions(e))}},{key:"_renderRightSideActions",value:function(){var e=(0,d.default)(this.props.right_actions.split("|"));return o.default.createElement("div",{className:"et-core-control-sortable-list__actions--right"},this._renderActions(e))}},{key:"render",value:function(){var e=this.props,t=e.isDragging,n=e.connectDragSource,r=e.connectDropTarget,a={opacity:this.props.isDragging?0:1},l=(0,i.default)({"et-core-control-sortable-list__row--dragged":t,"et-core-control-sortable-list__row--no-input":!this.props.useInput},this.props.classes);return n(r(o.default.createElement("div",{className:l,style:a},(this.props.isRadio||this.props.isCheckbox)&&this._renderCheckbox(),this._renderLeftSideActions(),this.props.useInput&&this._renderInput(),this.props.useInput||o.default.createElement("span",null,this.props.value),this._renderRightSideActions())))}}])&&b(t.prototype,n),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.PureComponent);S(E,"defaultProps",{left_actions:"",right_actions:"move|copy|delete"}),S(E,"propTypes",{id:l.default.any.isRequired,classes:l.default.string.isRequired,checkClasses:l.default.string.isRequired,isDragging:l.default.bool.isRequired,isCheckbox:l.default.bool.isRequired,isRadio:l.default.bool.isRequired,moveItem:l.default.func.isRequired,onCheck:l.default.func.isRequired,onChange:l.default.func.isRequired,onAdd:l.default.func.isRequired,onSettings:l.default.func,onCopy:l.default.func.isRequired,onDelete:l.default.func.isRequired,connectDragSource:l.default.func.isRequired});var P=(0,u.DragSource)(f.default.MODULE_ITEM,{beginDrag:function(e){return{id:e.id,index:e.index}}},(function(e,t){return{connectDragSource:e.dragSource(),isDragging:t.isDragging()}})),T=(0,u.DropTarget)(f.default.MODULE_ITEM,C,(function(e){return{connectDropTarget:e.dropTarget()}}))(P(E));t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={MODULE:"module",MODULE_ITEM:"module_item"}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(0,((r=n(463))&&r.__esModule?r:{default:r}).default)({SORTABLE_LIST_LINK_SETTINGS_CLOSE:null,SORTABLE_LIST_LINK_SETTINGS_SAVE:null});t.default=o},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=d(n(3)),i=d(n(13)),l=d(n(11)),u=d(n(41)),s=d(n(28)),c=d(n(1));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1629);var _=function(e){!function(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&&h(e,t)}(d,e);var t,n,r,a=m(d);function d(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),v(g(t=a.call(this,e)),"isChangingRange",!1),v(g(t),"updateOptionAndState",(function(e){e=(0,l.default)(e)?t.state.value:e,t.userUpdate=!0,t.setState({value:t.emptyIfDefault(e)}),t.props._onChange(t.props.name,e)})),v(g(t),"_updateFromRange",(function(e){t.isChangingRange=!0,t.updateOptionAndState((0,c.default)(e,"target.value")),t.isChangingRange=!1})),v(g(t),"_onChange",(function(e){var n=(0,c.default)(e,"target.value");t.updateOptionAndState(n),t.checkRangeBoundaries(n)}));var n=(0,c.default)(g(t),"props.range_settings",{min:0,max:100,step:1}),r=(0,s.default)(t.props.value);return t.state={rangeMin:n.min,rangeMax:n.max,rangeStep:n.step,value:t.emptyIfDefault(r)},t}return t=d,(n=[{key:"componentDidMount",value:function(){var e=this.props.value;this.deferredUpdate=(0,u.default)(this.updateOptionAndState,700),parseFloat(this.state.rangeStep)>.1&&parseFloat(e)%1>0&&this.setState({rangeStep:"0.1"}),this.checkRangeBoundaries(this.state.value)}},{key:"componentDidUpdate",value:function(e){var t=this.emptyIfDefault(this.props.value);e.value===t||this.userUpdate||this.setState({value:t}),this.userUpdate=!1}},{key:"componentWillUnmount",value:function(){this.deferredUpdate.cancel()}},{key:"getDefaultValue",value:function(){return(0,s.default)(this.props.default)}},{key:"emptyIfDefault",value:function(e){return e===this.getDefaultValue()?"":e}},{key:"checkRangeBoundaries",value:function(e){if((0,s.default)(e)){var t=parseFloat(e);t>this.state.rangeMax&&this.setState({rangeMax:t}),t<this.state.rangeMin&&this.setState({rangeMin:t}),parseFloat(this.state.rangeStep)>.1&&t%1>0&&this.setState({rangeStep:"0.1"})}}},{key:"_renderInput",value:function(){var e=this.props.id||"et-fb-".concat(this.props.name),t=this.props.name,n=this.emptyIfDefault(this.state.value),r=this.getDefaultValue(),a=""===n?r:n;return o.default.createElement("div",{className:"et-fb-settings-option-inputs-wrap"},o.default.createElement("input",{id:e,name:t,type:"range",min:this.state.rangeMin,max:this.state.rangeMax,step:this.state.rangeStep,className:"et-fb-range",value:parseFloat(a),"data-shortcuts-allowed":!0,onChange:this._updateFromRange}),o.default.createElement("div",{className:"et-fb-range-number et-fb-settings-option-input"},o.default.createElement("input",{type:"number",value:n,placeholder:r,onChange:this._onChange})))}},{key:"render",value:function(){var e=this.getDefaultValue(),t=this.props.value,n="";return t&&t!==e&&(n=o.default.createElement("button",{className:"et-fb-settings-option-button--reset",onClick:this.reset})),o.default.createElement("div",{className:(0,i.default)({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-range":!0})},this._renderInput(),n)}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.PureComponent);v(_,"defaultProps",{default_unit:""}),v(_,"propTypes",{name:a.default.string.isRequired,default_unit:a.default.string,precision:a.default.number});var w=_;t.default=w},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=i(n(3));function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){var t=function(){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}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=function(e){!function(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&&u(e,t)}(i,e);var t,n,r,a=s(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=a.call(this,e)).onClick=t.onClick.bind(d(t)),t}return t=i,(n=[{key:"onClick",value:function(e){e.preventDefault(),this.props.onClick(this.props.value)}},{key:"render",value:function(){var e=this.props,t=e.tag,n=e.className,r=e.children;return o.default.createElement(t,{className:n,onClick:this.onClick},r)}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.default.Component);p.propTypes={tag:a.default.string.isRequired,className:a.default.string,children:a.default.arrayOf(a.default.node).isRequired,value:a.default.oneOfType([a.default.number,a.default.string,a.default.object,a.default.array]).isRequired,onClick:a.default.func.isRequired},p.defaultProps={className:""};var h=p;t.default=h},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=x(n(0)),o=x(n(270)),a=x(n(11)),i=x(n(9)),l=x(n(7)),u=x(n(184)),s=x(n(4)),c=x(n(12)),d=x(n(37)),f=x(n(125)),p=x(n(148)),h=x(n(1)),m=x(n(333)),y=x(n(196)),g=x(n(787)),b=x(n(397)),v=x(n(393)),_=x(n(823)),w=x(n(515)),O=x(n(16)),k=x(n(2)),S=x(n(6)),C=x(n(22)),E=x(n(840)),P=x(n(1506));n(1639);var T=x(n(18)),M=x(n(216)),j=n(95);function x(e){return e&&e.__esModule?e:{default:e}}var D=function(e){return!(0,g.default)(e)&&0!==parseInt(e)&&"false"!==e},N=function(e){return e&&!1!==e?"true":"false"},L=function(e,t){return e||t},R=M.default.instance(),A=(0,o.default)({displayName:"ETBuilderControlInputMargins",mixins:[O.default],getInitialState:function(){var e=this._calculatePreviewMode(),t=(0,h.default)(this.props,"value.activeTab","desktop"),n="wireframe"===e?t:e;return{activeTab:n,value:this.getCurrentInputValue(n)}},getDefaultValues:function(){var e=this._calculatePreviewMode();return"zoom"!==e&&"wireframe"!==e||(e="desktop"),{desktop:["","","",""],tablet:["","","",""],phone:["","","",""],activeTab:e,isResponsive:!1}},UNSAFE_componentWillMount:function(){var e=this;this._onTopChange=this._onInputChange(0).bind(this),this._onRightChange=this._onInputChange(1).bind(this),this._onBottomChange=this._onInputChange(2).bind(this),this._onLeftChange=this._onInputChange(3).bind(this),this.getTopBottomLink=(0,y.default)(D,(0,_.default)(4),(function(t){return(0,w.default)(t,e.getDefaultValue(),L)}),(0,v.default)("|"),this.getStateValue),this.getLeftRightLink=(0,y.default)(D,(0,_.default)(5),(function(t){return(0,w.default)(t,e.getDefaultValue(),L)}),(0,v.default)("|"),this.getStateValue)},componentDidMount:function(){this.updatePreviewMode=(0,u.default)(this._onPreviewModeChange,500,{leading:!1}),k.default.appWindow().addEventListener("resize",this.updatePreviewMode),this.saveValue=(0,u.default)(this.updateOptionValue,0,{leading:!1})},componentWillUnmount:function(){k.default.appWindow().removeEventListener("resize",this.updatePreviewMode)},UNSAFE_componentWillReceiveProps:function(e){var t=(0,h.default)(e,"value.activeTab"),n=R.isAnimating()?this.state.activeTab:this._calculatePreviewMode(),r="wireframe"===n?t:n,o=this.hasResponsiveValue()?r:"desktop",a=(0,h.default)(e,"value",{}),i=(0,c.default)(a)?a[o]:a;r===this.state.activeTab&&i===this.getStateValue()||this.setState({activeTab:r,value:i})},componentDidUpdate:function(e){var t=(0,h.default)(e,["value","activeTab"]),n=(0,h.default)(this.props,["value","activeTab"]);t&&n&&t!==n&&this.setState({activeTab:n})},_calculatePreviewMode:function(){var e=S.default.getPreviewMode();return"zoom"!==e&&(0,h.default)(this.props,"value.isResponsive",!1)?"wireframe"===e?"wireframe":e:"desktop"},_onPreviewModeChange:function(){var e=this.getValue("isResponsive")?this._calculatePreviewMode():"desktop";(0,l.default)(["desktop","tablet","phone"],e)&&this.setState({activeTab:e,value:this.getCurrentInputValue(e)})},getCSSProperty:function(){return(0,h.default)({custom_padding:"padding",custom_margin:"margin"},this.props.type)},getValues:function(e){var t=this.getDefaultValues(),n=(0,a.default)(e)?this.props:e,r=(0,a.default)(n.value)||""===n.value?t:k.default.intentionallyClone(n.value),o=["desktop","tablet","phone"];return(0,d.default)(r)&&(r={desktop:r}),(0,i.default)(r,(function(e,n){if((0,l.default)(o,n)){var i=(0,a.default)(e)||(0,s.default)(e)?e:e.split("|");(0,s.default)(i)&&2===(0,f.default)(i)&&(i=[i[0],"",i[1],""]),r[n]=!(0,a.default)(e)&&k.default.hasValue(e)?i:t[n]}else"activeTab"===n&&(r.activeTab=(0,l.default)(o,e)?e:t.activeTab)})),r},getValue:function(e,t){var n=this.getValues(t);return(0,a.default)(n)||(0,a.default)(n[e])?"":n[e]},getStateValue:function(){return(0,b.default)(this.state.value)},getDefaultValue:function(e){e=e||this.getValue("activeTab");var t=k.default.getPrevBreakpoint(e),n=(0,h.default)(this.props,"default_".concat(e),"");return t?n?n.split("|"):this.getDefaultValue(t):(0,h.default)(this.props,"default","").split("|")},getCurrentInputValue:function(e,t){var n,r="desktop";return(0,a.default)(e)?(this.getActiveTab("tablet")&&this.getValue("isResponsive")&&(r="tablet"),this.getActiveTab("phone")&&this.getValue("isResponsive")&&(r="phone")):r=e,n=this.getValue(r,t),(0,a.default)(n)||!(0,s.default)(n)?"||||":n.join("|")},getActiveTab:function(e){var t="zoom"===this._calculatePreviewMode()?"desktop":(0,h.default)(this,"state.activeTab");return this.hasResponsiveValue()?e===t:e===this.getValue("activeTab")},getPropsNameSuffix:function(){var e=this.state.activeTab;return!(0,l.default)(["zoom","wireframe","desktop"],e)&&this.hasResponsiveValue()?"_".concat(e):""},getPropsNameLastEdited:function(){return"".concat(this.props.name,"_last_edited")},getPropsValueLastEdited:function(e,t){return t=e?t:"desktop","".concat(e?"on":"off","|").concat(t)},hasMobileOptions:function(){return k.default.hasValue(this.props.mobile_options)},hasResponsiveValue:function(){return this.hasMobileOptions()&&(0,c.default)(this.props.value)&&this.props.value.isResponsive},reset:function(e){e.preventDefault();var t=this.getDefaultValues(),n=this.getValue("activeTab");this.getValues()[n]=t[n],this.props._onChange(this.props.name+this.getPropsNameSuffix(),t[n].join("|")),this.setState({value:t[n].join("|")})},changeTab:function(e){var t=S.default.getActiveModule(),n=this.getValue("isResponsive"),r=e.target.getAttribute("data-tab"),o=this._calculatePreviewMode();return"hover"===r?(C.default.switchResponsivePreviewMode("desktop"),C.default.toggleModuleHover(!0),void C.default.moduleSettingsChange(t,"hover_enabled",1)):"sticky"===r?(C.default.switchResponsiveMode("desktop"),C.default.toggleModuleSticky(!0),void C.default.moduleSettingsChange(t,"sticky_enabled",1)):(C.default.toggleModuleHover(!1),C.default.moduleSettingsChange(t,"hover_enabled",0),C.default.moduleSettingsChange(t,"sticky_enabled",0),this.setState({activeTab:r,value:this.getCurrentInputValue(r)}),"wireframe"!==o&&C.default.switchResponsivePreviewMode(r),this.props._onChange(this.getPropsNameLastEdited(),this.getPropsValueLastEdited(n,r)),void this.removePaddingMobile())},removePaddingMobile:function(){var e=(0,h.default)(this,"props.name",!1),t=(0,h.default)(this,"props.moduleAttrs.padding_mobile",!1),n=(0,h.default)(this,"props.moduleAttrs.column_padding_mobile",!1);"custom_padding"===e&&k.default.hasValue(t)&&this.props._onChange("padding_mobile",""),(0,l.default)(["padding_1","padding_2","padding_3","padding_4","padding_5","padding_6"],e)&&k.default.hasValue(n)&&this.props._onChange("column_padding_mobile","")},getInput:function(e,t,n,o){var a="et-fb-".concat(this.props.name),i="padding"===this.getCSSProperty()?0:void 0,l=n===o?"":n,u=(0,h.default)({top:this._onTopChange,right:this._onRightChange,bottom:this._onBottomChange,left:this._onLeftChange},t);return r.default.createElement("div",{className:"et-fb-settings-option-input-wrap ".concat(t)},r.default.createElement(P.default,{id:"".concat(a,"-input-").concat(t),name:"".concat(this.props.name,"-input-").concat(t),type:"text",className:"et-fb-settings-option-input et-fb-settings-option-input-margin et-fb-settings-option-input-margin--".concat(t),value:(0,p.default)(l),defaultValue:o,"data-tab":e,"data-order":"0",onChange:u,speed:4,min:i,label:ETBuilderBackend.i18n.controls.inputMargin[t],defaultUnit:"px",allowedUnits:this.props.allowed_units,property:this.getCSSProperty(),readonly:(0,h.default)(this.props,"readonly",!1)}))},inputsWrap:function(e){var t=this.getStateValue().split("|"),n=this.getDefaultValue(e);return r.default.createElement("div",{className:"et-fb-settings-option-inputs-wrap"},this.getInput(e,"top",t[0],n[0]),r.default.createElement(E.default,{active:this.getTopBottomLink(),onClick:this._topBottomLink}),this.getInput(e,"bottom",t[2],n[2]),this.getInput(e,"left",t[3],n[3]),r.default.createElement(E.default,{active:this.getLeftRightLink(),onClick:this._leftRightLink}),this.getInput(e,"right",t[1],n[1]))},render:function(){var e,t,n,o=this.getActiveTab("desktop")?"active":"",a=this.getActiveTab("tablet")?"active":"",i=this.getActiveTab("phone")?"active":"",l=this.getValue("isResponsive"),u=ETBuilderBackend.i18n.controls.responsiveTabs;if(this.getValue("isResponsive")){var s=T.default.getFieldBaseName((0,h.default)(this,"props.name","")),c=T.default.isEnabled("moduleAttrs.".concat(s),this.props),d=!0===S.default.getHoverMode()?"active":"",f=c?r.default.createElement("li",{className:d,"data-tab":"hover",onClick:this.changeTab},ETBuilderBackend.i18n.controls.tabs.hover):"",p=c?"et-fb-settings-option-responsive-tab-nav et-fb-settings-option-responsive-tab-nav-hover-active ":"et-fb-settings-option-responsive-tab-nav";"active"===d&&(o=""),r.default.createElement("ul",{className:p},r.default.createElement("li",{className:o,"data-tab":"desktop",onClick:this.changeTab},u.desktop),f,r.default.createElement("li",{className:a,"data-tab":"tablet",onClick:this.changeTab},u.tablet),r.default.createElement("li",{className:i,"data-tab":"phone",onClick:this.changeTab},u.phone))}return!this.getActiveTab("desktop")&&this.hasResponsiveValue()||(e=this.inputsWrap("desktop")),this.getActiveTab("tablet")&&l&&(t=this.inputsWrap("tablet")),this.getActiveTab("phone")&&l&&(n=this.inputsWrap("phone")),r.default.createElement("div",{className:"et-fb-settings-option-inner et-fb-settings-option-inner-responsive et-fb-settings-option-inner-input-margins"},e,t,n)},_topBottomLink:function(){if(!this.props.readonly){var e=this.getLastVerticalUpdated(),t=this.getStateValue().split("|");t[4]=N(!this.getTopBottomLink()),this.getTopBottomLink()||t[0]===t[2]||((0,g.default)(e)?(0,g.default)(t[0])?t[0]=t[2]:t[2]=t[0]:"top"===e?t[2]=t[0]:t[0]=t[2]),this.updatePadding(t.join("|"))}},_leftRightLink:function(){if(!this.props.readonly){var e=this.getLastHorizontalUpdated(),t=this.getStateValue().split("|");t[5]=N(!this.getLeftRightLink()),this.getLeftRightLink()||t[1]===t[3]||((0,g.default)(e)?(0,g.default)(t[3])?t[3]=t[1]:t[1]=t[3]:"left"===e?t[1]=t[3]:t[3]=t[1]),this.updatePadding(t.join("|"))}},_onInputChange:(0,m.default)((function(e,t){if(!this.props.readonly){var n=this.getStateValue().split("|");switch(n[e]=this.validateValue(t)?t:"",e){case 0:n[2]=this.getTopBottomLink()?n[e]:n[2],this._lastVUpdated="top";break;case 1:n[3]=this.getLeftRightLink()?n[e]:n[3],this._lastHUpdated="right";break;case 2:n[0]=this.getTopBottomLink()?n[e]:n[0],this._lastVUpdated="bottom";break;case 3:n[1]=this.getLeftRightLink()?n[e]:n[1],this._lastHUpdated="left"}n[4]=n[4]||this.getTopBottomLink(),n[5]=n[5]||this.getLeftRightLink(),this.updatePadding(n.join("|"))}})),validateValue:function(e){return!!(0,j.isAcceptableCSSStringValue)(this.getCSSProperty(),e)||!isNaN(parseFloat(e))&&("padding"!==this.getCSSProperty()||parseFloat(e)>=0)},getLastVerticalUpdated:function(){return this._lastVUpdated},getLastHorizontalUpdated:function(){return this._lastHUpdated},updatePadding:function(e){this.removePaddingMobile(),this.setState({value:e}),this.saveValue.cancel(),this.saveValue()},updateOptionValue:function(){this.props._onChange(this.props.name+this.getPropsNameSuffix(),this.getStateValue())}});A.defaultProps={default:"|||||"};var I=A;t.default=I},function(e,t,n){"use strict";n.r(t)},function(e,t,n){var r=n(54)("add",n(633));r.placeholder=n(48),e.exports=r},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=d(n(3)),i=d(n(1637)),l=d(n(626));n(1638);var u=d(n(40)),s=d(n(196)),c=n(115);function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var b=function(e){!function(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&&h(e,t)}(u,e);var t,n,r,a=m(u);function u(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(e=a.call(this)).state={spinner:-5e3,isDragging:!1},e}return t=u,(n=[{key:"UNSAFE_componentWillMount",value:function(){this.handleDrag=(0,s.default)(parseInt,this.handleDrag.bind(this)),this.handleDragStart=this.handleDragStart.bind(this),this.handleDragEnd=this.handleDragEnd.bind(this),this.normalize=(new c.Normalizer)(1.8)}},{key:"handleDrag",value:function(e,t){this.props.onChange(e,t),this.setState({spinner:this.normalize(e)+this.state.spinner})}},{key:"handleDragStart",value:function(){this.setState({isDragging:!0})}},{key:"handleDragEnd",value:function(){this.setState({isDragging:!1,spinner:-5e3})}},{key:"render",value:function(){var e=this.state.isDragging?"dragging":"";return o.default.createElement(l.default,{className:"et-fb-settings-option--spinner-control ".concat(e),onDragX:this.handleDrag,onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd},o.default.createElement(i.default,{pos:this.state.spinner}))}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Component);b.propTypes={onChange:a.default.func.isRequired},b.defaultProps={onChange:u.default};var v=b;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(28)),a=["pos","style","className"];function i(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.default=function(e){var t=e.pos,n=e.style,i=e.className,s=u(e,a);return r.default.createElement("div",l({},s,{style:n,className:"et-fb-spinner-control__spinner ".concat((0,o.default)(i))}),r.default.createElement("div",{className:"et-fb-spinner-control__spinner-item",style:{transform:"translateX(".concat(t,"px)")}}))}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=(u(n(3)),u(n(27))),i=u(n(16)),l=u(n(2));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){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}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}n(1641);var y,g,b,v=function(e){!function(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&&d(e,t)}(s,e);var t,n,r,u=f(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=u.call(this,e)).state={date_time:null},t.shouldComponentUpdate=i.default.shouldComponentUpdate.bind(h(t)),t}return t=s,(n=[{key:"componentDidMount",value:function(){var e=this,t=l.default.$topWindow(a.default.findDOMNode(this.refs.input)),n={showButtonPanel:!1,dateFormat:"yy-mm-dd",onSelect:function(t,n){e.props._onChange(e.props.name,t)}};this.props.showTimeSelect?(t.datetimepicker(n),t.datetimepicker("setDate",this.props.value)):(t.datepicker(n),t.datepicker("setDate",this.props.value))}},{key:"render",value:function(){return o.default.createElement("div",{className:"et-fb-settings-option-input-datetime",ref:"input"})}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);b={showTimeSelect:!0},(g="defaultProps")in(y=v)?Object.defineProperty(y,g,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[g]=b;var _=v;t.default=_},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=_(n(3)),i=_(n(16)),l=_(n(31)),u=_(n(7)),s=_(n(5)),c=_(n(11)),d=_(n(28)),f=_(n(394)),p=_(n(197)),h=_(n(332)),m=_(n(1)),y=_(n(146)),g=_(n(162)),b=n(93),v=_(n(6));function _(e){return e&&e.__esModule?e:{default:e}}function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function S(e){var t=function(){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}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}n(1643);var T=function(e){!function(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&&k(e,t)}(_,e);var t,n,r,a=S(_);function _(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,_),(t=a.call(this,e)).shouldComponentUpdate=i.default.shouldComponentUpdate.bind(E(t)),t._onChange=t._onChange.bind(E(t)),t}return t=_,(n=[{key:"render",value:function(){var e=this,t=(0,h.default)(this._getCategories()),n=v.default.getTaxonomyLabels(this._getTermName()),r=this.props.value,a=(0,c.default)(r)?[]:r.split(","),i=[];return(0,s.default)(t)||(i=t.map((function(t,n){if((0,s.default)(t))return!1;var r=(0,m.default)(e.props,"module.props.module.props.shortcut_index",e._getTermName()),i="select-category-".concat(r,"-").concat(t.term_id);return!(0,s.default)(t)&&o.default.createElement("p",{key:i},o.default.createElement("label",{htmlFor:i},o.default.createElement("input",{type:"checkbox",id:i,name:"et_fb_select_category[".concat(n,"]"),value:t.term_id,onChange:e._onChange,checked:(0,u.default)(a,t.term_id.toString())})," ",(0,b.decode)(t.name)))}))),(0,s.default)((0,g.default)(i))&&(i=[]),(0,s.default)((0,g.default)(i))&&(i=(0,c.default)(n.not_found)?"":(0,b.decode)(n.not_found)),o.default.createElement("div",{className:"et-fb-checkboxes-category-wrap"},i)}},{key:"_getTermName",value:function(){return(0,m.default)(this.props,"renderer_options.use_terms",!1)?(0,m.default)(this.props,"renderer_options.term_name"):this.props.taxonomy_name}},{key:"_getCategories",value:function(){var e=v.default.getTaxonomy(this._getTermName()),t=(0,m.default)(this.props,"renderer_options.custom_items",[]);return(0,y.default)(t,this._getMetaCategories(),e)}},{key:"_useMetaCategories",value:function(){return!(0,c.default)(this.props.meta_categories)&&!(0,s.default)(this.props.meta_categories)}},{key:"_getMetaCategories",value:function(){return this._useMetaCategories()?(0,l.default)(this.props.meta_categories,(function(e,t){return{term_id:t,name:e}})):[]}},{key:"_onChange",value:function(e){var t=this.props.value,n=this._getCategories(),r=(0,l.default)(n,(function(e){return(0,d.default)(e.term_id)})),o=e.target.checked,a=(0,d.default)(e.target.value),i=(0,c.default)(t)?[]:t.split(",");o?(0,s.default)(i)?i=[a]:i.push(a):i=(0,f.default)(i,(function(e){return e!==a}));var u=(0,p.default)(i,r);this.props._onChange(this.props.name,u.join(","))}}])&&O(t.prototype,n),r&&O(t,r),Object.defineProperty(t,"prototype",{writable:!1}),_}(o.Component);T.propTypes={taxonomy_name:a.default.string,value:a.default.string,_onChange:a.default.func};var M=T;t.default=M},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=P(n(56)),a=P(n(394)),i=P(n(40)),l=P(n(11)),u=P(n(37)),s=P(n(96)),c=P(n(5)),d=P(n(7)),f=P(n(34)),p=P(n(1)),h=P(n(9)),m=P(n(41)),y=n(1647),g=P(n(0)),b=P(n(3));n(1648),n(1509),n(1649),n(1652),n(1653),n(1654),n(1656),n(1534),n(1657),n(1658),n(1659),n(1508),n(1660),n(1536),n(1661),n(1662),n(1663),n(1664);var v=P(n(281)),_=P(n(1665)),w=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(2)),O=P(n(6)),k=P(n(1666)),S=P(n(1668)),C=P(n(1537));function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}function P(e){return e&&e.__esModule?e:{default:e}}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function D(e){var t=function(){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}}();return function(){var n,r=R(e);if(t){var o=R(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return L(e)}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t,n){return t&&I(e.prototype,t),n&&I(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var F=100,W=500,V=2e3,U={common:{keyMap:"sublime",autofocus:!1,cursorBlinkRate:0,viewportMargin:1/0,theme:"et",styleActiveLine:!0,matchBrackets:!0,autoCloseBrackets:!0,autoCloseTags:!0,lineWrapping:!0,lineNumbers:!0,indentUnit:2,tabSize:2},modes:{css:{mode:{name:"css",inline:!0},colorpicker:{mode:"edit"},lineBreakPlaceholder:/\|\||<!-- \[et_pb_line_break_holder\] -->/},html:{mode:{name:"htmlmixed"},colorpicker:{mode:"edit"},matchTags:{bothTags:!0},lineBreakPlaceholder:/<!-- \[et_pb_line_break_holder\] -->/}}},G={line:0,ch:0},H={ignoreKeys:[13,37,39],prefix:{css:/[A-z-]/,default:/[A-z]/},tokens:{xml:["attribute","tag"]}},z=function(e){var t=(0,p.default)(e,e.is_fb_content?"content":"value");return t===e.default?"":t},q=function(e){e.hideCompletion(),e.hideColorPicker()},K=new(function(){function e(){A(this,e),this.instances=[],this.listener=!1,this.$window=w.default.$appWindow(),this.onScroll=this.onScroll.bind(this)}return B(e,[{key:"add",value:function(e){this.instances.push(e),this.check()}},{key:"remove",value:function(e){(0,a.default)(this.instances,e),this.check()}},{key:"onScroll",value:function(){(0,h.default)(this.instances,q)}},{key:"check",value:function(){this.instances.length>0?this.listener||(this.$window.on("wheel scroll",this.onScroll),this.listener=!0):this.listener&&(this.$window.off("wheel scroll",this.onScroll),this.listener=!1)}}]),e}()),$=(0,w.isIEOrEdge)()?e("body")[0]:{scrollTop:0};function Y(t){var n=this,r=t.lineNo,o=t.ch,a=t.nameColor,i=t.color;if(this.colorpicker){var l=i,u=this.cm.charCoords({line:r,ch:o},"window");this.colorpicker.show({left:u.left,top:u.bottom+$.scrollTop,isShortCut:t.isShortCut||!1,hideDelay:this.opt.hideDelay||2e3},a||i,(function(e){n.cm.replaceRange(e,{line:r,ch:o},{line:r,ch:o+l.length},"*colorpicker"),l=e})),e(this.colorpicker.$root.el).css({top:"".concat(u.bottom+$.scrollTop,"px"),left:(0,s.default)(u.left)?"".concat(u.left,"px"):u.left})}}var X=function(e){!function(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&&x(e,t)}(n,e);var t=D(n);function n(e){var r;A(this,n),(r=t.call(this,e)).editor=!1,r.dirty=!1,r.markers=[],r.mode=(0,p.default)(e,"mode","css"),r.options=M(M(M({},U.common),(0,p.default)(U.modes,r.mode,{})),{},{readOnly:(0,p.default)(e,"readonly",!1)}),(0,f.default)(r.options,"mode.inline")&&(0,f.default)(e,"inline")&&(r.options.mode.inline=e.inline),r.completion=(0,p.default)(H.prefix,r.mode,H.prefix.default),r.onChange=r.onChange.bind(L(r)),r.onClick=r.onClick.bind(L(r)),r.onKeyUp=r.onKeyUp.bind(L(r)),r.onKeyDown=r.onKeyDown.bind(L(r)),r._onFocus=r._onFocus.bind(L(r)),r._onBlur=r._onBlur.bind(L(r)),r.onBeforeChange=r.onBeforeChange.bind(L(r)),r.editorDidMount=r.editorDidMount.bind(L(r)),r.activateEditor=r.activateEditor.bind(L(r)),r.getEditor=r.getEditor.bind(L(r)),r.debouncedShowCompletion=(0,m.default)(r.showCompletion,W),r.debouncedUpdateSettings=(0,m.default)(r.updateSettings,F),r.incrementalKey=0;var o=r.addLineBreaks(z(e)),a=r.addLineBreaks(r.props.default);return r.state={value:o,default:a,enabled:!(0,c.default)(o)||!(0,c.default)(a),focused:!1},r}return B(n,[{key:"componentDidMount",value:function(){K.add(this)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.addLineBreaks(z(e));if(this.state.enabled||(0,c.default)(t)&&(0,c.default)(this.state.default)||this.enableEditor(),this.state.value!==t||e.activeTabMode!==this.props.activeTabMode){var n=this.addLineBreaks(e.default);this.setState({default:n}),this.dirty||(this.incrementalKey++,this.setValue(t))}}},{key:"componentDidUpdate",value:function(){if(this.editor){var e=this.editor;if((0,h.default)(this.markers,(function(e){e.clear()})),this.markers=[],(0,c.default)((0,p.default)(this,"props.search")))return;for(var t=e.getSearchCursor(this.props.search);t.findNext();)this.markers.push(e.doc.markText(t.from(),t.to(),{className:"cm-searching",clearOnEnter:!0}))}}},{key:"componentWillUnmount",value:function(){this.hideCompletion(),this.hideColorPicker(),K.remove(this),this.debouncedShowCompletion.cancel(),this.debouncedUpdateSettings.flush(),this.editor=!1,this.linter&&this.linter.destroy()}},{key:"onBeforeChange",value:function(e,t,n){this.dirty=!0,this.setValue(n)}},{key:"onChange",value:function(){F>0?this.debouncedUpdateSettings():this.updateSettings(),this.lint()}},{key:"onKeyUp",value:function(e,t){this.checkCompletion(e,t)}},{key:"onKeyDown",value:function(e,t){"Enter"!==t.key&&13!==t.keyCode||t.stopPropagation()}},{key:"onClick",value:function(){this.options.autofocus=!0,this.enableEditor()}},{key:"setValue",value:function(e){this.setState({value:e})}},{key:"addLineBreaks",value:function(e){if((0,l.default)(e)||!(0,u.default)(e))return e;var t=this.options.lineBreakPlaceholder;return e.match(t)?e.split(t).join("\n"):e}},{key:"enableEditor",value:function(){this.setState({enabled:!0})}},{key:"lint",value:function(e){this.linter&&this.linter.lint(e)}},{key:"editorDidMount",value:function(e){this.editor=e;var t=e.state.colorpicker;t&&(0,o.default)(t,"open_color_picker",Y.bind(t)),this.linter=new _.default(this.options.mode,e,V),this.lint(0)}},{key:"updateSettings",value:function(){var e=this.props;e._onChange(e.name,this.state.value,e.type),this.dirty=!1}},{key:"hideCompletion",value:function(){this.debouncedShowCompletion.cancel(),this.editor&&this.editor.state.completionActive&&this.editor.state.completionActive.close()}},{key:"hideColorPicker",value:function(){this.editor&&this.editor.state.colorpicker&&this.editor.state.colorpicker.close_color_picker()}},{key:"checkCompletion",value:function(e,t){if((0,d.default)(H.ignoreKeys,t.keyCode))this.hideCompletion();else{var n=e.doc,r=n.getCursor(),o=r.line,a=r.ch,i=(0,p.default)(e.getModeAt(r),"name"),l=n.getLine(o),u=l.substr(Math.max(a-1,0),1),s=l.substr(a,1);if(this.completion.test(u)&&!this.completion.test(s)){var c=(0,p.default)(H,"tokens.".concat(i));if(c){var f=e.getTokenTypeAt(r);if(!(0,d.default)(c,f))return void this.hideCompletion()}this.debouncedShowCompletion()}else this.hideCompletion()}}},{key:"showCompletion",value:function(){if(!this.editor.state.completionActive){var e=w.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app"))[0];this.editor.showHint({completeSingle:!1,container:e})}}},{key:"activateEditor",value:function(){this.enableEditor()}},{key:"getEditor",value:function(){return this.editor}},{key:"render",value:function(){var e,t,n,r=this.props.name;if(this.state.enabled){var o=M(M({},this.options),{},{lineNumbers:this.state.focused||!(0,c.default)(this.state.value)||(0,c.default)(this.state.default),placeholder:this.state.default,scrollbarStyle:null});t=g.default.createElement(y.Controlled,{key:this.incrementalKey,value:this.state.value,options:o,cursor:this.options.autofocus?G:null,autoFocus:this.options.autofocus,name:r,id:"et-fb-".concat(r),onChange:this.onChange,onBeforeChange:this.onBeforeChange,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown,editorDidMount:this.editorDidMount,onFocus:this._onFocus,onBlur:this._onBlur})}else t=g.default.createElement("textarea",{className:"et-fb-settings-option-textarea",value:this.state.value,name:r,onChange:i.default,onClick:this.onClick,onFocus:this._onFocus,onBlur:this._onBlur,placeholder:this.state.default});switch(r){case"et_pb_custom_css":n="code_css";break;case"raw_content":n="code_html";break;case"custom_css_free_form":n="code_css_free_form";break;default:n="code_css_no_selector"}var a="code_css_free_form"===n?"code_css":n,l=Boolean(O.default.getExtendStylesModal()),u=(null===(e=this.props)||void 0===e?void 0:e.uniqueKey)||"",s=Boolean(O.default.getFindReplaceModal())&&u.endsWith("__find"),d=l||s;return g.default.createElement(v.default,{componentName:r},g.default.createElement("div",{className:"et-fb-codemirror"},t,!d&&g.default.createElement(k.default,null,g.default.createElement(S.default,{context:n,activateEditor:this.activateEditor,getEditor:this.getEditor,value:this.state.value,editorName:r,processedKey:this.props.processedKey}),g.default.createElement(C.default,{context:a,editor:this.editor,activateEditor:this.activateEditor,getEditor:this.getEditor}))))}},{key:"_onFocus",value:function(){this.setState({focused:!0})}},{key:"_onBlur",value:function(){this.setState({focused:!1})}}]),n}(g.default.Component);X.propTypes={value:b.default.string,name:b.default.string.isRequired,search:b.default.string,inline:b.default.bool},X.defaultProps={value:"",search:"",inline:!0};var J=X;t.default=J}).call(this,n(8))},function(e,t,n){"use strict";(function(e){function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function o(e){return o="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},o(e)}var a,i=(a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},a(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UnControlled=t.Controlled=void 0;var l,u=n(0),s="undefined"==typeof navigator||!0===e.PREVENT_CODEMIRROR_RENDER;s||(l=n(1482));var c=function(){function e(){}return e.equals=function(e,t){var n=this,r=Object.keys,a=o(e),i=o(t);return e&&t&&"object"===a&&a===i?r(e).length===r(t).length&&r(e).every((function(r){return n.equals(e[r],t[r])})):e===t},e}(),d=function(){function e(e,t){this.editor=e,this.props=t}return e.prototype.delegateCursor=function(e,t,n){var r=this.editor.getDoc();n&&this.editor.focus(),t?r.setCursor(e):r.setCursor(e,null,{scroll:!1})},e.prototype.delegateScroll=function(e){this.editor.scrollTo(e.x,e.y)},e.prototype.delegateSelection=function(e,t){this.editor.getDoc().setSelections(e),t&&this.editor.focus()},e.prototype.apply=function(e){e&&e.selection&&e.selection.ranges&&this.delegateSelection(e.selection.ranges,e.selection.focus||!1),e&&e.cursor&&this.delegateCursor(e.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1),e&&e.scroll&&this.delegateScroll(e.scroll)},e.prototype.applyNext=function(e,t,n){e&&e.selection&&e.selection.ranges&&t&&t.selection&&t.selection.ranges&&!c.equals(e.selection.ranges,t.selection.ranges)&&this.delegateSelection(t.selection.ranges,t.selection.focus||!1),e&&e.cursor&&t&&t.cursor&&!c.equals(e.cursor,t.cursor)&&this.delegateCursor(n.cursor||t.cursor,t.autoScroll||!1,t.autoCursor||!1),e&&e.scroll&&t&&t.scroll&&!c.equals(e.scroll,t.scroll)&&this.delegateScroll(t.scroll)},e.prototype.applyUserDefined=function(e,t){t&&t.cursor&&this.delegateCursor(t.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1)},e.prototype.wire=function(e){var t=this;Object.keys(e||{}).filter((function(e){return/^on/.test(e)})).forEach((function(e){switch(e){case"onBlur":t.editor.on("blur",(function(e,n){t.props.onBlur(t.editor,n)}));break;case"onContextMenu":t.editor.on("contextmenu",(function(e,n){t.props.onContextMenu(t.editor,n)}));break;case"onCopy":t.editor.on("copy",(function(e,n){t.props.onCopy(t.editor,n)}));break;case"onCursor":t.editor.on("cursorActivity",(function(e){t.props.onCursor(t.editor,t.editor.getDoc().getCursor())}));break;case"onCursorActivity":t.editor.on("cursorActivity",(function(e){t.props.onCursorActivity(t.editor)}));break;case"onCut":t.editor.on("cut",(function(e,n){t.props.onCut(t.editor,n)}));break;case"onDblClick":t.editor.on("dblclick",(function(e,n){t.props.onDblClick(t.editor,n)}));break;case"onDragEnter":t.editor.on("dragenter",(function(e,n){t.props.onDragEnter(t.editor,n)}));break;case"onDragLeave":t.editor.on("dragleave",(function(e,n){t.props.onDragLeave(t.editor,n)}));break;case"onDragOver":t.editor.on("dragover",(function(e,n){t.props.onDragOver(t.editor,n)}));break;case"onDragStart":t.editor.on("dragstart",(function(e,n){t.props.onDragStart(t.editor,n)}));break;case"onDrop":t.editor.on("drop",(function(e,n){t.props.onDrop(t.editor,n)}));break;case"onFocus":t.editor.on("focus",(function(e,n){t.props.onFocus(t.editor,n)}));break;case"onGutterClick":t.editor.on("gutterClick",(function(e,n,r,o){t.props.onGutterClick(t.editor,n,r,o)}));break;case"onInputRead":t.editor.on("inputRead",(function(e,n){t.props.onInputRead(t.editor,n)}));break;case"onKeyDown":t.editor.on("keydown",(function(e,n){t.props.onKeyDown(t.editor,n)}));break;case"onKeyHandled":t.editor.on("keyHandled",(function(e,n,r){t.props.onKeyHandled(t.editor,n,r)}));break;case"onKeyPress":t.editor.on("keypress",(function(e,n){t.props.onKeyPress(t.editor,n)}));break;case"onKeyUp":t.editor.on("keyup",(function(e,n){t.props.onKeyUp(t.editor,n)}));break;case"onMouseDown":t.editor.on("mousedown",(function(e,n){t.props.onMouseDown(t.editor,n)}));break;case"onPaste":t.editor.on("paste",(function(e,n){t.props.onPaste(t.editor,n)}));break;case"onRenderLine":t.editor.on("renderLine",(function(e,n,r){t.props.onRenderLine(t.editor,n,r)}));break;case"onScroll":t.editor.on("scroll",(function(e){t.props.onScroll(t.editor,t.editor.getScrollInfo())}));break;case"onSelection":t.editor.on("beforeSelectionChange",(function(e,n){t.props.onSelection(t.editor,n)}));break;case"onTouchStart":t.editor.on("touchstart",(function(e,n){t.props.onTouchStart(t.editor,n)}));break;case"onUpdate":t.editor.on("update",(function(e){t.props.onUpdate(t.editor)}));break;case"onViewportChange":t.editor.on("viewportChange",(function(e,n,r){t.props.onViewportChange(t.editor,n,r)}))}}))},e}(),f=function(e){function t(t){var n=e.call(this,t)||this;return s||(n.applied=!1,n.appliedNext=!1,n.appliedUserDefined=!1,n.deferred=null,n.emulating=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1),n}return i(t,e),t.prototype.hydrate=function(e){var t=this,n=e&&e.options?e.options:{},o=r({},l.defaults,this.editor.options,n);Object.keys(o).some((function(e){return t.editor.getOption(e)!==o[e]}))&&Object.keys(o).forEach((function(e){n.hasOwnProperty(e)&&t.editor.getOption(e)!==o[e]&&(t.editor.setOption(e,o[e]),t.mirror.setOption(e,o[e]))})),this.hydrated||(this.deferred?this.resolveChange(e.value):this.initChange(e.value||"")),this.hydrated=!0},t.prototype.initChange=function(e){this.emulating=!0;var t=this.editor.getDoc(),n=t.lastLine(),r=t.getLine(t.lastLine()).length;t.replaceRange(e||"",{line:0,ch:0},{line:n,ch:r}),this.mirror.setValue(e),t.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},t.prototype.resolveChange=function(e){this.emulating=!0;var t=this.editor.getDoc();if("undo"===this.deferred.origin?t.undo():"redo"===this.deferred.origin?t.redo():t.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),e&&e!==t.getValue()){var n=t.getCursor();t.setValue(e),t.setCursor(n)}this.emulating=!1,this.deferred=null},t.prototype.mirrorChange=function(e){var t=this.editor.getDoc();return"undo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.undo()):"redo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()},t.prototype.componentDidMount=function(){var e=this;s||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&l.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=l(this.ref,this.props.options),this.shared=new d(this.editor,this.props),this.mirror=l((function(){}),this.props.options),this.editor.on("electricInput",(function(){e.mirror.setHistory(e.editor.getDoc().getHistory())})),this.editor.on("cursorActivity",(function(){e.mirror.setCursor(e.editor.getDoc().getCursor())})),this.editor.on("beforeChange",(function(t,n){if(!e.emulating){n.cancel(),e.deferred=n;var r=e.mirrorChange(e.deferred);e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,e.deferred,r)}})),this.editor.on("change",(function(t,n){e.mounted&&e.props.onChange&&e.props.onChange(e.editor,n,e.editor.getValue())})),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(!s){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(e,this.props,t),this.appliedNext=!0),this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0}},t.prototype.componentWillUnmount=function(){s||this.props.editorWillUnmount&&this.props.editorWillUnmount(l)},t.prototype.shouldComponentUpdate=function(e,t){return!s},t.prototype.render=function(){var e=this;if(s)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return u.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(u.Component);t.Controlled=f;var p=function(e){function t(t){var n=e.call(this,t)||this;return s||(n.applied=!1,n.appliedUserDefined=!1,n.continueChange=!1,n.detached=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1,n.onBeforeChangeCb=function(){n.continueChange=!0}),n}return i(t,e),t.prototype.hydrate=function(e){var t=this,n=e&&e.options?e.options:{},o=r({},l.defaults,this.editor.options,n);if(Object.keys(o).some((function(e){return t.editor.getOption(e)!==o[e]}))&&Object.keys(o).forEach((function(e){n.hasOwnProperty(e)&&t.editor.getOption(e)!==o[e]&&t.editor.setOption(e,o[e])})),!this.hydrated){var a=this.editor.getDoc(),i=a.lastLine(),u=a.getLine(a.lastLine()).length;a.replaceRange(e.value||"",{line:0,ch:0},{line:i,ch:u})}this.hydrated=!0},t.prototype.componentDidMount=function(){var e=this;s||(this.detached=!0===this.props.detach,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&l.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=l(this.ref,this.props.options),this.shared=new d(this.editor,this.props),this.editor.on("beforeChange",(function(t,n){e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,n,e.editor.getValue(),e.onBeforeChangeCb)})),this.editor.on("change",(function(t,n){e.mounted&&e.props.onChange&&(e.props.onBeforeChange?e.continueChange&&e.props.onChange(e.editor,n,e.editor.getValue()):e.props.onChange(e.editor,n,e.editor.getValue()))})),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(this.detached&&!1===this.props.detach&&(this.detached=!1,e.editorDidAttach&&e.editorDidAttach(this.editor)),this.detached||!0!==this.props.detach||(this.detached=!0,e.editorDidDetach&&e.editorDidDetach(this.editor)),!s&&!this.detached){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),e.autoCursor||void 0===e.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(e),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0)}},t.prototype.componentWillUnmount=function(){s||this.props.editorWillUnmount&&this.props.editorWillUnmount(l)},t.prototype.shouldComponentUpdate=function(e,t){var n=!0;return s&&(n=!1),this.detached&&e.detach&&(n=!1),n},t.prototype.render=function(){var e=this;if(s)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return u.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(u.Component);t.UnControlled=p}).call(this,n(89))},function(e,t,n){!function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r,o){if(o<0&&0==r.ch)return t.clipPos(n(r.line-1));var a=t.getLine(r.line);if(o>0&&r.ch>=a.length)return t.clipPos(n(r.line+1,0));for(var i,l="start",u=r.ch,s=u,c=o<0?0:a.length,d=0;s!=c;s+=o,d++){var f=a.charAt(o<0?s-1:s),p="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==p&&f.toUpperCase()==f&&(p="W"),"start"==l)"o"!=p?(l="in",i=p):u=s+o;else if("in"==l&&i!=p){if("w"==i&&"W"==p&&o<0&&s--,"W"==i&&"w"==p&&o>0){if(s==u+1){i="w";continue}s--}break}}return n(r.line,s)}function o(e,t){e.extendSelectionsBy((function(n){return e.display.shift||e.doc.extend||n.empty()?r(e.doc,n.head,t):t<0?n.from():n.to()}))}function a(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,o=[],a=-1,i=0;i<e;i++){var l=t.listSelections()[i].head;if(!(l.line<=a)){var u=n(l.line+(r?0:1),0);t.replaceRange("\n",u,null,"+insertLine"),t.indentLine(u.line,null,!0),o.push({head:u,anchor:u}),a=l.line+1}}t.setSelections(o)})),t.execCommand("indentAuto")}function i(t,r){for(var o=r.ch,a=o,i=t.getLine(r.line);o&&e.isWordChar(i.charAt(o-1));)--o;for(;a<i.length&&e.isWordChar(i.charAt(a));)++a;return{from:n(r.line,o),to:n(r.line,a),word:i.slice(o,a)}}function l(e,t){for(var n=e.listSelections(),r=[],o=0;o<n.length;o++){var a=n[o],i=e.findPosV(a.anchor,t,"line",a.anchor.goalColumn),l=e.findPosV(a.head,t,"line",a.head.goalColumn);i.goalColumn=null!=a.anchor.goalColumn?a.anchor.goalColumn:e.cursorCoords(a.anchor,"div").left,l.goalColumn=null!=a.head.goalColumn?a.head.goalColumn:e.cursorCoords(a.head,"div").left;var u={anchor:i,head:l};r.push(a),r.push(u)}e.setSelections(r)}function u(t,n,r){for(var o=0;o<t.length;o++)if(0==e.cmpPos(t[o].from(),n)&&0==e.cmpPos(t[o].to(),r))return!0;return!1}t.goSubwordLeft=function(e){o(e,-1)},t.goSubwordRight=function(e){o(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],o=0;o<t.length;o++)for(var a=t[o].from(),i=t[o].to(),l=a.line;l<=i.line;++l)i.line>a.line&&l==i.line&&0==i.ch||r.push({anchor:l==a.line?a:n(l,0),head:l==i.line?i:n(l)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],o=0;o<t.length;o++){var a=t[o];r.push({anchor:n(a.from().line,0),head:n(a.to().line+1,0)})}e.setSelections(r)},t.insertLineAfter=function(e){return a(e,!1)},t.insertLineBefore=function(e){return a(e,!0)},t.selectNextOccurrence=function(t){var r=t.getCursor("from"),o=t.getCursor("to"),a=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(r,o)){var l=i(t,r);if(!l.word)return;t.setSelection(l.from,l.to),a=!0}else{var s=t.getRange(r,o),c=a?new RegExp("\\b"+s+"\\b"):s,d=t.getSearchCursor(c,o),f=d.findNext();if(f||(f=(d=t.getSearchCursor(c,n(t.firstLine(),0))).findNext()),!f||u(t.listSelections(),d.from(),d.to()))return;t.addSelection(d.from(),d.to())}a&&(t.state.sublimeFindFullWord=t.doc.sel)},t.skipAndSelectNextOccurrence=function(n){var r=n.getCursor("anchor"),o=n.getCursor("head");t.selectNextOccurrence(n),0!=e.cmpPos(r,o)&&n.doc.setSelections(n.doc.listSelections().filter((function(e){return e.anchor!=r||e.head!=o})))},t.addCursorToPrevLine=function(e){l(e,-1)},t.addCursorToNextLine=function(e){l(e,1)};var s="(){}[]";function c(t){for(var r=t.listSelections(),o=[],a=0;a<r.length;a++){var i=r[a],l=i.head,u=t.scanForBracket(l,-1);if(!u)return!1;for(;;){var c=t.scanForBracket(l,1);if(!c)return!1;if(c.ch==s.charAt(s.indexOf(u.ch)+1)){var d=n(u.pos.line,u.pos.ch+1);if(0!=e.cmpPos(d,i.from())||0!=e.cmpPos(c.pos,i.to())){o.push({anchor:d,head:c.pos});break}if(!(u=t.scanForBracket(u.pos,-1)))return!1}l=n(c.pos.line,c.pos.ch+1)}}return t.setSelections(o),!0}function d(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}function f(t,r,o){if(t.isReadOnly())return e.Pass;for(var a,i=t.listSelections(),l=[],u=0;u<i.length;u++){var s=i[u];if(!s.empty()){for(var c=s.from().line,d=s.to().line;u<i.length-1&&i[u+1].from().line==d;)d=i[++u].to().line;i[u].to().ch||d--,l.push(c,d)}}l.length?a=!0:l.push(t.firstLine(),t.lastLine()),t.operation((function(){for(var e=[],i=0;i<l.length;i+=2){var u=l[i],s=l[i+1],c=n(u,0),d=n(s),f=t.getRange(c,d,!1);r?f.sort((function(e,t){return e<t?-o:e==t?0:o})):f.sort((function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-o:e==t?0:o})),t.replaceRange(f,c,d),a&&e.push({anchor:c,head:n(s+1,0)})}a&&t.setSelections(e,0)}))}function p(t,n){t.operation((function(){for(var r=t.listSelections(),o=[],a=[],l=0;l<r.length;l++)(s=r[l]).empty()?(o.push(l),a.push("")):a.push(n(t.getRange(s.from(),s.to())));var u;for(t.replaceSelections(a,"around","case"),l=o.length-1;l>=0;l--){var s=r[o[l]];if(!(u&&e.cmpPos(s.head,u)>0)){var c=i(t,s.head);u=c.from,t.replaceRange(n(c.word),c.from,c.to)}}}))}function h(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var o=i(t,n);if(!o.word)return;n=o.from,r=o.to}return{from:n,to:r,query:t.getRange(n,r),word:o}}function m(e,t){var r=h(e);if(r){var o=r.query,a=e.getSearchCursor(o,t?r.to:r.from);(t?a.findNext():a.findPrevious())?e.setSelection(a.from(),a.to()):(a=e.getSearchCursor(o,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?a.findNext():a.findPrevious())?e.setSelection(a.from(),a.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){c(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!c(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var o=t.scanForBracket(r.head,1,d(t.getTokenTypeAt(r.head)));if(o&&0!=e.cmpPos(o.pos,r.head))return o.pos;var a=t.scanForBracket(r.head,-1,d(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return a&&n(a.pos.line,a.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),o=[],a=t.firstLine()-1,i=[],l=0;l<r.length;l++){var u=r[l],s=u.from().line-1,c=u.to().line;i.push({anchor:n(u.anchor.line-1,u.anchor.ch),head:n(u.head.line-1,u.head.ch)}),0!=u.to().ch||u.empty()||--c,s>a?o.push(s,c):o.length&&(o[o.length-1]=c),a=c}t.operation((function(){for(var e=0;e<o.length;e+=2){var r=o[e],a=o[e+1],l=t.getLine(r);t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),a>t.lastLine()?t.replaceRange("\n"+l,n(t.lastLine()),null,"+swapLine"):t.replaceRange(l+"\n",n(a,0),null,"+swapLine")}t.setSelections(i),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),o=[],a=t.lastLine()+1,i=r.length-1;i>=0;i--){var l=r[i],u=l.to().line+1,s=l.from().line;0!=l.to().ch||l.empty()||u--,u<a?o.push(u,s):o.length&&(o[o.length-1]=s),a=s}t.operation((function(){for(var e=o.length-2;e>=0;e-=2){var r=o[e],a=o[e+1],i=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(i+"\n",n(a,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],o=0;o<t.length;o++){for(var a=t[o],i=a.from(),l=i.line,u=a.to().line;o<t.length-1&&t[o+1].from().line==u;)u=t[++o].to().line;r.push({start:l,end:u,anchor:!a.empty()&&i})}e.operation((function(){for(var t=0,o=[],a=0;a<r.length;a++){for(var i,l=r[a],u=l.anchor&&n(l.anchor.line-t,l.anchor.ch),s=l.start;s<=l.end;s++){var c=s-t;s==l.end&&(i=n(c,e.getLine(c).length+1)),c<e.lastLine()&&(e.replaceRange(" ",n(c),n(c+1,/^\s*/.exec(e.getLine(c+1))[0].length)),++t)}o.push({anchor:u||i,head:i})}e.setSelections(o,0)}))},t.duplicateLine=function(e){e.operation((function(){for(var t=e.listSelections().length,r=0;r<t;r++){var o=e.listSelections()[r];o.empty()?e.replaceRange(e.getLine(o.head.line)+"\n",n(o.head.line,0)):e.replaceRange(e.getRange(o.from(),o.to()),o.from())}e.scrollIntoView()}))},t.sortLines=function(e){f(e,!0,1)},t.reverseSortLines=function(e){f(e,!0,-1)},t.sortLinesInsensitive=function(e){f(e,!1,1)},t.reverseSortLinesInsensitive=function(e){f(e,!1,-1)},t.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},t.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},t.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var o=t[r].from(),a=t[r].to(),i=t[r].empty()?e.findMarksAt(o):e.findMarks(o,a),l=0;l<i.length;l++)if(i[l].sublimeBookmark){i[l].clear();for(var u=0;u<n.length;u++)n[u]==i[l]&&n.splice(u--,1);break}l==i.length&&n.push(e.markText(o,a,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},t.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},t.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var o=t[r].find();o?n.push({anchor:o.from,head:o.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},t.smartBackspace=function(t){if(t.somethingSelected())return e.Pass;t.operation((function(){for(var r=t.listSelections(),o=t.getOption("indentUnit"),a=r.length-1;a>=0;a--){var i=r[a].head,l=t.getRange({line:i.line,ch:0},i),u=e.countColumn(l,null,t.getOption("tabSize")),s=t.findPosH(i,-1,"char",!1);if(l&&!/\S/.test(l)&&u%o==0){var c=new n(i.line,e.findColumn(l,u-o,o));c.ch!=i.ch&&(s=c)}t.replaceRange("",s,i,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){p(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){p(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),o=n;if(e.cmpPos(r,o)>0){var a=o;o=r,r=a}t.state.sublimeKilled=t.getRange(r,o),t.replaceRange("",r,o)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){m(e,!0)},t.findUnderPrevious=function(e){m(e,!1)},t.findAllUnder=function(e){var t=h(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],o=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&o++;e.setSelections(r,o)}};var y=e.keyMap;y.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(y.macSublime),y.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(y.pcSublime);var g=y.default==y.macDefault;y.sublime=g?y.macSublime:y.pcSublime}(n(1482),n(1508),n(1534))},function(e,t,n){!function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function n(e,t,n){var r=e.current(),o=r.search(t);return o>-1?e.backUp(r.length-o):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}var r={};function o(e){var t=r[e];return t||(r[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function a(e,t){var n=e.match(o(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"</\\s*"+e+"\\s*>","i")}function l(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),o=e[n],a=o.length-1;a>=0;a--)r.unshift(o[a])}function u(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(a(t,r[0])))return r[2]}}e.defineMode("htmlmixed",(function(r,o){var a=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag,allowMissingTagName:o.allowMissingTagName}),s={},c=o&&o.tags,d=o&&o.scriptTypes;if(l(t,s),c&&l(c,s),d)for(var f=d.length-1;f>=0;f--)s.script.unshift(["type",d[f].matches,d[f].mode]);function p(t,o){var l,c=a.token(t,o.htmlState),d=/\btag\b/.test(c);if(d&&!/[<>\s\/]/.test(t.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&s.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&d&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var h=">"==t.current()&&u(s[f[1]],f[2]),m=e.getMode(r,h),y=i(f[1],!0),g=i(f[1],!1);o.token=function(e,t){return e.match(y,!1)?(t.token=p,t.localState=t.localMode=null,null):n(e,g,t.localMode.token(e,t.localState))},o.localMode=m,o.localState=e.startState(m,a.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=t.current(),t.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:e.startState(a)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(a,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?a.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||a}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(n(1482),n(1650),n(1651),n(1509))},function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,o){var a,i,l=r.indentUnit,u={},s=o.htmlMode?t:n;for(var c in s)u[c]=s[c];for(var c in o)u[c]=o[c];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=d,a=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return a="equals",null;if("<"==n){t.tokenize=d,t.state=_,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=p(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=f;break}return"string"};return t.isInAttribute=!0,t}function h(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function m(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=m(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=d;break}return n.tokenize=m(e-1),n.tokenize(t,n)}}return"meta"}}function y(e){return e&&e.toLowerCase()}function g(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function b(e){e.context&&(e.context=e.context.prev)}function v(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!u.contextGrabbers.hasOwnProperty(y(n))||!u.contextGrabbers[y(n)].hasOwnProperty(y(t)))return;b(e)}}function _(e,t,n){return"openTag"==e?(n.tagStart=t.column(),w):"closeTag"==e?O:_}function w(e,t,n){return"word"==e?(n.tagName=t.current(),i="tag",C):u.allowMissingTagName&&"endTag"==e?(i="tag bracket",C(e,t,n)):(i="error",w)}function O(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(y(n.context.tagName))&&b(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(i="tag",k):(i="tag error",S)}return u.allowMissingTagName&&"endTag"==e?(i="tag bracket",k(e,t,n)):(i="error",S)}function k(e,t,n){return"endTag"!=e?(i="error",k):(b(n),_)}function S(e,t,n){return i="error",k(e,t,n)}function C(e,t,n){if("word"==e)return i="attribute",E;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||u.autoSelfClosers.hasOwnProperty(y(r))?v(n,r):(v(n,r),n.context=new g(n,r,o==n.indented)),_}return i="error",C}function E(e,t,n){return"equals"==e?P:(u.allowMissing||(i="error"),C(e,t,n))}function P(e,t,n){return"string"==e?T:"word"==e&&u.allowUnquoted?(i="string",C):(i="error",C(e,t,n))}function T(e,t,n){return"string"==e?T:C(e,t,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:_,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(i=null,t.state=t.state(a||n,e,t),i&&(n="error"==i?n+" error":i)),n},indent:function(t,n,r){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var a=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(a&&a[1])for(;o;){if(o.tagName==a[2]){o=o.prev;break}if(!u.implicitlyClosed.hasOwnProperty(y(o.tagName)))break;o=o.prev}else if(a)for(;o;){var i=u.contextGrabbers[y(o.tagName)];if(!i||!i.hasOwnProperty(y(a[2])))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(e){e.state==P&&(e.state=C)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(1482))},function(e,t,n){!function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,o,a=t.indentUnit,i=n.statementIndent,l=n.jsonld,u=n.json||l,s=!1!==n.trackScope,c=n.typescript,d=n.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),o=e("keyword d"),a=e("operator"),i={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:o,break:o,continue:o,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),p=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function y(e,t,n){return r=e,o=n,t}function g(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=b(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return y("number","number");if("."==n&&e.match(".."))return y("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return y(n);if("="==n&&e.eat(">"))return y("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return y("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),y("number","number");if("/"==n)return e.eat("*")?(t.tokenize=v,v(e,t)):e.eat("/")?(e.skipToEnd(),y("comment","comment")):ot(e,t,1)?(m(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),y("regexp","string-2")):(e.eat("="),y("operator","operator",e.current()));if("`"==n)return t.tokenize=_,_(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),y("meta","meta");if("#"==n&&e.eatWhile(d))return y("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),y("comment","comment");if(p.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?y("."):y("operator","operator",e.current());if(d.test(n)){e.eatWhile(d);var r=e.current();if("."!=t.lastType){if(f.propertyIsEnumerable(r)){var o=f[r];return y(o.type,o.style,r)}if("async"==r&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return y("async","keyword",r)}return y("variable","variable",r)}}function b(e){return function(t,n){var r,o=!1;if(l&&"@"==t.peek()&&t.match(h))return n.tokenize=g,y("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||o);)o=!o&&"\\"==r;return o||(n.tokenize=g),y("string","string")}}function v(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return y("comment","comment")}function _(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return y("quasi","string-2",e.current())}var w="([{}])";function O(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var o=0,a=!1,i=n-1;i>=0;--i){var l=e.string.charAt(i),u=w.indexOf(l);if(u>=0&&u<3){if(!o){++i;break}if(0==--o){"("==l&&(a=!0);break}}else if(u>=3&&u<6)++o;else if(d.test(l))a=!0;else if(/["'\/`]/.test(l))for(;;--i){if(0==i)return;if(e.string.charAt(i-1)==l&&"\\"!=e.string.charAt(i-2)){i--;break}}else if(a&&!o){++i;break}}a&&!o&&(t.fatArrowAt=i)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(e,t,n,r,o,a){this.indented=e,this.column=t,this.type=n,this.prev=o,this.info=a,null!=r&&(this.align=r)}function C(e,t){if(!s)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function E(e,t,n,r,o){var a=e.cc;for(P.state=e,P.stream=o,P.marked=null,P.cc=a,P.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((a.length?a.pop():u?z:G)(n,r)){for(;a.length&&a[a.length-1].lex;)a.pop()();return P.marked?P.marked:"variable"==n&&C(e,r)?"variable-2":t}}var P={state:null,column:null,marked:null,cc:null};function T(){for(var e=arguments.length-1;e>=0;e--)P.cc.push(arguments[e])}function M(){return T.apply(null,arguments),!0}function j(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function x(e){var t=P.state;if(P.marked="def",s){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=D(e,t.context);if(null!=r)return void(t.context=r)}else if(!j(e,t.localVars))return void(t.localVars=new R(e,t.localVars));n.globalVars&&!j(e,t.globalVars)&&(t.globalVars=new R(e,t.globalVars))}}function D(e,t){if(t){if(t.block){var n=D(e,t.prev);return n?n==t.prev?t:new L(n,t.vars,!0):null}return j(e,t.vars)?t:new L(t.prev,new R(e,t.vars),!1)}return null}function N(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function L(e,t,n){this.prev=e,this.vars=t,this.block=n}function R(e,t){this.name=e,this.next=t}var A=new R("this",new R("arguments",null));function I(){P.state.context=new L(P.state.context,P.state.localVars,!1),P.state.localVars=A}function B(){P.state.context=new L(P.state.context,P.state.localVars,!0),P.state.localVars=null}function F(){P.state.localVars=P.state.context.vars,P.state.context=P.state.context.prev}function W(e,t){var n=function(){var n=P.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var o=n.lexical;o&&")"==o.type&&o.align;o=o.prev)r=o.indented;n.lexical=new S(r,P.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function V(){var e=P.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function U(e){function t(n){return n==e?M():";"==e||"}"==n||")"==n||"]"==n?T():M(t)}return t}function G(e,t){return"var"==e?M(W("vardef",t),Te,U(";"),V):"keyword a"==e?M(W("form"),K,G,V):"keyword b"==e?M(W("form"),G,V):"keyword d"==e?P.stream.match(/^\s*$/,!1)?M():M(W("stat"),Y,U(";"),V):"debugger"==e?M(U(";")):"{"==e?M(W("}"),B,fe,V,F):";"==e?M():"if"==e?("else"==P.state.lexical.info&&P.state.cc[P.state.cc.length-1]==V&&P.state.cc.pop()(),M(W("form"),K,G,V,Le)):"function"==e?M(Be):"for"==e?M(W("form"),B,Re,G,F,V):"class"==e||c&&"interface"==t?(P.marked="keyword",M(W("form","class"==e?e:t),Ge,V)):"variable"==e?c&&"declare"==t?(P.marked="keyword",M(G)):c&&("module"==t||"enum"==t||"type"==t)&&P.stream.match(/^\s*\w/,!1)?(P.marked="keyword","enum"==t?M(tt):"type"==t?M(We,U("operator"),ge,U(";")):M(W("form"),Me,U("{"),W("}"),fe,V,V)):c&&"namespace"==t?(P.marked="keyword",M(W("form"),z,G,V)):c&&"abstract"==t?(P.marked="keyword",M(G)):M(W("stat"),ae):"switch"==e?M(W("form"),K,U("{"),W("}","switch"),B,fe,V,V,F):"case"==e?M(z,U(":")):"default"==e?M(U(":")):"catch"==e?M(W("form"),I,H,G,V,F):"export"==e?M(W("stat"),Ke,V):"import"==e?M(W("stat"),Ye,V):"async"==e?M(G):"@"==t?M(z,G):T(W("stat"),z,U(";"),V)}function H(e){if("("==e)return M(Ve,U(")"))}function z(e,t){return $(e,t,!1)}function q(e,t){return $(e,t,!0)}function K(e){return"("!=e?T():M(W(")"),Y,U(")"),V)}function $(e,t,n){if(P.state.fatArrowAt==P.stream.start){var r=n?te:ee;if("("==e)return M(I,W(")"),ce(Ve,")"),V,U("=>"),r,F);if("variable"==e)return T(I,Me,U("=>"),r,F)}var o=n?J:X;return k.hasOwnProperty(e)?M(o):"function"==e?M(Be,o):"class"==e||c&&"interface"==t?(P.marked="keyword",M(W("form"),Ue,V)):"keyword c"==e||"async"==e?M(n?q:z):"("==e?M(W(")"),Y,U(")"),V,o):"operator"==e||"spread"==e?M(n?q:z):"["==e?M(W("]"),et,V,o):"{"==e?de(le,"}",null,o):"quasi"==e?T(Q,o):"new"==e?M(ne(n)):M()}function Y(e){return e.match(/[;\}\)\],]/)?T():T(z)}function X(e,t){return","==e?M(Y):J(e,t,!1)}function J(e,t,n){var r=0==n?X:J,o=0==n?z:q;return"=>"==e?M(I,n?te:ee,F):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?M(r):c&&"<"==t&&P.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?M(W(">"),ce(ge,">"),V,r):"?"==t?M(z,U(":"),o):M(o):"quasi"==e?T(Q,r):";"!=e?"("==e?de(q,")","call",r):"."==e?M(ie,r):"["==e?M(W("]"),Y,U("]"),V,r):c&&"as"==t?(P.marked="keyword",M(ge,r)):"regexp"==e?(P.state.lastType=P.marked="operator",P.stream.backUp(P.stream.pos-P.stream.start-1),M(o)):void 0:void 0}function Q(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?M(Q):M(Y,Z)}function Z(e){if("}"==e)return P.marked="string-2",P.state.tokenize=_,M(Q)}function ee(e){return O(P.stream,P.state),T("{"==e?G:z)}function te(e){return O(P.stream,P.state),T("{"==e?G:q)}function ne(e){return function(t){return"."==t?M(e?oe:re):"variable"==t&&c?M(Ce,e?J:X):T(e?q:z)}}function re(e,t){if("target"==t)return P.marked="keyword",M(X)}function oe(e,t){if("target"==t)return P.marked="keyword",M(J)}function ae(e){return":"==e?M(V,G):T(X,U(";"),V)}function ie(e){if("variable"==e)return P.marked="property",M()}function le(e,t){return"async"==e?(P.marked="property",M(le)):"variable"==e||"keyword"==P.style?(P.marked="property","get"==t||"set"==t?M(ue):(c&&P.state.fatArrowAt==P.stream.start&&(n=P.stream.match(/^\s*:\s*/,!1))&&(P.state.fatArrowAt=P.stream.pos+n[0].length),M(se))):"number"==e||"string"==e?(P.marked=l?"property":P.style+" property",M(se)):"jsonld-keyword"==e?M(se):c&&N(t)?(P.marked="keyword",M(le)):"["==e?M(z,pe,U("]"),se):"spread"==e?M(q,se):"*"==t?(P.marked="keyword",M(le)):":"==e?T(se):void 0;var n}function ue(e){return"variable"!=e?T(se):(P.marked="property",M(Be))}function se(e){return":"==e?M(q):"("==e?T(Be):void 0}function ce(e,t,n){function r(o,a){if(n?n.indexOf(o)>-1:","==o){var i=P.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),M((function(n,r){return n==t||r==t?T():T(e)}),r)}return o==t||a==t?M():n&&n.indexOf(";")>-1?T(e):M(U(t))}return function(n,o){return n==t||o==t?M():T(e,r)}}function de(e,t,n){for(var r=3;r<arguments.length;r++)P.cc.push(arguments[r]);return M(W(t,n),ce(e,t),V)}function fe(e){return"}"==e?M():T(G,fe)}function pe(e,t){if(c){if(":"==e)return M(ge);if("?"==t)return M(pe)}}function he(e,t){if(c&&(":"==e||"in"==t))return M(ge)}function me(e){if(c&&":"==e)return P.stream.match(/^\s*\w+\s+is\b/,!1)?M(z,ye,ge):M(ge)}function ye(e,t){if("is"==t)return P.marked="keyword",M()}function ge(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(P.marked="keyword",M("typeof"==t?q:ge)):"variable"==e||"void"==t?(P.marked="type",M(Se)):"|"==t||"&"==t?M(ge):"string"==e||"number"==e||"atom"==e?M(Se):"["==e?M(W("]"),ce(ge,"]",","),V,Se):"{"==e?M(W("}"),ve,V,Se):"("==e?M(ce(ke,")"),be,Se):"<"==e?M(ce(ge,">"),ge):"quasi"==e?T(we,Se):void 0}function be(e){if("=>"==e)return M(ge)}function ve(e){return e.match(/[\}\)\]]/)?M():","==e||";"==e?M(ve):T(_e,ve)}function _e(e,t){return"variable"==e||"keyword"==P.style?(P.marked="property",M(_e)):"?"==t||"number"==e||"string"==e?M(_e):":"==e?M(ge):"["==e?M(U("variable"),he,U("]"),_e):"("==e?T(Fe,_e):e.match(/[;\}\)\],]/)?void 0:M()}function we(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?M(we):M(ge,Oe)}function Oe(e){if("}"==e)return P.marked="string-2",P.state.tokenize=_,M(we)}function ke(e,t){return"variable"==e&&P.stream.match(/^\s*[?:]/,!1)||"?"==t?M(ke):":"==e?M(ge):"spread"==e?M(ke):T(ge)}function Se(e,t){return"<"==t?M(W(">"),ce(ge,">"),V,Se):"|"==t||"."==e||"&"==t?M(ge):"["==e?M(ge,U("]"),Se):"extends"==t||"implements"==t?(P.marked="keyword",M(ge)):"?"==t?M(ge,U(":"),ge):void 0}function Ce(e,t){if("<"==t)return M(W(">"),ce(ge,">"),V,Se)}function Ee(){return T(ge,Pe)}function Pe(e,t){if("="==t)return M(ge)}function Te(e,t){return"enum"==t?(P.marked="keyword",M(tt)):T(Me,pe,De,Ne)}function Me(e,t){return c&&N(t)?(P.marked="keyword",M(Me)):"variable"==e?(x(t),M()):"spread"==e?M(Me):"["==e?de(xe,"]"):"{"==e?de(je,"}"):void 0}function je(e,t){return"variable"!=e||P.stream.match(/^\s*:/,!1)?("variable"==e&&(P.marked="property"),"spread"==e?M(Me):"}"==e?T():"["==e?M(z,U("]"),U(":"),je):M(U(":"),Me,De)):(x(t),M(De))}function xe(){return T(Me,De)}function De(e,t){if("="==t)return M(q)}function Ne(e){if(","==e)return M(Te)}function Le(e,t){if("keyword b"==e&&"else"==t)return M(W("form","else"),G,V)}function Re(e,t){return"await"==t?M(Re):"("==e?M(W(")"),Ae,V):void 0}function Ae(e){return"var"==e?M(Te,Ie):"variable"==e?M(Ie):T(Ie)}function Ie(e,t){return")"==e?M():";"==e?M(Ie):"in"==t||"of"==t?(P.marked="keyword",M(z,Ie)):T(z,Ie)}function Be(e,t){return"*"==t?(P.marked="keyword",M(Be)):"variable"==e?(x(t),M(Be)):"("==e?M(I,W(")"),ce(Ve,")"),V,me,G,F):c&&"<"==t?M(W(">"),ce(Ee,">"),V,Be):void 0}function Fe(e,t){return"*"==t?(P.marked="keyword",M(Fe)):"variable"==e?(x(t),M(Fe)):"("==e?M(I,W(")"),ce(Ve,")"),V,me,F):c&&"<"==t?M(W(">"),ce(Ee,">"),V,Fe):void 0}function We(e,t){return"keyword"==e||"variable"==e?(P.marked="type",M(We)):"<"==t?M(W(">"),ce(Ee,">"),V):void 0}function Ve(e,t){return"@"==t&&M(z,Ve),"spread"==e?M(Ve):c&&N(t)?(P.marked="keyword",M(Ve)):c&&"this"==e?M(pe,De):T(Me,pe,De)}function Ue(e,t){return"variable"==e?Ge(e,t):He(e,t)}function Ge(e,t){if("variable"==e)return x(t),M(He)}function He(e,t){return"<"==t?M(W(">"),ce(Ee,">"),V,He):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(P.marked="keyword"),M(c?ge:z,He)):"{"==e?M(W("}"),ze,V):void 0}function ze(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&N(t))&&P.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(P.marked="keyword",M(ze)):"variable"==e||"keyword"==P.style?(P.marked="property",M(qe,ze)):"number"==e||"string"==e?M(qe,ze):"["==e?M(z,pe,U("]"),qe,ze):"*"==t?(P.marked="keyword",M(ze)):c&&"("==e?T(Fe,ze):";"==e||","==e?M(ze):"}"==e?M():"@"==t?M(z,ze):void 0}function qe(e,t){if("!"==t)return M(qe);if("?"==t)return M(qe);if(":"==e)return M(ge,De);if("="==t)return M(q);var n=P.state.lexical.prev;return T(n&&"interface"==n.info?Fe:Be)}function Ke(e,t){return"*"==t?(P.marked="keyword",M(Ze,U(";"))):"default"==t?(P.marked="keyword",M(z,U(";"))):"{"==e?M(ce($e,"}"),Ze,U(";")):T(G)}function $e(e,t){return"as"==t?(P.marked="keyword",M(U("variable"))):"variable"==e?T(q,$e):void 0}function Ye(e){return"string"==e?M():"("==e?T(z):"."==e?T(X):T(Xe,Je,Ze)}function Xe(e,t){return"{"==e?de(Xe,"}"):("variable"==e&&x(t),"*"==t&&(P.marked="keyword"),M(Qe))}function Je(e){if(","==e)return M(Xe,Je)}function Qe(e,t){if("as"==t)return P.marked="keyword",M(Xe)}function Ze(e,t){if("from"==t)return P.marked="keyword",M(z)}function et(e){return"]"==e?M():T(ce(q,"]"))}function tt(){return T(W("form"),Me,U("{"),W("}"),ce(nt,"}"),V,V)}function nt(){return T(Me,De)}function rt(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function ot(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return I.lex=B.lex=!0,F.lex=!0,V.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new S((e||0)-a,0,"block",!1),localVars:n.localVars,context:n.localVars&&new L(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),O(e,t)),t.tokenize!=v&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=o&&"--"!=o?r:"incdec",E(t,n,r,o,e))},indent:function(t,r){if(t.tokenize==v||t.tokenize==_)return e.Pass;if(t.tokenize!=g)return 0;var o,l=r&&r.charAt(0),u=t.lexical;if(!/^\s*else\b/.test(r))for(var s=t.cc.length-1;s>=0;--s){var c=t.cc[s];if(c==V)u=u.prev;else if(c!=Le&&c!=F)break}for(;("stat"==u.type||"form"==u.type)&&("}"==l||(o=t.cc[t.cc.length-1])&&(o==X||o==J)&&!/^[,\.=+\-*:?[\(]/.test(r));)u=u.prev;i&&")"==u.type&&"stat"==u.prev.type&&(u=u.prev);var d=u.type,f=l==d;return"vardef"==d?u.indented+("operator"==t.lastType||","==t.lastType?u.info.length+1:0):"form"==d&&"{"==l?u.indented:"form"==d?u.indented+a:"stat"==d?u.indented+(rt(t,r)?i||a:0):"switch"!=u.info||f||0==n.doubleIndentSwitch?u.align?u.column+(f?0:1):u.indented+(f?0:a):u.indented+(/^(?:case|default)\b/.test(r)?a:2*a)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",blockCommentContinue:u?null:" * ",lineComment:u?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:u?"json":"javascript",jsonldMode:l,jsonMode:u,expressionAllowed:ot,skipExpression:function(t){E(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(1482))},function(e,t,n){!function(e){"use strict";var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var o in n)r[o]=n[o];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=i(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var o=0;o<n.length;o++)if(n[o].head.line!=n[o].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var a=this.state.completionActive=new r(this,t);a.options.hint&&(e.signal(this,"startCompletion",this),a.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var o=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},a=window.cancelAnimationFrame||clearTimeout;function i(e,t,n){var r=e.options.hintOptions,o={};for(var a in h)o[a]=h[a];if(r)for(var a in r)void 0!==r[a]&&(o[a]=r[a]);if(n)for(var a in n)void 0!==n[a]&&(o[a]=n[a]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}function l(e){return"string"==typeof e?e:e.text}function u(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,o=r?{}:n;function a(e,r){var a;a="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,o[e]=a}if(r)for(var i in r)r.hasOwnProperty(i)&&a(i,r[i]);var l=e.options.extraKeys;if(l)for(var i in l)l.hasOwnProperty(i)&&a(i,l[i]);return o}function s(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function c(r,o){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=r,this.data=o,this.picked=!1;var a=this,i=r.cm,c=i.getInputField().ownerDocument,d=c.defaultView||c.parentWindow,f=this.hints=c.createElement("ul");f.setAttribute("role","listbox"),f.setAttribute("aria-expanded","true"),f.id=this.id;var p=r.cm.options.theme;f.className="CodeMirror-hints "+p,this.selectedHint=o.selectedHint||0;for(var h=o.list,m=0;m<h.length;++m){var y=f.appendChild(c.createElement("li")),g=h[m],b=t+(m!=this.selectedHint?"":" "+n);null!=g.className&&(b=g.className+" "+b),y.className=b,m==this.selectedHint&&y.setAttribute("aria-selected","true"),y.id=this.id+"-"+m,y.setAttribute("role","option"),g.render?g.render(y,o,g):y.appendChild(c.createTextNode(g.displayText||l(g))),y.hintId=m}var v=r.options.container||c.body,_=i.cursorCoords(r.options.alignWithWord?o.from:null),w=_.left,O=_.bottom,k=!0,S=0,C=0;if(v!==c.body){var E=-1!==["absolute","relative","fixed"].indexOf(d.getComputedStyle(v).position)?v:v.offsetParent,P=E.getBoundingClientRect(),T=c.body.getBoundingClientRect();S=P.left-T.left-E.scrollLeft,C=P.top-T.top-E.scrollTop}f.style.left=w-S+"px",f.style.top=O-C+"px";var M=d.innerWidth||Math.max(c.body.offsetWidth,c.documentElement.offsetWidth),j=d.innerHeight||Math.max(c.body.offsetHeight,c.documentElement.offsetHeight);v.appendChild(f),i.getInputField().setAttribute("aria-autocomplete","list"),i.getInputField().setAttribute("aria-owns",this.id),i.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var x,D=r.options.moveOnOverlap?f.getBoundingClientRect():new DOMRect,N=!!r.options.paddingForScrollbar&&f.scrollHeight>f.clientHeight+1;if(setTimeout((function(){x=i.getScrollInfo()})),D.bottom-j>0){var L=D.bottom-D.top;if(_.top-(_.bottom-D.top)-L>0)f.style.top=(O=_.top-L-C)+"px",k=!1;else if(L>j){f.style.height=j-5+"px",f.style.top=(O=_.bottom-D.top-C)+"px";var R=i.getCursor();o.from.ch!=R.ch&&(_=i.cursorCoords(R),f.style.left=(w=_.left-S)+"px",D=f.getBoundingClientRect())}}var A,I=D.right-M;if(N&&(I+=i.display.nativeBarWidth),I>0&&(D.right-D.left>M&&(f.style.width=M-5+"px",I-=D.right-D.left-M),f.style.left=(w=_.left-I-S)+"px"),N)for(var B=f.firstChild;B;B=B.nextSibling)B.style.paddingRight=i.display.nativeBarWidth+"px";i.addKeyMap(this.keyMap=u(r,{moveFocus:function(e,t){a.changeActive(a.selectedHint+e,t)},setFocus:function(e){a.changeActive(e)},menuSize:function(){return a.screenAmount()},length:h.length,close:function(){r.close()},pick:function(){a.pick()},data:o})),r.options.closeOnUnfocus&&(i.on("blur",this.onBlur=function(){A=setTimeout((function(){r.close()}),100)}),i.on("focus",this.onFocus=function(){clearTimeout(A)})),i.on("scroll",this.onScroll=function(){var e=i.getScrollInfo(),t=i.getWrapperElement().getBoundingClientRect();x||(x=i.getScrollInfo());var n=O+x.top-e.top,o=n-(d.pageYOffset||(c.documentElement||c.body).scrollTop);if(k||(o+=f.offsetHeight),o<=t.top||o>=t.bottom)return r.close();f.style.top=n+"px",f.style.left=w+x.left-e.left+"px"}),e.on(f,"dblclick",(function(e){var t=s(f,e.target||e.srcElement);t&&null!=t.hintId&&(a.changeActive(t.hintId),a.pick())})),e.on(f,"click",(function(e){var t=s(f,e.target||e.srcElement);t&&null!=t.hintId&&(a.changeActive(t.hintId),r.options.completeOnSingleClick&&a.pick())})),e.on(f,"mousedown",(function(){setTimeout((function(){i.focus()}),20)}));var F=this.getSelectedHintRange();return 0===F.from&&0===F.to||this.scrollToActive(),e.signal(o,"select",h[this.selectedHint],f.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function f(e,t,n,r){if(e.async)e(t,r,n);else{var o=e(t,n);o&&o.then?o.then(r):r(o)}}function p(t,n){var r,o=t.getHelpers(n,"hint");if(o.length){var a=function(e,t,n){var r=d(e,o);function a(o){if(o==r.length)return t(null);f(r[o],e,n,(function(e){e&&e.list.length>0?t(e):a(o+1)}))}a(0)};return a.async=!0,a.supportsSelection=!0,a}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],o=this;this.cm.operation((function(){r.hint?r.hint(o.cm,t,r):o.cm.replaceRange(l(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),o.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(a(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var r=this;this.debounce=o((function(){r.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;f(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new c(this,t),e.signal(t,"shown")))}},c.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,r){if(t>=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+n,""),o.removeAttribute("aria-selected")),(o=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,o.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",o.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],o)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",(function(t,n){var r,o=t.getCursor(),a=t.getTokenAt(o),i=e.Pos(o.line,a.start),l=o;a.start<o.ch&&/\w/.test(a.string.charAt(o.ch-a.start-1))?r=a.string.substr(0,o.ch-a.start):(r="",i=o);for(var u=[],s=0;s<n.words.length;s++){var c=n.words[s];c.slice(0,r.length)==r&&u.push(c)}if(u.length)return{list:u,from:i,to:l}})),e.commands.autocomplete=e.showHint;var h={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(n(1482))},function(e,t,n){!function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(n){var r=n.getCursor(),o=n.getTokenAt(r),a=e.innerMode(n.getMode(),o.state);if("css"==a.mode.name){if("keyword"==o.type&&0=="!important".indexOf(o.string))return{list:["!important"],from:e.Pos(r.line,o.start),to:e.Pos(r.line,o.end)};var i=o.start,l=r.ch,u=o.string.slice(0,l-i);/[^\w$_-]/.test(u)&&(u="",i=l=r.ch);var s=e.resolveMode("text/css"),c=[],d=a.state.state;return"pseudo"==d||"variable-3"==o.type?f(t):"block"==d||"maybeprop"==d?f(s.propertyKeywords):"prop"==d||"parens"==d||"at"==d||"params"==d?(f(s.valueKeywords),f(s.colorKeywords)):"media"!=d&&"media_parens"!=d||(f(s.mediaTypes),f(s.mediaFeatures)),c.length?{list:c,from:e.Pos(r.line,i),to:e.Pos(r.line,l)}:void 0}function f(e){for(var t in e)u&&0!=t.lastIndexOf(u,0)||c.push(t)}}))}(n(1482),n(1509))},function(e,t,n){!function(e){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),n=["_blank","_self","_top","_parent"],r=["ascii","utf-8","utf-16","latin1","latin1"],o=["get","post","put","delete"],a=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],i=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],l={attrs:{}},u={a:{attrs:{href:null,ping:null,type:null,media:i,target:n,hreflang:t}},abbr:l,acronym:l,address:l,applet:l,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:i,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:l,aside:l,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:l,base:{attrs:{href:null,target:n}},basefont:l,bdi:l,bdo:l,big:l,blockquote:{attrs:{cite:null}},body:l,br:l,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:a,formmethod:o,formnovalidate:["","novalidate"],formtarget:n,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:l,center:l,cite:l,code:l,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:l,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:l,dir:l,div:l,dialog:{attrs:{open:null}},dl:l,dt:l,em:l,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:l,figure:l,font:l,footer:l,form:{attrs:{action:null,name:null,"accept-charset":r,autocomplete:["on","off"],enctype:a,method:o,novalidate:["","novalidate"],target:n}},frame:l,frameset:l,h1:l,h2:l,h3:l,h4:l,h5:l,h6:l,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:l,hgroup:l,hr:l,html:{attrs:{manifest:null},children:["head","body"]},i:l,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:a,formmethod:o,formnovalidate:["","novalidate"],formtarget:n,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:l,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:l,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:i,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:l,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:r,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:l,noframes:l,noscript:l,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:l,param:{attrs:{name:null,value:null}},pre:l,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:l,rt:l,ruby:l,s:l,samp:l,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:r}},section:l,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:l,source:{attrs:{src:null,type:null,media:null}},span:l,strike:l,strong:l,style:{attrs:{type:["text/css"],media:i,scoped:null}},sub:l,summary:l,sup:l,table:l,tbody:l,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:l,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:l,time:{attrs:{datetime:null}},title:l,tr:l,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:t}},tt:l,u:l,ul:l,var:l,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:l},s={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function c(e){for(var t in s)s.hasOwnProperty(t)&&(e.attrs[t]=s[t])}for(var d in c(l),u)u.hasOwnProperty(d)&&u[d]!=l&&c(u[d]);function f(t,n){var r={schemaInfo:u};if(n)for(var o in n)r[o]=n[o];return e.hint.xml(t,r)}e.htmlSchema=u,e.registerHelper("hint","html",f)}(n(1482),n(1655))},function(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t,n){return n?e.indexOf(t)>=0:0==e.lastIndexOf(t,0)}function r(r,o){var a=o&&o.schemaInfo,i=o&&o.quoteChar||'"',l=o&&o.matchInMiddle;if(a){var u=r.getCursor(),s=r.getTokenAt(u);if(s.end>u.ch&&(s.end=u.ch,s.string=s.string.slice(0,u.ch-s.start)),(v=e.innerMode(r.getMode(),s.state)).mode.xmlCurrentTag){var c,d,f=[],p=!1,h=/\btag\b/.test(s.type)&&!/>$/.test(s.string),m=h&&/^\w/.test(s.string);if(m){var y=r.getLine(u.line).slice(Math.max(0,s.start-2),s.start),g=/<\/$/.test(y)?"close":/<$/.test(y)?"open":null;g&&(d=s.start-("close"==g?2:1))}else h&&"<"==s.string?g="open":h&&"</"==s.string&&(g="close");var b=v.mode.xmlCurrentTag(v.state);if(!h&&!b||g){m&&(c=s.string),p=g;var v,_=v.mode.xmlCurrentContext?v.mode.xmlCurrentContext(v.state):[],w=(v=_.length&&_[_.length-1])&&a[v],O=v?w&&w.children:a["!top"];if(O&&"close"!=g)for(var k=0;k<O.length;++k)c&&!n(O[k],c,l)||f.push("<"+O[k]);else if("close"!=g)for(var S in a)!a.hasOwnProperty(S)||"!top"==S||"!attrs"==S||c&&!n(S,c,l)||f.push("<"+S);v&&(!c||"close"==g&&n(v,c,l))&&f.push("</"+v+">")}else{var C=(w=b&&a[b.name])&&w.attrs,E=a["!attrs"];if(!C&&!E)return;if(C){if(E){var P={};for(var T in E)E.hasOwnProperty(T)&&(P[T]=E[T]);for(var T in C)C.hasOwnProperty(T)&&(P[T]=C[T]);C=P}}else C=E;if("string"==s.type||"="==s.string){var M,j=(y=r.getRange(t(u.line,Math.max(0,u.ch-60)),t(u.line,"string"==s.type?s.start:s.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!j||!C.hasOwnProperty(j[1])||!(M=C[j[1]]))return;if("function"==typeof M&&(M=M.call(this,r)),"string"==s.type){c=s.string;var x=0;/['"]/.test(s.string.charAt(0))&&(i=s.string.charAt(0),c=s.string.slice(1),x++);var D=s.string.length;if(/['"]/.test(s.string.charAt(D-1))&&(i=s.string.charAt(D-1),c=s.string.substr(x,D-2)),x){var N=r.getLine(u.line);N.length>s.end&&N.charAt(s.end)==i&&s.end++}p=!0}var L=function(e){if(e)for(var t=0;t<e.length;++t)c&&!n(e[t],c,l)||f.push(i+e[t]+i);return A()};return M&&M.then?M.then(L):L(M)}for(var R in"attribute"==s.type&&(c=s.string,p=!0),C)!C.hasOwnProperty(R)||c&&!n(R,c,l)||f.push(R)}return A()}}function A(){return{list:f,from:p?t(u.line,null==d?s.start:d):u,to:p?t(u.line,s.end):u}}}e.registerHelper("hint","xml",r)}(n(1482))},function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,i){i&&i!=e.Init&&(t.removeKeyMap(o),t.state.closeBrackets=null),n&&(a(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(o))}));var o={Backspace:u,Enter:s};function a(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";o[r]||(o[r]=i(n))}}function i(e){return function(t){return f(t,e)}}function l(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function u(t){var o=l(t);if(!o||t.getOption("disableInput"))return e.Pass;for(var a=r(o,"pairs"),i=t.listSelections(),u=0;u<i.length;u++){if(!i[u].empty())return e.Pass;var s=p(t,i[u].head);if(!s||a.indexOf(s)%2!=0)return e.Pass}for(u=i.length-1;u>=0;u--){var c=i[u].head;t.replaceRange("",n(c.line,c.ch-1),n(c.line,c.ch+1),"+delete")}}function s(t){var n=l(t),o=n&&r(n,"explode");if(!o||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),i=0;i<a.length;i++){if(!a[i].empty())return e.Pass;var u=p(t,a[i].head);if(!u||o.indexOf(u)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),c(t,-1),a=t.listSelections();for(var n=0;n<a.length;n++){var r=a[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}function c(e,t){for(var n=[],r=e.listSelections(),o=0,a=0;a<r.length;a++){var i=r[a];i.head==e.getCursor()&&(o=a);var l=i.head.ch||t>0?{line:i.head.line,ch:i.head.ch+t}:{line:i.head.line-1};n.push({anchor:l,head:l})}e.setSelections(n,o)}function d(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,o){var a=l(t);if(!a||t.getOption("disableInput"))return e.Pass;var i=r(a,"pairs"),u=i.indexOf(o);if(-1==u)return e.Pass;for(var s,f=r(a,"closeBefore"),p=r(a,"triples"),m=i.charAt(u+1)==o,y=t.listSelections(),g=u%2==0,b=0;b<y.length;b++){var v,_=y[b],w=_.head,O=t.getRange(w,n(w.line,w.ch+1));if(g&&!_.empty())v="surround";else if(!m&&g||O!=o)if(m&&w.ch>1&&p.indexOf(o)>=0&&t.getRange(n(w.line,w.ch-2),w)==o+o){if(w.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(w.line,w.ch-2))))return e.Pass;v="addFour"}else if(m){var k=0==w.ch?" ":t.getRange(n(w.line,w.ch-1),w);if(e.isWordChar(O)||k==o||e.isWordChar(k))return e.Pass;v="both"}else{if(!g||!(0===O.length||/\s/.test(O)||f.indexOf(O)>-1))return e.Pass;v="both"}else v=m&&h(t,w)?"both":p.indexOf(o)>=0&&t.getRange(w,n(w.line,w.ch+3))==o+o+o?"skipThree":"skip";if(s){if(s!=v)return e.Pass}else s=v}var S=u%2?i.charAt(u-1):o,C=u%2?o:i.charAt(u+1);t.operation((function(){if("skip"==s)c(t,1);else if("skipThree"==s)c(t,3);else if("surround"==s){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=S+e[n]+C;for(t.replaceSelections(e,"around"),e=t.listSelections().slice(),n=0;n<e.length;n++)e[n]=d(e[n]);t.setSelections(e)}else"both"==s?(t.replaceSelection(S+C,null),t.triggerElectric(S+C),c(t,-1)):"addFour"==s&&(t.replaceSelection(S+S+S+S,"before"),c(t,1))}))}function p(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function h(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}a(t.pairs+"`")}(n(1482))},function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(t,n,o){if(o!=e.Init&&o&&t.removeKeyMap("autoCloseTags"),n){var i={name:"autoCloseTags"};"object"==typeof n&&!1===n.whenClosing||(i["'/'"]=function(e){return a(e)}),"object"==typeof n&&!1===n.whenOpening||(i["'>'"]=function(e){return r(e)}),t.addKeyMap(i)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),a=[],u=r.getOption("autoCloseTags"),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var c=o[s].head,d=r.getTokenAt(c),f=e.innerMode(r.getMode(),d.state),p=f.state,h=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(p),m=h&&h.name;if(!m)return e.Pass;var y="html"==f.mode.configuration,g="object"==typeof u&&u.dontCloseTags||y&&t,b="object"==typeof u&&u.indentTags||y&&n;d.end>c.ch&&(m=m.slice(0,m.length-d.end+c.ch));var v=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=c.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&h.close||d.string.indexOf("/")==c.ch-d.start-1||g&&i(g,v)>-1||l(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(p)||[],m,c,!0))return e.Pass;var _="object"==typeof u&&u.emptyTags;if(_&&i(_,m)>-1)a[s]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var w=b&&i(b,v)>-1;a[s]={indent:w,text:">"+(w?"\n\n":"")+"</"+m+">",newPos:w?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var O="object"==typeof u&&u.dontIndentOnAutoClose;for(s=o.length-1;s>=0;s--){var k=a[s];r.replaceRange(k.text,o[s].head,o[s].anchor,"+insert");var S=r.listSelections().slice(0);S[s]={head:k.newPos,anchor:k.newPos},r.setSelections(S),!O&&k.indent&&(r.indentLine(k.newPos.line,null,!0),r.indentLine(k.newPos.line+1,null,!0))}}function o(t,n){for(var r=t.listSelections(),o=[],a=n?"/":"</",i=t.getOption("autoCloseTags"),u="object"==typeof i&&i.dontIndentOnSlash,s=0;s<r.length;s++){if(!r[s].empty())return e.Pass;var c=r[s].head,d=t.getTokenAt(c),f=e.innerMode(t.getMode(),d.state),p=f.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=c.ch-1))return e.Pass;var h,m="xml"!=f.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==f.mode.name)h=a+"script";else if(m&&"css"==f.mode.name)h=a+"style";else{var y=f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(p),g=y.length?y[y.length-1]:"";if(!y||y.length&&l(t,y,g,c))return e.Pass;h=a+g}">"!=t.getLine(c.line).charAt(d.end)&&(h+=">"),o[s]=h}if(t.replaceSelections(o),r=t.listSelections(),!u)for(s=0;s<r.length;s++)(s==r.length-1||r[s].head.line<r[s+1].head.line)&&t.indentLine(r[s].head.line)}function a(t){return t.getOption("disableInput")?e.Pass:o(t,!0)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function l(t,n,r,o,a){if(!e.scanForClosingTag)return!1;var i=Math.min(t.lastLine()+1,o.line+500),l=e.scanForClosingTag(t,o,null,i);if(!l||l.tag!=r)return!1;for(var u=a?1:0,s=n.length-1;s>=0&&n[s]==r;s--)++u;for(o=l.to,s=1;s<u;s++){var c=e.scanForClosingTag(t,o,null,i);if(!c||c.tag!=r)return!1;o=c.to}return!0}e.commands.closeTag=function(e){return o(e)}}(n(1482),n(1535))},function(e,t,n){!function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation((function(){if(t(n),!n.somethingSelected()){var r=n.getCursor(),o=n.getViewport();o.from=Math.min(o.from,r.line),o.to=Math.max(r.line+1,o.to);var a=e.findMatchingTag(n,r,o);if(a){if(n.state.matchBothTags){var i="open"==a.at?a.open:a.close;i&&(n.state.tagHit=n.markText(i.from,i.to,{className:"CodeMirror-matchingtag"}))}var l="close"==a.at?a.open:a.close;l?n.state.tagOther=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}}))}function r(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,(function(o,a,i){i&&i!=e.Init&&(o.off("cursorActivity",n),o.off("viewportChange",r),t(o)),a&&(o.state.matchBothTags="object"==typeof a&&a.bothTags,o.on("cursorActivity",n),o.on("viewportChange",r),n(o))})),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var r="close"==n.at?n.open:n.close;r&&t.extendSelection(r.to,r.from)}}}(n(1482),n(1535))},function(e,t,n){!function(e){"use strict";var t="CodeMirror-activeline",n="CodeMirror-activeline-background",r="CodeMirror-activeline-gutter";function o(e){for(var o=0;o<e.state.activeLines.length;o++)e.removeLineClass(e.state.activeLines[o],"wrap",t),e.removeLineClass(e.state.activeLines[o],"background",n),e.removeLineClass(e.state.activeLines[o],"gutter",r)}function a(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function i(e,i){for(var l=[],u=0;u<i.length;u++){var s=i[u],c=e.getOption("styleActiveLine");if("object"==typeof c&&c.nonEmpty?s.anchor.line==s.head.line:s.empty()){var d=e.getLineHandleVisualStart(s.head.line);l[l.length-1]!=d&&l.push(d)}}a(e.state.activeLines,l)||e.operation((function(){o(e);for(var a=0;a<l.length;a++)e.addLineClass(l[a],"wrap",t),e.addLineClass(l[a],"background",n),e.addLineClass(l[a],"gutter",r);e.state.activeLines=l}))}function l(e,t){i(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,n,r){var a=r!=e.Init&&r;n!=a&&(a&&(t.off("beforeSelectionChange",l),o(t),delete t.state.activeLines),n&&(t.state.activeLines=[],i(t,t.listSelections()),t.on("beforeSelectionChange",l)))}))}(n(1482))},function(e,t,n){!function(e){"use strict";function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function o(e){return"string"==typeof e&&e==e.toLowerCase()}function a(e,t,n){return e.getSearchCursor(t,n,{caseFold:o(t),multiline:!0})}function i(e,t,n,r,o){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){h(e)},onKeyDown:o,bottom:e.options.search.bottom})}function l(e,t,n,r,o){e.openDialog?e.openDialog(t,o,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):o(prompt(n,r))}function u(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function s(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function c(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=s(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function d(e,n,r){n.queryText=r,n.query=c(r),e.removeOverlay(n.overlay,o(n.query)),n.overlay=t(n.query,o(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,o(n.query)))}function f(t,n,o,a){var u=r(t);if(u.query)return p(t,n);var s=t.getSelection()||u.lastQuery;if(s instanceof RegExp&&"x^"==s.source&&(s=null),o&&t.openDialog){var c=null,f=function(n,r){e.e_stop(r),n&&(n!=u.queryText&&(d(t,u,n),u.posFrom=u.posTo=t.getCursor()),c&&(c.style.opacity=1),p(t,r.shiftKey,(function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((c=r).style.opacity=.4)})))};i(t,y(t),s,f,(function(n,o){var a=e.keyName(n),i=t.getOption("extraKeys"),l=i&&i[a]||e.keyMap[t.getOption("keyMap")][a];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(n),d(t,r(t),o),t.execCommand(l)):"find"!=l&&"findPersistent"!=l||(e.e_stop(n),f(o,n))})),a&&s&&(d(t,u,s),p(t,n))}else l(t,y(t),"Search for:",s,(function(e){e&&!u.query&&t.operation((function(){d(t,u,e),u.posFrom=u.posTo=t.getCursor(),p(t,n)}))}))}function p(t,n,o){t.operation((function(){var i=r(t),l=a(t,i.query,n?i.posFrom:i.posTo);(l.find(n)||(l=a(t,i.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(n))&&(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),i.posFrom=l.from(),i.posTo=l.to(),o&&o(l.from(),l.to()))}))}function h(e){e.operation((function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function m(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var o=2;o<arguments.length;o++){var a=arguments[o];n.appendChild("string"==typeof a?document.createTextNode(a):a)}return n}function y(e){var t=m("label",{className:"CodeMirror-search-label"},e.phrase("Search:"),m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return t.setAttribute("for","CodeMirror-search-field"),m("",null,t," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function g(e){return m("",null," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function b(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function v(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",m("button",{},e.phrase("Yes"))," ",m("button",{},e.phrase("No"))," ",m("button",{},e.phrase("All"))," ",m("button",{},e.phrase("Stop")))}function _(e,t,n){e.operation((function(){for(var r=a(e,t);r.findNext();)if("string"!=typeof t){var o=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,(function(e,t){return o[t]})))}else r.replace(n)}))}function w(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,o=t?e.phrase("Replace all:"):e.phrase("Replace:"),i=m("",null,m("span",{className:"CodeMirror-search-label"},o),g(e));l(e,i,o,n,(function(n){n&&(n=c(n),l(e,b(e),e.phrase("Replace with:"),"",(function(r){if(r=s(r),t)_(e,n,r);else{h(e);var o=a(e,n,e.getCursor("from")),i=function(){var t,s=o.from();!(t=o.findNext())&&(o=a(e,n),!(t=o.findNext())||s&&o.from().line==s.line&&o.from().ch==s.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),u(e,v(e),e.phrase("Replace?"),[function(){l(t)},i,function(){_(e,n,r)}]))},l=function(e){o.replace("string"==typeof n?r:r.replace(/\$(\d)/g,(function(t,n){return e[n]}))),i()};i()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){h(e),f(e)},e.commands.findPersistent=function(e){h(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=h,e.commands.replace=w,e.commands.replaceAll=function(e){w(e,!0)}}(n(1482),n(1508),n(1536))},function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout((function(){var r=!1;if(1==e.lineCount()){var o=e.getInputField();r="TEXTAREA"==o.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(o.querySelector(".CodeMirror-line").textContent)}r?n(e):t(e)}),20)}function o(e){i(e)&&n(e)}function a(e){var r=e.getWrapperElement(),o=i(e);r.className=r.className.replace(" CodeMirror-empty","")+(o?" CodeMirror-empty":""),o?n(e):t(e)}function i(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(n,i,l){var u=l&&l!=e.Init;if(i&&!u)n.on("blur",o),n.on("change",a),n.on("swapDoc",a),e.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){r(n)}),a(n);else if(!i&&u){n.off("blur",o),n.off("change",a),n.off("swapDoc",a),e.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),t(n);var s=n.getWrapperElement();s.className=s.className.replace(" CodeMirror-empty","")}i&&!n.hasFocus()&&o(n)}))}(n(1482))},function(e,t,n){n(1482).defineExtension("colorpicker",(function(){var e,t,n,r,o,a,i,l,u,s,c,d,f,p,h,m,y,g,b,v,_,w,O,k,S,C,E,P,T,M,j,x,D,N,L,R,A,I,B,F=function(){return ET_Builder.Frames.top},W={trim:function(e){return e.replace(/^\s+|\s+$/g,"")},format:function(e,t){if("hex"==t){var n=e.r.toString(16);e.r<16&&(n="0"+n);var r=e.g.toString(16);e.g<16&&(r="0"+r);var o=e.b.toString(16);return e.b<16&&(o="0"+o),"#"+[n,r,o].join("")}return"rgb"==t?void 0===e.a?"rgb("+[e.r,e.g,e.b].join(",")+")":"rgba("+[e.r,e.g,e.b,e.a].join(",")+")":"hsl"==t?void 0===e.a?"hsl("+[e.h,e.s+"%",e.l+"%"].join(",")+")":"hsla("+[e.h,e.s+"%",e.l+"%",e.a].join(",")+")":e},parse:function(e){if("string"==typeof e){if(e.indexOf("rgb(")>-1){for(var t=0,n=(a=e.replace("rgb(","").replace(")","").split(",")).length;t<n;t++)a[t]=parseInt(W.trim(a[t]),10);return{type:"rgb",r:a[0],g:a[1],b:a[2],a:1}}if(e.indexOf("rgba(")>-1){for(t=0,n=(a=e.replace("rgba(","").replace(")","").split(",")).length;t<n;t++)a[t]=n-1==t?parseFloat(W.trim(a[t])):parseInt(W.trim(a[t]),10);return{type:"rgb",r:a[0],g:a[1],b:a[2],a:a[3]}}if(e.indexOf("hsl(")>-1){for(t=0,n=(a=e.replace("hsl(","").replace(")","").split(",")).length;t<n;t++)a[t]=parseInt(W.trim(a[t]),10);var r={type:"hsl",h:a[0],s:a[1],l:a[2],a:1},o=W.HSLtoRGB(r.h,r.s,r.l);return r.r=o.r,r.g=o.g,r.b=o.b,r}if(e.indexOf("hsla(")>-1){for(t=0,n=(a=e.replace("hsla(","").replace(")","").split(",")).length;t<n;t++)a[t]=n-1==t?parseFloat(W.trim(a[t])):parseInt(W.trim(a[t]),10);return r={type:"hsl",h:a[0],s:a[1],l:a[2],a:a[3]},o=W.HSLtoRGB(r.h,r.s,r.l),r.r=o.r,r.g=o.g,r.b=o.b,r}if(0==e.indexOf("#")){var a=[];if(3==(e=e.replace("#","")).length)for(t=0,n=e.length;t<n;t++){var i=e.substr(t,1);a.push(parseInt(i+i,16))}else for(t=0,n=e.length;t<n;t+=2)a.push(parseInt(e.substr(t,2),16));return{type:"hex",r:a[0],g:a[1],b:a[2],a:1}}}return e},HSVtoRGB:function(e,t,n){360==e&&(e=0);var r=t*n,o=r*(1-Math.abs(e/60%2-1)),a=n-r,i=[];return 0<=e&&e<60?i=[r,o,0]:60<=e&&e<120?i=[o,r,0]:120<=e&&e<180?i=[0,r,o]:180<=e&&e<240?i=[0,o,r]:240<=e&&e<300?i=[o,0,r]:300<=e&&e<360&&(i=[r,0,o]),{r:Math.ceil(255*(i[0]+a)),g:Math.ceil(255*(i[1]+a)),b:Math.ceil(255*(i[2]+a))}},RGBtoHSV:function(e,t,n){var r=e/255,o=t/255,a=n/255,i=Math.max(r,o,a),l=i-Math.min(r,o,a),u=0;return 0==l?u=0:i==r?u=(o-a)/l%6*60:i==o?u=60*((a-r)/l+2):i==a&&(u=60*((r-o)/l+4)),u<0&&(u=360+u),{h:u,s:0==i?0:l/i,v:i}},RGBtoHSL:function(e,t,n){e/=255,t/=255,n/=255;var r,o,a=Math.max(e,t,n),i=Math.min(e,t,n),l=(a+i)/2;if(a==i)r=o=0;else{var u=a-i;switch(o=l>.5?u/(2-a-i):u/(a+i),a){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:Math.round(360*r),s:Math.round(100*o),l:Math.round(100*l)}},HUEtoRGB:function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},HSLtoRGB:function(e,t,n){var r,o,a;if(e/=360,n/=100,0==(t/=100))r=o=a=n;else{var i=n<.5?n*(1+t):n+t-n*t,l=2*n-i;r=this.HUEtoRGB(l,i,e+1/3),o=this.HUEtoRGB(l,i,e),a=this.HUEtoRGB(l,i,e-1/3)}return{r:255*r,g:255*o,b:255*a}}},V=[{rgb:"#ff0000",start:0},{rgb:"#ffff00",start:.17},{rgb:"#00ff00",start:.33},{rgb:"#00ffff",start:.5},{rgb:"#0000ff",start:.67},{rgb:"#ff00ff",start:.83},{rgb:"#ff0000",start:1}],U=(fe(),function(){}),G=0,H={},z=!1,q=!1,K=2e3,$={},Y=[{name:"Material",edit:!0,colors:["#fff","#f00","#0ff","#f0f","#fff","#f00","#0ff","#f0f","#fff","#f00","#0ff","#f0f"]},{name:"Custom",edit:!0,colors:[]},{name:"Pages",edit:!0,colors:["#fff","#f00","#0ff","#f0f"]}];function X(e,t,n){if("string"!=typeof e)this.el=e;else{var r=F().document.createElement(e);for(var o in this.uniqId=G++,r.className=t,n=n||{})r.setAttribute(o,n[o]);this.el=r}}function J(e,t,n){j.val(e),x.val(t),D.val(n),N.val(C)}function Q(e,t,n){L.val(e),R.val(t+"%"),A.val(n+"%"),I.val(C)}function Z(){return W.format({r:j.int(),g:x.int(),b:D.int()},"hex")}function ee(){return W.HSVtoRGB(E,P,T)}function te(){return W.format(ee(),"hex")}function ne(){var e=W.HSVtoRGB(E,P,T);return W.RGBtoHSL(e.r,e.g,e.b)}function re(e){if("rgb"==(e=e||"hex"))return(n=ee()).a=1==C?void 0:C,W.format(n,"rgb");if("hsl"==e){var t=ne();return t.a=1==C?void 0:C,W.format(t,"hsl")}var n=ee();return W.format(n,"hex")}function oe(e){c.css("background-color",e)}function ae(){var e=g.data("format")||"hex",t=null;if("hex"==e)M.val(te());else if("rgb"==e)J((t=ee()).r,t.g,t.b);else if("hsl"==e){var n=ne();Q(n.h,n.s,n.l)}oe(re("rgb")),t=ee(),pe(W.format(t,"rgb")),"function"==typeof U&&(isNaN(C)||U(re(e)))}function ie(e){e.preventDefault();var n=t.position(),o=r.width(),a=r.height(),l=e.clientX-n.left,u=e.clientY-n.top;l<0?l=0:l>o&&(l=o),u<0?u=0:u>a&&(u=a),i.css({left:l-5+"px",top:u-5+"px"}),i.data("pos",{x:l,y:u}),ye(),ae()}function le(e,t,n){var r={r:parseInt(e.r+(t.r-e.r)*n,10),g:parseInt(e.g+(t.g-e.g)*n,10),b:parseInt(e.b+(t.b-e.b)*n,10)};return W.format(r,"hex")}function ue(e){for(var t,n,r=0;r<V.length;r++)if(V[r].start>=e){t=V[r-1],n=V[r];break}return t&&n?le(t,n,(e-t.start)/(n.start-t.start)):V[0].rgb}function se(e){r.css("background-color",e)}function ce(e){E=e}function de(e){var t,n=d.offset().left,r=n+d.width(),o=e?ge(e).clientX:n+E/360*(r-n);t=o<n?0:o>r?100:(o-n)/(r-n)*100;var a=d.width()*(t/100);l.css({left:a-Math.ceil(l.width()/2)+"px"}),l.data("pos",{x:a}),se(ue(t/100)),ce(t/100*360),ae()}function fe(){for(var e="",t=["","-o-","-ms-","-moz-","-webkit-"],n=F().document.createElement("div"),r=0;r<t.length;r++)n.style.background=t[r]+"linear-gradient(#000000, #ffffff)",n.style.background&&(e=t[r]);return n=null,delete n,e}function pe(e){var t=W.parse(e);t.a=0;var n=W.format(t,"rgb");t.a=1;var r=W.format(t,"rgb");h.css("background","linear-gradient(to right, "+n+", "+r+")")}function he(e){var t,n=p.offset().left,r=n+p.width(),o=ge(e).clientX;t=o<n?0:o>r?100:(o-n)/(r-n)*100;var a=p.width()*(t/100);y.css({left:a-Math.ceil(y.width()/2)+"px"}),y.data("pos",{x:a}),me(),Ve(),ae()}function me(){var e=y.data("pos")||{x:0},t=Math.round(e.x/p.width()*100)/100;C=isNaN(t)?1:t}function ye(){var e=i.data("pos")||{x:0,y:0},t=l.data("pos")||{x:0},n=r.width(),o=r.height(),a=t.x/d.width()*360,u=e.x/n,s=(o-e.y)/o;0==n&&(a=0,u=0,s=0),E=a,P=u,T=s}function ge(e){return e.touches&&e.touches[0]?e.touches[0]:e}function be(e){var t=e.which,n=!1;return 37!=t&&39!=t&&8!=t&&46!=t&&9!=t||(n=!0),!(!n&&(t<48||t>57))}function ve(e){var t=j.val(),n=x.val(),r=D.val();""!=t&&""!=n&&""!=r&&(parseInt(t)>255?j.val(255):j.val(parseInt(t)),parseInt(n)>255?x.val(255):x.val(parseInt(n)),parseInt(r)>255?D.val(255):D.val(parseInt(r)),ke(Z()))}function _e(){var e=r.width()*P,t=r.height()*(1-T);i.css({left:e-5+"px",top:t-5+"px"}),i.data("pos",{x:e,y:t});var n=d.width()*(E/360);l.css({left:n-7.5+"px"}),l.data("pos",{x:n});var o=p.width()*(C||0);y.css({left:o-7.5+"px"}),y.data("pos",{x:o})}function we(e,t,n,r){C=r,E=e,P=t,T=n}function Oe(e){g.data("format",e),Ue()}function ke(e){var t=e||"#FF0000",n=W.parse(t);Oe(n.type),se(t);var r=W.RGBtoHSV(n.r,n.g,n.b);we(r.h,r.s,r.v,n.a),_e(),de(),ae()}function Se(e,t,n){e.addEventListener(t,n)}function Ce(e,t,n){e.removeEventListener(t,n)}function Ee(e){r.data("isDown",!0),ie(e)}function Pe(e){r.data("isDown",!1)}function Te(e){e.preventDefault(),n.data("isDown",!0)}function Me(e){e.preventDefault(),f.data("isDown",!0)}function je(e){n.data("isDown",!0),de(e)}function xe(e){f.data("isDown",!0),he(e)}function De(e){if(e.which<65||e.which>70)return be(e)}function Ne(e){var t=M.val();"#"==t.charAt(0)&&7==t.length&&ke(t)}function Le(e){Ge()}function Re(){Se(r.el,"mousedown",Ee),Se(r.el,"mouseup",Pe),Se(l.el,"mousedown",Te),Se(y.el,"mousedown",Me),Se(d.el,"mousedown",je),Se(p.el,"mousedown",xe),Se(M.el,"keydown",De),Se(M.el,"keyup",Ne),Se(j.el,"keydown",be),Se(j.el,"keyup",ve),Se(x.el,"keydown",be),Se(x.el,"keyup",ve),Se(D.el,"keydown",be),Se(D.el,"keyup",ve),Se(F().document,"mouseup",Be),Se(F().document,"mousemove",Fe),Se(m.el,"click",Le)}function Ae(e){var t=new X(e).closest("codemirror-colorview"),n=new X(e).closest("codemirror-colorpicker"),r=new X(e).closest("CodeMirror");return e.nodeName,!!(n||t||r)}function Ie(e){return"HTML"==e.nodeName}function Be(e){r.data("isDown",!1),n.data("isDown",!1),f.data("isDown",!1),Ie(e.target)?Ze(K):0==Ae(e.target)&&et()}function Fe(e){r.data("isDown")&&ie(e),n.data("isDown")&&de(e),f.data("isDown")&&he(e)}function We(){Ce(r.el,"mousedown",Ee),Ce(r.el,"mouseup",Pe),Ce(l.el,"mousedown",Te),Ce(y.el,"mousedown",Me),Ce(d.el,"mousedown",je),Ce(p.el,"mousedown",xe),Ce(M.el,"keydown",De),Ce(M.el,"keyup",Ne),Ce(j.el,"keydown",be),Ce(j.el,"keyup",ve),Ce(x.el,"keydown",be),Ce(x.el,"keyup",ve),Ce(D.el,"keydown",be),Ce(D.el,"keyup",ve),Ce(document,"mousemove",Fe),Ce(F().document,"mousemove",Fe),Ce(m.el,"click",Le),U=void 0}function Ve(){var e=g.data("format")||"hex";if(C<1&&"hex"==e){var t="rgb";g.removeClass(e),g.addClass(t),g.data("format",t),ae()}}function Ue(){var e=g.data("format")||"hex";g.removeClass("hex"),g.removeClass("rgb"),g.removeClass("hsl"),g.addClass(e)}function Ge(){var e=g.data("format")||"hex",t="hex";"hex"==e?t="rgb":"rgb"==e?t="hsl":"hsl"==e&&(t=1==C?"hex":"rgb"),g.removeClass(e),g.addClass(t),g.data("format",t),ae()}function He(e){var t=new X("div","information-item "+e);if("hex"==e){var n=new X("div","input-field hex");M=new X("input","input",{type:"text"}),n.append(M),n.append(new X("div","title").html("HEX")),t.append(n)}else"rgb"==e?(n=new X("div","input-field rgb-r"),j=new X("input","input",{type:"text"}),n.append(j),n.append(new X("div","title").html("R")),t.append(n),n=new X("div","input-field rgb-g"),x=new X("input","input",{type:"text"}),n.append(x),n.append(new X("div","title").html("G")),t.append(n),n=new X("div","input-field rgb-b"),D=new X("input","input",{type:"text"}),n.append(D),n.append(new X("div","title").html("B")),t.append(n),n=new X("div","input-field rgb-a"),N=new X("input","input",{type:"text"}),n.append(N),n.append(new X("div","title").html("A")),t.append(n)):"hsl"==e&&(n=new X("div","input-field hsl-h"),L=new X("input","input",{type:"text"}),n.append(L),n.append(new X("div","title").html("H")),t.append(n),n=new X("div","input-field hsl-s"),R=new X("input","input",{type:"text"}),n.append(R),n.append(new X("div","title").html("S")),t.append(n),n=new X("div","input-field hsl-l"),A=new X("input","input",{type:"text"}),n.append(A),n.append(new X("div","title").html("L")),t.append(n),n=new X("div","input-field hsl-a"),I=new X("input","input",{type:"text"}),n.append(I),n.append(new X("div","title").html("A")),t.append(n));return t}function ze(e){$=e?Y.filter((function(t){return t.name==e}))[0]:Y[0]}function qe(){for(var e=new X("div","current-color-sets"),t=0,n=$.colors.length;t<n;t++){var r=$.colors[t],o=new X("div","color-item",{"data-color":r}),a=new X("div","color-view");a.css({"background-color":r}),o.append(a),e.append(o)}return $.edit&&(o=new X("div","add-color-item").html("+"),e.append(o)),e}function Ke(){ze(),e=new X(F().document.body),t=new X("div","codemirror-colorpicker"),r=new X("div","color"),i=new X("div","drag-pointer"),o=new X("div","value"),a=new X("div","saturation"),u=new X("div","control"),s=new X("div","empty"),c=new X("div","color"),n=new X("div","hue"),d=new X("div","hue-container"),l=new X("div","drag-bar"),f=new X("div","opacity"),p=new X("div","opacity-container"),h=new X("div","color-bar"),y=new X("div","drag-bar2"),g=new X("div","information hex"),b=new X("div","information-change"),m=new X("button","format-change-button",{type:"button"}).html("\u2194"),b.append(m),g.append(He("hex")),g.append(He("rgb")),g.append(He("hsl")),g.append(b),o.append(i),a.append(o),r.append(a),d.append(l),n.append(d),p.append(h),p.append(y),f.append(p),u.append(n),u.append(f),u.append(s),u.append(c),v=new X("div","colorsets"),_=new X("div","menu"),w=new X("div","color-list"),v.append(_),v.append(w),S=new X("button","color-sets-choose-btn").html("+"),_.append(S),w.append(qe()),O=new X("div","color-chooser"),k=new X("div","colorsets-list"),O.append(k),t.append(r),t.append(u),t.append(g),t.append(v),t.append(O),$e(),ke()}function $e(){for(var e=0,t=V.length;e<t;e++){var n=V[e],r=W.parse(n.rgb);n.r=r.r,n.g=r.g,n.b=r.b}}function Ye(e){if("object"==typeof e){if(!e.r||!e.g||!e.b)return;ke(W.format(e,"hex"))}else if("string"==typeof e){if("#"!=e.charAt(0))return;ke(e)}}function Xe(e){ye();var t=ee();return e?W.format(t,e):t}function Je(n){var r=t.width(),o=t.height(),a=n.left-e.el.scrollLeft;r+a>window.innerWidth&&(a-=r+a-window.innerWidth),a<0&&(a=0);var i=n.top-e.el.scrollTop;o+i>window.innerHeight&&(i-=o+i-window.innerHeight),i<0&&(i=0),t.css({left:a+"px",top:i+"px"})}function Qe(e,n,r){We(),Re(),t.appendTo(F().document.body),t.css({position:"fixed",left:"-10000px",top:"-10000px"}),t.show(),Je(e),z=!0,q=e.isShortCut||!1,ke(n),U=function(e){r(e)},(K=e.hideDelay||2e3)>0&&Ze(K)}function Ze(e){e=e||0,Ce(t.el,"mouseenter"),Ce(t.el,"mouseleave"),Se(t.el,"mouseenter",(function(){clearTimeout(B)})),Se(t.el,"mouseleave",(function(){clearTimeout(B),B=setTimeout(et,e)})),clearTimeout(B),B=setTimeout(et,e)}function et(){z&&(We(),t.hide(),t.remove(),z=!1)}return X.prototype.closest=function(e){for(var t=this,n=!1;!(n=t.hasClass(e));){if(!t.el.parentNode)return null;t=new X(t.el.parentNode)}return n?t:null},X.prototype.removeClass=function(e){this.el.className=W.trim((" "+this.el.className+" ").replace(" "+e+" "," "))},X.prototype.hasClass=function(e){return!!this.el.className&&(" "+this.el.className+" ").indexOf(" "+e+" ")>-1},X.prototype.addClass=function(e){this.hasClass(e)||(this.el.className=this.el.className+" "+e)},X.prototype.html=function(e){return this.el.innerHTML=e,this},X.prototype.empty=function(){return this.html("")},X.prototype.append=function(e){return"string"==typeof e?this.el.appendChild(F().document.createTextNode(e)):this.el.appendChild(e.el||e),this},X.prototype.appendTo=function(e){return(e.el?e.el:e).appendChild(this.el),this},X.prototype.remove=function(){return this.el.parentNode&&this.el.parentNode.removeChild(this.el),this},X.prototype.text=function(){return this.el.textContent},X.prototype.css=function(e,t){if(2==arguments.length)this.el.style[e]=t;else if(1==arguments.length){if("string"==typeof e)return getComputedStyle(this.el)[e];var n=e||{};for(var r in n)this.el.style[r]=n[r]}return this},X.prototype.offset=function(){var e=this.el.getBoundingClientRect();return{top:e.top+F().document.body.scrollTop,left:e.left+F().document.body.scrollLeft}},X.prototype.position=function(){return{top:parseFloat(this.el.style.top),left:parseFloat(this.el.style.left)}},X.prototype.width=function(){return this.el.offsetWidth},X.prototype.height=function(){return this.el.offsetHeight},X.prototype.dataKey=function(e){return this.uniqId+"."+e},X.prototype.data=function(e,t){if(2!=arguments.length){if(1==arguments.length)return H[this.dataKey(e)];var n=Object.keys(H),r=this.uniqId+".";return n.filter((function(e){return 0==e.indexOf(r)})).map((function(e){return H[e]}))}return H[this.dataKey(e)]=t,this},X.prototype.val=function(e){return 0==arguments.length?this.el.value:(1==arguments.length&&(this.el.value=e),this)},X.prototype.int=function(){return parseInt(this.val(),10)},X.prototype.show=function(){return this.css("display","block")},X.prototype.hide=function(){return this.css("display","none")},Ke(),{isShortCut:function(){return q},$root:t,show:Qe,hide:et,setColor:Ye,getColor:Xe}}))},function(e,t,n){!function(e){"use strict";var t=function(){return ET_Builder.Frames.top},n={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb(0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb(95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(237, 20, 61)",cyan:"rgb(0, 255, 255)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgrey:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb(0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb(75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgreen:"rgb(144, 238, 144)",lightgray:"rgb(211, 211, 211)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb(0, 255, 0)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",rebeccapurple:"rgb(102, 51, 153)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb(65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb(0, 255, 127)",steelblue:"rgb(70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb(0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb(64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)",transparent:"rgba(0, 0, 0, 0)"},r="codemirror-colorview",o="codemirror-colorview-background",a=["comment","builtin"];function i(e,t){"setValue"==t.origin?(e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update()):e.state.colorpicker.style_color_update(e.getCursor().line)}function l(e,t){e.state.colorpicker.isUpdate||(e.state.colorpicker.isUpdate=!0,e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update())}function u(e,t){i(e,{origin:"setValue"})}function s(e,t){e.state.colorpicker.keyup(t)}function c(e,t){e.state.colorpicker.is_edit_mode()&&e.state.colorpicker.check_mousedown(t)}function d(e,t){i(e,{origin:"setValue"})}function f(e){e.state.colorpicker.close_color_picker()}function p(e,t){var n=void 0;return function(r,o){n&&clearTimeout(n),n=setTimeout((function(){e(r,o)}),t||300)}}function h(e,t){return!(!e||!e.className)&&(" "+e.className+" ").indexOf(" "+t+" ")>-1}function m(e,t){t="boolean"==typeof t?{mode:"view"}:Object.assign({mode:"view"},t||{}),this.opt=t,this.cm=e,this.markers={},a=this.opt.excluded_token||a,this.cm.colorpicker?this.colorpicker=this.cm.colorpicker():this.opt.colorpicker&&(this.colorpicker=this.opt.colorpicker),this.init_event()}e.defineOption("colorpicker",!1,(function(t,n,r){r&&r!=e.Init&&t.state.colorpicker&&(t.state.colorpicker.destroy(),t.state.colorpicker=null),n&&(t.state.colorpicker=new m(t,n))})),m.prototype.init_event=function(){var e,t;this.cm.on("mousedown",c),this.cm.on("keyup",s),this.cm.on("change",i),this.cm.on("update",l),this.cm.on("refresh",u),this.onPasteCallback=(e=this.cm,t=d,function(n){t.call(this,e,n)}),this.cm.getWrapperElement().addEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.on("scroll",p(f,50))},m.prototype.is_edit_mode=function(){return"edit"==this.opt.mode},m.prototype.is_view_mode=function(){return"view"==this.opt.mode},m.prototype.destroy=function(){this.cm.off("mousedown",c),this.cm.off("keyup",s),this.cm.off("change",i),this.cm.getWrapperElement().removeEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.off("scroll")},m.prototype.hasClass=function(e,t){return!!e.className&&(" "+e.className+" ").indexOf(" "+t+" ")>-1},m.prototype.check_mousedown=function(e){this.hasClass(e.target,o)?this.open_color_picker(e.target.parentNode):this.close_color_picker()},m.prototype.popup_color_picker=function(e){var t=this.cm.getCursor(),n=this,r={lineNo:t.line,ch:t.ch,color:e||"#FFFFFF",isShortCut:!0};Object.keys(this.markers).forEach((function(e){if(("#"+e).indexOf("#"+r.lineNo+":")>-1){var t=n.markers[e];t.ch<=r.ch&&r.ch<=t.ch+t.color.length&&(r.ch=t.ch,r.color=t.color,r.nameColor=t.nameColor)}})),this.open_color_picker(r)},m.prototype.open_color_picker=function(e){var t=e.lineNo,n=e.ch,r=e.nameColor,o=e.color;if(this.colorpicker){var a=this,i=o,l=this.cm.charCoords({line:t,ch:n});this.colorpicker.show({left:l.left,top:l.bottom,isShortCut:e.isShortCut||!1,hideDelay:a.opt.hideDelay||2e3},r||o,(function(e){a.cm.replaceRange(e,{line:t,ch:n},{line:t,ch:n+i.length},"*colorpicker"),i=e}))}},m.prototype.close_color_picker=function(e){this.colorpicker&&this.colorpicker.hide()},m.prototype.key=function(e,t){return[e,t].join(":")},m.prototype.keyup=function(e){this.colorpicker&&("Escape"==e.key||0==this.colorpicker.isShortCut())&&this.colorpicker.hide()},m.prototype.init_color_update=function(){this.markers={}},m.prototype.style_color_update=function(e){if(e)this.match(e);else for(var t=this.cm.lineCount(),n=0;n<t;n++)this.match(n)},m.prototype.empty_marker=function(e,t){for(var n=t.markedSpans||[],o=0,a=n.length;o<a;o++){var i=this.key(e,n[o].from);i&&h(n[o].marker.replacedWith,r)&&(delete this.markers[i],n[o].marker.clear())}},m.prototype.color_regexp=/(#(?:[\da-f]{3}){1,2}|rgb\((?:\s*\d{1,3},\s*){2}\d{1,3}\s*\)|rgba\((?:\s*\d{1,3},\s*){3}\d*\.?\d+\s*\)|hsl\(\s*\d{1,3}(?:,\s*\d{1,3}%){2}\s*\)|hsla\(\s*\d{1,3}(?:,\s*\d{1,3}%){2},\s*\d*\.?\d+\s*\)|([\w_\-]+))/gi,m.prototype.match_result=function(e){return e.text.match(this.color_regexp)},m.prototype.submatch=function(e,t){this.empty_marker(e,t);var r=this.match_result(t);if(r&&r.length)for(var o={next:0},a=0,i=r.length;a<i;a++)if(r[a].indexOf("#")>-1||r[a].indexOf("rgb")>-1||r[a].indexOf("hsl")>-1)this.render(o,e,t,r[a]);else{var l=n[r[a]];l&&this.render(o,e,t,r[a],l)}},m.prototype.match=function(e){var t=this.cm.getLineHandle(e),n=this;this.cm.operation((function(){n.submatch(e,t)}))},m.prototype.make_element=function(){var e=t().document.createElement("div");return e.className=r,this.is_edit_mode()?e.title="open color picker":e.title="",e.back_element=this.make_background_element(),e.appendChild(e.back_element),e},m.prototype.make_background_element=function(){var e=t().document.createElement("div");return e.className=o,e},m.prototype.set_state=function(e,t,n,r){var o=this.create_marker(e,t);return o.lineNo=e,o.ch=t,o.color=n,o.nameColor=r,o},m.prototype.create_marker=function(e,t){var n=this.key(e,t);return this.markers[n]||(this.markers[n]=this.make_element()),this.markers[n]},m.prototype.has_marker=function(e,t){var n=this.key(e,t);return!!this.markers[n]},m.prototype.update_element=function(e,t){e.back_element.style.backgroundColor=t},m.prototype.set_mark=function(e,t,n){this.cm.setBookmark({line:e,ch:t},{widget:n,handleMouseEvents:!0})},m.prototype.is_excluded_token=function(e,t){var n=this.cm.getTokenAt({line:e,ch:t},!0),r=n.type,o=n.state.state;if(null==r&&"block"==o)return!0;if(null==r&&"top"==o)return!0;for(var i=0,l=0,u=a.length;l<u;l++)if(r===a[l]){i++;break}return i>0},m.prototype.render=function(e,t,n,r,o){var a=n.text.indexOf(r,e.next);if(!0!==this.is_excluded_token(t,a)){if(e.next=a+r.length,this.has_marker(t,a))return this.update_element(this.create_marker(t,a),o||r),void this.set_state(t,a,r,o);var i=this.create_marker(t,a);this.update_element(i,o||r),this.set_state(t,a,r,o||r),this.set_mark(t,a,i)}}}(n(1482))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(11)),o=s(n(5)),a=s(n(9)),i=s(n(846)),l=s(n(42)),u=n(828);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d={"known-properties":1,"duplicate-properties":1},f={coverGutter:!1,noHScroll:!0},p=function(e){var t=e.message,n=e.line,r=e.type;return{description:t.replace(/ \w+ \w+ \d+, \w+ \d+\.$/,"."),line:n,type:r}},h=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mode=t,this.editor=n,this.delay=r,this.timer=0,this.lineWidgets=[],this.doLint=this.doLint.bind(this),this.removeLineWidget=this.removeLineWidget.bind(this),this.showErrors=this.showErrors.bind(this),this.showError=this.showError.bind(this)}var t,n,s;return t=e,(n=[{key:"lint",value:function(e){clearTimeout(this.timer);var t=(0,r.default)(e)?this.delay:e;0===t?this.doLint():this.timer=setTimeout(this.doLint,t)}},{key:"doLint",value:function(){this.editor&&this.editor.operation(this.showErrors)}},{key:"getErrors",value:function(){var e,t=this.editor.getValue();if("css"===this.mode.name){var n=this.mode.inline?"p {".concat(t,"}"):t,r=u.CSSLint.verify(n,d).messages;e=(0,i.default)(r,l.default).map(p)}else e=[];return e}},{key:"removeLineWidget",value:function(e){this.editor.removeLineWidget(e)}},{key:"showError",value:function(e){var t=this.editor,n=e.description,r=e.line,o=e.type,a=document.createElement("div");return a.appendChild(document.createTextNode("".concat(n))),a.className="codemirror-lint-".concat(o),t.addLineWidget(r-1,a,f)}},{key:"showErrors",value:function(){(0,o.default)(this.lineWidgets)||(0,a.default)(this.lineWidgets,this.removeLineWidget);var e=this.getErrors();(0,o.default)(e)?this.lineWidgets=[]:this.lineWidgets=e.map(this.showError)}},{key:"destroy",value:function(){clearTimeout(this.timer),this.editor=!1}}])&&c(t.prototype,n),s&&c(t,s),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r};n(1667);var a=function(e){return o.default.createElement("ul",{className:"et-code-buttons-wrapper"},e.children)};t.default=a},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=y(n(7)),o=y(n(1)),a=n(0),i=n(852),l=n(93),u=y(n(22)),s=y(n(6)),c=y(n(620)),d=y(n(625)),f=n(511),p=n(830);n(831),n(832),n(1669);var h=y(n(517)),m=y(n(2));function y(e){return e&&e.__esModule?e:{default:e}}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=function(t){var n=g((0,a.useState)(""),2),y=n[0],b=n[1],v=s.default.getModuleEdit(),_=(0,o.default)(v,"props.address",""),w=g((0,a.useState)([]),2),O=w[0],k=w[1],S=g((0,a.useState)(!1),2),C=S[0],E=S[1],P=g((0,a.useState)(null),2),T=P[0],M=P[1],j=t.context,x=t.value,D=t.editorName,N=t.getEditor,L=t.activateEditor,R=t.processedKey,A=function(e,t){B(t?{tag:[t,e]}:{tag:e})},I=function(e){var t=e.detail,n=t.code,r=t.insertMode,o=t.name,a=t.previousCode,i=t.cursor,l=t.useCodeAction;if(o===D){var s=N().getDoc();if(l){var c=s.getValue();"raw_content"===o?u.default.moduleContentChange(v,c,!0,!1):u.default.moduleSettingsChange(v,o,c)}else"append"===r?s.setValue("".concat(a,"\n").concat(n)):"insert"===r?(s.setValue(a),s.replaceRange(n,i)):s.setValue(n)}},B=function(t){var n=s.default.getShortcodeObjAtAddress(_),a=["address"],i=(0,h.default)({0:n},{convertGlobalColors:!0,allowedProps:a});L();var l,u=N(),c=(0,o.default)(v,"props.type",""),p=(0,r.default)(["et_pb_fullwidth_code","et_pb_code"],c),y="code_html"===j,g={line:0,ch:0};u.getCursor&&(g=u.getCursor()),(s.default.isSettingsModalOpen("settings")&&!s.default.isSettingsModalOpen("settings_modal")||y)&&(n=s.default.getSections(),i=(0,h.default)(n,{convertGlobalColors:!0,allowedProps:a})),p&&!y?l="":(l="",function(t){return new Promise((function(n,r){e.ajax({type:"POST",url:ETBuilderBackend.ajaxUrl,dataType:"json",data:{action:"et_fb_prepare_shortcode",et_fb_prepare_shortcode_nonce:ETBuilderBackend.nonces.prepareShortcode,et_page_content:JSON.stringify(t)},success:function(e){var t=e.shortcode;n(t)}})}))}(i).then((function(e){m.default.parseShortcode(e,(function(e){l=e.html,l=(0,f.prepareModuleHTML)(l);var t=new CustomEvent("et_ai_code_module_html_ready",{detail:{module_html:l}});window.dispatchEvent(t)}))})));var b={aiMode:"code",type:t,label:(0,d.default)("ai","Code With AI"),contextData:{module:l},etAccount:s.default.getETAccount(),prefilledContentType:j,additionalInfo:{field_name:"",fields:[]},content:x,code:{editorValue:x,editorName:D,cursor:{line:g.line,ch:g.ch},processedKey:R},contextHTMLReceived:p&&!y};e(window).trigger("et_ai_container_ready",[b,"et-ai-app"])},F=function(e,t){var n=t.items||{};return React.createElement(i.SubMenu,{label:React.createElement(React.Fragment,null,React.createElement("span",{className:"szh-menu__item__name"},t.name),React.createElement(c.default,{icon:"caret-solid-right"})),key:e,align:"center",position:"anchor"},W(n,e))},W=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e;return t.showSearchField&&(r=getFilteredOptionsList("main",e)),Object.entries(r).map((function(e){var r=g(e,2),o=r[0],a=r[1];return a.hasOwnProperty("items")?F(o,a):React.createElement(i.MenuItem,{type:"radio",value:o,key:o,onClick:function(e){return A(o,n)}},React.createElement("span",{className:"szh-menu__item__name"},(null==a?void 0:a.name)||a),o===t.value&&React.createElement(c.default,{icon:"check"}))}))},V=function(e){return React.createElement(i.MenuItem,{type:"radio",value:e,key:e,onClick:function(){return B(e)}},React.createElement("span",{className:"szh-menu__item__name"},(0,l.decode)(ETBuilderBackend.aiCodeOptions[e])))},U=function(e){if(b(""),E(!0),m.default.condition("is_bfb")&&e.target){var t=e.target.getBoundingClientRect().top,n=window.top.innerHeight;M(n-t<400?t>=400?"top":"left":null)}},G=function(){return React.createElement("li",{onMouseEnter:function(){return b("-hover")},onMouseLeave:function(){return b("")},className:"et-code-ai-btn","data-tip":"-hover"===y?(0,d.default)("ai","Code With AI"):"",onClick:U},React.createElement(c.default,{icon:"divi-ai-code".concat(y),svgId:R}))};return(0,a.useEffect)((function(){return window.addEventListener("ai_prompt_use_code",I),function(){window.removeEventListener("ai_prompt_use_code",I)}})),(0,a.useEffect)((function(){j&&(0,p.getDataOptionsByContext)(j).then((function(e){null!=e&&e.refine&&k(e.refine)}))}),[j]),(0,a.useEffect)((function(){C&&(E(!1),!x&&B("code_with_ai"))}),[y]),x?React.createElement(i.Menu,{menuButton:G(),portal:{target:window.top.document.body},menuClassName:"et-fb-select-menu",containerProps:{style:{zIndex:2000001,position:"fixed"}},transition:{open:!0,close:!1,item:!1},submenuCloseDelay:0,submenuOpenDelay:0,initialOpen:!1,initialMounted:!1,position:"anchor",viewScroll:"auto",direction:T},React.createElement(React.Fragment,null,V("code_with_ai"),V("improve_code_with_ai"),React.createElement(React.Fragment,null,React.createElement(i.MenuDivider,null),React.createElement(i.MenuItem,{className:"szh-menu__item__quick-action"},React.createElement("span",{className:"szh-menu__item__name "},(0,d.default)("ai","Quick Actions")))),W(O))):G()};t.default=v}).call(this,n(8))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(1540)),a=i(n(14));function i(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}var u=function(e){return r.default.createElement(o.default,l({current_post_type:ETBuilderBackend.themeBuilder.isLayout?"product":a.default.postType,include_latest_post:"1",include_current_post:"product"===a.default.postType||ETBuilderBackend.themeBuilder.isLayout?"1":"0",defaultOption:"latest"},e))};t.default=u},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=T(n(3)),i=T(n(170)),l=T(n(41)),u=T(n(1)),s=T(n(28)),c=T(n(360)),d=T(n(162)),f=T(n(9)),p=T(n(58)),h=T(n(5)),m=T(n(11)),y=T(n(518)),g=T(n(107)),b=T(n(40)),v=T(n(135)),_=T(n(56)),w=T(n(8)),O=T(n(363)),k=T(n(616)),S=T(n(457)),C=T(n(43)),E=T(n(6)),P=T(n(84));function T(e){return e&&e.__esModule?e:{default:e}}function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function N(e){var t=function(){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}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1675);var B=(0,O.default)((function(e,t){return w.default.ajax({type:"GET",dataType:"json",url:e,data:t}).promise()})),F=function(e){!function(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&&D(e,t)}(b,e);var t,n,r,a=N(b);function b(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),I(R(t=a.call(this,e)),"getSelectOptions",(function(){return(0,g.default)((0,y.default)(t.state.options,(function(e){var n=e.value;return t.valuePrefix+n.toString()})),"label")})),I(R(t),"filterOptionLabel",(function(e,n){return(0,m.default)(t.props.labelFilter)?e:t.props.labelFilter(e,n.substr(t.valuePrefix.length),t.state.options)})),I(R(t),"handleOpenDropdown",(function(){t.setState({open:!0}),t.inputRef.focus(),(0,h.default)(t.state.options)&&t.requestOptions(t.props.value,t.state.search,t.state.meta.pagination.pages.current)})),I(R(t),"handleCloseDropdown",(function(){t.setState({open:!1})})),I(R(t),"handleOnChange",(function(e){var n=e.substr(t.valuePrefix.length),r=(0,u.default)(t.state,"meta.pages.current",1);t.setState({selected:!1,options:{}},(function(){t.getOptions(n,t.state.search,r)})),t.props._onChange(t.props.name,n)})),I(R(t),"handleOnPagination",(function(e){var n=Math.max(Math.min(e,t.state.meta.pagination.pages.total),1);t.state.meta.pagination.pages.current!==n&&t.setState({meta:(0,_.default)((0,i.default)(t.state.meta),"pagination.pages.current",n)},(function(){t.requestOptions(t.props.value,t.state.search,t.state.meta.pagination.pages.current)}))})),I(R(t),"handleSearch",(function(e,n){n!==t.state.search&&t.setState({search:n},(function(){return t.requestOptions(t.props.value,t.state.search,1)}))})),I(R(t),"_requestOptions",(0,l.default)((function(e,n,r){var o=t.props.arguments(e,n,r),a=t.props.defaultOption,l=B(t.props.src,o);t.setState({request:l},(function(){l.then((function(u){if(l===t.state.request){var f=u.data,m=f.results,y=f.meta;if(""===n){var g=(0,i.default)(m),b=g[1],v=(0,p.default)(g,(function(t){return(0,s.default)(t.value)===(0,s.default)(e)}));b&&(0,s.default)(b.value)===e&&(t.setState({selected:b}),(0,c.default)(g,1)),!v&&a&&t.setState({selected:{value:a}}),(0,h.default)(g)||E.default.updateAjaxifiedCache(o,r,(0,d.default)(g),y)}t.updateCurrentOptions(m,y)}})).always((function(){t.setState({loading:!1})}))}))}),250)),I(R(t),"requestOptions",(function(e,n,r){n.length>0&&n.length<3||(t.state.loading||t.setState({loading:!0}),t.getOptions(e,n,r))})),I(R(t),"getOptions",(function(e,n,r){var o=t.props.arguments(e,n,r),a=(0,i.default)(E.default.getAjaxifiedCache(o.action,o.post_type));if(""===n&&!(0,h.default)((0,u.default)(a,["results",r],[]))){var l=(0,h.default)(t.state.selected)||""===e?t.getSelectedOption(e,a):t.state.selected,c=(0,u.default)(a,"meta",{}),d=(0,u.default)(a,["results",r]);return(0,_.default)(c,"pagination.pages.current",r),l&&(0,s.default)((0,u.default)(d,"[1].value"))!==e&&d.splice(1,0,l),void t.updateCurrentOptions(d,c)}t._requestOptions(e,n,r)})),I(R(t),"getSelectedOption",(function(e,n){var r;if(!(0,h.default)(n)){if((0,f.default)(n.results,(function(t){r||(r=(0,p.default)(t,(function(t){return(0,s.default)(t.value)===(0,s.default)(e)})))})),!(0,h.default)(r))return(0,_.default)(r,"meta.post_type",""),t.setState({selected:r}),r;t._requestOptions(e,"",1)}})),I(R(t),"updateCurrentOptions",(function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=n||t.state.meta;t.setState({options:e,meta:o,loading:r},(function(){(0,h.default)(t.props.value)&&t.handleOnChange(t.valuePrefix+(0,u.default)(e,"0.value","").toString())}))})),I(R(t),"renderLoading",(function(){return o.default.createElement("div",{className:"et-fb-select-ajaxified__spinner"})})),I(R(t),"renderNoResults",(function(){return o.default.createElement("li",{className:"et-fb-select-options-filter select-option-item et-fb-select-ajaxified__element"},ETBuilderBackend.i18n.selectControl.noResults)})),I(R(t),"renderBeforeList",(function(){return o.default.createElement("li",{className:"et-fb-select-options-filter select-option-item et-fb-select-ajaxified__element et-fb-select-ajaxified__search"},o.default.createElement(S.default,{ref:function(e){return t.inputRef=e},type:"text",name:"search",value:t.state.search,_onChange:t.handleSearch,additional_attrs:{placeholder:ETBuilderBackend.i18n.selectControl.typeToSearch}}),t.state.loading&&t.renderLoading())})),I(R(t),"renderAfterList",(function(e){return(0,h.default)(t.state.options)&&!t.state.loading?o.default.createElement(o.Fragment,null,t.renderNoResults(),e):o.default.createElement(o.Fragment,null,e,t.renderPagination())})),t.state={search:"",options:{},meta:{pagination:{results:{per_page:20,total:0},pages:{current:1,total:0}}},request:null,loading:!1,open:!1,selected:!1},t.valuePrefix="_",t.onClickPaginationPrev=t.onClickPaginationPrev.bind(R(t)),t.onClickPaginationNext=t.onClickPaginationNext.bind(R(t)),t}return t=b,(n=[{key:"onClickPaginationPrev",value:function(){this.handleOnPagination(this.state.meta.pagination.pages.current-1)}},{key:"onClickPaginationNext",value:function(){this.handleOnPagination(this.state.meta.pagination.pages.current+1)}},{key:"renderPagination",value:function(){var e=this.state.meta.pagination;if(e.pages.current>e.pages.total||e.pages.total<2)return null;var t=ETBuilderBackend.i18n.selectControl.pagination.replace("%1$s",e.pages.current).replace("%2$s",e.pages.total);return o.default.createElement("li",{className:"et-fb-select-options-filter select-option-item et-fb-select-ajaxified__element et-fb-select-ajaxified__pagination"},o.default.createElement("div",{className:"et-fb-select-ajaxified__pagination-container"},o.default.createElement("button",{type:"button",className:"et-fb-select-ajaxified__pagination-button et-fb-select-ajaxified__pagination-button--previous",onClick:this.onClickPaginationPrev},o.default.createElement(C.default,{icon:"previous",color:P.default.white})),o.default.createElement("span",{className:"et-fb-select-ajaxified__pagination-label"},t),o.default.createElement("button",{type:"button",className:"et-fb-select-ajaxified__pagination-button et-fb-select-ajaxified__pagination-button--next",onClick:this.onClickPaginationNext},o.default.createElement(C.default,{icon:"next",color:P.default.white}))))}},{key:"componentDidMount",value:function(){this.requestOptions(this.props.value,this.state.search,this.state.meta.pagination.pages.current)}},{key:"render",value:function(){var e=j({},this.props),t=(0,u.default)(this,"state.selected.value",this.props.value);return e=(0,v.default)(e,"searchable"),o.default.createElement("div",{className:"et-fb-select-ajaxified"},o.default.createElement(k.default,j({},e,{options:this.getSelectOptions(),value:this.valuePrefix+t,selectFirst:!1,emptyLabel:ETBuilderBackend.i18n.selectControl.noTitle,labelFilter:this.filterOptionLabel,preserveHeight:this.state.meta.pagination.pages.total>1?"on":"auto",beforeList:this.renderBeforeList,afterList:this.renderAfterList,__onChange:this.handleOnChange,onOpen:this.handleOpenDropdown,onClose:this.handleCloseDropdown})),this.state.loading&&!this.state.open&&this.renderLoading())}}])&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.PureComponent);F.propTypes={name:a.default.string,value:a.default.any.isRequired,src:a.default.string,arguments:a.default.func.isRequired,labelFilter:a.default.func,_onChange:a.default.func,defaultOption:a.default.any},F.defaultProps={name:"",src:ETBuilderBackend.ajaxUrl,labelFilter:void 0,_onChange:b.default,defaultOption:!1};var W=F;t.default=W},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(616)),a=i(n(281));function i(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}var u=function(e){return r.default.createElement(a.default,{componentName:e.name},r.default.createElement(o.default,l({className:"et-fb-settings-option-select--dividers"},e)))};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),o=c(n(1)),a=c(n(360)),i=c(n(116)),l=c(n(616)),u=c(n(281)),s=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}var f=function(e){if(""!==(0,o.default)(e,"module.props.module.props.attrs.global_module","")||s.default.isEditingLibraryItem("row"))return!1;var t=(0,i.default)(e.options);return"et_pb_column_inner"===(0,o.default)(e,"content.[0].type","")&&"2_3"!==(0,o.default)(e,"content.[0].attrs.saved_specialty_column_type","")&&(0,a.default)(t,"1_4,1_4,1_4,1_4"),r.default.createElement(u.default,{componentName:e.name},r.default.createElement(l.default,d({},e,{options:t})))};t.default=f},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=c(n(3)),i=(c(n(13)),c(n(16))),l=c(n(9)),u=c(n(616)),s=c(n(14));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var b=function(e){!function(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&&p(e,t)}(c,e);var t,n,r,a=h(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this,e))._onChange=t._onChange.bind(y(t)),t.shouldComponentUpdate=i.default.shouldComponentUpdate.bind(y(t)),t}return t=c,(n=[{key:"render",value:function(){var e=s.default.getWidgetAreas(),t={},n="";return(0,l.default)(e,(function(e,r){n||(n=r),t[r]=e.name})),o.default.createElement(u.default,{value:this.props.value,default:n,name:this.props.name,__onChange:this._onChange,options:t})}},{key:"_onChange",value:function(e){this.props._onChange(this.props.name,e)}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Component);b.propTypes={_onChange:a.default.func,className:a.default.object,computed_affects:a.default.array,name:a.default.string,description:a.default.string,value:a.default.string};var v=b;t.default=v},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=g(n(5)),o=g(n(1)),a=g(n(0)),i=g(n(270)),l=g(n(16)),u=g(n(27)),s=g(n(13)),c=g(n(123)),d=g(n(6)),f=g(n(2)),p=g(n(63)),h=g(n(43)),m=n(826),y=g(n(1541));function g(e){return e&&e.__esModule?e:{default:e}}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}n(1683);var v=(0,i.default)({displayName:"ETBuilderControlSelectFontIcon",mixins:[l.default],getInitialState:function(){return{isToolTipActive:!1,maybeIconDownMode:"icon_down"===(0,o.default)(this.props,"renderer_options.icons_list",""),maybeFindReplaceMode:this.props.readonly}},render:function(){var e=this.props.value||this.props.default;if(this.state.maybeIconDownMode||this.state.maybeFindReplaceMode&&!(0,r.default)(e))return this._renderReducedIconList(e);var t=f.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app")),n=u.default.createPortal(a.default.createElement(c.default,{class:"et-fb-tooltip",countTransform:!1,delayShow:700,globalEventOff:"click"}),t[0]);return a.default.createElement("div",null,this._renderExpandedPickerButton(),a.default.createElement(y.default,{iconValue:e,handleChangeIcon:this._onChange,attrs:this.props.additional_attrs,dropDownClassName:"icon-options-filter",iconPickerMenuCustomStyling:!0,listStyle:{height:180,overflowY:"scroll"},name:"icon_picker"}),this._renderExpandedPickerModal(),n)},_renderReducedIconList:function(e){var t,n=this;if(this.state.maybeFindReplaceMode){var r={"et-pb-fa-icon":f.default.maybeFaIconType(e),active:!0};t=[a.default.createElement("li",{className:(0,s.default)(r),"data-icon":f.default.processFontIcon(e),onClick:this._onChange,key:"".concat(this._key_suffix,"-font-icon-0")})]}else if(this.state.maybeIconDownMode){var o=parseInt(e.replace(/%/g,""));t=ETBuilderBackend.fontIconsDown.map((function(t,r){var i,l=f.default.processFontIcon(t);return i=r===o||l===e?{active:!0}:{},a.default.createElement("li",{className:(0,s.default)(i),key:"".concat(n._key_suffix,"-font-icon-").concat(r),"data-icon":l,onClick:n._onChange})}))}var i=this.props.additional_attrs?this.props.additional_attrs:{},l=this.state.maybeFindReplaceMode?{overflowY:"unset",borderTopWidth:0,backgroundColor:"transparent"}:{overflowY:"unset"};return a.default.createElement("ul",b({id:"et-fb-".concat(this.props.name),className:"et-fb-font-icon-list",style:l},i),t)},_renderExpandedPickerButton:function(){return a.default.createElement(p.default,{onMouseDown:function(e){return e.stopPropagation()},primary:!0,tooltip:ETBuilderBackend.i18n.expandModal,_onClick:this._showExapndedModal,stopPropagation:!0,className:"et-fb-modal-expanded-btn"},a.default.createElement(h.default,{icon:"expand",color:"#FFFFFF"}))},_showExapndedModal:function(){this.setState({isToolTipActive:!this.state.isToolTipActive})},_renderExpandedPickerModal:function(){var e=this.state.isToolTipActive;return!!e&&a.default.createElement(m.ETBuilderTooltipModal,{key:!1,actionType:"expanded_icon_picker",active:e,modalPosition:d.default.getClickedButtonPosition(),modalMoving:!0,handleChangeIcon:this._onChange,selectedIcon:this.props.value,_closeFunction:this._showExapndedModal,currentIconAttrs:this.props.additional_attrs})},_onChange:function(t){var n=e(t.target);if(this.state.maybeIconDownMode){var r=n.index(),o="%%".concat(r,"%%");this.props._onChange(this.props.name,o)}else{var a=n.attr("data-icon-utf"),i=n.attr("data-icon-type"),l=n.attr("data-icon-font-weight");this.props._onChange(this.props.name,"".concat(a,"||").concat(i,"||").concat(l))}}});t.default=v}).call(this,n(8))},function(e,t,n){e.exports=n(1681)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),a=l(o),i=l(n(3));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){this.props.useCapture;return this.isPassiveSupported()?{useCapture:this.props.useCapture,passive:!0}:{passive:!1}}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var o=document.documentElement||document.body.parentNode||document.body,a=void 0!==t.pageYOffset?t.pageYOffset:o.scrollTop;r=this.props.isReverse?a:this.calculateOffset(e,a)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,o=t.hasMore,i=(t.initialLoad,t.isReverse),l=t.loader,u=(t.loadMore,t.pageStart,t.ref),s=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));s.ref=function(t){e.scrollComponent=t,u&&u(t)};var c=[n];return o&&(l?i?c.unshift(l):c.push(l):this.defaultLoader&&(i?c.unshift(this.defaultLoader):c.push(this.defaultLoader))),a.default.createElement(r,s,c)}}]),t}(o.Component);u.propTypes={children:i.default.node.isRequired,element:i.default.node,hasMore:i.default.bool,initialLoad:i.default.bool,isReverse:i.default.bool,loader:i.default.node,loadMore:i.default.func.isRequired,pageStart:i.default.number,ref:i.default.func,getScrollParent:i.default.func,threshold:i.default.number,useCapture:i.default.bool,useWindow:i.default.bool},u.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=u,e.exports=t.default},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=D(n(0)),a=D(n(3)),i=n(93),l=D(n(13)),u=D(n(16)),s=D(n(11)),c=D(n(12)),d=D(n(10)),f=D(n(4)),p=D(n(5)),h=D(n(37)),m=D(n(28)),y=D(n(1)),g=D(n(7)),b=D(n(9)),v=D(n(197)),_=D(n(146)),w=D(n(17)),O=D(n(31)),k=D(n(84)),S=D(n(789)),C=D(n(22)),E=D(n(6)),P=D(n(15)),T=D(n(2)),M=D(n(616)),j=D(n(792)),x=D(n(43));function D(e){return e&&e.__esModule?e:{default:e}}function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(this,arguments)}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function B(e){var t=function(){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}}();return function(){var n,r=V(e);if(t){var o=V(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return F(this,n)}}function F(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return W(e)}function W(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1685);var G=ETBuilderBackend.i18n.fonts,H={name:a.default.string,value:a.default.string,default:a.default.string,_onChange:a.default.func,_resetOption:a.default.func},z=function(e){return(0,y.default)(ETBuilderBackend,"removedFonts.".concat(e,".parent_font"),e)},q=[{slug:"italic",icon:"text-italic"},{slug:"uppercase",icon:"text-uppercase"},{slug:"capitalize",icon:"text-smallcaps"},{slug:"underline",icon:"text-underline"},{slug:"line_through",icon:"text-strikethrough"}],K=function(e){!function(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&&I(e,t)}(D,e);var t,n,r,a=B(D);function D(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,D),U(W(t=a.call(this,e)),"getDefaultValue",(function(e){return(0,y.default)(t.getDefaultValues(),e,"")})),U(W(t),"getValue",(function(e){return(0,y.default)(t.getValues(),e,"")})),U(W(t),"isDefault",(function(e){return"style"===e?(0,O.default)(q,"slug").reduce((function(e,n){return e&&t.isDefault(n)}),!0):t.getValue(e)===t.getDefaultValue(e)})),U(W(t),"updateFontWeight",(function(e){return t.updateOptionValue("weight",e)})),U(W(t),"updateLineColor",(function(e,n){return t.updateOptionValue("line_color",n)})),U(W(t),"updateLineStyle",(function(e){return t.updateOptionValue("line_style",e)})),U(W(t),"resetOption",(function(e){if("style"===e){var n=(0,O.default)(q,"slug").reduce((function(e,n){return R(R({},e),{},U({},n,t.getDefaultValue(n)))}),{});t.updateFontStyle(n)}else t.updateOptionValue(e,t.getDefaultValue(e))})),U(W(t),"toggleButton",(function(e){return t.updateOptionValue(e,!t.getValue(e))})),U(W(t),"getLabel",(function(e,n){return o.default.createElement(S.default,{isResetActive:!t.isDefault(e),onClickReset:function(n){return t.resetOption(e)},for:"".concat(t.props.name,"_").concat(e),name:t.props.name,hoveredGroup:t.state.hoveredElement===e},(0,i.decode)(n))})),t.state={uploadedFonts:t.getUploadedFonts(),hoveredElement:null},t.shouldComponentUpdate=u.default.shouldComponentUpdate.bind(W(t)),t.getDefaultValues=t.getDefaultValues.bind(W(t)),t.getValues=t.getValues.bind(W(t)),t.updateFontStyle=t.updateFontStyle.bind(W(t)),t.updateFontFamily=t.updateFontFamily.bind(W(t)),t.fontStyleButtonClassNames=t.fontStyleButtonClassNames.bind(W(t)),t.getFontWeightOptions=t.getFontWeightOptions.bind(W(t)),t.getFontWeight=t.getFontWeight.bind(W(t)),t.updateOptionValue=t.updateOptionValue.bind(W(t)),t._onFontUploaderUpdate=t._onFontUploaderUpdate.bind(W(t)),t.maybeResetFont=t.maybeResetFont.bind(W(t)),t._applyFontPreview=t._applyFontPreview.bind(W(t)),t._applyFontPreviewOnLoad=t._applyFontPreviewOnLoad.bind(W(t)),t._previewFontOnHover=t._previewFontOnHover.bind(W(t)),t.updateLineStyle=t.updateLineStyle.bind(W(t)),t._onMouseEnter=t._onMouseEnter.bind(W(t)),t._onMouseLeave=t._onMouseLeave.bind(W(t)),t}return t=D,(n=[{key:"componentDidMount",value:function(){this.props.isItemSelected||setTimeout(this.maybeResetFont,0),E.default.addFontUploaderUpdateListener(this._onFontUploaderUpdate),this._applyFontPreviewOnLoad();var e=(0,y.default)(this.props,"additionalAttrs.oldOptionValue",""),t=(0,y.default)(this.props,"attributes.data-old-option-ref",!1);if(""!==e&&t){var n={};"on"===e&&(n.uppercase="on",this.updateFontStyle(n)),this.props._resetOption(t)}}},{key:"componentWillUnmount",value:function(){E.default.removeFontUploaderUpdateListener(this._onFontUploaderUpdate)}},{key:"maybeResetFont",value:function(){var e=this.getValues();if(!(0,p.default)(e.font)){var t=ETBuilderBackend.removedFonts,n=e.font;if(!(0,s.default)(t[n]))return this.updateOptionValue("font",t[n].parent_font),void this.updateOptionValue("weight",t[n].styles);(0,s.default)(ETBuilderBackend.googleFonts[n])&&(0,s.default)(ETBuilderBackend.customFonts[n])&&this.updateOptionValue("font","Default")}}},{key:"getDefaultValues",value:function(){var e=((0,h.default)(this.props.default)?this.props.default:"||||||||").split("|");return{font:z(e[0]||""),weight:this.processFontWeightValue(e[1])||"",italic:T.default.isOn(e[2]),uppercase:T.default.isOn(e[3]),underline:T.default.isOn(e[4]),capitalize:T.default.isOn(e[5]),line_through:T.default.isOn(e[6]),line_color:e[7]||"",line_style:e[8]||""}}},{key:"getDefaultEmptyFontValue",value:function(){return P.default.isMobile(this.props)?"Default":""}},{key:"getValues",value:function(){var e=!(0,s.default)(this.props.default)&&(0,h.default)(this.props.default)?this.props.default:"||||||||",t=(0,s.default)(this.props.value)||""===this.props.value?e:this.props.value,n=(0,c.default)(t)?t:t.split("|");return{font:z(n[0]||""),weight:this.processFontWeightValue((0,m.default)(n[1]))||"",italic:T.default.isOn(n[2]),uppercase:T.default.isOn(n[3]),underline:T.default.isOn(n[4]),capitalize:T.default.isOn(n[5]),line_through:T.default.isOn(n[6]),line_color:n[7]||"",line_style:n[8]||""}}},{key:"_onFontUploaderUpdate",value:function(){var e=this;setTimeout((function(){e.maybeResetFont()}),100),this.setState({uploadedFonts:this.getUploadedFonts()})}},{key:"processFontWeightValue",value:function(e){return"on"===e?"700":e}},{key:"updateFontStyle",value:function(e){var t=this.getValues(),n=(0,d.default)(t,e),r="Default"===n.font?this.getDefaultEmptyFontValue():n.font,o="400"===n.weight?"":n.weight,a=n.italic?"on":"",i=n.uppercase?"on":"",l=n.underline?"on":"",u=n.capitalize?"on":"",s=n.line_through?"on":"",c=n.line_color,f=n.line_style,p="".concat(r,"|").concat(o,"|").concat(a,"|").concat(i,"|").concat(l,"|").concat(u,"|").concat(s,"|").concat(c,"|").concat(f);this.props._onChange(this.props.name,p),this._applyFontPreview(r,"font-family"),this._applyFontPreview(r,"font-weight")}},{key:"updateFontFamily",value:function(e){this.updateFontStyle({font:e}),this._applyFontPreview(e,"font-family"),this._applyFontPreview(e,"font-weight")}},{key:"_previewFontOnHover",value:function(e){this._applyFontPreview(e,"font-family")}},{key:"_applyFontPreviewOnLoad",value:function(){var e=this.getValue("font");this._applyFontPreview(e,"font-weight"),this._applyFontPreview(e,"font-family")}},{key:"_applyFontPreview",value:function(e,t){var n=T.default.$topWindow("head"),r="font-weight"===t?"et-fb-font-weight-".concat(this.props.name):e.replace(/ /g,"_");if("Default"!==e&&""!==e){T.default.maybeLoadFont(e);var o="";if("font-weight"===t)n.find("style#".concat(r)).length>0&&n.find("style#".concat(r)).remove(),o='<style id="'.concat(r,'" type="text/css">.et-fb-settings-option-inner--').concat(this.props.name,' .et-fb-font-weight-option { font-family:"').concat(e,'"; }</style>');else{if(n.find("style#et-fb-font-".concat(r)).length>0)return;o='<style id="et-fb-font-'.concat(r,'" type="text/css">.et-fb-option--font .select-option-item-').concat(r,' { font-family:"').concat(e,'"; }</style>')}n.append(o)}else"font-weight"===t&&n.find("style#".concat(r)).length>0&&n.find("style#".concat(r)).remove()}},{key:"getUploadedFonts",value:function(){var e=ETBuilderBackend.customFonts;return(0,p.default)(e)?[]:(0,w.default)(e)}},{key:"getFontWeightOptions",value:function(){var e=ETBuilderBackend.googleFonts,t=ETBuilderBackend.customFonts,n=this.getValue("font"),r=(0,y.default)(t,n,!1),o=(0,w.default)(ETBuilderBackend.allFontWeights),a={},i=[];if(""===n)i=["300","400","600","700","800"];else{if(r||(r=(0,y.default)(e,n,!1)),!r||(0,s.default)(r.styles))return ETBuilderBackend.allFontWeights;i=r.styles.split(",")}var l=(0,v.default)((0,_.default)(["400","700"],i),o);return(0,b.default)(l,(function(e){a[e]=ETBuilderBackend.allFontWeights[e]})),a}},{key:"getFontWeight",value:function(){var e=this.getValue("weight");return!0===e?"700":(0,g.default)((0,w.default)(this.getFontWeightOptions()),e)?e:"400"}},{key:"updateOptionValue",value:function(e,t){var n=this.getValues();n[e]=T.default.get(t,""),(0,b.default)([["uppercase","capitalize"],["underline","line_through"]],(function(t){(0,g.default)(t,e)&&(0,b.default)(t,(function(t){t!==e&&(n[t]=!1)}))})),this.updateFontStyle(n)}},{key:"fontStyleButtonClassNames",value:function(e){var t;return(0,l.default)((U(t={"et-fb-select-fontstyle-button":!0},"et-fb-select-fontstyle-button--".concat(e),!0),U(t,"et-fb-select-fontstyle-option--".concat(this.props.name),!0),t))}},{key:"fieldClassNames",value:function(e,t){var n;return(0,l.default)((0,d.default)({},(U(n={"et-fb-font-option-container":!0,"et-fb-font-option-container-with-label":!0},"et-fb-font-option-container--".concat(this.props.name),!0),U(n,"et-fb-font-option-container--sub",!0),U(n,"et-fb-font-option-container--sub-".concat(e),!0),n),t))}},{key:"_onMouseEnter",value:function(e){if(!this.props.rightClickOpened&&this.props.isSettingsModal){var t=e.currentTarget.getAttribute("data-subfield");this.setState({hoveredElement:t}),C.default.setHoveredSubElement(t)}}},{key:"_onMouseLeave",value:function(){!this.props.rightClickOpened&&this.props.isSettingsModal&&C.default.setHoveredSubElement(!1)}},{key:"_extraProps",value:function(){var e={readonly:this.props.readonly,disableReset:this.props.disableReset};return(0,d.default)({},e)}},{key:"_isFilterActive",value:function(){return(0,g.default)(["styles_modified","active_content"],this.props.filterSelected)}},{key:"_isRenderSubFieldLabel",value:function(e){return!!(0,s.default)(this.props.subFieldLabel)||((0,h.default)(this.props.subFieldLabel)?e===this.props.subFieldLabel:(0,f.default)(this.props.subFieldLabel)?(0,g.default)(this.props.subFieldLabel,e):this.props.subFieldLabel)}},{key:"_isRenderSubField",value:function(e){return!!(0,s.default)(this.props.subField)||((0,h.default)(this.props.subField)?e===this.props.subField:(0,f.default)(this.props.subField)?(0,g.default)(this.props.subField,e):this.props.subField)}},{key:"_renderSubFieldFontFamily",value:function(){if(!this._isRenderSubField("font"))return!1;var e=this.getValue("font");if(this._isFilterActive()&&(!e||"Default"===e))return!1;var t=this.fieldClassNames("font");return o.default.createElement("div",{className:t,"data-subfield":"font",onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave},this._isRenderSubFieldLabel("font")&&this.props.formLabel,this._isRenderSubFieldLabel("font")&&this.props.formDescription,o.default.createElement(M.default,N({default:"Default",recentCategory:"font_family",value:e,name:this.props.name,options:ETBuilderBackend.googleFontsList,additionalOptions:{uploaded:this.state.uploadedFonts},searchPlaceholder:G.searchFonts,searchable:!0,displayRecent:!0,_hoverAction:this._previewFontOnHover,__onChange:this.updateFontFamily},this._extraProps())))}},{key:"_renderSubFieldFontWeight",value:function(){if(!this._isRenderSubField("weight"))return!1;var e=this.getFontWeight();if(this._isFilterActive()&&(!e||(0,g.default)(["400","normal"],e)))return!1;var t=(0,s.default)(this.props.group_label)?G.fontWeight:"".concat(this.props.group_label," ").concat(G.fontWeight),n=!!this._isRenderSubFieldLabel("weight")&&this.getLabel("weight",t),r=this.fieldClassNames("weight");return o.default.createElement("div",{className:r,"data-subfield":"weight",onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave},n,o.default.createElement(M.default,N({className:"et-fb-font-weight-option",name:"".concat(this.props.name,"_weight"),default:"normal",value:e,options:this.getFontWeightOptions(),__onChange:this.updateFontWeight},this._extraProps())))}},{key:"_renderSubFieldFontStyle",value:function(){var e=this;if(!this._isRenderSubField("style"))return!1;var t=q.filter((function(t){return!e._isFilterActive()||e._isFilterActive()&&e.getValue(t.slug)}));if((0,p.default)(t))return!1;var n=t.map((function(t){var n=e.getValue(t.slug)?k.default.activeTabIcon:k.default.optionTabIcon;return o.default.createElement("button",{key:t.slug,className:e.fontStyleButtonClassNames(t.slug),onClick:function(n){return e.toggleButton(t.slug)||n.preventDefault()},"data-button":t.slug,type:t},o.default.createElement(x.default,{icon:t.icon,color:n}))})),r=(0,s.default)(this.props.group_label)?G.fontStyle:"".concat(this.props.group_label," ").concat(G.fontStyle),a=!!this._isRenderSubFieldLabel("style")&&this.getLabel("style",r),i=this.fieldClassNames("style");return o.default.createElement("div",{className:i,"data-subfield":"style",onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave},a,n)}},{key:"_renderSubFieldFontLineColor",value:function(){if(!this._isRenderSubField("line_color"))return!1;var e=this.getValue("underline"),t=this.getValue("line_through");if(!e&&!t)return!1;var n=this.getValue("line_color");if(this._isFilterActive()&&!n)return!1;var r=e?G.underline:G.strikethrough,a=(0,s.default)(this.props.group_label)?"".concat(r," ").concat(G.color):"".concat(this.props.group_label," ").concat(r," ").concat(G.color),i=!!this._isRenderSubFieldLabel("line_color")&&this.getLabel("line_color",a),l=this.fieldClassNames("line_color",{"et-fb-option--color-alpha":!0});return o.default.createElement("div",{className:l,onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave,"data-subfield":"line_color"},i,o.default.createElement(j.default,N({name:"".concat(this.props.name,"_line_color"),type:"color-alpha",value:n,animate:!0,_onChange:this.updateLineColor},this._extraProps())))}},{key:"_renderSubFieldFontLineStyle",value:function(){if(!this._isRenderSubField("line_style"))return!1;var e=this.getValue("underline"),t=this.getValue("line_through");if(!e&&!t)return!1;var n=(0,p.default)(this.getValue("line_style"))?"solid":this.getValue("line_style");if(this._isFilterActive()&&"solid"===n)return!1;var r=e?G.underline:G.strikethrough,a=(0,s.default)(this.props.group_label)?"".concat(r," ").concat(G.style):"".concat(this.props.group_label," ").concat(r," ").concat(G.style),i=!!this._isRenderSubFieldLabel("line_style")&&this.getLabel("line_style",a),l=this.fieldClassNames("line_style");return o.default.createElement("div",{className:l,"data-subfield":"line_style",onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave},i,o.default.createElement(M.default,N({name:"".concat(this.props.name,"_line_style"),className:"et-fb-font-line-style-option",default:"solid",value:n,options:["solid","double","dotted","dashed","wavy"],__onChange:this.updateLineStyle},this._extraProps())))}},{key:"render",value:function(){var e=(0,l.default)(U({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner--select-fontstyle":!0},"et-fb-settings-option-inner--".concat(this.props.name),!0));return o.default.createElement("div",{className:e},this._renderSubFieldFontFamily(),this._renderSubFieldFontWeight(),this._renderSubFieldFontStyle(),this._renderSubFieldFontLineColor(),this._renderSubFieldFontLineStyle())}}])&&A(t.prototype,n),r&&A(t,r),Object.defineProperty(t,"prototype",{writable:!1}),D}(o.default.Component);K.propTypes=H;var $=K;t.default=$},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(n(0)),a=p(n(13)),i=p(n(16)),l=p(n(31)),u=(p(n(125)),p(n(1))),s=p(n(7)),c=p(n(11)),d=p(n(43));p(n(2));n(1687);var f=p(n(18));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var _=function(e){switch(e){case"justified":return"text-justify";case"force_left":return"left";default:return e}},w=function(e){!function(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&&m(e,t)}(g,e);var t,n,r,p=y(g);function g(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),(t=p.call(this,e)).shouldComponentUpdate=i.default.shouldComponentUpdate.bind(b(t)),t._onClick=t._onClick.bind(b(t)),t}return t=g,(n=[{key:"_render_buttons",value:function(e){var t=this,n=(0,c.default)(this.props.default)?"":this.props.default,r=""!==this.props.value?this.props.value:n,i=this;return(0,l.default)(e,(function(e,n){var l=(0,u.default)(i,"props.baseName",i.props.name),c=(0,s.default)(["module_alignment","button_alignment"],f.default.getFieldBaseName(l))||"module_align"===(0,u.default)(t,"props.options_icon",""),p=c?"align":"text",h="justified"===n?_(n):"".concat(p,"-").concat(_(n)),m=n===r,y=m?"#4191DE":"#bec9d6",g=c?12:14,b={"et-fb-settings-option-select-align-button":!0,"et-fb-settings-option-select-align-button--active":m};return b["et-fb-settings-option-select-align-button--".concat(n)]=!0,o.default.createElement("button",{className:(0,a.default)(b),key:"".concat(i.props.name,"-select-align-option-").concat(n),onClick:i._onClick,"data-value":n},o.default.createElement(d.default,{icon:h,color:y,size:g}))}))}},{key:"render",value:function(){var e={"et-fb-settings-option-select-align":!0};return this.props.className?e[this.props.className]=!0:e["et-fb-main-setting"]=!0,o.default.createElement("div",{id:"et-fb-".concat(this.props.name),className:(0,a.default)(e)},this._render_buttons(this.props.options))}},{key:"_onClick",value:function(e){e.preventDefault();var t=this.props.name,n=e.target.getAttribute("data-value");n===(0,u.default)(this,"props.value")&&(n=""),this.props._onChange(t,n)}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),g}(o.default.Component);t.default=w},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=P(n(0)),o=(P(n(3)),P(n(8)),P(n(270))),a=P(n(27)),i=P(n(13)),l=P(n(841)),u=P(n(16)),s=P(n(64)),c=P(n(11)),d=P(n(9)),f=P(n(5)),p=P(n(35)),h=P(n(148)),m=P(n(332)),y=P(n(40)),g=P(n(1)),b=P(n(34)),v=P(n(7)),w=P(n(17)),O=P(n(65)),k=P(n(22)),S=P(n(2)),C=P(n(1689)),E=P(n(1537));function P(e){return e&&e.__esModule?e:{default:e}}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}n(1690);var M=S.default.topWindow(),j=S.default.condition("is_bfb"),x=S.default.condition("is_rich_editor");l.default.getDefaultProps.isReactClassApproved={},S.default.topWindow().QTags=void 0,S.default.topWindow().send_to_editor=function(e){var t,n=void 0!==S.default.topWindow().tinymce,r=void 0!==S.default.topWindow().QTags;if(S.default.appWindow().wpActiveEditor)n&&(t=tinymce.get(S.default.appWindow().wpActiveEditor));else if(n&&S.default.topWindow().tinymce.activeEditor)t=S.default.topWindow().tinymce.activeEditor,S.default.appWindow().wpActiveEditor=t.id;else if(!r)return!1;if(t&&!t.isHidden()?t.execCommand("mceInsertContent",!1,e):r?QTags.insertContent(e):(S.default.topDocument().getElementById(S.default.appWindow().wpActiveEditor).value+=e,S.default.$topWindow("#".concat(S.default.appWindow().wpActiveEditor)).trigger("focus").trigger("blur")),S.default.topWindow().tb_remove)try{S.default.topWindow().tb_remove()}catch(e){}};var D=(0,o.default)({displayName:"ETBuilderControlTinyMCE",mixins:[u.default],getInitialState:function(){var e;e="no"===x?"html":S.default.hasValue(getUserSetting("editor"))?getUserSetting("editor"):"tinymce",this.editor=null;var t=(0,g.default)(this.props,"toggle_slug",""),n=(0,g.default)(this.props,"name","");return this.uuid="".concat(t,"_").concat(n,"_").concat("vb_tiny_mce"),this.processedContent=!1,this.isEditing=!1,this.isUnmounting=!1,this.updateProps=!0,this.isRemoveP=!0,{editorMode:e,content:this.getPropsContent()}},UNSAFE_componentWillReceiveProps:function(e){if(e.activeTabMode!==this.props.activeTabMode?this.isRemoveP=!1:this.isRemoveP=!0,this.isEditing)this.isEditing=!1;else{var t=this.getPropsContent(e);if((this.processedContent?this.processContent(t):t)!==this.state.content){var n="tinymce"===this.state.editorMode;if(n){var r=S.default.appWindow().tinymce.EditorManager.get(this.uuid);(0,s.default)(r)&&(r=S.default.topWindow().tinymce.EditorManager.get(this.uuid)),(0,p.default)((0,g.default)(r,"setContent"))&&(0,b.default)(r,"dom")&&(this.updateProps=!1,r.setContent(C.default.wpautop(this.processContent(t)),{format:"raw"}),this.updateProps=!0)}this.processedContent=!1,this.setState({content:n?t:this.processContent(t)})}}},switchEditorMode:function(e){var t=this;e!==this.state.editorMode&&(this.setState({editorMode:e},(function(){t.props.onModeSwitch(t.state.editorMode)})),setUserSetting("editor",e))},sendAttachment:function(e,t){var n,r,o=t.caption;return M.wp.media.view.settings.captions||delete t.caption,e=M.wp.media.string.props(e,t),n={id:t.id,post_content:t.description,post_excerpt:o},e.linkUrl&&(n.url=e.linkUrl),"image"===t.type?(e.url=e.src,r=M.wp.media.string.image(e),(0,d.default)({align:"align",size:"image-size",alt:"image_alt"},(function(t,r){e[r]&&(n[t]=e[r])}))):"video"===t.type?r=M.wp.media.string.video(e,t):"audio"===t.type?r=M.wp.media.string.audio(e,t):(r=M.wp.media.string.link(e),n.post_title=e.title),r},addMedia:function(t){t.preventDefault();var n,r=this;if((0,c.default)(n)){var o=M.wp.media.controller.Library.extend({defaults:_.defaults({id:"insert",displaySettings:!0,multiple:!0},M.wp.media.controller.Library.prototype.defaults)});(n=M.wp.media.frames.file_frame=M.wp.media({title:ETBuilderBackend.i18n.controls.insertMedia.modalTitleText,state:"insert",states:[new o],frame:"post"})).on("select",(function(t){var o=n.state();if(t=t||o.get("selection"),"embed"!==o.attributes.content)t&&e.when.apply(e,t.map((function(e){var t=o.display(e).toJSON();return r.sendAttachment(t,e.toJSON())}),this)).done((function(){var e=(0,m.default)(arguments).join("\n\n");r.insertMedia(e)}));else{var a=o.props.attributes,i=(0,c.default)(a.url)?"":a.url,l="";if(""===i)return;if("image"===o.attributes.type){var u=(0,c.default)(a.alt)?"":a.alt,s=(0,c.default)(a.width)?"":a.width,d=(0,c.default)(a.height)?"":a.height,f=(0,c.default)(a.align)?"alignnone":"align".concat(a.align),p=(0,c.default)(a.caption)?"":a.caption,h=(0,c.default)(a.link)?"":a.link,y=(0,c.default)(a.linkUrl)?"":a.linkUrl,g=""!==p?"size-medium":"size-medium ".concat(f);if(l="".concat('<img width="').concat(s,'" height="').concat(d,'" src="').concat(i,'" alt="').concat(u,'" class="').concat(g,'" />'),""!==h)l='<a href="'.concat("custom"===h?y:i,'">').concat(l,"</a>");""!==p&&(l='[caption align="'.concat(f,'" width="').concat(s,'" ]').concat(l," ").concat(p,"[/caption]"))}else l="[embed]".concat(i,"[/embed]");r.insertMedia(l)}})),n.on("update",(function(e){var t=(0,c.default)(e.gallery)?"playlist":"gallery",n="playlist"===t?M.wp.media.playlist.shortcode(e).attrs.named:M.wp.media.gallery.shortcode(e).attrs.named,o=(0,c.default)(n.ids)?"":n.ids.join(",");if(""!==o){var a="";(0,d.default)(n,(function(e,t){"ids"!==t&&(a+=" ".concat(t,'="').concat(e,'"'))}));var i="[".concat(t,' ids="').concat(o,'"').concat(a,"]");r.insertMedia(i)}})),n.open()}else n.open()},insertMedia:function(e){if(S.default.appWindow().wpActiveEditor=!1,"html"===getUserSetting("editor")){var t=S.default.$topWindow(".et-fb-tinymce-html-input:visible"),n=t.val()+e;t.val(n),this.setTextareaContent(n)}else M.wp.media.editor.insert(e)},switchToVisual:function(e){e.preventDefault(),this.switchEditorMode("tinymce")},switchToHtml:function(e){e.preventDefault(),this.switchEditorMode("html"),this.processedContent=!0,this.setState({content:this.processContent(this.state.content)})},setActiveModeClass:function(e){var t,n,r,o=(t={"et-fb-switch-editor-mode__tab":!0},n="et-fb-switch-editor-mode__tab--".concat(e),r=!0,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);return e===this.state.editorMode&&(o["et-fb-switch-editor-mode__tab--active"]=!0),(0,i.default)(o)},processContent:function(e){return e=e.replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g,"<p>&nbsp;</p>"),this.isRemoveP&&(e=C.default.removep(e)),e},_onDoubleClick:function(e){e.stopPropagation()},_tinyMCESetup:function(e){e.settings.convert_urls=0,e.settings.remove_script_host=0},getStateContent:function(){return"html"===this.state.editorMode?"<br />\n"===this.state.content?"":this.state.content:C.default.wpautop(this.processContent(this.state.content))},getPropsContent:function(e){var t=e||this.props;return"content"===t.name?(0,g.default)(t,"content",""):(0,g.default)(t,"value","")},render:function(){var e=this.props.additional_attrs?this.props.additional_attrs:{},t=ETBuilderBackend.i18n.controls.tinymce,n=(this.props.className&&this.props.className,this.getStateContent()),o=(0,g.default)(ETBuilderBackend,"tinymcePlugins",["autolink","link","image","lists","print","preview","autoresize","textcolor","table","paste","fullscreen","charmap","emoticons","wpview"]),a={entity_encoding:"raw",skin_url:ETBuilderBackend.tinymceSkinUrl,plugins:o.join(" "),menubar:!1,valid_elements:"*[*]",toolbar:"formatselect,bold,italic,bullist,numlist,link,blockquote,alignleft,aligncenter,alignright,alignjustify,table,strikethrough,underline,hr,forecolor,pastetext,removeformat,outdent,indent,fullscreen,charmap,emoticons,undo,redo",content_css:ETBuilderBackend.tinymceCSSFiles,autoresize_bottom_margin:0,setup:this._tinyMCESetup};if(S.default.condition("is_bfb")&&(a=(0,g.default)(S.default.topWindow(),"tinyMCEPreInit.mceInit.content",{}),(0,c.default)(a.toolbar1)||(a.toolbar1=a.toolbar1.replace("dfw","table,fullscreen"),a.toolbar1=a.toolbar1.replace("wp_more",""))),S.default.condition("is_layout_block")){var i=(0,w.default)((0,g.default)(S.default.topWindow(),"tinymce.AddOnManager.PluginManager.lookup",{})),u=(0,O.default)(o,(function(e){return!(0,v.default)(i,e)}));(0,p.default)((0,g.default)(S.default.topWindow(),"tinymce.AddOnManager.PluginManager.load"))&&(0,d.default)(u,(function(e){S.default.topWindow().tinymce.AddOnManager.PluginManager.load(e,"".concat((0,g.default)(S.default.appWindow(),"et_pb_custom.tinymce_uri"),"/plugins/").concat(e,"/plugin.min.js"))}))}var s=S.default.hasValue(ETBuilderBackend.mediaButtons)?{}:{display:"none"},f="html"===this.state.editorMode?r.default.createElement(r.default.Fragment,null,r.default.createElement("textarea",{id:this.ETBuilderControlTinyMCE,ref:"textarea",className:"et-fb-tinymce-html-input",value:n,onChange:y.default,onInput:this._onInputHTML,onScroll:this._onTextareaScroll,onFocus:this._onFocus,onBlur:this._onBlur}),r.default.createElement(E.default,{context:"code_html",updateContent:this.setTextareaContent,editor:this.uuid})):r.default.createElement(l.default,T({id:this.uuid,ref:"tinymce",content:n,config:a,onInit:this._onInit,onChange:this._onChange,onDoubleClick:this._onDoubleClick,onKeyup:this._onChange,onKeydown:this._onKeyDown,onLoadContent:this._loadtinyMCEContent,onSetContent:this._onChange,onFocus:this._onFocus,onBlur:this._onBlur},e)),h="no"!==x&&r.default.createElement("a",{href:"#",onClick:this.switchToVisual,className:this.setActiveModeClass("tinymce")},t.visual);return r.default.createElement("div",{id:"et-fb-".concat(this.props.name),className:"et-fb-tinymce-buttons"},r.default.createElement("button",{className:"et-fb-settings-option-upload-button et-fb-tinymce-add-media-button et-fb-tinymce-add-media-button--absolute",onClick:this.addMedia},ETBuilderBackend.i18n.controls.insertMedia.buttonText),r.default.createElement("span",{className:"et-fb-tinymce-media-buttons",id:"et-fb-tinymce-".concat(this.props.name,"-media-buttons"),style:s,dangerouslySetInnerHTML:{__html:ETBuilderBackend.mediaButtons}}),r.default.createElement("div",{className:"et-fb-switch-editor-mode"},h,r.default.createElement("a",{href:"#",onClick:this.switchToHtml,className:this.setActiveModeClass("html")},t.text)),f)},_loadtinyMCEContent:function(e,t){(0,f.default)((0,h.default)(this.state.content))||t.setContent(C.default.wpautop(this.processContent(this.state.content)),{format:"raw"})},_onKeyDown:function(e){var t=e.keyCode,n=e.metaKey,r=e.ctrlKey,o=e.altKey;(0,p.default)(KeyboardEvent)&&(83!==t||!n&&!r||o||(S.default.appDocument().dispatchEvent(new KeyboardEvent("keydown",{keyCode:t,metaKey:n,ctrlKey:r,bubbles:!0,cancelable:!0})),e.preventDefault()))},_onChange:function(e,t){if(!this.isUnmounting){var n=(0,c.default)(e.type)?"":e.type;if(!this.props.isItemSelected||!(0,v.default)(["loadcontent","setcontent"],n)){var r=t.getContent({format:"html"}).replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g,"<p>&nbsp;</p>"),o=(0,f.default)(r)?r:C.default.wpautop(r);o="\n"===o.slice(-1)?o.slice(0,-1):o,this.setTextareaContent(o)}}},_onInit:function(e,t){this.editor=t,j&&(t.on("ExecCommand",(function(e){if("mceInsertLink"===e.command){var n=t.$('a[href="_wp_link_placeholder"]')[0];n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest"})}})),t.on("wp-toolbar-toggle",(function(){S.default.$topWindow().trigger("wp-toolbar-toggle")})))},componentWillUnmount:function(){this.isUnmounting=!0,j&&S.default.$topWindow("html, body").removeClass("mce-fullscreen")},_onInputHTML:function(e){e.persist();var t=e.target.value;this.setTextareaContent(t)},_onTextareaScroll:function(t){var n=e(t.currentTarget).closest(".et-fb-tabs__panel");n.scrollTop()||n.scrollTop(1)},setTextareaContent:function(e){if(e!==this.getStateContent()&&e!==this.getPropsContent()){this.isEditing=!0;var t="content"===this.props.name;this.updateProps&&this.props._onChange(this.props.name,e,"",t),this.processedContent=!1,this.setState({content:e})}},getFrameTargetElement:function(e){if((0,s.default)(e))return!1;var t=e.contentWindow;return(0,c.default)(S.default.appWindow().pageYOffset)&&(t=t.document.documentElement?t.document.documentElement:t=document.body),t},_onFocus:function(e){(this.props.module||this.props.isPageSetting)&&k.default.quickAccessHide(!1,e)},_onBlur:function(e){if("html"===this.state.editorMode){if(e.target.value===this.getStateContent())return;this._onInputHTML(e)}},focus:function(){var e=this;if("html"===this.state.editorMode)S.default.$topWindow(this.refs.textarea).trigger("focus");else try{window.tinymce.EditorManager.get(this.uuid).focus()}catch(t){setTimeout((function(){return e.focus()}),100)}},activateEditor:function(){"tinymce"===this.state.editorMode&&S.default.appWindow().tinyMCE.setActive(this.editor),S.default.appWindow().wpActiveEditor=this.uuid,this.focus()},componentDidUpdate:function(){var e=this;setTimeout((function(){var t=S.default.$topWindow(a.default.findDOMNode(e.refs.tinymce)).parent().find("iframe");if(0!==t.length){var n=t.height(),r=t.contents().find("html");if(r.length>0){var o=r.innerHeight();n<o&&t.height(o)}}}),200)},componentDidMount:function(){var t=this;this.props.onModeSwitch(this.state.editorMode);var n=e(a.default.findDOMNode(this.refs.tinymce)).parent().find("iframe"),r=n.attr("id"),o=this.getFrameTargetElement(S.default.topWindow().document.getElementById(r));!1!==o?(S.default.condition("is_bfb")||n.contents().find("head").append("<style type='text/css'> .wpview iframe { max-width: 100% !important; } .wpview { width: auto !important; }</style>"),o.onwheel=function(e){var t,r=n.closest(".et-fb-tabs__panel--active"),o=!1,a=!1;if(t=r.find(".et-fb-form").outerHeight()||0,r.length>0&&(o=r.scrollTop()<1&&e.deltaY<1,a=r.scrollTop()>=t-r.height()&&e.deltaY>=0,o||a))return!1},S.default.$topWindow("#et-fb-".concat(this.props.name,", #et-fb-").concat(this.props.name," *, .et-fb-tinymce-media-buttons a")).on("click",(function(){t.activateEditor()}))):S.default.$topWindow(".et-fb-tinymce-media-buttons a").on("click",(function(){t.activateEditor()}))}});D.defaultProps={onModeSwitch:y.default,isReactClassApproved:{},name:""};var N=D;t.default=N}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={wpautop:function(e){var t="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary",n=!1,r=!1;return-1!==e.indexOf("<object")&&(e=e.replace(/<object[\s\S]+?<\/object>/g,(function(e){return e.replace(/[\r\n]+/g,"")}))),-1===(e=e.replace(/<[^<>]+>/g,(function(e){return e.replace(/[\r\n]+/g," ")}))).indexOf("<pre")&&-1===e.indexOf("<script")||(n=!0,e=e.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,(function(e){return e.replace(/(\r\n|\n)/g,"<wp-line-break>")}))),-1!==e.indexOf("[caption")&&(r=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,(function(e){return(e=(e=e.replace(/<br([^>]*)>/g,"<wp-temp-br$1>")).replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,(function(e){return e.replace(/[\r\n\t]+/," ")}))).replace(/\s*\n\s*/g,"<wp-temp-br />")}))),e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e="".concat(e,"\n\n")).replace(/<br \/>\s*<br \/>/gi,"\n\n")).replace(new RegExp("(<(?:".concat(t,")(?: [^>]*)?>)"),"gi"),"\n$1")).replace(new RegExp("(</(?:".concat(t,")>)"),"gi"),"$1\n\n")).replace(/<hr( [^>]*)?>/gi,"<hr$1>\n\n")).replace(/\s*<option/gi,"<option")).replace(/<\/option>\s*/gi,"</option>")).replace(/\r\n|\r/g,"\n")).replace(/\n\s*\n+/g,"\n\n")).replace(/([\s\S]+?)\n\n/g,"<p>$1</p>\n")).replace(/<p>\s*?<\/p>/gi,"")).replace(new RegExp("<p>\\s*(</?(?:".concat(t,")(?: [^>]*)?>)\\s*</p>"),"gi"),"$1")).replace(/<p>(<li.+?)<\/p>/gi,"$1")).replace(/<p>\s*<blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote>\s*<\/p>/gi,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?(?:".concat(t,")(?: [^>]*)?>)"),"gi"),"$1")).replace(new RegExp("(</?(?:".concat(t,")(?: [^>]*)?>)\\s*</p>"),"gi"),"$1")).replace(/\s*\n/gi,"<br />\n")).replace(new RegExp("(</?(?:".concat(t,")[^>]*>)\\s*<br />"),"gi"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1")).replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi,"[caption$1[/caption]")).replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,(function(e,t,n){return n.match(/<p( [^>]*)?>/)?e:"".concat(t,"<p>").concat(n,"</p>")})),n&&(e=e.replace(/<wp-line-break>/g,"\n")),r&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),e},removep:function(e){var t="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset",n="".concat(t,"|div|p"),r="".concat(t,"|pre"),o=!1,a=!1;return e?(-1===e.indexOf("<pre")&&-1===e.indexOf("<script")||(o=!0,e=e.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,(function(e){return(e=(e=e.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/\r?\n/g,"<wp-line-break>")}))),-1!==e.indexOf("[caption")&&(a=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,(function(e){return e.replace(/<br([^>]*)>/g,"<wp-temp-br$1>").replace(/[\r\n\t]+/,"")}))),-1!==(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("\\s*</(".concat(n,")>\\s*"),"g"),"</$1>\n")).replace(new RegExp("\\s*<((?:".concat(n,")(?: [^>]*)?)>"),"g"),"\n<$1>")).replace(/(<p [^>]+>.*?)<\/p>/g,"$1</p#>")).replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n")).replace(/\s*<p>/gi,"")).replace(/\s*<\/p>\s*/gi,"\n\n")).replace(/\n[\s\u00a0]+\n/g,"\n\n")).replace(/\s*<br ?\/?>\s*/gi,"\n")).replace(/\s*<div/g,"\n<div")).replace(/<\/div>\s*/g,"</div>\n")).replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n")).replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption")).replace(new RegExp("\\s*<((?:".concat(r,")(?: [^>]*)?)\\s*>"),"g"),"\n<$1>")).replace(new RegExp("\\s*</(".concat(r,")>\\s*"),"g"),"</$1>\n")).replace(/<li([^>]*)>/g,"\t<li$1>")).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"\n<option")).replace(/\s*<\/select>/g,"\n</select>")),-1!==e.indexOf("<hr")&&(e=e.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n")),-1!==e.indexOf("<object")&&(e=e.replace(/<object[\s\S]+?<\/object>/g,(function(e){return e.replace(/[\r\n]+/g,"")}))),e=(e=(e=(e=e.replace(/<\/p#>/g,"</p>\n")).replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1")).replace(/^\s+/,"")).replace(/[\s\u00a0]+$/,""),o&&(e=e.replace(/<wp-line-break>/g,"\n")),a&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),e):""}};t.default=r},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=h(n(0)),o=h(n(270)),a=h(n(16)),i=h(n(1)),l=h(n(40)),u=h(n(7)),s=h(n(11)),c=n(67),d=h(n(43)),f=h(n(63)),p=n(2);function h(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}n(1692);var y=(0,o.default)({displayName:"ETBuilderConditionalLogic",mixins:[a.default],getInitialState:function(){return{options:this.props.value,fieldValues:{},selectedValues:{},moduleType:(0,i.default)(this,"props.module.props.module.props.type","")}},componentDidMount:function(){var e=this,t=this.props.module.props.module,n=t.parentModule.props.content,r={};n.map((function(n,o){if(n.address!==t.props.address){var a=(0,i.default)(n,"attrs.field_id","");if(""!==a.trim()){a="et_pb_signup_custom_field"===e.state.moduleType?a:a.toLowerCase();var l=[];if((0,u.default)(["checkbox","radio","select"],n.attrs.field_type)){var c;switch(n.attrs.field_type){case"checkbox":c=n.attrs.checkbox_options;break;case"radio":c=n.attrs.radio_options;break;case"select":c=n.attrs.select_options}0!==(c=""===c||(0,s.default)(c)?[]:c).length&&(l=(c=JSON.parse(c)).map((function(e){return e.value})))}r[a]=l}}})),this.setState({fieldValues:r}),setTimeout((function(){if(!e.state.options){var t=[],n="";for(var r in e.state.fieldValues)if(e.state.fieldValues.hasOwnProperty(r)){n=r;break}var o=(0,i.default)(e,["state","fieldValues",n,0]);t.push({field:n,condition:"is",value:o}),e.setState({options:JSON.stringify(t)}),e.updateOptions(0,n),e._updateFrontEnd()}for(var a={},l=(0,p.isJson)(e.state.options)?JSON.parse(e.state.options):[],u=0;u<l.length;u++)a[u]=l[u].value;e.setState({selectedValues:a})}),0)},updateOptions:function(t,n,r,o,a){var i=(0,p.isJson)(this.state.options)?JSON.parse(this.state.options):[],l=("field".concat(t),"condition".concat(t)),c="value".concat(t),d="",f="";(0,s.default)(this[l])||(d=this[l].value),(0,s.default)(this[c])||(f=this[c].value),!0===r&&(f=(0,s.default)(this.state.selectedValues[t])?"":this.state.selectedValues[t],(0,u.default)(["checkbox","radio","select"],o)&&(f=this.state.fieldValues[n][0]));var h={field:n,condition:d,value:f};i[t]=h;var m=e.intentionallyCloneDeep(this.state.selectedValues);!0===a&&(m[t]=f),this.setState({options:JSON.stringify(i),selectedValues:m}),this._updateFrontEnd()},updateSelected:function(e,t){var n=this,r=(0,p.isJson)(this.state.options)?JSON.parse(this.state.options):[],o=t.target.value,a=this.props.module.props.module.parentModule.props.content,l="input";a.map((function(e,t){var r=(0,i.default)(e,"attrs.field_id","");("et_pb_signup_custom_field"===n.state.moduleType?r:r.toLowerCase())===o&&(l=e.attrs.field_type)})),r[e].field=o,this.setState({options:JSON.stringify(r)}),setTimeout((function(){n.updateOptions(e,o,!0,l)}),0)},addRow:function(e,t){t&&t.preventDefault();var n=this,r=(0,p.isJson)(this.state.options)?JSON.parse(this.state.options):[],o="";for(var a in this.state.fieldValues)if(this.state.fieldValues.hasOwnProperty(a)){o=a;break}var l=(0,i.default)(this,["state","fieldValues",o,0]);!1!==e?r.splice(e+1,0,{field:o,condition:"is",value:l}):r.push({field:o,condition:"is",value:l}),this.setState({options:JSON.stringify(r)}),setTimeout((function(){if(!1!==e)n.updateOptions(e+1,o);else{var t=r.length>0?r.length-1:0;n.updateOptions(t,o)}n._updateFrontEnd()}),0)},removeRow:function(e,t){t.preventDefault();var n=this,r=(0,p.isJson)(this.state.options)?JSON.parse(this.state.options):[];if(r.splice(e,1),0===r.length){var o="";for(var a in this.state.fieldValues)if(this.state.fieldValues.hasOwnProperty(a)){o=a;break}r=[{field:o,condition:"is",value:(0,i.default)(this,["state","fieldValues",o,0])}]}this.setState({options:JSON.stringify(r)}),setTimeout((function(){n._updateFrontEnd()}),0)},_fieldSelect:function(e,t){var n=this,o=this,a=this.props.module.props.module,l=a.parentModule.props.content,u="field".concat(e),s="condition".concat(e),c="value".concat(e),d=t.field,f=this.updateOptions.bind(this,e,d);return r.default.createElement("div",{className:"et-fb-settings-conditional-logic",key:e},r.default.createElement("select",{className:"et-fb-settings-option-select et-fb-main-setting",onChange:this.updateSelected.bind(this,e),ref:function(e){return n[u]=e},value:t.field,disabled:this.props.readonly||!1},l.map((function(e,t){if(e.address!==a.props.address){var n=(0,i.default)(e,"attrs.field_id","");if(""!==n.trim()){n="et_pb_signup_custom_field"===o.state.moduleType?n:n.toLowerCase();var l=(0,i.default)(ETBuilderBackend,"componentDefinitions.fieldsDefaults.et_pb_contact_field.field_title[0]",""),u=(0,i.default)(e,"attrs.field_title",""),s=""!==l&&u===l?n:u;if(""!==s.trim())return r.default.createElement("option",{value:n,key:t},s)}}}))),r.default.createElement("select",{className:"et-fb-settings-option-select et-fb-main-setting",onChange:f,ref:function(e){return n[s]=e},value:t.condition,disabled:this.props.readonly||!1},r.default.createElement("option",{value:"is"},ETBuilderBackend.i18n.controls.conditionalLogic.is),r.default.createElement("option",{value:"is not"},ETBuilderBackend.i18n.controls.conditionalLogic.isNot),r.default.createElement("option",{value:"is greater"},ETBuilderBackend.i18n.controls.conditionalLogic.isGreater),r.default.createElement("option",{value:"is less"},ETBuilderBackend.i18n.controls.conditionalLogic.isLess),r.default.createElement("option",{value:"contains"},ETBuilderBackend.i18n.controls.conditionalLogic.contains),r.default.createElement("option",{value:"does not contain"},ETBuilderBackend.i18n.controls.conditionalLogic.doesNotContain),r.default.createElement("option",{value:"is empty"},ETBuilderBackend.i18n.controls.conditionalLogic.isEmpty),r.default.createElement("option",{value:"is not empty"},ETBuilderBackend.i18n.controls.conditionalLogic.isNotEmpty)),this._fieldSelectValues(e,d,t.value,c,t.condition))},_fieldSelectValues:function(e,t,n,o,a){var i=this,l=(this.props.module.props.module.parentModule.props.content,this.state.fieldValues[t]);(0,s.default)(l)&&(l=[],(0,s.default)(this.state.fieldValues[0])||(l=this.state.fieldValues[0])),(0,s.default)(n)&&(n="");var c=!!(0,u.default)(["is empty","is not empty"],a);return 0===l.length?r.default.createElement("input",{className:"et-fb-settings-option-input et-fb-main-setting",type:"text",onChange:this.updateOptions.bind(this,e,t,!1,!1,!0),ref:function(e){return i[o]=e},disabled:c,value:n,readOnly:this.props.readonly||!1}):r.default.createElement("select",{className:"et-fb-settings-option-select et-fb-main-setting",onChange:this.updateOptions.bind(this,e,t),ref:function(e){return i[o]=e},disabled:c,value:n},l.map((function(e,t){return r.default.createElement("option",{value:e,key:t},e)})))},_optionsControls:function(){var e=this;return((0,p.isJson)(this.state.options)?JSON.parse(this.state.options):[]).map((function(t,n){var o=!e.props.readonly&&!e.props.hideDeleteButton&&r.default.createElement("a",{href:"#",className:"et_options_list_remove",onClick:e.removeRow.bind(e,n)},r.default.createElement(d.default,{icon:"delete",color:"rgb(163, 176, 194)"}));return r.default.createElement("div",{className:"et_options_list_row et_condition_row",key:n},e._fieldSelect(n,t),o)}))},render:function(){var e=this.props.additional_attrs?this.props.additional_attrs:{},t=this.addRow.bind(this,!1,!1),n=!this.props.readonly&&!this.props.hideAddButton&&r.default.createElement("span",{className:"et-fb-item-button-wrap--add"},r.default.createElement(c.Motion,{defaultStyle:{size:.5,opacity:0},style:{size:(0,c.spring)(1,{stiffness:300,damping:20}),opacity:(0,c.spring)(1,{stiffness:300,damping:20})}},(function(e){return r.default.createElement(f.default,{round:!0,style:{opacity:e.opacity,transform:"scale( ".concat(e.size," )")},tooltip:ETBuilderBackend.i18n.controls.moduleItem.addNew,_onClick:t},r.default.createElement(d.default,{size:"14",icon:"add",color:"#FFFFFF"}))})));return r.default.createElement("div",{className:"et_options_list"},this._optionsControls(),r.default.createElement("textarea",m({value:this.state.options,name:this.props.name,id:"et-fb-".concat(this.props.name),onChange:l.default},e)),n)},_updateFrontEnd:function(){var e=this;setTimeout((function(){e.props._onChange(e.props.name,e.state.options,e.props.type)}),0)}});t.default=y}).call(this,n(2))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(0)),o=u(n(270)),a=u(n(16)),i=u(n(1)),l=u(n(43));function u(e){return e&&e.__esModule?e:{default:e}}n(1694);var s=(0,o.default)({displayName:"ETBuilderSelectAnimation",mixins:[a.default],render:function(){var e={none:ETBuilderBackend.i18n.controls.selectAnimation.none,fade:ETBuilderBackend.i18n.controls.selectAnimation.fade,slide:ETBuilderBackend.i18n.controls.selectAnimation.slide,bounce:ETBuilderBackend.i18n.controls.selectAnimation.bounce,zoom:ETBuilderBackend.i18n.controls.selectAnimation.zoom,flip:ETBuilderBackend.i18n.controls.selectAnimation.flip,fold:ETBuilderBackend.i18n.controls.selectAnimation.fold,roll:ETBuilderBackend.i18n.controls.selectAnimation.roll},t=Object.keys(e),n=this;return r.default.createElement("div",{className:"et_select_animation"},t.map((function(t,o){var a="";t===n.props.value&&(a="et_active_animation");var u="animation-".concat(t),s=(0,i.default)(e,t,e.none);return r.default.createElement("div",{className:"et_animation_button",key:o},r.default.createElement("a",{href:"#",className:a,onClick:n._onClick.bind(n,t)},r.default.createElement("span",{className:"et_animation_button_title","data-value":t,key:o},s),r.default.createElement("span",{className:"et_animation_button_icon"},r.default.createElement(l.default,{icon:u}))))})))},_onClick:function(e,t){t.preventDefault(),this.props._onChange(this.props.name,e)}});t.default=s},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(1505));function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1696);t.default=function(e){return r.default.createElement(o.default,l(l({},e),{},{className:"et_box_shadow ".concat(e.className)}))}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n(0)),a=u(n(1)),i=u(n(34)),l=u(n(1505));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){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}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}n(1698);var m=function(e){!function(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&&d(e,t)}(u,e);var t,n,r,l=f(u);function u(){return s(this,u),l.apply(this,arguments)}return t=u,(n=[{key:"renderContent",value:function(e){return(0,i.default)(e,"content")?o.default.createElement("span",{className:this.classes.content},o.default.createElement("span",{className:(0,a.default)(e,"class")},e.content)):null}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(l.default),y=m;t.default=y},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r},a=["src"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.default=function(e){var t=e.src,n=l(e,a);return o.default.createElement("video",i({},n,{src:t}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(0)),o=u(n(797)),a=u(n(1497)),i=n(785),l=["src"];function u(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.default=function(e){var t,n,u=e.src,d=c(e,l);return r.default.createElement(a.default,s({},d,{src:(t=u,(0,i.setArgs)((0,o.default)("v",(0,i.getArgs)(t)),(n=function(e){var t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:void 0}(t),"https://www.youtube.com/embed/".concat(n))))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),o=c(n(196)),a=c(n(793)),i=c(n(393)),l=c(n(1497)),u=n(785),s=["src"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=(0,o.default)(a.default,(0,i.default)("/"),u.clearArgs);t.default=function(e){var t,n,o=e.src,a=f(e,s);return r.default.createElement(l.default,d({},a,{src:(t=o,(0,u.setArgs)((0,u.getArgs)(t),(n=p(t),"https://player.vimeo.com/video/".concat(n)))),frameBorder:"0"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),o=c(n(196)),a=c(n(793)),i=c(n(393)),l=c(n(1497)),u=n(785),s=["src"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=(0,o.default)(a.default,(0,i.default)("/"),u.clearArgs);t.default=function(e){var t,n,o=e.src,a=f(e,s);return r.default.createElement(l.default,d({},a,{src:(t=o,(0,u.setArgs)((0,u.getArgs)(t),(n=p(t),"https://www.dailymotion.com/embed/video/".concat(n)))),frameBorder:"0"}))}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=O(n(3));n(1705);var i=O(n(28)),l=O(n(196)),u=O(n(798)),s=O(n(508)),c=O(n(47)),d=O(n(215)),f=O(n(393)),p=O(n(786)),h=O(n(799)),m=O(n(822)),y=O(n(796)),g=O(n(1706)),b=O(n(1710)),v=n(1544),_=O(n(1713)),w=O(n(1714));function O(e){return e&&e.__esModule?e:{default:e}}function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}function S(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function T(e){var t=function(){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}}();return function(){var n,r=x(e);if(t){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return M(this,n)}}function M(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}var D=(0,l.default)((0,u.default)((0,h.default)(isNaN)),(0,p.default)(parseInt),(0,f.default)(","),i.default),N=function(e){!function(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&&P(e,t)}(i,e);var t,n,r,a=T(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=a.call(this)).getValue=e.getValue.bind(j(e)),e.updateValue=e.updateValue.bind(j(e)),e.onRemove=(0,l.default)(e.onRemove.bind(j(e)),parseInt),e.onClick=e.onClick.bind(j(e)),e.find=e.find.bind(j(e)),e.move=e.move.bind(j(e)),e}return t=i,(n=[{key:"UNSAFE_componentWillMount",value:function(){(0,v.preLoad)(this.getValue())}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.value;(0,v.preLoad)(D(t))}},{key:"updateValue",value:function(e){this.props._onChange(this.props.name,(0,y.default)(",",e),this.props.type)}},{key:"onClick",value:function(){var e=this;(0,b.default)({multiple:!0,selected:this.getValue()}).then((0,p.default)((0,s.default)("id"))).then((function(t){return(0,c.default)(e.getValue(),t)})).then(this.updateValue)}},{key:"onRemove",value:function(e){this.updateValue((0,u.default)((0,h.default)((0,m.default)(e)),this.getValue()))}},{key:"getValue",value:function(){return D(this.props.value)}},{key:"move",value:function(e,t){var n=this.find(e).attachment,r=this.getValue().filter((0,h.default)((0,m.default)(e)));this.updateValue([].concat(S(r.slice(0,t)),[n],S(r.slice(t))))}},{key:"find",value:function(e){return{attachment:this.getValue().find((0,m.default)(e)),index:(0,d.default)(this.getValue(),(0,m.default)(e))}}},{key:"renderItems",value:function(){var e=this;return[].concat(S(this.getValue().map((function(t){return o.default.createElement(_.default,{key:t,id:t,onRemove:e.onRemove,readOnly:e.props.readonly})}))),[o.default.createElement(w.default,{key:-1,draggable:!1,onClick:this.onClick,title:ETBuilderBackend.i18n.controls.uploadGallery.addImages,readOnly:this.props.readonly})])}},{key:"render",value:function(){return o.default.createElement(g.default,{className:"et-fb-control-images-upload",type:"image-upload",move:this.move,find:this.find},this.renderItems())}}])&&E(t.prototype,n),r&&E(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.Component);N.propTypes={value:a.default.string};var L=N;t.default=L},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=n(1490),i=d(n(1492)),l=d(n(3)),u=d(n(1707)),s=d(n(1708));n(1709);var c=["children","type","find","move"];function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var _=function(e){!function(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&&m(e,t)}(d,e);var t,n,r,l=y(d);function d(e){var t,n=e.type;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=l.call(this)).defineContainer(n),t.defineItem(n),t.renderItem=t.renderItem.bind(b(t)),t}return t=d,(n=[{key:"getType",value:function(){return this.props.type}},{key:"getContainer",value:function(){return this.Container}},{key:"getItem",value:function(){return this.Item}},{key:"defineItem",value:function(e){var t=(0,a.DragSource)(e,{beginDrag:function(e){return{id:e.id,originalIndex:e.find(e.id).index}},endDrag:function(e,t){var n=t.getItem(),r=n.id,o=n.originalIndex;t.didDrop()||e.move(r,o)}},(function(e,t){return{connectDragSource:e.dragSource(),isDragging:t.isDragging()}})),n=(0,a.DropTarget)(e,{canDrop:function(){return!1},hover:function(e,t){var n=t.getItem().id,r=e.id;if(n!==r){var o=e.find(r).index;e.move(n,o)}}},(function(e){return{connectDropTarget:e.dropTarget()}}));this.Item=n(t(s.default))}},{key:"defineContainer",value:function(e){var t=(0,a.DropTarget)(e,{drop:function(){}},(function(e){return{connectDropTarget:e.dropTarget()}}));this.Container=t(u.default)}},{key:"renderItem",value:function(e){var t=this.getItem(),n=this.props,r=n.find,a=n.move;return!1===e.props.draggable?e:o.default.createElement(t,{id:e.props.id,key:e.props.id,find:r,move:a},e)}},{key:"render",value:function(){var e=this.getContainer(),t=this.props,n=t.children,r=(t.type,t.find,t.move,p(t,c));return o.default.createElement(i.default,null,o.default.createElement(e,r,n.map(this.renderItem)))}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.Component);_.propTypes={tagName:l.default.string,move:l.default.func.isRequired,find:l.default.func.isRequired,type:l.default.string.isRequired,children:l.default.node},_.defaultProps={tagName:"div",children:o.default.ReactNode};var w=_;t.default=w},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=(o=n(3))&&o.__esModule?o:{default:o},l=["connectDropTarget","tagName","children"];function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){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}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var y=function(e){!function(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&&f(e,t)}(i,e);var t,n,r,o=p(i);function i(){return c(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){var e=this.props,t=e.connectDropTarget,n=e.tagName,r=e.children,o=s(e,l);return t((0,a.createElement)(n,o,r))}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.Component);y.propTypes={tagName:i.default.string,connectDropTarget:i.default.func.isRequired,children:i.default.node},y.defaultProps={tagName:"div",children:a.default.ReactNode};var g=y;t.default=g},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=n(27),l=(o=n(3))&&o.__esModule?o:{default:o};function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){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}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var m=function(t){!function(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&&d(e,t)}(u,t);var n,r,o,l=f(u);function u(){return s(this,u),l.apply(this,arguments)}return n=u,(r=[{key:"render",value:function(){var t=this.props,n=t.children,r=t.connectDragSource,o=t.connectDropTarget,l=t.isDragging,u=a.default.Children.only(n);return a.default.cloneElement(u,{ref:function(t){var n=(0,i.findDOMNode)(t),a=e(n);o(n),r(n),a.addClass("et-fb-draggable-item"),l?a.addClass("et-fb-draggable-item--dragging"):a.removeClass("et-fb-draggable-item--dragging")}})}}])&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),u}(a.Component);m.propTypes={connectDragSource:l.default.func.isRequired,connectDropTarget:l.default.func.isRequired,children:l.default.node,isDragging:l.default.bool.isRequired},m.defaultProps={children:a.default.ReactNode};var y=m;t.default=y}).call(this,n(8))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(508)),o=a(n(2));function a(e){return e&&e.__esModule?e:{default:e}}var i={multiple:!1,mediaTypes:"image",selected:[]};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=o.default.$topWindow(".et-cloud-item-editor").length>0;t&&o.default.$topWindow("body").addClass("et-bp-settings-hide-settings-modal");var n=t?o.default.appWindow():o.default.topWindow(),a=n.wp.media({library:{type:e.mediaTypes},multiple:!!e.multiple&&"add"}),l=function(e){return e(a.state().get("selection").map((0,r.default)("attributes")))};return a.on("open",(function(){var t=a.state().get("selection");e.selected.map((function(e){return t.add(o.default.topWindow().wp.media.attachment(e))}))})),a.on("close",(function(){o.default.$topWindow("body").removeClass("et-bp-settings-hide-settings-modal")})),a.open(),new Promise((function(e){return a.on("select",(function(t){return l(e)}))}))}},function(e,t,n){var r=n(54)("find",n(58));r.placeholder=n(48),e.exports=r},function(e,t,n){var r=n(54)("noop",n(40),n(130));r.placeholder=n(48),e.exports=r},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=p(n(3)),i=n(67),l=p(n(5)),u=p(n(34)),s=p(n(1)),c=p(n(43)),d=p(n(1544)),f=p(n(303));function p(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e){var t=function(){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}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}var w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"thumbnail";return(0,d.default)(e).then((function(e){var n=(0,s.default)(e,"guid","");return t&&(0,u.default)(e,"metadata.".concat(t,".0"))?(0,s.default)(e,"metadata.".concat(t,".0"),n):n}))},O=function(e){!function(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&&y(e,t)}(u,e);var t,n,r,a=g(u);function u(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(e=a.call(this)).state={url:null,active:!1},e.setUrl=e.setUrl.bind(v(e)),e.onMouseOver=e.onMouseOver.bind(v(e)),e.onMouseLeave=e.onMouseLeave.bind(v(e)),e.onRemove=e.onRemove.bind(v(e)),e}return t=u,(n=[{key:"onMouseOver",value:function(){this.setState({active:!0})}},{key:"onMouseLeave",value:function(){this.setState({active:!1})}},{key:"onRemove",value:function(e){e.preventDefault(),this.props.onRemove&&this.props.onRemove(this.props.id)}},{key:"componentDidMount",value:function(){w(this.props.id).then(this.setUrl)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;this.props.id!==t&&w(t).then(this.setUrl)}},{key:"setUrl",value:function(e){this.setState({url:e})}},{key:"renderDelete",value:function(){var e=this,t={opacity:this.state.active?(0,i.spring)(1,{stiffness:300,damping:20}):(0,i.spring)(0,{stiffness:300,damping:20}),scale:this.state.active?(0,i.spring)(1,{stiffness:300,damping:20}):(0,i.spring)(0,{stiffness:300,damping:20}),top:this.state.active?(0,i.spring)(5,{stiffness:300,damping:20}):(0,i.spring)(-10,{stiffness:300,damping:20}),right:this.state.active?(0,i.spring)(5,{stiffness:300,damping:20}):(0,i.spring)(-10,{stiffness:300,damping:20})};return o.default.createElement(i.Motion,{style:t},(function(t){return o.default.createElement("button",{className:"et-fb-control-images-upload--item-delete",onClick:e.onRemove,style:{opacity:t.opacity,transform:"scale( ".concat(t.scale," )"),top:t.top}},o.default.createElement(c.default,{icon:"delete",color:"#fff"}))}))}},{key:"renderLoading",value:function(){return o.default.createElement("div",{className:"et-fb-control-images-upload--item-wrapper loading"},o.default.createElement("div",{className:"et-fb-control-images-upload--item",onMouseOver:this.onMouseOver,onMouseOut:this.onMouseLeave},o.default.createElement(f.default,{isLoading:!0})),!this.props.readonly&&this.renderDelete())}},{key:"renderAttachment",value:function(){return o.default.createElement("div",{className:"et-fb-control-images-upload--item-wrapper"},o.default.createElement("div",{className:"et-fb-control-images-upload--item",style:{backgroundImage:"url(".concat(this.state.url,")")},onMouseOver:this.onMouseOver,onMouseOut:this.onMouseLeave},!this.props.readonly&&this.renderDelete()))}},{key:"render",value:function(){return(0,l.default)(this.state.url)?this.renderLoading():this.renderAttachment()}}])&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Component);O.propTypes={id:a.default.number,onRemove:a.default.func};var k=O;t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(43));function a(e){return e&&e.__esModule?e:{default:e}}n(1715);t.default=function(e){var t=e.onClick,n=e.title;return!e.readonly&&r.default.createElement("div",{className:"et-fb-add-media",onClick:t},r.default.createElement("div",{className:"et-fb-add-media--container"},r.default.createElement("div",{className:"et-fb-add-media--button"},r.default.createElement(o.default,{icon:"add",color:"#fff"})),r.default.createElement("label",{className:"et-fb-add-media--title et-fb-form__label"},n)))}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=_(n(0)),a=_(n(13)),i=_(n(11)),l=_(n(5)),u=_(n(35)),s=_(n(12)),c=_(n(4)),d=_(n(148)),f=(_(n(34)),_(n(1))),p=_(n(31)),h=_(n(40)),m=_(n(41)),y=_(n(63)),g=_(n(22)),b=_(n(6)),v=n(2);function _(e){return e&&e.__esModule?e:{default:e}}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function k(e){var t=function(){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}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C(e)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}n(1717);var P=(0,f.default)((0,v.topWindow)(),"google.maps",(0,f.default)((0,v.appWindow)(),"google.maps",!1)),T=P&&new P.Geocoder,M=(0,a.default)({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-center-map":!0}),j=(0,a.default)({"et-fb-settings-button--center-map-update":!0,"et-fb-settings-button--additional-button":!0}),x=P?{url:"".concat(ETBuilderBackend.images_uri,"/marker.png"),size:new P.Size(46,43),anchor:new P.Point(16,43)}:{},D={coord:[1,1,46,43],type:"rect"},N=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},L=function(e,t){return new P.LatLng(N(e)?parseFloat(e):0,N(t)?parseFloat(t):0)},R=function(e){(0,f.default)(window,"alert",h.default)(e)},A=function(e){!function(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&&O(e,t)}(h,e);var t,n,r,a=k(h);function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(t=a.call(this,e)).state={updateMapSize:!1,contentUpdate:!1},t.isUpdating=!1,t.forceCenter=!0,t.markers=[],t.onClick=t.onClick.bind(C(t)),t.updateMap=t.updateMap.bind(C(t)),t.geoCodeCallback=t.geoCodeCallback.bind(C(t)),t.geoCodePinCallback=t.geoCodePinCallback.bind(C(t)),t.zoomChanged=t.zoomChanged.bind(C(t)),t.centerChanged=t.centerChanged.bind(C(t)),t.dragEnd=t.dragEnd.bind(C(t)),t.handleContentChange=t.handleContentChange.bind(C(t)),t.handleMapWidthChange=t.handleMapWidthChange.bind(C(t)),t.debouncedCenterChanged=(0,m.default)(t.centerChanged,500),t.debouncedUpdateMap=(0,m.default)(t.updateMap,200),t.debouncedWidthChange=(0,m.default)(t.handleMapWidthChange,500),t}return t=h,n=[{key:"componentDidMount",value:function(){P&&(b.default.addSettingsModalResizeListener(this.debouncedWidthChange),b.default.addChangeListener(this.debouncedWidthChange),b.default.addModuleItemsActionsListener(this.handleContentChange),this.wasModuleItemSettings=this.isModuleItemSettings(),this.createMap(),this.debouncedUpdateMap())}},{key:"componentDidUpdate",value:function(){if(P){var e=this.isModuleItemSettings();e&&!this.wasModuleItemSettings&&(this.forceCenter=!0),e!==this.wasModuleItemSettings&&this.removeMarkers(),this.wasModuleItemSettings=e,this.debouncedUpdateMap()}}},{key:"componentWillUnmount",value:function(){P&&P.event.clearInstanceListeners(this.map),this.debouncedUpdateMap.flush(),this.debouncedCenterChanged.cancel(),this.debouncedWidthChange.cancel(),b.default.removeSettingsModalResizeListener(this.debouncedWidthChange),b.default.removeChangeListener(this.debouncedWidthChange),b.default.removeModuleItemsActionsListener(this.handleContentChange)}},{key:"onClick",value:function(){this.geoCodeAddress()}},{key:"getModuleAttributeName",value:function(e){return this.isModuleItemSettings()&&"zoom_level"!==e?"pin_".concat(e):e}},{key:"getModuleAttributeValue",value:function(e){var t=this.getModuleAttributeName(e),n=(0,f.default)(this.props.moduleAttrs,t);return(0,f.default)(this.props,t,n)}},{key:"getAddress",value:function(){return(0,d.default)(this.getModuleAttributeValue("address"))}},{key:"getModule",value:function(){return(0,f.default)(this,"props.module.props.module")}},{key:"moduleSettingsChange",value:function(e,t){var n=(0,f.default)(this.props,"disableAction",!1),r=(0,f.default)(this.props,"_onChange");n&&(0,u.default)(r)?r(e,t):this.props.isItemSelected?g.default.multiSelectSettingsChange(this.getModule(),e,t):g.default.moduleSettingsChange(this.getModule(),e,t)}},{key:"geoCodeAddress",value:function(){var e=this.getAddress();e.length<=0||!1===T||T.geocode({address:e},this.geoCodeCallback)}},{key:"geoCodePinCallback",value:function(e,t){t===P.GeocoderStatus.OK?e[0]?(this.forceCenter=!0,this.moduleSettingsChange(this.getModuleAttributeName("address"),e[0].formatted_address)):R(ETBuilderBackend.i18n.controls.centerMap.noResults):R("".concat(ETBuilderBackend.i18n.controls.centerMap.geoCodeError_2,": ").concat(t))}},{key:"geoCodeCallback",value:function(e,t){if(t===P.GeocoderStatus.OK){var n=this.getAddress(),r=e[0],o=r.geometry.location,a=function(e){var t=e.split(","),n=!!(0,i.default)(t[0])&&parseFloat(t[0]),r=!!(0,i.default)(t[1])&&parseFloat(t[1]);return!(!n||isNaN(n)||!r||isNaN(r))&&L(n,r)}(n);a&&(o=a),isNaN(o.lat())||isNaN(o.lng())?R(ETBuilderBackend.i18n.controls.centerMap.mapPinAddressInvalid):(this.moduleSettingsChange(this.getModuleAttributeName("address"),r.formatted_address),this.moduleSettingsChange(this.getModuleAttributeName("address_lat"),o.lat()),this.moduleSettingsChange(this.getModuleAttributeName("address_lng"),o.lng()),this.removeMarkers(),this.forceCenter=!0)}else R("".concat(ETBuilderBackend.i18n.controls.centerMap.geoCodeError,": ").concat(t))}},{key:"isModuleItemSettings",value:function(){return!(0,i.default)((0,f.default)(this,"props.module.props.module.isModuleItem"))}},{key:"handleContentChange",value:function(){this.removeMarkers()}},{key:"handleMapWidthChange",value:function(){this.map&&(P.event.trigger(this.map,"resize"),this.updateMap())}},{key:"allowEvent",value:function(){return!this.isUpdating&&!this.props.readonly}},{key:"zoomChanged",value:function(){this.allowEvent()&&this.moduleSettingsChange("zoom_level",this.map.getZoom())}},{key:"centerChanged",value:function(){if(this.allowEvent()&&!this.isModuleItemSettings()){var e=this.map.getCenter(),t=e.lat(),n=e.lng(),r=this.getModuleAttributeValue("address_lat"),o=this.getModuleAttributeValue("address_lng");t!==r&&this.moduleSettingsChange("address_lat",t),n!==o&&this.moduleSettingsChange("address_lng",n)}}},{key:"dragEnd",value:function(){if(this.allowEvent()){var e=this.markers[0].getPosition();this.moduleSettingsChange(this.getModuleAttributeName("address_lat"),e.lat()),this.moduleSettingsChange(this.getModuleAttributeName("address_lng"),e.lng());var t=L(e.lat(),e.lng());T.geocode({latLng:t},this.geoCodePinCallback)}}},{key:"createMap",value:function(){P&&(this.map=new P.Map(this.mapContainer,{gestureHandling:"cooperative",mapTypeId:P.MapTypeId.ROADMAP,zoomControl:!this.props.readonly,mapTypeControl:!this.props.readonly,scaleControl:!this.props.readonly,streetViewControl:!this.props.readonly,fullscreenControl:!this.props.readonly,scrollwheel:!this.props.readonly,draggable:!this.props.readonly,disableDoubleClickZoom:this.props.readonly}),this.props.readonly||(this.map.addListener("zoom_changed",this.zoomChanged),this.map.addListener("dragend",this.debouncedCenterChanged)))}},{key:"removeMarkers",value:function(){(0,p.default)(this.markers,(function(e){(0,s.default)(e)&&e.setMap(null)})),this.markers=[]}},{key:"addMarkers",value:function(){var e=this,t=this.getModule(),n=(0,f.default)(t,"props.content"),r=this.getModuleAttributeValue("address_lat"),o=this.getModuleAttributeValue("address_lng");if((0,l.default)(n)||!(0,c.default)(n)){if(this.isModuleItemSettings()){var a=new P.Marker({map:this.map,position:L(r,o),draggable:!this.props.readonly,icon:x,shape:D});a.addListener("dragend",this.dragEnd),this.markers=[a]}}else(0,c.default)(n)&&(this.markers=(0,p.default)(n,(function(t){return!(0,i.default)(t)&&new P.Marker({map:e.map,position:L(t.attrs.pin_address_lat,t.attrs.pin_address_lng),icon:x,shape:D})})))}},{key:"updateMap",value:function(){var e=this.getModuleAttributeValue("address_lat"),t=this.getModuleAttributeValue("address_lng"),n=function(e){return N(e)?parseInt(e,10):10}(this.getModuleAttributeValue("zoom_level"));this.isUpdating=!0,n&&this.map.setZoom(n),this.isModuleItemSettings()&&!this.forceCenter||(this.map.setCenter(L(e,t)),this.forceCenter=!1),(0,l.default)(this.markers)&&this.addMarkers(),this.isUpdating=!1}},{key:"render",value:function(){var e=this,t=!this.props.readonly&&!this.props.hideUpdateButton&&o.default.createElement(y.default,{className:j,_onClick:this.onClick,inverse:!0},ETBuilderBackend.i18n.controls.centerMap.updateMapButtonText);return o.default.createElement("div",{className:M},t,o.default.createElement("div",{className:"et-fb-settings-option-center-map",ref:function(t){return e.mapContainer=t}}))}}],n&&w(t.prototype,n),r&&w(t,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(o.default.Component),I=A;t.default=I},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e,r){function o(e){return o="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},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(0)),i=c(n(3)),l=c(n(13)),u=n(93),s=c(n(11));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}n(1719);var b=function(t){!function(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&&h(e,t)}(d,t);var n,o,i,c=m(d);function d(){return f(this,d),c.apply(this,arguments)}return n=d,(o=[{key:"_openLinkInNewTab",value:function(t){var n=t.target.href;(0,s.default)(n)||(t.preventDefault(),e.topWindow().open(n,"_blank").focus())}},{key:"componentDidMount",value:function(){this.$warningTag=r(this.warningTag),this.$warningTag.on("click","a",this._openLinkInNewTab)}},{key:"componentWillUnmount",value:function(){this.$warningTag.off("click","a",this._openLinkInNewTab)}},{key:"render",value:function(){var e=this,t={"et-fb-main-settings-option":!0};return this.props.className&&(t[this.props.className]=!0),this.props.value!==this.props.display_if?null:a.default.createElement("div",{className:(0,l.default)(t),dangerouslySetInnerHTML:{__html:(0,u.decode)(this.props.message)},ref:function(t){return e.warningTag=t}})}}])&&p(n.prototype,o),i&&p(n,i),Object.defineProperty(n,"prototype",{writable:!1}),d}(a.Component);b.propTypes={display_if:i.default.bool,message:i.default.string,module:i.default.object,name:i.default.string,type:i.default.string,value:i.default.bool};var v=b;t.default=v}).call(this,n(2),n(8))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=ne(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=te(n(3)),i=te(n(123)),l=te(n(13)),u=te(n(58)),s=te(n(9)),c=te(n(1)),d=te(n(34)),f=te(n(7)),p=te(n(4)),h=te(n(5)),m=te(n(42)),y=te(n(35)),g=te(n(163)),b=te(n(12)),v=te(n(11)),_=te(n(17)),w=te(n(31)),O=te(n(359)),k=te(n(124)),S=te(n(69)),C=te(n(28)),E=te(n(126)),P=te(n(199)),T=n(506),M=n(808),j=n(621),x=n(783),D=n(60),N=n(94),L=n(785),R=te(n(84)),A=te(n(14)),I=te(n(792)),B=te(n(1531)),F=te(n(457)),W=te(n(1721)),V=te(n(1532)),U=te(n(43)),G=te(n(1498)),H=te(n(616)),z=te(n(1538)),q=te(n(1542)),K=te(n(164)),$=te(n(1539)),Y=te(n(1489)),X=te(n(18)),J=te(n(791)),Q=te(n(2)),Z=te(n(1543)),ee=te(n(15));function te(e){return e&&e.__esModule?e:{default:e}}function ne(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(ne=function(e){return e?n:t})(e)}function re(e){return function(e){if(Array.isArray(e))return oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oe(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}function se(e){var t=function(){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}}();return function(){var n,r=fe(e);if(t){var o=fe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ce(this,n)}}function ce(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return de(e)}function de(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fe(e){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fe(e)}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1549);var he={gradient:B.default,"gradient-stops":W.default,color:I.default,"color-alpha":I.default,multiple_buttons:$.default,number:F.default,range:V.default,select:H.default,"select-mask":z.default,"select-pattern":z.default,text:F.default,upload:q.default,yes_no_button:Y.default},me=function(e){!function(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&&ue(e,t)}(I,e);var t,n,r,a=se(I);function I(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,I),pe(de(o=a.call(this,e)),"componentDidMount",(function(){i.default.rebuild(),window.addEventListener("ai_prompt_use_text_click",o.setAIBackgroundImage)})),pe(de(o),"componentWillUnmount",(function(){window.removeEventListener("ai_prompt_use_text_click",o.setAIBackgroundImage)})),pe(de(o),"setAIBackgroundImage",(function(e){var t=e.detail,n=t.text,r=t.fieldName;("background_image"===r||(0,P.default)("_bg_image"))&&o._onChange(r,n)})),pe(de(o),"_onGradientStopClick",(function(e){var t=o.state.activeGradientStop,n={activeGradientStop:e.uuid,name:e.uuid};e.color&&-1!==e.color.indexOf("gcid-")&&(n.colorEditId=e.color,n.currentGlobalColorId=e.color),e.uuid&&e.uuid!==t||(n.activeGradientStop=!1,n.name=!1,n.colorEditId=null,n.currentGlobalColorId=null),o.setState(n)})),pe(de(o),"_getParsedGradient",(function(){return o.state.parsedGradient})),pe(de(o),"_getGradientActiveStop",(function(){return o.state.activeGradientStop})),pe(de(o),"_getParsedGradientStops",(function(){var e=Q.default.gradientFieldsMapping("stops"),t=o._getAttrsByTemplate(e,!0);return!!t&&(0,x.parseGradientString)(t)})),pe(de(o),"_getRawGradientStops",(function(){var e=Q.default.gradientFieldsMapping("stops"),t=o._getAttrsByTemplate(e,!0);return t||!1})),pe(de(o),"_getGradientUnit",(function(){var e=Q.default.gradientFieldsMapping("unit"),t=o._getAttrsByTemplate(e,!0);return t||!1})),o.defaultTab="color",o.state={activeGradientStop:!1,activeTab:e.activeTab||o.defaultTab,fieldNameGradientStops:null===(t=o._getFieldByTemplate("color_gradient_stops",!0))||void 0===t?void 0:t.name,fieldNameGradientUnit:null===(n=o._getFieldByTemplate("color_gradient_unit",!0))||void 0===n?void 0:n.name,fieldNameUseGradient:null===(r=o._getFieldByTemplate("use_color_gradient",!0))||void 0===r?void 0:r.name,parsedGradient:o._getParsedGradientStops(),stops:o._getRawGradientStops(),unit:o._getGradientUnit()},o._onClickTabNav=o._onClickTabNav.bind(de(o)),o._onMouseEnterTabNav=o._onMouseEnterTabNav.bind(de(o)),o._onMouseLeaveTabNav=o._onMouseLeaveTabNav.bind(de(o)),o._onChange=o._onChange.bind(de(o)),o._onMouseEnterFormGroup=o._onMouseEnterFormGroup.bind(de(o)),o._onMouseLeaveFormGroup=o._onMouseLeaveFormGroup.bind(de(o)),o._onChangeSvg=o._onChangeSvg.bind(de(o)),o._onChangeGradient=o._onChangeGradient.bind(de(o)),o._onMouseEnterFormGroupGradient=o._onMouseEnterFormGroupGradient.bind(de(o)),o._onMouseLeaveFormGroupGradient=o._onMouseLeaveFormGroupGradient.bind(de(o)),o._onResetDynamic=o._onResetDynamic.bind(de(o)),o._onInheritDynamic=o._onInheritDynamic.bind(de(o)),o}return t=I,n=[{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props,n=t.backgroundFields,r=t.background_fields;(0,m.default)(e.backgroundFields,n)&&(0,m.default)(e.background_fields,r)||(this._backgroundFields=!1,this._tabs=!1)}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,m.default)(e,this.props)||!(0,m.default)(t,this.state)}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.activeTabMode,r=this.state,o=r.activeGradientStop,a=(r.parsedGradient,r.stops!==t.stops),i=n!==e.activeTabMode;o||!a&&!i||this.setState({parsedGradient:this._getParsedGradientStops()})}},{key:"_onClickTabNav",value:function(e){e.preventDefault();var t=e.target.getAttribute("data-tab");this._isTabDisabled(t)||this.setState({activeTab:t})}},{key:"_onMouseEnterTabNav",value:function(e){var t=this.props,n=t.toggle_slug,r=t.tab_slug,o=t.context_menu,a=t.onMouseEnterGroup;if((0,y.default)(a)){var i=e.target.getAttribute("data-tab"),l=A.default.getI18n("controls.background.".concat(i));a({fieldName:this._getBackgroundBase(),fieldLabel:l,fieldType:"background-".concat(i),toggleId:n,toggleGroupId:r,fieldContextMenu:o})}}},{key:"_onMouseLeaveTabNav",value:function(){var e=this.props.onMouseLeaveGroup;(0,y.default)(e)&&e({fieldName:!1,fieldLabel:""})}},{key:"_onMouseEnterFormGroup",value:function(e){var t=this._getField(e);if(t&&"use_color_gradient"!==t.field_template){var n=this.props,r=n.onMouseEnterGroup,o=n.toggle_slug,a=n.tab_slug;if((0,y.default)(r)){var i=(0,c.default)(t,"data_type",!1),l=i?"".concat(t.type,"_").concat(i):t.type,u=(0,c.default)(t,"context_menu",!0);r({fieldName:t.name,fieldLabel:t.label,fieldType:l,toggleId:o,toggleGroupId:a,fieldContextMenu:u})}}}},{key:"_onMouseLeaveFormGroup",value:function(e){var t=this._getField(e);if(t&&"use_color_gradient"!==t.field_template){var n=this.props,r=n.onMouseLeaveGroup,o=n.toggle_slug,a=n.tab_slug;if((0,y.default)(r)){var i=(0,c.default)(t,"data_type",!1),l=i?"".concat(t.type,"_").concat(i):t.type,u=(0,c.default)(t,"context_menu",!0);r({fieldName:t.name,fieldLabel:t.label,fieldType:l,toggleId:o,toggleGroupId:a,fieldContextMenu:u})}}}},{key:"_onMouseEnterFormGroupGradient",value:function(e,t){var n=this._getField(e);if(n&&"use_color_gradient"===n.field_template){var r=this._getFieldByTemplate(Q.default.gradientFieldsMapping(t));if(r)this._onMouseEnterFormGroup(r.name);else{var o=this.props,a=o.onMouseEnterGroup,i=o.toggle_slug,l=o.tab_slug;if((0,y.default)(a)){var u="preview"===t?"background-gradient":n.type,s=(0,c.default)(n,"data_type",!1);s&&(u="".concat(u,"_").concat(s)),a({fieldName:this._getBackgroundBase(),fieldLabel:A.default.getI18n("controls.background.gradientColors"),fieldType:u,toggleId:i,toggleGroupId:l,fieldContextMenu:(0,c.default)(n,"context_menu")})}}}}},{key:"_onMouseLeaveFormGroupGradient",value:function(e,t){var n=this._getField(e);if(n&&"use_color_gradient"===n.field_template){var r=this._getFieldByTemplate(Q.default.gradientFieldsMapping(t));if(r)this._onMouseLeaveFormGroup(r.name);else{var o=this.props,a=o.onMouseLeaveGroup,i=o.toggle_slug,l=o.tab_slug;if((0,y.default)(a)){var u=(0,c.default)(n,"data_type",!1),s=u?"".concat(n.type,"_").concat(u):n.type,d=(0,c.default)(n,"context_menu",!0);a({fieldName:this._getBackgroundBase(),fieldLabel:A.default.getI18n("controls.background.gradientColors"),fieldType:s,toggleId:i,toggleGroupId:l,fieldContextMenu:d})}}}}},{key:"_onResetDynamic",value:function(e){this._onChange(e,"")}},{key:"_onInheritDynamic",value:function(e){this._onChange(e)}},{key:"_onChange",value:function(e,t,n,r,o){var a,i,l=[];switch(e){case"gradientStopOpenClose":case"gradientStopSingleColor":this._onChangeGradient(e,t,n,r,o);break;case"background_color_gradient_unit":var u=this._getFieldByTemplate("color_gradient_type");"conic"===this.props.moduleAttrs[null==u?void 0:u.name]&&(t="%"),this._emitChange(e,t,n,r,o),this.state.parsedGradient.forEach((function(e,n){l[n]=ie(ie({},e),{},{unit:t})}));var s=(0,x.toGradientString)(l,!0);this._emitChange(null===(a=this._getFieldByTemplate("color_gradient_stops"))||void 0===a?void 0:a.name,s);break;case"background_color_gradient_type":var c=this._getFieldByTemplate("color_gradient_unit"),d=this.props.moduleAttrs[null==c?void 0:c.name];"conic"===t&&(d="%",this._emitChange(c.name,d,n,r,o)),this._emitChange(e,t,n,r,o),this.state.parsedGradient.forEach((function(e,t){l[t]=ie(ie({},e),{},{unit:d})}));var f=(0,x.toGradientString)(l,!0);this._emitChange(null===(i=this._getFieldByTemplate("color_gradient_stops"))||void 0===i?void 0:i.name,f);break;default:this._emitChange(e,t,n,r,o);var p,h=this._getFieldEnablePair(e);h&&(p=(0,v.default)(t)||o?"":(0,N.hasValue)(t)?"on":"off",this._getAttrs(h.name)!==p&&this._emitChange(h.name,p))}this.forceUpdate()}},{key:"_onChangeGradient",value:function(e,t,n,r,o){var a=this;switch(e){case"gradientStopOpenClose":this._onGradientStopClick(t);break;case"gradientStopSingleColor":this.setState({parsedGradient:t.parsedGradient,stops:t.stops}),this._onChangeGradient("gradient",{stops:t.stops});break;default:var i;if((0,b.default)(t))(0,s.default)(t,(function(e,t){var n=Q.default.gradientFieldsMapping(t);if(n){var r=a._getFieldByTemplate(n);r&&(0,C.default)(e).toLowerCase()!==(0,C.default)(a._getAttrs(r.name)).toLowerCase()&&a._emitChange(r.name,e)}})),(0,N.isOn)(this._getAttrsByTemplate("use_color_gradient"))||this._emitChange(null===(i=this._getFieldByTemplate("use_color_gradient"))||void 0===i?void 0:i.name,"on");else if((0,v.default)(t)||o)(0,s.default)(["color_gradient_stops","use_color_gradient"],(function(e){var t=a._getFieldByTemplate(e);t&&a._emitChange(t.name,"",n,r,!0)}));else if((0,N.isOn)(t))(0,s.default)(["color_gradient_stops","use_color_gradient"],(function(e){var t=a._getFieldByTemplate(e);t&&a._emitChange(t.name,a._getAttrs(t.name,!0))})),this._emitChange(e,t);else if("use_color_gradient"===e&&Q.default.isOff(t)){var l=this.props,u=l.moduleAttrs,c=l.previewMode;(0,s.default)(["color_gradient_type","color_gradient_direction","color_gradient_direction_radial","color_gradient_stops","color_gradient_repeat","color_gradient_unit","color_gradient_start","color_gradient_end","color_gradient_start_position","color_gradient_end_position"],(function(e){var t=a._getFieldByTemplate(e);if(t){var o=a._getFieldNameByMode(t.name);a._emitChange(o,"",n,r,!0)}}));var d=this._getFieldByTemplate(e),f=this._getFieldNameByMode(null==d?void 0:d.name);ee.default.getInheritanceBackgroundValue(u,e,c,null==d?void 0:d.name),this._emitChange(f,t)}else this._emitChange(e,t)}}},{key:"_onChangeSvg",value:function(e,t,n,r,o){"default"===t&&(t=this._getDefault(e)),this._onChange(e,t,n,r,o)}},{key:"_emitChange",value:function(e,t,n,r,o){var a=this.props,i=a.readonly,l=a._onChange;i||((0,f.default)(["_dynamic_attributes"],e)?l(e,t,n,r,o):l(this._getFieldNameByMode(e),t,n,r,o))}},{key:"_getModuleAttrs",value:function(){return this.props.moduleAttrs||{}}},{key:"_getAttrsByTemplate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._getFieldByTemplate(e);return n?this._getAttrs(n.name,t):null}},{key:"_getAttrs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._getModuleAttrs(),r=this._getFieldEnablePair(e);if(r){var o=this._getAttrs(r.name,t);if("off"===o)return""}return t?(0,c.default)(n,this._getFieldNameByMode(e),this._getDefault(e)):(0,c.default)(n,this._getFieldNameByMode(e))}},{key:"_getDefault",value:function(e){var t=J.default.getBaseName(e),n=this._getField(t),r=(0,c.default)(n,"default"),o=this._getModuleAttrs(),a=J.default.getDesktopValue(t,o);if(n.mobile_options&&J.default.isResponsiveMode()&&J.default.isResponsiveEnabled(this._getBackgroundBase(),o)){var i=J.default.getTabletValue(t,o,a);return J.default.isPhoneMode()?Q.default.get(i,r):Q.default.get(a,r)}return"tabs"===n.hover&&J.default.isHoverMode()&&J.default.isHoverEnabled(this._getBackgroundBase(),o)||n.sticky&&J.default.isStickyMode()&&J.default.isStickyEnabled(this._getBackgroundBase(),o)?Q.default.get(a,r):r}},{key:"_getBackgroundBase",value:function(){return J.default.getBaseName(this.props.name)||"background"}},{key:"_getFieldNameByMode",value:function(e){var t=this._getModuleAttrs(),n=J.default.getBaseName(e),r=this._getField(n);return r?r.mobile_options&&J.default.isResponsiveMode()&&J.default.isResponsiveEnabled(this._getBackgroundBase(),t)?J.default.isPhoneMode()?J.default.getPhoneName(n):J.default.getTabletName(n):"tabs"===r.hover&&J.default.isHoverMode()&&J.default.isHoverEnabled(this._getBackgroundBase(),t)?J.default.getHoverName(n):r.sticky&&J.default.isStickyMode()&&J.default.isStickyEnabled(this._getBackgroundBase(),t)?J.default.getStickyName(n):n:e}},{key:"_getFieldEnablePair",value:function(e){var t=this._getFieldTemplate(e);return!!(0,f.default)(["color","image","mask_style","pattern_style","video_mp4","video_webm"],t)&&this._getFieldByTemplate("enable_".concat(t))}},{key:"_getFieldByTemplate",value:function(e){return e&&(0,u.default)(this._getFields(),(function(t){return t.field_template===e}))}},{key:"_getFieldTemplate",value:function(e){return(0,c.default)(this._getField(J.default.getBaseName(e)),"field_template","")}},{key:"_getField",value:function(e){return(0,c.default)(this._getFields(),J.default.getBaseName(e))}},{key:"_getFields",value:function(){var e=this;if(!(0,h.default)(this._backgroundFields))return this._backgroundFields;var t=[],n=this.props.backgroundFields||this.props.background_fields||{};if((0,s.default)(n,(function(e,r){var o=ie({name:r},e),a=(0,k.default)(n,(function(t){var n=t.affects_template;return(0,f.default)(n,e.field_template)}));if(!(0,h.default)(a)){var i=(0,_.default)(a);(0,d.default)(o,"depends_on")?o.depends_on=(0,E.default)([].concat(re(o.depends_on),re(i))):o.depends_on=i}t.push(o)})),this._backgroundFields={},!(0,h.default)(t)){var r=(0,O.default)(t,["priority"]);(0,s.default)(r,(function(t){e._backgroundFields[t.name]=t}))}return this._backgroundFields}},{key:"_getActiveTab",value:function(){var e=this,t=(0,u.default)((0,_.default)(this._getTabsNotEmpty()),(function(t){return!e._isTabDisabled(t)&&t===e.state.activeTab}));return t||this.defaultTab}},{key:"_getTabs",value:function(){var e=this;return(0,h.default)(this._tabs)?(this._tabs={},(0,s.default)(ETBuilderBackend.backgroundTabs,(function(t){e._tabs[t]=(0,k.default)(e._getFields(),(function(e){return e.background_tab===t}))})),this._tabs):this._tabs}},{key:"_getTabsNotEmpty",value:function(){return(0,k.default)(this._getTabs(),(function(e){return!(0,h.default)(e)}))}},{key:"_getGradientPreviewStyle",value:function(e){var t=this,n=this.state,r=n.parsedGradient,o=(n.unit,{});return(0,s.default)(Q.default.gradientFieldsMapping(),(function(n,a){var i=t._getAttrsByTemplate(n,e);(0,g.default)(i)||((0,f.default)(["colorStart","colorEnd"],a)?o[a]=K.default.getColorValue(i)||i:o[a]="stops"===a?(0,x.toGradientString)(r,!0):i)})),o}},{key:"_getImagePreviewStyle",value:function(e){var t=this,n={};(0,s.default)(["color","size","image_width","image_height","position","horizontal_offset","vertical_offset","repeat","blend","parallax"],(function(r){var o=t._getAttrsByTemplate(r,e);(0,g.default)(o)||(n[r]="parallax"===r?(0,N.isOn)(o):o)}));var r=this._getAttrsByTemplate("use_color_gradient",e),o=this._getAttrsByTemplate("color_gradient_overlays_image",e);if((0,N.isOn)(r)){var a=this._getGradientPreviewStyle(e),i=K.default.getColors();a&&(n.gradient=Q.default.getGradient(a,i),n.gradientOverlaysImage=o)}return n}},{key:"_getImageField",value:function(){var e=this._getFieldByTemplate("image");if(e){var t=this._getAttrs(e.name,!0)||"";return{name:e.name,dynamic:(0,D.isDynamicContent)(t),value:t}}return{name:"background_image",value:"",dynamic:!1}}},{key:"_getVideoNode",value:function(){var e=this._getAttrsByTemplate("video_mp4",!0),t=this._getAttrsByTemplate("video_webm",!0),n=e||t;return(0,N.hasValue)(n)?o.default.createElement(Z.default,{className:"et-fb-settings-option-preview-content",loop:"loop",muted:"muted",autoPlay:"autoplay",height:190,style:{width:"100%",background:"rgb(51, 59, 68)"},src:(0,L.setArgs)({width:500,controls:0,fs:0,iv_load_policy:3,modestbranding:1,showinfo:0},n)}):null}},{key:"_getPatternPreviewStyle",value:function(){var e=!0,t=(0,N.isOn)(this._getAttrsByTemplate("enable_pattern_style",e)),n=this._getAttrsByTemplate("pattern_style",e),r={};if(t&&(0,N.hasValue)(n)){var o=this._getAttrsByTemplate("pattern_color",e),a=this._getAttrsByTemplate("pattern_repeat",e),i=this._getAttrsByTemplate("pattern_blend_mode",e),l=this._getAttrsByTemplate("pattern_transform",e),u=(0,j.getTransformState)(l,"horizontal"),s=(0,j.getTransformState)(l,"vertical"),c=(0,j.getTransformState)(l,"rotate"),d=(0,j.getTransformState)(l,"invert"),f=(0,M.getSvgPattern)(n,o,"default",c,d);r={backgroundImage:'url("data:image/svg+xml;utf8,'.concat(f,'")'),mixBlendMode:i,transform:(0,j.getTransformCSS)(u,s)};var p=this._getAttrsByTemplate("pattern_size",e),h=this._getAttrsByTemplate("pattern_width",e),m=this._getAttrsByTemplate("pattern_height",e),y=(0,j.getBackgroundSizeCss)(p,h,m);if(y.size&&(r.backgroundSize=y.size),(0,N.hasValue)(p)&&"stretch"!==p&&(r.backgroundRepeat=a,(0,N.hasValue)(a)&&"space"!==a)){var g=this._getAttrsByTemplate("pattern_horizontal_offset",e),b=this._getAttrsByTemplate("pattern_vertical_offset",e),v=this._getAttrsByTemplate("pattern_repeat_origin",e),_=(0,j.getBackgroundPositionCss)(v,g,b);r.backgroundPosition=_.position}}return r}},{key:"_getMaskPreviewStyle",value:function(){var e=!0,t=(0,N.isOn)(this._getAttrsByTemplate("enable_mask_style",e)),n=this._getAttrsByTemplate("mask_style",e),r={};if(t&&(0,N.hasValue)(n)){var o=this._getAttrsByTemplate("mask_color",e),a=this._getAttrsByTemplate("mask_aspect_ratio",e),i=this._getAttrsByTemplate("mask_blend_mode",e),l=this._getAttrsByTemplate("mask_transform",e),u=(0,j.getTransformState)(l,"horizontal"),s=(0,j.getTransformState)(l,"vertical"),c=(0,j.getTransformState)(l,"rotate"),d=(0,j.getTransformState)(l,"invert"),f=this._getAttrsByTemplate("mask_size",e),p=this._getAttrsByTemplate("mask_width",e),h=this._getAttrsByTemplate("mask_height",e),m=(0,j.getBackgroundSizeCss)(f,p,h,"mask"),y=(0,M.getSvgMask)(n,o,a,c,d,f);if(r={backgroundImage:'url("data:image/svg+xml;utf8,'.concat(y,'")'),backgroundRepeat:"no-repeat",backgroundSize:m.size?m.size:"100% 100%",mixBlendMode:i,transform:(0,j.getTransformCSS)(u,s)},(0,N.hasValue)(f)&&"stretch"!==f){var g=this._getAttrsByTemplate("mask_horizontal_offset",e),b=this._getAttrsByTemplate("mask_vertical_offset",e),v=this._getAttrsByTemplate("mask_position",e),_=(0,j.getBackgroundPositionCss)(v,g,b);r.backgroundPosition=_.position}}return r}},{key:"_isTabDisabled",value:function(e){var t=this.props.isColumnBackground&&"color"!==e,n=this._getBackgroundBase(),r=this._getModuleAttrs();return!!(t&&J.default.isHoverMode()&&J.default.isHoverEnabled(n,r))||!!(t&&J.default.isStickyMode()&&J.default.isStickyEnabled(n,r))}},{key:"_isTabFilled",value:function(e){var t=this;if(this._isTabDisabled(e))return!1;var n=(0,k.default)(this._getFields(),(function(t){return t.background_tab===e&&t.tab_filler}));return!(0,h.default)(n)&&(0,S.default)(n,(function(e){var n=e.field_template,r=t._getAttrs(e.name,!0);return"use_color_gradient"===n?(0,N.isOn)(r):(!(0,f.default)(["pattern_style","mask_style"],n)||""!==r)&&(0,N.hasValue)(r)}))}},{key:"_isFieldHidden",value:function(e){var t=this;if(this.props.moduleAttrs,(0,f.default)(["color_gradient_start","color_gradient_end"],(0,c.default)(e,"field_template")))return!0;if(!(0,d.default)(e,"show_if")&&!(0,d.default)(e,"show_if_not")&&!(0,d.default)(e,"depends_on"))return!1;var n=function(){if((0,d.default)(e,"show_if"))return(0,S.default)(e.show_if,(function(e,n){var r=t._getField(n);if(!r||!e)return!1;if(t._isFieldHidden(r))return!1;var o=(0,p.default)(e)?e:[e],a=t._getAttrs(r.name,!0);return!!(0,f.default)(o,a)}))},r=function(){if((0,d.default)(e,"show_if_not"))return(0,S.default)(e.show_if_not,(function(e,n){var r=t._getField(n);if(!r||!e)return!1;if(t._isFieldHidden(r))return!0;var o=(0,p.default)(e)?e:[e],a=t._getAttrs(r.name,!0);return!(0,f.default)(o,a)}))};return(0,d.default)(e,"show_if")&&(0,d.default)(e,"show_if_not")?!(n()&&r()):(0,d.default)(e,"show_if")?!n():(0,d.default)(e,"show_if_not")?!r():(0,S.default)(e.depends_on,(function(n){var r=t._getField(n);if(!r)return!1;if((0,d.default)(r,"depends_on")&&t._isFieldHidden(r))return!0;var o=t._getAttrs(r.name,!0);return!(!(0,d.default)(e,"depends_show_if")||(0,f.default)(e.depends_show_if,o))||!(!(0,d.default)(e,"depends_show_if_not")||!(0,f.default)(e.depends_show_if_not,o))}))}},{key:"_normalizeField",value:function(e){var t=this,n=this.props,r=n.animate,o=n.module,a=n.moduleAttrs,i=ie(ie({},e),{},{controlType:e.type,value:this._getAttrs(e.name,!0),default:this._getDefault(e.name),animate:r,module:o,moduleAttrs:a,_onChange:this._onChange});if("color"===i.field_template&&(i.disableCurrent=!1,i.hasPreview=!0,i.hasColorManager=!0,i.showPickerPalettes=!1,i.hidePickerOnPaletteSelect=!0,i.hidePaletteOnPickerActive=!1,i.addTitle=A.default.getI18n("controls.background.addColor"),X.default.isHoverMode()&&(i.name="".concat(i.name,"__hover"))),"use_color_gradient"===i.field_template){var l=this._getGradientPreviewStyle(!0),u=this._getFieldByTemplate(Q.default.gradientFieldsMapping("stops"));i.controlType="gradient",i.stopsField=null==u?void 0:u.name,i.hasPreview=!0,i.addTitle=A.default.getI18n("controls.background.addGradient"),i._onChange=this._onChangeGradient,i._onMouseEnter=this._onMouseEnterFormGroupGradient,i._onMouseLeave=this._onMouseLeaveFormGroupGradient;var s=this._getAttrsByTemplate("use_color_gradient",!0);(0,N.isOn)(s)?(i.value=l,i.hideResetButton=!u||t._getDefault(u.name)===l.stops,i.activeGradientStop=this._getGradientActiveStop(),i.parsedGradient=this._getParsedGradient(),i._onGradientStopClick=this._onGradientStopClick):i.value=""}else if("color_gradient_stops"===i.field_template){var c=this._getGradientPreviewStyle(!0),d=this._getFieldByTemplate(Q.default.gradientFieldsMapping("stops")),p=this._getAttrsByTemplate("use_color_gradient",!0);(0,N.isOn)(p)&&(i.stopsField=null==d?void 0:d.name,i.getParsedGradient=this._getParsedGradient,i.stringValue=c.stops,i.activeGradientStop=this._getGradientActiveStop(),i.parsedGradient=this._getParsedGradient(),i.unit=this._getGradientUnit(),i._onGradientStopClick=this._onGradientStopClick)}if("image"===i.field_template&&(i.addTitle=A.default.getI18n("controls.background.addImage"),i.isBackgroundType=!0,i.imagePreviewAttrs=this._getImagePreviewStyle(!0)),(0,f.default)(["video_mp4","video_webm"],i.field_template)&&(i.addTitle=A.default.getI18n("controls.background.addVideo")),(0,f.default)(["pattern_style","mask_style"],i.field_template)){var h="select-pattern"===i.controlType?"addPattern":"addMask",m="select-pattern"===i.controlType?"pattern":"mask";i.addTitle=A.default.getI18n("controls.background.".concat(h)),i.transformValues=this._getAttrsByTemplate("".concat(m,"_transform"),!0),i.imageField=this._getImageField(),i.imagePreviewAttrs=this._getImagePreviewStyle(!0),i.videoNode=this._getVideoNode(),i.patternPreviewStyle=this._getPatternPreviewStyle(),i.maskPreviewStyle=this._getMaskPreviewStyle(),i._onChange=this._onChangeSvg}return i}},{key:"_renderTabNavs",value:function(e){var t=this,n=this._getActiveTab(),r=(0,l.default)(["et-fb-settings-background-tab-navs","et-fb-settings-background-tab-navs-items--".concat((0,_.default)(e).length)]),a="et-fb-settings-background-tab-nav",u=ETBuilderBackend.i18n.controls.background;return o.default.createElement("ul",{className:r},(0,_.default)(e).map((function(e){var r=["".concat(a,"--").concat(e),a];t._isTabDisabled(e)&&r.push("".concat(a,"--disabled"));var s=n===e,c=t._isTabFilled(e);s&&r.push("".concat(a,"--active"));var d=s||c?R.default.info:R.default.inactiveGrey;return o.default.createElement("li",{key:e},o.default.createElement("button",{className:(0,l.default)(r),name:e,"data-tab":e,"data-tip":u[e],"data-index":e,"data-for":"styles-background-tab-tooltip-".concat(e),onClick:t._onClickTabNav,onMouseEnter:t._onMouseEnterTabNav,onMouseLeave:t._onMouseLeaveTabNav},o.default.createElement(U.default,{icon:"background-".concat(e),color:d}),o.default.createElement(i.default,{id:"styles-background-tab-tooltip-".concat(e)})))})))}},{key:"_renderTabs",value:function(e){var t=this,n=this._getActiveTab(),r="et-fb-settings-background-tab";return(0,w.default)(e,(function(e,a){if(n!==a)return!1;var i=[r,"".concat(r,"--").concat(a),"".concat(r,"--active")];return o.default.createElement("div",{key:a,className:(0,l.default)(i)},t._renderFields(e,a))}))}},{key:"_renderFields",value:function(e){var t=this;return(0,w.default)(e,(function(e){var n=e.name||"";if(!n)return!1;var r=t._normalizeField(e);if(!r)return!1;var a=r.controlType||"";if(!a||!(0,d.default)(he,a))return!1;if(t._isFieldHidden(r))return!1;var i=["et-fb-settings-options","et-fb-option--".concat(r.type.replace("_","-"))];return(0,v.default)(r.depends_default)&&(0,v.default)(r.depends_show_if)&&(0,v.default)(r.depends_show_if_not)||i.push("et-fb-option--depends-on"),o.default.createElement(T.ETBuilderFormGroup,{key:"general-form-group-".concat(n),className:(0,l.default)(pe({},"et-fb-form__group--".concat(n),!0)),name:n,onMouseEnterGroup:t._onMouseEnterFormGroup,onMouseLeaveGroup:t._onMouseLeaveFormGroup,isGlobalOptionSynced:r.isGlobalOptionSynced,isSelectiveSyncAvailable:r.isSelectiveSyncAvailable,_unsyncGlobalSetting:r._unsyncGlobalSetting},t._renderFieldLabel(r,n),t._renderFieldDescription(r,n),o.default.createElement("div",{key:"et-fb-option-advanced_".concat(n),className:(0,l.default)(i)},o.default.createElement("div",{key:"et-fb-option-container-".concat(n),className:"et-fb-option-container"},t._renderControl(r,n))))}))}},{key:"_renderFieldLabel",value:function(e,t){if(!e.label||(0,f.default)(["color","use_color_gradient","image","pattern_style","mask_style"],e.field_template))return!1;var n=(0,N.hasValue)(e.description),r=this.props.isResetActive(e),a=this.props.isHoveredGroup(e.name),i=n&&this.props.isDescriptionVisible(e.name),l=!!n&&this.props.onClickHelp;return o.default.createElement(T.ETBuilderFormLabel,{key:"general-form-label-".concat(t),name:e.name,hoveredGroup:a,isResetActive:r,activeHelp:i,onClickHelp:l,onClickReset:this.props.onClickReset,onToggleRightMenu:this.props.onToggleRightMenu},e.label)}},{key:"_renderFieldDescription",value:function(e,t){return!(!e.description||(0,f.default)(["color","use_color_gradient","image"],e.field_template))&&o.default.createElement(T.ETBuilderFormDescription,{key:"general-form-description-".concat(t),active:this.props.isDescriptionVisible(e.name)},e.description)}},{key:"_renderControl",value:function(e,t){var n=e.controlType||"";return!(!n||!(0,d.default)(he,n))&&("image"===e.field_template?this._renderControlDynamic(e,t):o.default.createElement(he[n],ie({key:t},e)))}},{key:"_renderControlDynamic",value:function(e,t){var n=e.controlType||"";if(!n||!(0,d.default)(he,n))return!1;var r=e.value||"",a=this._getFieldNameByMode(e.name),i=(0,D.getEnabledDynamicAttributes)(this._getModuleAttrs()),l=!J.default.isDesktopMode()&&!(0,m.default)(e.value,e.default);return(0,D.isDynamicContent)(r)&&!(0,f.default)(i,a)&&i.push(a),o.default.createElement(G.default,{key:t,type:"image",previewMode:"background",fieldName:a,fieldType:e.type,value:r,previewAttributes:e.imagePreviewAttrs,dynamicAttributes:i,showInheritButton:l,onChange:this._onChange,onReset:this._onResetDynamic,onInherit:this._onInheritDynamic},o.default.createElement(he[n],ie({key:t},e)))}},{key:"render",value:function(){var e=this._getTabsNotEmpty();return!(0,h.default)(e)&&o.default.createElement("div",null,this._renderTabNavs(e),o.default.createElement("div",{className:"et-fb-settings-background-tabs"},this._renderTabs(e)))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.moduleAttrs,r=t.activeGradientStop,o=(t.parsedGradient,t.stops),a=(t.unit,t.fieldNameGradientStops);if(t.fieldNameGradientUnit,"on"===n[t.fieldNameUseGradient]){var i=n[a]!==o;if(!r&&i)return{stops:n[a]}}return null}}],n&&le(t.prototype,n),r&&le(t,r),Object.defineProperty(t,"prototype",{writable:!1}),I}(o.Component);me.propTypes={name:a.default.string,activeTab:a.default.string,toggle_slug:a.default.string,tab_slug:a.default.string,isColumnBackground:a.default.bool,readonly:a.default.bool,animate:a.default.bool,moduleAttrs:a.default.object,backgroundFields:a.default.object,background_fields:a.default.object,_onChange:a.default.func,onMouseEnterGroup:a.default.func,onMouseLeaveGroup:a.default.func,isResetActive:a.default.func,isHoveredGroup:a.default.func,isDescriptionVisible:a.default.func,onClickReset:a.default.func,onClickHelp:a.default.func,onToggleRightMenu:a.default.func};var ye=me;t.default=ye},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=m(n(3)),i=m(n(215)),l=m(n(42)),u=m(n(40)),s=n(282),c=m(n(1722)),d=m(n(1546)),f=m(n(1727)),p=m(n(403)),h=n(783);function m(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e){var t=e.activeGradientStop,n=e.parsedGradient,r=e.unit,a=e._onChange,u=o.default.createRef(),m=v((0,o.useState)(n),2),y=m[0],_=m[1];function w(e){var t=(0,s.v4)(),o=(0,h.findNearestColorStops)(e.position,n),u=(0,i.default)(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o.high)),c=e.position<=o.high.position?u:u+1,d=new p.default(e.color,e.position,c,t,r),f=(0,h.addStopToGradient)(d,n,c);(0,l.default)(n,f)||a("gradientStopSingleColor",{color:d.color,uuid:d.uuid,parsedGradient:f,stops:(0,h.toGradientString)(f)}),a("gradientStopOpenClose",t)}return(0,o.useEffect)((function(){_(n)}),[n]),(0,o.useEffect)((function(){_(n)}),[e.stringValue]),o.default.createElement(c.default,{classNames:["et-builder-control-gradient"],ref:u,legacy:!0,min:0,max:100,step:1,snap:!0,snapDistance:.99,onChange:function(e){if((0,h.sortGradientStops)(e),!(0,l.default)(n,e)){var t=(0,h.toGradientString)(e);a("gradientStopSingleColor",{parsedGradient:e,stops:t})}},onStopClick:function(e){null!=e&&e.uuid?function(e){t&&(0,l.default)(null==e?void 0:e.uuid,t)?a("gradientStopSingleColor",{stopData:e,parsedGradient:y,stops:(0,h.toGradientString)(y)}):a("gradientStopOpenClose",e)}(e):w(e)},addStop:w,value:y,activeGradientStop:t,thumbComponent:d.default,railComponent:f.default})}n(1729),w.propTypes={_onChange:a.default.func,activeGradientStop:a.default.oneOfType([a.default.bool,a.default.string]),name:a.default.string,value:a.default.string.isRequired,unit:a.default.string,stringValue:a.default.string.isRequired},w.defaultProps={_onChange:u.default,activeGradientStop:!1,name:"gradient-stops",unit:"%"};var O=w;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ETCoreControlSlider",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var r,o=(r=n(1545))&&r.__esModule?r:{default:r};var a=o.default;t.default=a},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(3)),o=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.backgroundColor,n=e.color,r=e.children;return o.default.createElement("span",{className:"et-builder-control-gradient__thumb__color",style:{backgroundColor:t,color:n}},r)}i.propTypes={children:r.default.node,color:r.default.string,backgroundColor:r.default.string},i.defaultProps={children:null,color:"#FFFFFF",backgroundColor:"#000000"};var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(3)),o=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.position,n=e.unit;return o.default.createElement("span",{className:"et-builder-control-gradient__thumb__tooltip"},"".concat(t).concat(n))}i.propTypes={position:r.default.number,unit:r.default.string},i.defaultProps={position:0,unit:"%"};var l=i;t.default=l},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=m(n(3)),i=m(n(96)),l=m(n(40)),u=n(1545),s=n(1510),c=m(n(84)),d=n(783),f=m(n(1546));n(1728);var p=m(n(398)),h=m(n(164));function m(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e){var t=e.onStopClick,n=e.className,r=e.value,a=e.unit,l=e.locked,u=e.disabled,m=o.default.createRef(),y=g((0,o.useState)(!1),2),b=y[0],v=y[1],_=g((0,o.useState)(-1),2),w=_[0],O=_[1],k=g((0,o.useState)(c.default.white),2),S=k[0],C=k[1],E={left:"".concat(w,"%")},P=r.map((function(e){var t=h.default.getColorValue(e.color)||e.color;return"".concat(p.default.normalize(t)," ").concat(e.position).concat(a)})),T=g((0,o.useState)(P),2),M=T[0],j=T[1];(0,o.useEffect)((function(){M!==P&&j(P)}),[r]);var x={backgroundImage:"linear-gradient(90deg, ".concat(M.join(", "),'), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==")')},D={color:S,position:parseInt(w),index:!1};function N(t){var n=e.disabled;return function(e){b&&!l&&n||(0,s.isPrimaryClick)(e)&&t(e)}}return o.default.createElement("div",{ref:m,onMouseDown:N((function(e){e.preventDefault(),e.stopPropagation(),(0,s.isPrimaryClick)(e)&&!l&&!(0,i.default)(D.index)&&w&&t(D)})),onMouseEnter:N((function(e){v(!0)})),onMouseLeave:N((function(e){v(!1),O(!1)})),onMouseMove:function(t){if((0,s.isPrimaryClick)(t)){var n=e.min,o=e.max,a=m.current.getBoundingClientRect(),i=a.width,u=a.left,c=Math.round((t.clientX-u)/i*100),f=(0,s.limitValueRange)(n,o,c);if(O(f),b&&!l){var p=(0,d.findNearestColorStops)(c,r),h=(0,d.gradientColorAtPosition)(p.low,p.high,c);C(h),v(!0)}else v(!1)}},className:n,style:x},b&&!l&&!u&&!!w&&o.default.createElement(f.default,{value:D,stopsIndex:!1,style:E,id:"gradientStop_new",newThumb:!0,className:"et-builder-control-gradient__thumb--new",nearestStops:(0,d.findNearestColorStops)(D.position,r),onStopClick:N(t)}))}v.propTypes={disabled:a.default.bool,value:u.SLIDER_VALUE_PROP_TYPES,unit:a.default.string,className:a.default.string,locked:a.default.bool,onStopClick:a.default.func,nearestStops:a.default.shape({low:a.default.shape({color:a.default.string,position:a.default.number}),high:a.default.shape({color:a.default.string,position:a.default.number})}),min:a.default.number,max:a.default.number},v.defaultProps={disabled:!1,value:{},unit:"%",className:"",locked:!1,onStopClick:l.default,nearestStops:{},min:0,max:100};var _=v;t.default=_},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=c(n(3)),i=c(n(40)),l=n(618),u=c(n(617)),s=c(n(1484));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var v=function(e){!function(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&&m(e,t)}(i,e);var t,n,r,a=y(i);function i(){return p(this,i),a.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){var e=s.default.getControl(this.props.field.type);return(0,l.canShowField)(this.props.field,this.props.propertyResolver)?o.default.createElement("div",{className:"et-fb-field-settings-modal__field"},this.props.field.label&&o.default.createElement("p",{className:"et-fb-form__label"},this.props.field.label),o.default.createElement(e,f({name:this.props.fieldName,value:this.props.value,_onChange:this.props.onChange,processedKey:this.props.fieldName,content:this.props.value,animate:this.props.animation},this.props.field))):null}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.PureComponent);v.propTypes={field:a.default.object.isRequired,fieldName:a.default.string.isRequired,propertyResolver:a.default.instanceOf(u.default).isRequired,animation:a.default.bool,onChange:a.default.func},v.defaultProps={animation:!0,onChange:i.default};var _=v;t.default=_},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=d(n(0)),a=d(n(3)),i=d(n(7)),l=d(n(5)),u=d(n(40)),s=d(n(1733)),c=d(n(1548));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var b=function(e){!function(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&&h(e,t)}(u,e);var t,n,r,a=m(u);function u(){return f(this,u),a.apply(this,arguments)}return t=u,(n=[{key:"render",value:function(){var e=(0,i.default)(["upload","background"],this.props.fieldType),t=(0,l.default)(this.props.settingsFields)?null:o.default.createElement(c.default,{type:this.props.fieldType,icon:"setting",tooltip:ETBuilderBackend.i18n.dynamicContent.tooltips.settings,onClick:this.props.onSettings}),n=this.props.showDisableButton?o.default.createElement(c.default,{type:this.props.fieldType,parentClassName:this.props.showInheritButton?"et-fb-control-image-preview__button-remove":"",icon:"delete",tooltip:ETBuilderBackend.i18n.dynamicContent.tooltips.disable,onClick:this.props.onDisable}):null,r=this.props.showInheritButton?o.default.createElement(c.default,{type:this.props.fieldType,parentClassName:"et-fb-control-image-preview__button-reset",icon:"reset",tooltip:ETBuilderBackend.i18n.dynamicContent.tooltips.reset,onClick:this.props.onInherit}):null;return o.default.createElement("div",{className:"et-fb-settings-option-dynamic__preview"},e?o.default.createElement(s.default,{value:this.props.value,label:this.props.label,mode:this.props.mode,attributes:this.props.attributes,dynamicEnabled:this.props.dynamicEnabled},t,n,r):o.default.createElement("div",{className:"et-fb-settings-option-dynamic__preview--text"},t,o.default.createElement("div",{className:"et-fb-settings-option-dynamic__label"},this.props.label),n))}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.default.PureComponent);b.propTypes={fieldType:a.default.string.isRequired,value:a.default.string.isRequired,label:a.default.string.isRequired,mode:a.default.oneOf(["image","background"]),attributes:a.default.object,settingsFields:a.default.object.isRequired,dynamicEnabled:a.default.bool.isRequired,onSettings:a.default.func,onDisable:a.default.func,onInherit:a.default.func},b.defaultProps={mode:"image",attributes:{},onSettings:u.default,onDisable:u.default,onInherit:u.default};var v=b;t.default=v},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=f(n(0)),a=f(n(3)),i=f(n(13)),l=f(n(31)),u=f(n(1));n(1734);var s=f(n(1735)),c=f(n(1736)),d=f(n(1738));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=function(e){!function(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&&h(e,t)}(f,e);var t,n,r,a=m(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),v(g(t=a.call(this,e)),"handleMouseEnter",(function(){t.setState({isHovered:!0})})),v(g(t),"handleMouseMove",(function(){t.state.isHovered||t.setState({isHovered:!0})})),v(g(t),"handleMouseLeave",(function(){t.setState({isHovered:!1})})),t.state={isHovered:!1},t}return t=f,(n=[{key:"render",value:function(){var e=this;return o.default.createElement("div",{className:(0,i.default)({"et-fb-control-image-preview":!0,"et-fb-control-image-preview--hovered":this.state.isHovered}),onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave},"image"===this.props.mode?o.default.createElement(c.default,{value:this.props.value,dynamicEnabled:this.props.dynamicEnabled}):o.default.createElement(d.default,{value:this.props.value,attributes:this.props.attributes,dynamicEnabled:this.props.dynamicEnabled}),o.default.createElement("div",{className:"et-fb-control-image-preview__buttons"},(0,l.default)(this.props.children,(function(t,n){return o.default.createElement(s.default,{key:n,forward:e.state.isHovered},(function(e){return o.default.createElement("div",{className:"et-fb-control-image-preview__button ".concat((0,u.default)(t,"props.parentClassName","")),style:e},t)}))}))),this.props.label&&o.default.createElement("div",{className:"et-fb-control-image-preview__label"},this.props.label))}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.default.PureComponent);_.propTypes={value:a.default.string.isRequired,label:a.default.string,mode:a.default.oneOf(["image","background"]),attributes:a.default.object,dynamicEnabled:a.default.bool.isRequired},_.defaultProps={label:"",mode:"image",attributes:{}};var w=_;t.default=w},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=(o=n(3))&&o.__esModule?o:{default:o},l=n(67);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){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}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(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&&d(e,t)}(i,e);var t,n,r,o=f(i);function i(){var e;s(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(h(e=o.call.apply(o,[this].concat(n))),"getStyle",(function(){return{opacity:e.props.forward?(0,l.spring)(1,{stiffness:300,damping:20}):(0,l.spring)(0,{stiffness:300,damping:20}),scale:e.props.forward?(0,l.spring)(1,{stiffness:300,damping:20}):(0,l.spring)(0,{stiffness:300,damping:20}),top:e.props.forward?(0,l.spring)(14,{stiffness:300,damping:20}):(0,l.spring)(-10,{stiffness:300,damping:20})}})),e}return t=i,(n=[{key:"render",value:function(){var e=this;return a.default.createElement(l.Motion,{style:this.getStyle()},(function(t){return e.props.children({opacity:t.opacity,transform:"scale(".concat(t.scale,")"),top:t.top})}))}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.Component);g.propTypes={children:i.default.func.isRequired,forward:i.default.bool},g.defaultProps={forward:!0};var b=g;t.default=b},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=c(n(0)),a=c(n(3)),i=c(n(5)),l=c(n(43)),u=n(49),s=n(60);function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){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}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}n(1737);var g=function(e){!function(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&&p(e,t)}(u,e);var t,n,r,a=h(u);function u(){return d(this,u),a.apply(this,arguments)}return t=u,(n=[{key:"_renderPreview",value:function(){var e=this.props.dynamic.image;return e.loading?(0,s.renderLoading)("image"):(0,i.default)(e.value)?o.default.createElement(l.default,{icon:"none",color:"#6e7b8a"}):o.default.createElement("img",{src:e.value,alt:""})}},{key:"render",value:function(){return o.default.createElement("div",{className:"et-fb-control-image-preview__preview et-fb-control-image-preview__preview--image"},this._renderPreview())}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.default.PureComponent);g.propTypes={value:a.default.string.isRequired,dynamicEnabled:a.default.bool.isRequired};var b=(0,u.withDynamicContent)((function(e){return{image:{attribute:"image",type:"image",value:e.value}}}),(function(e){return{_dynamic_attributes:e.dynamicEnabled?"image":""}}))(g);t.default=b},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(n(0)),a=p(n(3)),i=p(n(10)),l=p(n(5)),u=p(n(11)),s=p(n(43)),c=p(n(2)),d=n(49),f=n(60);function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e){var t=function(){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}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(e){!function(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&&y(e,t)}(d,e);var t,n,r,a=g(d);function d(){var e;h(this,d);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(v(e=a.call.apply(a,[this].concat(n))),"getStyle",(function(e,t){var n={backgroundImage:"url(".concat(encodeURI(e),")")};return t.parallax?(0,i.default)(n,{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center"}):((0,u.default)(t.position)||(n.backgroundPosition=t.position.replace("_"," ")),(0,u.default)(t.color)||(n.backgroundColor=t.color),(0,u.default)(t.blend)||(n.backgroundBlendMode=t.blend),(0,u.default)(t.repeat)||(n.backgroundRepeat=t.repeat),(0,u.default)(t.size)||(n.backgroundSize=t.size),t.gradient&&(e&&(n.backgroundColor="initial"),c.default.isOn(t.gradientOverlaysImage)?n.backgroundImage="".concat(t.gradient,", ").concat(n.backgroundImage):n.backgroundImage="".concat(n.backgroundImage,", ").concat(t.gradient)),n)})),e}return t=d,(n=[{key:"render",value:function(){var e=this.props.dynamic.image;return e.loading?o.default.createElement("div",{className:"et-fb-control-image-preview__preview et-fb-control-image-preview__preview--background"},(0,f.renderLoading)("image")):(0,l.default)(e.value)?o.default.createElement("div",{className:"et-fb-control-image-preview__preview et-fb-control-image-preview__preview--background"},o.default.createElement(s.default,{icon:"none",color:"#FF0000"})):o.default.createElement("div",{className:"et-fb-control-image-preview__preview et-fb-control-image-preview__preview--background",style:this.getStyle(e.value,this.props.attributes)})}}])&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.default.PureComponent);O.propTypes={value:a.default.string.isRequired,attributes:a.default.object,dynamicEnabled:a.default.bool.isRequired},O.defaultProps={attributes:{}};var k=(0,d.withDynamicContent)((function(e){return{image:{attribute:"image",type:"image",value:e.value}}}),(function(e){return{_dynamic_attributes:e.dynamicEnabled?"image":""}}))(O);t.default=k},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=O(n(0)),a=O(n(27)),i=O(n(1741)),l=O(n(13)),u=O(n(11)),s=O(n(12)),c=(O(n(170)),O(n(42))),d=O(n(336)),f=O(n(515)),p=O(n(287)),h=O(n(28)),m=O(n(333));n(1742);var y=O(n(1)),g=O(n(43)),b=O(n(63)),v=O(n(2)),_=O(n(1506)),w=O(n(95));function O(e){return e&&e.__esModule?e:{default:e}}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function C(e){var t=function(){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}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function M(e){return function(e){if(Array.isArray(e))return D(e)}(e)||N(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e){return function(e){if(Array.isArray(e))return e}(e)||N(e)||x(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}var L=function(e,t){return 0===(0,h.default)(e).length?t:e},R=function(e,t){if(""===e&&!t)return"";var n=j((0,p.default)(e,"|")),r=n[0],o=n.slice(1);return[r||"on"].concat(M(o))},A=function(e,t){return(0,d.default)((0,f.default)(R(e),R(t,!0),L),"|")},I=function(t){!function(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&&S(e,t)}(p,t);var n,r,d,f=C(p);function p(e){var t,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),t=f.call(this,e),n=P(t),r="_onCornerChange",o=(0,m.default)((function(e,n){var r=v.default.intentionallyCloneDeep(t._getValues());t._lastValue=n,r[e]=n,t.setState({inputValues:r}),t._onChange(e)})),r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o;var a=A(t.props.value,t._getDefaultValue());return t.state={inputValues:t._splitValue(a)},t._values=t._splitValue(a),t._lastValue="",t._onChange=t._onChange.bind(P(t)),t._onClickLink=t._onClickLink.bind(P(t)),t._onResize=t._onResize.bind(P(t)),t._onTopLeftChange=t._onCornerChange("top-left").bind(P(t)),t._onTopRightChange=t._onCornerChange("top-right").bind(P(t)),t._onBottomLeftChange=t._onCornerChange("bottom-left").bind(P(t)),t._onBottomRightChange=t._onCornerChange("bottom-right").bind(P(t)),t}return n=p,(r=[{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=""!==e.value||!e.isResponsive&&!e.activeHover||(0,u.default)(e.default)?e.value:e.default,n=A(t,this._getDefaultValue());this._values=this._splitValue(n),this.setState({inputValues:this._splitValue(n)})}},{key:"shouldComponentUpdate",value:function(e,t){return A(e.value,this._getDefaultValue())!==this.props.value||!(0,c.default)(this.state.inputValues,t.inputValues)||!(!this.props.isResponsive||this.props.activeTabMode===e.activeTabMode)}},{key:"componentDidMount",value:function(){this._onResize(),this._onChange=this._onChange.bind(this)}},{key:"_onResize",value:function(){var t=e(a.default.findDOMNode(this.refs.radiusPreview)),n=t.innerHeight(),r=t.innerWidth(),o='"data:image/svg+xml,%3Csvg%20width%3D%27'.concat(r,"%27%20height%3D%27").concat(n,"%27%20viewBox%3D%270%200%20").concat(r,"%20").concat(n,"%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cline%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%27").concat(r,"%27%20y2%3D%27").concat(n,"%27%20style%3D%27stroke%3A%23f1f5f9%3Bstroke-width%3A2%27%20/%3E%3Cline%20x1%3D%270%27%20y1%3D%27").concat(n,"%27%20x2%3D%27").concat(r,'%27%20y2%3D%270%27%20style%3D%27stroke%3A%23f1f5f9%3Bstroke-width%3A2%27%20/%3E%3C/svg%3E"');t.css("background","#FFFFFF url(".concat(o,")"))}},{key:"_isLinkedMode",value:function(){return this._getSettingValue("border-link")}},{key:"_onChange",value:function(e){var t,n=w.default.sanitizeInputUnit(this._lastValue),r=this._getDefaultSettingValue(e);(n===r||""===r&&"0px"===n)&&(n=""),this._isLinkedMode()?t=this._spreadValue(n):(t=this._getValues())[e]=n,this.props._onChange(this.props.name,this._combineValues(t)),this.setState({inputValues:t})}},{key:"_spreadValue",value:function(e){return{"border-link":!0,"top-left":e,"top-right":e,"bottom-right":e,"bottom-left":e}}},{key:"_onClickLink",value:function(){if(!this.props.readonly)if(this._getSettingValue("border-link")){var e=this._getValues();e["border-link"]=!1,this.props._onChange(this.props.name,this._combineValues(e))}else{""===this._lastValue&&(this._lastValue=this._getSettingValue("top-left"));var t=this._spreadValue(this._lastValue);this.props._onChange(this.props.name,this._combineValues(t)),this.setState({inputValues:t})}}},{key:"_combineValues",value:function(e){return"".concat(e["border-link"]?"on":"off","|").concat(e["top-left"],"|").concat(e["top-right"],"|").concat(e["bottom-right"],"|").concat(e["bottom-left"])}},{key:"_splitValue",value:function(e){var t=(0,s.default)(e)?e:e.split("|");return{"border-link":!!(0,u.default)(t[0])||v.default.isOn(t[0]),"top-left":(0,u.default)(t[1])||""===t[1]?"":t[1],"top-right":(0,u.default)(t[2])||""===t[2]?"":t[2],"bottom-right":(0,u.default)(t[3])||""===t[3]?"":t[3],"bottom-left":(0,u.default)(t[4])||""===t[4]?"":t[4]}}},{key:"_getDefaultValue",value:function(){return(0,u.default)(this.props.default)||""===this.props.default?"on||||":this.props.default}},{key:"_getDefaultSettingValue",value:function(e){return this._splitValue(this._getDefaultValue())[e]}},{key:"_getSettingPlaceholder",value:function(e){var t=this._getDefaultSettingValue(e);return""===t?"0px":t}},{key:"_getValues",value:function(){return this._values}},{key:"_getSettingValue",value:function(e){return this._getValues()[e]}},{key:"getInput",value:function(e){var t=(0,y.default)({"top-left":this._onTopLeftChange,"top-right":this._onTopRightChange,"bottom-right":this._onBottomRightChange,"bottom-left":this._onBottomLeftChange},e),n=this._getDefaultSettingValue(e)===this.state.inputValues[e]?"":this.state.inputValues[e];return o.default.createElement("div",{className:"et-fb-settings-border-radius-".concat(e)},o.default.createElement(_.default,{lassName:"et-fb-settings-option-input",value:n,onChange:t,defaultValue:this._getSettingPlaceholder(e),speed:.5,min:0,defaultUnit:"px",allowedUnits:this.props.allowed_units,readonly:this.props.readonly}))}},{key:"render",value:function(){var e={borderTopLeftRadius:this._getSettingValue("top-left"),borderTopRightRadius:this._getSettingValue("top-right"),borderBottomRightRadius:this._getSettingValue("bottom-right"),borderBottomLeftRadius:this._getSettingValue("bottom-left")},t=this._getSettingValue("border-link")?"#2b87da":"#bec9d6";return o.default.createElement("div",{className:"et-fb-settings-border-radius-wrap"},o.default.createElement("div",{className:"et-fb-settings-border-radius-wrap-column"},this.getInput("top-left"),this.getInput("bottom-left")),o.default.createElement("div",{className:"et-fb-settings-border-radius-wrap-column"},o.default.createElement("div",{className:"et-fb-settings-border-radius-preview",style:e,ref:"radiusPreview"},o.default.createElement(i.default,{handleWidth:!0,handleHeight:!0,onResize:this._onResize}),o.default.createElement("div",{className:"et-fb-settings-border-radius-wrap-link-button"},o.default.createElement(b.default,{buttonName:"ROUNDED_CORNERS_SYNC_VALUES",className:(0,l.default)({"et-fb-settings-border-radius-wrap-link-button-active":this._getSettingValue("border-link")}),tooltip:this.props.tooltip,stopPropagation:!0,ink:!1,_onClick:this._onClickLink},o.default.createElement(g.default,{icon:"border-link",color:t}))))),o.default.createElement("div",{className:"et-fb-settings-border-radius-wrap-column"},this.getInput("top-right"),this.getInput("bottom-right")))}}])&&k(n.prototype,r),d&&k(n,d),Object.defineProperty(n,"prototype",{writable:!1}),p}(o.default.Component);t.default=I}).call(this,n(8))},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"default",(function(){return ee})),n.d(t,"useResizeDetector",(function(){return re})),n.d(t,"withResizeDetector",(function(){return te}));var r=n(0),o=n(27),a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},a(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};var c=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},d="object"==typeof s&&s&&s.Object===Object&&s,f="object"==typeof self&&self&&self.Object===Object&&self,p=d||f||Function("return this")(),h=p,m=function(){return h.Date.now()},y=/\s/;var g=function(e){for(var t=e.length;t--&&y.test(e.charAt(t)););return t},b=/^\s+/;var v=function(e){return e?e.slice(0,g(e)+1).replace(b,""):e},_=p.Symbol,w=_,O=Object.prototype,k=O.hasOwnProperty,S=O.toString,C=w?w.toStringTag:void 0;var E=function(e){var t=k.call(e,C),n=e[C];try{e[C]=void 0;var r=!0}catch(e){}var o=S.call(e);return r&&(t?e[C]=n:delete e[C]),o},P=Object.prototype.toString;var T=E,M=function(e){return P.call(e)},j=_?_.toStringTag:void 0;var x=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":j&&j in Object(e)?T(e):M(e)},D=function(e){return null!=e&&"object"==typeof e};var N=v,L=c,R=function(e){return"symbol"==typeof e||D(e)&&"[object Symbol]"==x(e)},A=/^[-+]0x[0-9a-f]+$/i,I=/^0b[01]+$/i,B=/^0o[0-7]+$/i,F=parseInt;var W=c,V=m,U=function(e){if("number"==typeof e)return e;if(R(e))return NaN;if(L(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=L(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=N(e);var n=I.test(e);return n||B.test(e)?F(e.slice(2),n?2:8):A.test(e)?NaN:+e},G=Math.max,H=Math.min;var z=function(e,t,n){var r,o,a,i,l,u,s=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=o;return r=o=void 0,s=t,i=e.apply(a,n)}function h(e){return s=e,l=setTimeout(y,t),c?p(e):i}function m(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-s>=a}function y(){var e=V();if(m(e))return g(e);l=setTimeout(y,function(e){var n=t-(e-u);return d?H(n,a-(e-s)):n}(e))}function g(e){return l=void 0,f&&r?p(e):(r=o=void 0,i)}function b(){var e=V(),n=m(e);if(r=arguments,o=this,u=e,n){if(void 0===l)return h(u);if(d)return clearTimeout(l),l=setTimeout(y,t),p(u)}return void 0===l&&(l=setTimeout(y,t)),i}return t=U(t)||0,W(n)&&(c=!!n.leading,a=(d="maxWait"in n)?G(U(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==l&&clearTimeout(l),s=0,r=u=o=l=void 0},b.flush=function(){return void 0===l?i:g(V())},b},q=z,K=c;var $=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return K(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),q(e,t,{leading:r,maxWait:t,trailing:o})},Y=function(e,t,n,r){switch(t){case"debounce":return z(e,n,r);case"throttle":return $(e,n,r);default:return e}},X=function(e){return"function"==typeof e},J=function(){return"undefined"==typeof window},Q=function(e){return e instanceof Element||e instanceof HTMLDocument},Z=function(e,t,n,r){return function(o){var a=o.width,i=o.height;t((function(t){return t.width===a&&t.height===i||t.width===a&&!r||t.height===i&&!n?t:(e&&X(e)&&e(a,i),{width:a,height:i})}))}},ee=function(e){function t(t){var n=e.call(this,t)||this;n.cancelHandler=function(){n.resizeHandler&&n.resizeHandler.cancel&&(n.resizeHandler.cancel(),n.resizeHandler=null)},n.attachObserver=function(){var e=n.props,t=e.targetRef,r=e.observerOptions;if(!J()){t&&t.current&&(n.targetRef.current=t.current);var o=n.getElement();o&&(n.observableElement&&n.observableElement===o||(n.observableElement=o,n.resizeObserver.observe(o,r)))}},n.getElement=function(){var e=n.props,t=e.querySelector,r=e.targetDomEl;if(J())return null;if(t)return document.querySelector(t);if(r&&Q(r))return r;if(n.targetRef&&Q(n.targetRef.current))return n.targetRef.current;var a=Object(o.findDOMNode)(n);if(!a)return null;switch(n.getRenderType()){case"renderProp":case"childFunction":case"child":case"childArray":return a;default:return a.parentElement}},n.createResizeHandler=function(e){var t=n.props,r=t.handleWidth,o=void 0===r||r,a=t.handleHeight,i=void 0===a||a,l=t.onResize;if(o||i){var u=Z(l,n.setState.bind(n),o,i);e.forEach((function(e){var t=e&&e.contentRect||{},r=t.width,o=t.height;!n.skipOnMount&&!J()&&u({width:r,height:o}),n.skipOnMount=!1}))}},n.getRenderType=function(){var e=n.props,t=e.render,o=e.children;return X(t)?"renderProp":X(o)?"childFunction":Object(r.isValidElement)(o)?"child":Array.isArray(o)?"childArray":"parent"};var a=t.skipOnMount,i=t.refreshMode,l=t.refreshRate,u=void 0===l?1e3:l,s=t.refreshOptions;return n.state={width:void 0,height:void 0},n.skipOnMount=a,n.targetRef=Object(r.createRef)(),n.observableElement=null,J()||(n.resizeHandler=Y(n.createResizeHandler,i,u,s),n.resizeObserver=new window.ResizeObserver(n.resizeHandler)),n}return i(t,e),t.prototype.componentDidMount=function(){this.attachObserver()},t.prototype.componentDidUpdate=function(){this.attachObserver()},t.prototype.componentWillUnmount=function(){J()||(this.observableElement=null,this.resizeObserver.disconnect(),this.cancelHandler())},t.prototype.render=function(){var e,t=this.props,n=t.render,o=t.children,a=t.nodeType,i=void 0===a?"div":a,l=this.state,s={width:l.width,height:l.height,targetRef:this.targetRef};switch(this.getRenderType()){case"renderProp":return n&&n(s);case"childFunction":return(e=o)(s);case"child":if((e=o).type&&"string"==typeof e.type){var c=u(s,["targetRef"]);return Object(r.cloneElement)(e,c)}return Object(r.cloneElement)(e,s);case"childArray":return(e=o).map((function(e){return!!e&&Object(r.cloneElement)(e,s)}));default:return r.createElement(i,null)}},t}(r.PureComponent);function te(e,t){void 0===t&&(t={});var n=function(n){function o(){var e=null!==n&&n.apply(this,arguments)||this;return e.ref=Object(r.createRef)(),e}return i(o,n),o.prototype.render=function(){var n=this.props,o=n.forwardedRef,a=u(n,["forwardedRef"]),i=null!=o?o:this.ref;return r.createElement(ee,l({},t,{targetRef:i}),r.createElement(e,l({targetRef:i},a)))},o}(r.Component);function o(e,t){return r.createElement(n,l({},e,{forwardedRef:t}))}var a=e.displayName||e.name;return o.displayName="withResizeDetector(".concat(a,")"),Object(r.forwardRef)(o)}var ne=J()?r.useEffect:r.useLayoutEffect;function re(e){void 0===e&&(e={});var t=e.skipOnMount,n=void 0!==t&&t,o=e.refreshMode,a=e.refreshRate,i=void 0===a?1e3:a,u=e.refreshOptions,s=e.handleWidth,c=void 0===s||s,d=e.handleHeight,f=void 0===d||d,p=e.targetRef,h=e.observerOptions,m=e.onResize,y=Object(r.useRef)(n),g=Object(r.useRef)(null),b=null!=p?p:g,v=Object(r.useRef)(),_=Object(r.useState)({width:void 0,height:void 0}),w=_[0],O=_[1];return ne((function(){if(!J()){var e=Z(m,O,c,f);v.current=Y((function(t){(c||f)&&t.forEach((function(t){var n=t&&t.contentRect||{},r=n.width,o=n.height;!y.current&&!J()&&e({width:r,height:o}),y.current=!1}))}),o,i,u);var t=new window.ResizeObserver(v.current);return b.current&&t.observe(b.current,h),function(){t.disconnect();var e=v.current;e&&e.cancel&&e.cancel()}}}),[o,i,u,c,f,m,h,b.current]),l({ref:b},w)}}.call(this,n(89))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(n(0)),a=p(n(3)),i=p(n(1)),l=p(n(56)),u=p(n(9)),s=p(n(362));n(1744);var c=p(n(1511)),d=p(n(2)),f=(p(n(18)),p(n(15)));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var v={attr_suffix:a.default.string},_=function(e){!function(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&&m(e,t)}(c,e);var t,n,r,a=y(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this,e)).suffix=(0,i.default)(e,"attr_suffix",""),t}return t=c,(n=[{key:"_processProperty",value:function(e,t){return"width"===e?this._processWidth(t):t}},{key:"_processWidth",value:function(e){var t=parseInt(e);return t>50&&(t=50),d.default.processRangeValue(t)}},{key:"_renderTabPreviewArea",value:function(e){var t=this,n=["width","style","color"],r={};return(0,u.default)(["top","right","bottom","left"],(function(e){var o="";(0,u.default)(n,(function(n){var r="border_".concat(n,"_").concat(e).concat(t.suffix),a="border_".concat(n,"_all").concat(t.suffix),i=t.getDefault(a),l=d.default.get(t.getDefault(r),i),u=t._processProperty(n,t.getValue(a)),s=t._processProperty(n,d.default.get(t.getValue(r),d.default.get(u,l)));if(f.default.isMobile(t.props,!1)){var c=d.default.get(t.getValue(r),t.getDefault(r)),p=d.default.get(t.getValue(a),d.default.get(t.getDefault(a),t.getFieldDefault(a)));s=t._processProperty(n,d.default.get(c,p))}o+="".concat(s," ")})),(0,l.default)(r,"border".concat((0,s.default)(e)),o)})),o.default.createElement("div",{className:"et-fb-settings-border-styles-wrap"},o.default.createElement("div",{className:"et-fb-settings-border-styles-wrap-column"},o.default.createElement("div",{className:"et-fb-settings-border-styles-preview",style:r})))}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(c.default);_.propTypes=v;var w=_;t.default=w},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=T(n(0)),a=T(n(13)),i=T(n(123)),l=T(n(1)),u=T(n(31)),s=T(n(7)),c=T(n(11)),d=T(n(17));n(1554),n(1552);var f=T(n(1555)),p=T(n(1511)),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=P(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(18)),m=T(n(43)),y=T(n(803)),g=T(n(789)),b=T(n(281)),v=T(n(6)),_=(T(n(216)),T(n(22))),w=T(n(790)),O=T(n(2)),k=T(n(15)),S=T(n(39)),C=T(n(84)),E=T(n(804));function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(P=function(e){return e?n:t})(e)}function T(e){return e&&e.__esModule?e:{default:e}}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function x(e){var t=function(){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}}();return function(){var n,r=L(e);if(t){var o=L(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return D(this,n)}}function D(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var R=function(e){var t="";switch(e){case"hover":case"sticky":t="__".concat(e);break;case"phone":case"tablet":t="_".concat(e)}return t},A=function(e){!function(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&&j(e,t)}(P,e);var t,n,r,p=x(P);function P(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),t=p.call(this,e),n=N(t),r="state",o={transformTab:"scale",scaleLinked:t.getLinked("scale"),translateLinked:t.getLinked("translate"),skewLinked:t.getLinked("skew"),transformTabContextMenu:t.getContextMenu()},r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t.isResetActive=t.isResetActive.bind(N(t)),t.onClickReset=t.onClickReset.bind(N(t)),t.isResponsiveEnabled=t.isResponsiveEnabled.bind(N(t)),t.onClickResponsive=t.onClickResponsive.bind(N(t)),t.onClickHover=t.onClickHover.bind(N(t)),t.onClickSticky=t.onClickSticky.bind(N(t)),t.onClickTransformTab=t.onClickTransformTab.bind(N(t)),t.onClickResponsiveTab=t.onClickResponsiveTab.bind(N(t)),t.setLinked=t.setLinked.bind(N(t)),t.onEnterGroup=t.onEnterGroup.bind(N(t)),t.onLeaveGroup=t.onLeaveGroup.bind(N(t)),t.onMouseOverTransformTab=t.onMouseOverTransformTab.bind(N(t)),t.onMouseLeaveTransformTab=t.onMouseLeaveTransformTab.bind(N(t)),t}return t=P,n=[{key:"shouldComponentUpdate",value:function(e,t){return O.default.shouldComponentUpdate(this,e,t)}},{key:"setLinked",value:function(e,t){if((0,s.default)(["scale","translate","skew"],e)){var n={},r=(0,c.default)(t)?!(0,l.default)(this.state,"".concat(e,"Linked")):O.default.isOn(t),o=r?"on":"off",a=this.getSettingDefault("transform_".concat(e,"_linked"))===o;n["".concat(e,"Linked")]=r,this.setState(n),this.props._onChange("transform_".concat(e,"_linked").concat(this.getViewTabSuffix()),o,"skip",null,a)}}},{key:"getLinked",value:function(e){var t=(0,l.default)(this.getAttrs(),"transform_".concat(e,"_linked").concat(this.getViewTabSuffix()),"");return O.default.hasValue(t)||(t=this.getSettingDefault("transform_".concat(e,"_linked"))),O.default.isOn(t)}},{key:"getSettingDefault",value:function(e,t){var n,r=t||this.getActiveTabMode(),o=this.getSetting(e);switch(r){case"tablet":n="_tablet";break;case"phone":n="_phone";break;case"hover":n="__hover";break;case"sticky":n="__sticky";break;default:n=""}var a=(0,l.default)(o,"default".concat(n));if(!(0,c.default)(a))return a;var i=(0,l.default)(o,"default"),u=i,d=!1,f=!1,p=r;return this.getActiveTabMode()===r?(d=this.props.activeHover&&(0,h.isHoverMode)(),f=this.props.activeSticky&&S.default.isStickyMode(),(0,s.default)(["tablet","phone"],r)&&!this.isResponsiveEnabled()&&(p="desktop")):"hover"===r?d=!0:"sticky"===r&&(f=!0),(d||f||"tablet"===p||"phone"===p&&!1===(u=(0,l.default)(this.getAttrs(),"".concat(e,"_tablet"),!1)))&&(u=(0,l.default)(this.getAttrs(),e,u)),O.default.hasValue(u)||(u=i),u}},{key:"getViewTabSuffix",value:function(){return R(this.getActiveTabMode())}},{key:"getActiveTabMode",value:function(){return this.props.activeHover&&(0,h.isHoverMode)()?"hover":this.props.activeSticky&&S.default.isStickyMode()?"sticky":(0,s.default)(["tablet","phone"],this.props.activeTabMode)&&this.props.isResponsiveEnabled?this.props.activeTabMode:"desktop"}},{key:"getContextMenu",value:function(){var e=this.getSetting("transform_".concat(this.state.transformTab));return(0,l.default)(e,"context_menu",!0)}},{key:"isActiveViewTab",value:function(e){return this.getActiveTabMode()===e?"desktop"===e&&((0,h.isHoverMode)()||S.default.isStickyMode())?"":"active":this.isResponsiveTabModified(e)?"modified":""}},{key:"isResponsiveTabModified",value:function(e){var t=R(e),n=(0,l.default)(this.getAttrs(),"transform_".concat(this.state.transformTab).concat(t),"");return!!O.default.hasValue(n)&&this.getSettingDefault("transform_".concat(this.state.transformTab),e)!==n}},{key:"responsiveTabs",value:function(){var e=ETBuilderBackend.i18n.controls,t=["et-fb-settings-option-responsive-tab-nav","et-fb-settings-transform-responsive-tab-nav"];return this.props.activeHover&&t.push("et-fb-settings-option-responsive-tab-nav-hover-active"),o.default.createElement(b.default,null,o.default.createElement("ul",{className:t.join(" ")},o.default.createElement("li",{className:this.isActiveViewTab("desktop"),"data-tab":"desktop",onClick:this.onClickResponsiveTab},e.responsiveTabs.desktop),this.props.activeHover?o.default.createElement("li",{"data-tab":"hover",className:this.isActiveViewTab("hover"),onClick:this.onClickResponsiveTab},e.tabs.hover):null,o.default.createElement("li",{"data-tab":"tablet",className:this.isActiveViewTab("tablet"),onClick:this.onClickResponsiveTab},e.responsiveTabs.tablet),o.default.createElement("li",{"data-tab":"phone",className:this.isActiveViewTab("phone"),onClick:this.onClickResponsiveTab},e.responsiveTabs.phone)))}},{key:"onMouseOverTransformTab",value:function(e){var t=e.target.dataset,n=t.tab,r=t.transform_type,o=t.tip;if(n!==this.state.transformTab){var a={fieldName:"transform_".concat(n),fieldLabel:o,fieldType:r,toggleId:this.props.toggle_slug,toggleGroupId:this.props.tab_slug,fieldContextMenu:this.state.transformTabContextMenu};this.props.onMouseEnterGroup(a)}}},{key:"onMouseLeaveTransformTab",value:function(e){var t=this.getSetting("transform_".concat(this.state.transformTab));if(e.target.dataset.tab!==this.state.transformTab){var n={fieldName:"transform_".concat(this.state.transformTab),fieldLabel:(0,l.default)(t,"label"),fieldType:(0,l.default)(t,"type"),toggleId:this.props.toggle_slug,toggleGroupId:this.props.tab_slug,fieldContextMenu:this.state.transformTabContextMenu};this.props.onMouseEnterGroup(n)}}},{key:"transformTabs",value:function(){var e=this;return o.default.createElement("ul",{className:"et-fb-settings-tab-titles"},(0,u.default)(this.getTabs(),(function(t,n){var r=(0,l.default)(t.controls,"transform_".concat(n));return o.default.createElement("li",{key:"".concat(n,"-tab")},o.default.createElement("button",{className:(0,a.default)({"et-fb-settings-tab-title":!0,"et-fb-settings-tab-title-active":e.state.transformTab===n,"et-fb-settings-tab-title-modified":e.isResetActive(n)}),"data-tab":n,"data-transform_type":(0,l.default)(r,"type"),onClick:e.onClickTransformTab,onMouseOver:e.onMouseOverTransformTab,onMouseLeave:e.onMouseLeaveTransformTab,"data-tip":(0,l.default)(r,"label"),"data-index":t,"data-for":"transform-tab-tooltip-".concat(t)},o.default.createElement(m.default,{icon:t.icon,color:e.state.transformTab===n||e.isResetActive(n)?C.default.info:C.default.inactiveGrey}),o.default.createElement(i.default,{id:"transform-tab-tooltip-".concat(t)})))})))}},{key:"renderTransformField",value:function(){var e="transform_".concat(this.state.transformTab),t=this.getSettingDefault(e),n="".concat(e).concat(this.getViewTabSuffix()),r=(0,l.default)(this.getAttrs(),n,t),a=this.getSetting(e);return o.default.createElement(f.default,{key:"".concat(this.props.uniqueKey,"-").concat(n),name:n,transform_type:this.state.transformTab,default:t,default_unit:(0,l.default)(a,"default_unit"),range_settings:(0,l.default)(a,"range_settings"),value:r,uniqueKey:this.props.uniqueKey,_onChange:this.props._onChange,onClickLink:this.setLinked,scaleLinked:this.getLinked("scale"),skewLinked:this.getLinked("skew"),translateLinked:this.getLinked("translate"),readonly:O.default.hasValue(this.props.readonly),module:this.props.module.props.module})}},{key:"onClickTransformTab",value:function(e){e.preventDefault();var t=e.target.dataset.tab;this.setState({transformTab:t,transformTabContextMenu:this.getContextMenu()})}},{key:"onClickResponsiveTab",value:function(e){var t=e.target.dataset.tab,n=v.default.getActiveModule(),r="hover"===t,o="sticky"===t,a=r||o?"desktop":t,i=function(e){return"".concat(e?"on":"off","|").concat(e?t:"desktop")};_.default.toggleModuleHover(r),_.default.moduleSettingsChange(n,"hover_enabled",r?1:0),_.default.moduleSettingsChange(n,"sticky_enabled",o?1:0),"wireframe"!==v.default.getPreviewMode()&&_.default.switchResponsivePreviewMode(a,!1,!0),r||(this.props._onChange("".concat(this.props.name,"_last_edited"),i(this.isResponsiveEnabled())),this.props._onChange("transform_".concat(this.state.transformTab,"_last_edited"),i(this.isResponsiveEnabled())))}},{key:"isResponsiveEnabled",value:function(){return k.default.isResponsiveEnabled(this.getAttrs(),this.props.name)}},{key:"isHoverEnabled",value:function(){return h.default.isEnabled(this.props.name,this.getAttrs())}},{key:"isStickyEnabled",value:function(){return S.default.isEnabled(this.props.name,this.getAttrs())}},{key:"onClickResponsive",value:function(){this.props.onClickResponsive(this.props.name,(0,d.default)(this.getTabs()).map((function(e){return"transform_".concat(e)})))}},{key:"isResetActive",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.transformTab,t="transform_".concat(e),n="".concat(t).concat(this.getViewTabSuffix()),r=this.getSettingDefault(t),o=(0,l.default)(this.getAttrs(),n,r),a="",i="";return(0,s.default)(["scale","translate","skew"],e)&&(a=this.getSettingDefault("".concat(t,"_linked")),i=(0,l.default)(this.getAttrs(),"".concat(t,"_linked").concat(this.getViewTabSuffix()),a)),O.default.hasValue(i)&&i!==a||o!==r&&O.default.hasValue(o)}},{key:"onClickReset",value:function(){var e="transform_".concat(this.state.transformTab);this.props._onChange("".concat(e).concat(this.getViewTabSuffix()),"","range",null,!0),(0,s.default)(["scale","translate","skew"],this.state.transformTab)&&this.setLinked(this.state.transformTab,this.getSettingDefault("".concat(e,"_linked")))}},{key:"onClickHover",value:function(){this.props.onClickHover(this.props.name,(0,d.default)(this.getTabs()).map((function(e){return"transform_".concat(e)})))}},{key:"onClickSticky",value:function(){this.props.onClickSticky(this.props.name,(0,d.default)(this.getTabs()).map((function(e){return"transform_".concat(e)})))}},{key:"buttonsVisible",value:function(){var e=this,t=!1;return(0,d.default)(this.getTabs()).forEach((function(n){t||(t=e.props.isHoveredGroup("transform_".concat(n)))})),t}},{key:"onEnterGroup",value:function(e){var t=this.getSetting(e),n={fieldName:e,fieldLabel:(0,l.default)(t,"label"),fieldType:(0,l.default)(t,"type"),toggleId:this.props.toggle_slug,toggleGroupId:this.props.tab_slug,fieldContextMenu:this.state.transformTabContextMenu};this.props.onMouseEnterGroup(n)}},{key:"onLeaveGroup",value:function(){var e={fieldName:this.props.name,fieldLabel:this.props.label,fieldType:this.props.type,toggleId:this.props.toggle_slug,toggleGroupId:this.props.tab_slug,fieldContextMenu:this.state.transformTabContextMenu};this.props.onMouseEnterGroup(e)}},{key:"render",value:function(){if(!this.props._isOptionMatchesFilter(this.props.label,"".concat(this.props.description," scale rotate translate skew origin"),this.props.label))return!1;var e=this.props,t=e.name,n=e.label,r=e.description,a=e.hasHoverOptions,i=e.hasStickyOptions,l=e.mobile_options,u=!(0,c.default)(r)&&""!==r,s=o.default.createElement(g.default,{name:t,key:"general-form-label-".concat(this.props.uniqueKey),onClickHelp:this.props.onClickHelp,activeHelp:this.props.isDescriptionVisible(t),hasHoverOptions:O.default.hasValue(a),activeHover:this.props.activeHover,onClickHover:this.onClickHover,hasStickyOptions:O.default.hasValue(i),activeSticky:this.props.activeSticky,onClickSticky:this.onClickSticky,hasResponsiveOptions:O.default.hasValue(l),isResponsiveEnabled:this.isResponsiveEnabled(),onClickResponsive:this.onClickResponsive,onClickReset:this.onClickReset,isResetActive:this.isResetActive(),hoveredGroup:this.buttonsVisible(),onToggleRightMenu:!!this.state.transformTabContextMenu&&this.props.onToggleRightMenu},n),d=u?o.default.createElement(w.default,{active:this.props.isDescriptionVisible(t),key:"general-form-description-".concat(this.props.uniqueKey)},r):"",f="transform_".concat(this.state.transformTab),p=this.isResponsiveEnabled()||this.isHoverEnabled()||this.isStickyEnabled()?o.default.createElement(b.default,null,o.default.createElement(E.default,{module:this.getModule(),moduleAttrs:this.getAttrs(),fieldName:t,subFields:[f],activeTabMode:this.props.activeTabMode,isGlobalPresetsMode:this.props.isGlobalPresetsMode,isResponsiveEnabled:this.isResponsiveEnabled(),isHoverEnabled:this.isHoverEnabled(),isStickyEnabled:this.isStickyEnabled(),isItemSelected:this.props.isItemSelected})):"";return o.default.createElement(y.default,{name:f,key:"advanced-form-group-".concat(this.props.uniqueKey),onMouseEnterGroup:this.onEnterGroup,onMouseLeaveGroup:this.onLeaveGroup,className:this.props.productTourClass,isSelectiveSyncAvailable:this.props.isSelectiveSyncAvailable(),isGlobalOptionSynced:this.props.isGlobalOptionSynced(f),_unsyncGlobalSetting:this.props._unsyncGlobalSetting},s,d,p,this.transformTabs(),this.renderTransformField())}}],n&&M(t.prototype,n),r&&M(t,r),Object.defineProperty(t,"prototype",{writable:!1}),P}(p.default),I=A;t.default=I},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=D(n(0)),a=D(n(27)),i=D(n(16)),l=D(n(13)),u=D(n(1)),s=D(n(5)),c=D(n(69)),d=D(n(7)),f=D(n(10)),p=D(n(9)),h=D(n(124)),m=D(n(72)),y=D(n(199)),g=D(n(521)),b=D(n(17)),v=D(n(147)),_=D(n(88)),w=D(n(364)),O=D(n(459)),k=D(n(399)),S=D(n(107)),C=D(n(1491)),E=D(n(2)),P=D(n(63)),T=D(n(303)),M=D(n(14)),j=D(n(6)),x=D(n(22));function D(e){return e&&e.__esModule?e:{default:e}}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function R(e){var t=function(){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}}();return function(){var n,r=B(e);if(t){var o=B(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return A(this,n)}}function A(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return I(e)}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1747);var W=function(e){return E.default.hasValue(e)&&!(0,d.default)(["none","0|none"],e)},V=function(e){return"add_new_account"===e},U=function(e){return"fetch_lists"===e},G=E.default.$topWindow("body"),H=function(t){!function(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&&L(e,t)}(B,t);var n,r,D,A=R(B);function B(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,B),F(I(t=A.call(this,e)),"force_clear_fields",!1),F(I(t),"getProviderName",(function(){return t.props.name.replace("_list","")})),F(I(t),"addNewAccountInProgress",(function(){return V(t.props.value)})),F(I(t),"removeAccountInProgress",(function(){return"remove_account"===t.props.value})),F(I(t),"fetchListsInProgress",(function(){return U(t.props.value)})),F(I(t),"canAddNewAccount",(function(){var e=(0,b.default)(t.props.options).length-2;return!t.props.max_accounts||e<t.props.max_accounts})),t.state={ajax_in_progress:!1,remove_account_ajax:!1},t.previous_selection="none",t.selected_account="",t.shouldComponentUpdate=i.default.shouldComponentUpdate.bind(I(t)),t._addNewAccount=t._addNewAccount.bind(I(t)),t._removeAccount=t._removeAccount.bind(I(t)),t._ajaxSendRequest=t._ajaxSendRequest.bind(I(t)),t._ajaxComplete=t._ajaxComplete.bind(I(t)),t._fetchLists=t._fetchLists.bind(I(t)),t.actionInProgress=t.actionInProgress.bind(I(t)),t.cancelAllActions=t.cancelAllActions.bind(I(t)),t.getProviderName=t.getProviderName.bind(I(t)),t.getSelectedAccount=t.getSelectedAccount.bind(I(t)),t._onChange=t._onChange.bind(I(t)),t._onClickAddNewAccountButton=t._onClickAddNewAccountButton.bind(I(t)),t._onClickFetchListsButton=t._onClickFetchListsButton.bind(I(t)),t._onClickRemoveAccountButton=t._onClickRemoveAccountButton.bind(I(t)),t._renderAddNewAccountButton=t._renderAddNewAccountButton.bind(I(t)),t._renderRemoveAccountButton=t._renderRemoveAccountButton.bind(I(t)),t._renderFetchListsButton=t._renderFetchListsButton.bind(I(t)),t}return n=B,r=[{key:"UNSAFE_componentWillMount",value:function(){j.default.addModuleSettingsAddAccountCancelEventListener(this.cancelAllActions),j.default.addModuleSettingsAddAccountSubmitEventListener(this._addNewAccount)}},{key:"componentWillUnmount",value:function(){j.default.removeModuleSettingsAddAccountCancelEventListener(this.cancelAllActions),j.default.removeModuleSettingsAddAccountSubmitEventListener(this._addNewAccount),G.removeClass("et-fb--email-action-in-progress et-fb--email-ajax-in-progress")}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){W(this.props.value)&&!W(e.value)&&this.setState({ajax_in_progress:!1,remove_account_ajax:!1})}},{key:"_openPopupAuth",value:function(e){var t=this,n=e.redirect_url,r=null!=window.screenLeft?window.screenLeft:window.screenX,o=null!=window.screenTop?window.screenTop:window.screenY,a=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,i=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,l={width:900,height:500};l.left=a/2-l.width/2+r,l.top=i/2-l.height/2+o;var u="toolbar=0,scrollbars=1,status=1,resizable=1,location=1,menuBar=0, width=".concat(l.width,",height=").concat(l.height,", left=").concat(l.left,",top=").concat(l.top),s=window.open(n,"ETAuthPopup",u),c=window.addEventListener?"addEventListener":"attachEvent",d=window[c],f="attachEvent"===c?"onmessage":"message",p=setInterval((function(){s.closed&&(clearInterval(p),t._ajaxComplete(e))}),1e3);window.focus&&s.focus(),d(f,(function(n){clearInterval(p),n.data.authenticated?t._addNewAccount():t._ajaxComplete(e),s.close()}),!1)}},{key:"_addNewAccount",value:function(){var e=this,t=(0,u.default)(this.props,"module.state.generalFields"),n=this.getProviderName(),r=(0,h.default)(t,(function(e,t){return(0,m.default)(t,n)}));if(!(0,c.default)(r,(function(e){return(0,s.default)(e)}))){var o=(0,g.default)(r,(function(t,n,r){(0,y.default)(r,"_list")||(t["et_".concat(r)]=(0,u.default)(e.props.moduleAttrs,r,""))}));o.action="et_builder_email_add_account",o.et_provider=n,o.et_builder_email_add_account_nonce=ETBuilderBackend.nonces.moduleEmailOptinAddAccount,"spam"===(0,u.default)(this,"props.toggle_slug")&&(o.is_spam_account=1),this._ajaxSendRequest(o)}}},{key:"_removeAccount",value:function(){var e=this.getProviderName(),t=this.selected_account,n={action:"et_builder_email_remove_account",et_builder_email_remove_account_nonce:ETBuilderBackend.nonces.moduleEmailOptinRemoveAccount,et_provider:e,et_account:t};"spam"===(0,u.default)(this,"props.toggle_slug")&&(n.is_spam_account=1),this._ajaxSendRequest(n,"remove_account_ajax")}},{key:"_ajaxSendRequest",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax_in_progress",o="et_builder_email_add_account"===t.action;this.setState(F({},r,!0)),e.ajax({type:"POST",url:ETBuilderBackend.ajaxUrl,dataType:"json",data:t}).done((function(e,t,r){o&&E.default.hasValue(e.redirect_url)?n._openPopupAuth(e):n._ajaxComplete(e)})).fail((function(){return n._ajaxComplete()}))}},{key:"_ajaxComplete",value:function(e){var t=this;if(e){var n=["et_pb_signup"];"spam"===(0,u.default)(this,"props.toggle_slug")&&n.push("et_pb_contact_form"),(0,p.default)(n,(function(n){var r=M.default.getComponentFieldsByType(n)[t.props.name];r.options=(0,f.default)({},e.accounts_list),x.default.updateComponentFieldDefinition(n,t.props.name,r),"et_pb_signup"!==n||(0,s.default)(e.predefined_custom_fields)||(ETBuilderBackend.emailPredefinedCustomFields=e.predefined_custom_fields),"et_pb_signup"!==n||(0,s.default)(e.custom_fields)||x.default.updateComponentFieldDefinitions("et_pb_signup_custom_field",e.custom_fields)}))}if(this.addNewAccountInProgress()&&this.state.ajax_in_progress){j.default.emitModuleSettingsAddAccountAjaxCompleteEvent();var r=(0,_.default)((0,w.default)((0,O.default)(e.accounts_list)));"spam"===(0,u.default)(this,"props.toggle_slug")?(r=(0,v.default)(r),r+="-0"):r=(0,v.default)((0,_.default)((0,O.default)((0,_.default)(r)))),this.previous_selection=r}else this.removeAccountInProgress()&&(this.previous_selection="");this.force_clear_fields=this.removeAccountInProgress(),this.cancelAllActions()}},{key:"_fetchLists",value:function(){var e=this.getProviderName(),t=this.getSelectedAccount(),n={action:"et_builder_email_get_lists",et_builder_email_fetch_lists_nonce:ETBuilderBackend.nonces.moduleEmailOptinFetchLists,et_provider:e,et_account:t};this._ajaxSendRequest(n)}},{key:"actionInProgress",value:function(){return this.addNewAccountInProgress()||this.fetchListsInProgress()||this.removeAccountInProgress()}},{key:"cancelAllActions",value:function(){(""===this.previous_selection||(0,d.default)(["add_new_account","fetch_lists","remove_account"],this.previous_selection))&&(this.previous_selection="none"),this.setState({ajax_in_progress:!1,remove_account_ajax:!1}),this.props._onChange(this.props.name,this.previous_selection)}},{key:"getSelectedAccount",value:function(){return e(a.default.findDOMNode(this)).find(":selected").parent().attr("label")}},{key:"setPreviousSelection",value:function(){this.previous_selection="".concat(this.getSelectedAccount(),"|").concat(this.props.value)}},{key:"_onChange",value:function(e,t,n){var r=(0,d.default)(["add_new_account","fetch_lists","remove_account"],t),o=this.actionInProgress()&&!r;this.props._onChange(e,t),o&&this.cancelAllActions(),!this.actionInProgress()&&r&&("add_new_account"===t?"aweber"===this.getProviderName()&&setTimeout((function(){E.default.topWindow().open("https://auth.aweber.com/1.0/oauth/authorize_app/b17f3351")}),500):"fetch_lists"===t&&this._fetchLists())}},{key:"_onClickAddNewAccountButton",value:function(){this.addNewAccountInProgress()||(this.setPreviousSelection(),this._onChange(this.props.name,"add_new_account"))}},{key:"_onClickFetchListsButton",value:function(){this.removeAccountInProgress()?this.cancelAllActions():this.actionInProgress()||(this.setPreviousSelection(),this._onChange(this.props.name,"fetch_lists"))}},{key:"_onClickRemoveAccountButton",value:function(){this.removeAccountInProgress()&&!this.state.remove_account_ajax?this._removeAccount():this.removeAccountInProgress()||(this.selected_account=this.getSelectedAccount(),this.setPreviousSelection(),this._onChange(this.props.name,"remove_account"))}},{key:"UNSAFE_componentWillUpdate",value:function(e,t){var n=t.ajax_in_progress;V(e.value)||U(e.value)?G.addClass("et-fb--email-action-in-progress"):G.removeClass("et-fb--email-action-in-progress"),n?G.addClass("et-fb--email-ajax-in-progress"):G.removeClass("et-fb--email-ajax-in-progress")}},{key:"_renderAddNewAccountButton",value:function(e){var t=(0,u.default)(this.props,"after[0].text","");return this.addNewAccountInProgress()||this.removeAccountInProgress()||!this.canAddNewAccount()?"":o.default.createElement(T.default,{useWrapper:!1,isLoading:this.state.ajax_in_progress},o.default.createElement(P.default,{className:e,_onClick:this._onClickAddNewAccountButton,inverse:!0},t))}},{key:"_renderRemoveAccountButton",value:function(e){var t=this.removeAccountInProgress(),n=(0,u.default)(this.props,"after[1].attributes.data-confirm_text",""),r=(0,u.default)(this.props,"after[1].text","");return this.addNewAccountInProgress()||this.fetchListsInProgress()||!W(this.props.value)||"0"===this.props.value?"":o.default.createElement(T.default,{useWrapper:!1,isLoading:this.state.remove_account_ajax},o.default.createElement(P.default,{className:e,_onClick:this._onClickRemoveAccountButton,inverse:!0},t?n:r))}},{key:"_renderFetchListsButton",value:function(e){var t=(0,u.default)(this.props,"after[2].attributes['data-cancel_text']","");t||(t=(0,u.default)(this.props,"after[1].attributes['data-cancel_text']",""));var n=this.addNewAccountInProgress(),r=(0,u.default)(this.props,"after[2].text","");return n||!r&&!this.removeAccountInProgress()||this.state.ajax_in_progress||this.state.remove_account_ajax||!W(this.props.value)?"":o.default.createElement(T.default,{useWrapper:!1,isLoading:this.fetchListsInProgress()},o.default.createElement(P.default,{className:e,_onClick:this._onClickFetchListsButton,inverse:!0},this.removeAccountInProgress()?t:r))}},{key:"render",value:function(){var e,t=this.props.type.replace(/_/g,"-"),n=(0,l.default)({"et-fb-settings-button--additional-button":!0}),r=this.addNewAccountInProgress()&&this.state.ajax_in_progress,a=this.addNewAccountInProgress()||this.removeAccountInProgress(),i="spam"===(0,u.default)(this,"props.toggle_slug"),s="";a&&this.addNewAccountInProgress()?s=this.props.attributes["data-adding_new_account_text"]:a&&this.removeAccountInProgress()&&(s="".concat(this.props.attributes["data-confirm_remove_text"]," ").concat(this.selected_account));var c=(0,l.default)((F(e={},"et-fb-option--".concat(t),!0),F(e,"et-fb--email-add-new-in-progress-ajax",r),F(e,"et-fb--email-add-new-in-progress",this.addNewAccountInProgress()),F(e,"et-fb--email-fetch-lists-in-progress",this.fetchListsInProgress()),F(e,"et-fb--email-remove-in-progress",this.removeAccountInProgress()),F(e,"et-fb--spam",i),e)),d=this.props.value||this.props.default,f=!this.props.readonly,p=W(d),h=f&&!this.props.hideAddButton,m=p&&f&&!this.props.hideRemoveButton,y=p&&f&&!this.props.hideFetchButton,g=(0,S.default)(this.props.options,(function(e,t){return(0,k.default)(e,(function(e,n){return"manage"===t?n:"".concat(t,"|").concat(n)}))}));return o.default.createElement("div",{className:c},a?o.default.createElement("span",{className:"et-fb-form__description"},s):o.default.createElement(C.default,{name:this.props.name,value:this.props.value||this.props.default,className:(0,l.default)("et-fb-settings-option--with-after-element"),groups:!0,parseGroupValue:!1,options:g,module:this.props.module,readonly:this.props.readonly||!1,_onChange:this._onChange}),h&&this._renderAddNewAccountButton(n),m&&this._renderRemoveAccountButton(n),y&&this._renderFetchListsButton(n))}}],r&&N(n.prototype,r),D&&N(n,D),Object.defineProperty(n,"prototype",{writable:!1}),B}(o.default.Component),z=H;t.default=z}).call(this,n(8))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=_(n(0)),a=_(n(16)),i=_(n(13)),l=_(n(1)),u=_(n(11)),s=_(n(72)),c=_(n(199)),d=_(n(65)),f=_(n(17)),p=_(n(9)),h=(_(n(334)),_(n(8))),m=_(n(457)),y=_(n(63)),g=_(n(303)),b=_(n(6)),v=n(1556);function _(e){return e&&e.__esModule?e:{default:e}}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function k(e){var t=function(){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}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C(e)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1749);var T=function(e){!function(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&&O(e,t)}(S,e);var t,n,r,_=k(S);function S(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,S),P(C(t=_.call(this,e)),"_apiFields",(function(){var e=t.props.name.split("_").shift(),n=(0,f.default)((0,v.getModule)(C(t)).props.attrs);return(0,d.default)(n,(function(t){return(0,s.default)(t,"".concat(e,"_"))&&!(0,c.default)(t,"_list")}))})),P(C(t),"onAddAccountAjaxComplete",(function(){t.setState({ajax_in_progress:!1}),t.props._onChange(t.props.name,"",void 0,void 0,!0),(0,p.default)(t._apiFields(),(function(e){t.props._onChange(e,"",void 0,void 0,!0)}))})),t.state={ajax_in_progress:!1},t.shouldComponentUpdate=a.default.shouldComponentUpdate.bind(C(t)),t._onClickCancelButton=t._onClickCancelButton.bind(C(t)),t._onClickSubmitButton=t._onClickSubmitButton.bind(C(t)),t}return t=S,(n=[{key:"UNSAFE_componentWillMount",value:function(){b.default.addModuleSettingsAddAccountAjaxCompleteEventListener(this.onAddAccountAjaxComplete)}},{key:"componentWillUnmount",value:function(){b.default.removeModuleSettingsAddAccountAjaxCompleteEventListener(this.onAddAccountAjaxComplete)}},{key:"_onClickCancelButton",value:function(){b.default.emitModuleSettingsAddAccountCancelEvent.call(b.default);var e=this.props.name.split("_").shift();(0,h.default)(this.node).closest(".et-fb-form__toggle-enabled").find('input[name^="'.concat(e,'"]')).css("border",""),this.state.ajax_in_progress&&this.setState({ajax_in_progress:!1})}},{key:"_onClickSubmitButton",value:function(){var e=this.props.name.split("_").shift(),t=(0,h.default)(this.node).closest(".et-fb-form__toggle-enabled").find('input[name^="'.concat(e,'"]')).filter((function(e,t){return""===(0,h.default)(t).val()&&""===(0,h.default)(t).attr("placeholder")&&!(0,h.default)(t).hasClass("et-fb-settings-option--not-required")}));if(t.length>0)return t.css("border","1px solid #EF5555"),void t.on("input",(function(){(0,h.default)(this).val()&&(0,h.default)(this).css("border","")||(0,h.default)(this).css("border","1px solid #EF5555")}));b.default.emitModuleSettingsAddAccountSubmitEvent.call(b.default),this.setState({ajax_in_progress:!0})}},{key:"render",value:function(){var e,t=this,n=this.props.type.replace(/_/g,"-"),r=(0,i.default)({"et-fb-settings-button--additional-button":!0}),a=(0,i.default)({"et-fb-settings-option--with-after-element":!0,"et-fb-settings-option--not-required":this.props.not_required}),s=(0,i.default)((P(e={},"et-fb-option--".concat(n),!0),P(e,"et-fb-option-group--last-field",!0),e));return o.default.createElement("div",{ref:function(e){return t.node=e},className:s},o.default.createElement(m.default,{name:this.props.name,value:(0,u.default)(this.props.value)?"":this.props.value,className:a,groups:!0,options:this.props.options,module:this.props.module,_onChange:this.props._onChange}),o.default.createElement(y.default,{className:(0,i.default)(r,"et-fb-button--cancel"),_onClick:this._onClickCancelButton,inverse:!0},(0,l.default)(this.props,"after[0].text","")),o.default.createElement(g.default,{useWrapper:!1,isLoading:this.state.ajax_in_progress},o.default.createElement(y.default,{className:r,_onClick:this._onClickSubmitButton,inverse:!0},(0,l.default)(this.props,"after[1].text",""))))}}])&&w(t.prototype,n),r&&w(t,r),Object.defineProperty(t,"prototype",{writable:!1}),S}(o.default.Component);t.default=T},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=u(n(392)),i=u(n(1));n(1751);var l=u(n(457));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var b=function(e){!function(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&&h(e,t)}(s,e);var t,n,r,u=m(s);function s(){return f(this,s),u.apply(this,arguments)}return t=s,n=[{key:"render",value:function(){var e=(0,o.createElement)(l.default,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.props));return o.default.createElement(o.Fragment,null,e,o.default.createElement("div",{className:"et-fb-settings-unsupported-notice",dangerouslySetInnerHTML:{__html:(0,a.default)((0,i.default)(ETBuilderBackend,"i18n.vbSupport.unsupportedFieldType",""))}}))}}],n&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.PureComponent),v=b;t.default=v},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=f(n(0)),a=f(n(3)),i=f(n(7)),l=f(n(1)),u=f(n(40)),s=f(n(5));n(1753);var c=f(n(2)),d=f(n(84));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _="et-fb-settings-position",w=function(e){return(0,l.default)(e,"currentTarget.dataset.origin_type","top_left").split("_")},O=function(e){!function(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&&h(e,t)}(l,e);var t,n,r,a=m(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),v(g(t=a.call(this,e)),"state",{value:t.props.value||t.props.default}),v(g(t),"handleButtonOnClick",(function(e){if(!t.eventInitReadOnly(e)){var n=w(e),r=n.join("_");(0,s.default)(t.hRuler.current)||("center"===n[0]?t.hRuler.current.style.backgroundColor=d.default.selectPositionGray:t.hRuler.current.style.backgroundColor="transparent","center"===n[1]?t.vRuler.current.style.backgroundColor=d.default.selectPositionGray:t.vRuler.current.style.backgroundColor="transparent"),t.props._onChange(t.props.name,r),t.setState({value:r})}})),v(g(t),"handleButtonOnMouseEnter",(function(e){if(!t.eventInitReadOnly(e)){var n=w(e);"center"===n[0]&&(t.hRuler.current.style.backgroundColor=d.default.selectPositionGray),"center"===n[1]&&(t.vRuler.current.style.backgroundColor=d.default.selectPositionGray)}})),v(g(t),"handleButtonOnMouseLeave",(function(e){if(!t.eventInitReadOnly(e)){var n=w(e),r=t.state.value.split("_");"center"===n[0]&&"center"!==r[0]&&(t.hRuler.current.style.backgroundColor="transparent"),"center"===n[1]&&"center"!==r[1]&&(t.vRuler.current.style.backgroundColor="transparent")}})),t.position="absolute",(0,i.default)(e.name,"_f")?t.position="fixed":(0,i.default)(e.name,"_r")&&(t.position="relative"),t.hRuler=o.default.createRef(),t.vRuler=o.default.createRef(),t}return t=l,n=[{key:"shouldComponentUpdate",value:function(e,t){return c.default.shouldComponentUpdate(this,e,t)}},{key:"getButtonClass",value:function(e){return e===this.state.value?"".concat(_,"-button-active"):"".concat(_,"-button")}},{key:"eventInitReadOnly",value:function(e){return e.preventDefault(),e.stopPropagation(),this.props.readonly}},{key:"renderButton",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return""!==e?o.default.createElement("div",{className:"".concat(this.getButtonClass(e)," ").concat(_,"-").concat(this.position),"data-origin_type":e,onMouseDown:this.handleButtonOnClick,onMouseEnter:this.handleButtonOnMouseEnter,onMouseLeave:this.handleButtonOnMouseLeave}):o.default.createElement("div",{className:"".concat(_,"-button-guide ").concat(_,"-").concat(this.position)})}},{key:"renderNineController",value:function(){var e=this.state.value.split("_"),t="transparent",n="transparent";return"center"===e[0]&&(t=d.default.selectPositionGray),"center"===e[1]&&(n=d.default.selectPositionGray),o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"".concat(_,"-hr"),ref:this.hRuler,style:{backgroundColor:t}}),o.default.createElement("div",{className:"".concat(_,"-vr"),ref:this.vRuler,style:{backgroundColor:n}}),o.default.createElement("div",{className:"".concat(_,"-control-guide ").concat(_,"-").concat(this.position)},o.default.createElement("div",{className:"".concat(_,"-control-inner-top")},this.renderButton(),this.renderButton(),this.renderButton()),o.default.createElement("div",{className:"".concat(_,"-control-inner-mid")},this.renderButton(),this.renderButton(),this.renderButton()),o.default.createElement("div",{className:"".concat(_,"-control-inner-bottom")},this.renderButton(),this.renderButton(),this.renderButton())),o.default.createElement("div",{className:"".concat(_,"-control-frame ").concat(_,"-").concat(this.position)}),o.default.createElement("div",{className:"".concat(_,"-control-guide ").concat(_,"-").concat(this.position)},o.default.createElement("div",{className:"".concat(_,"-control-inner-top")},this.renderButton("top_left"),this.renderButton("top_center"),this.renderButton("top_right")),o.default.createElement("div",{className:"".concat(_,"-control-inner-mid")},this.renderButton("center_left"),this.renderButton("center_center"),this.renderButton("center_right")),o.default.createElement("div",{className:"".concat(_,"-control-inner-bottom")},this.renderButton("bottom_left"),this.renderButton("bottom_center"),this.renderButton("bottom_right"))))}},{key:"renderFourController",value:function(){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"".concat(_,"-control-guide ").concat(_,"-").concat(this.position)},o.default.createElement("div",{className:"".concat(_,"-control-inner-top")},this.renderButton(),o.default.createElement("div",{className:"".concat(_,"-button-space")}),this.renderButton()),o.default.createElement("div",{className:"".concat(_,"-control-inner-bottom")},this.renderButton(),o.default.createElement("div",{className:"".concat(_,"-button-space")}),this.renderButton())),o.default.createElement("div",{className:"".concat(_,"-control-frame ").concat(_,"-").concat(this.position)}),o.default.createElement("div",{className:"".concat(_,"-control-guide ").concat(_,"-").concat(this.position)},o.default.createElement("div",{className:"".concat(_,"-control-inner-top")},this.renderButton("top_left"),o.default.createElement("div",{className:"".concat(_,"-button-space")}),this.renderButton("top_right")),o.default.createElement("div",{className:"".concat(_,"-control-inner-bottom")},this.renderButton("bottom_left"),o.default.createElement("div",{className:"".concat(_,"-button-space")}),this.renderButton("bottom_right"))))}},{key:"render",value:function(){return o.default.createElement("div",{id:"".concat(_,"-container"),className:"".concat(_,"-container")},"relative"===this.position?this.renderFourController():this.renderNineController())}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return t.value!==e.value?{value:e.value||e.default}:null}}],n&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.default.Component);v(O,"propTypes",{default:a.default.string,name:a.default.string.isRequired,value:a.default.string,_onChange:u.default,readonly:a.default.bool}),v(O,"defaultProps",{default:"top_left",name:"position_origin_r",value:"top_left",_onChange:u.default,readonly:!1});var k=O;t.default=k},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ETBuilderControlAlign=void 0;var r=l(n(0)),o=l(n(127)),a=n(1557),i=n(1556);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e){return(0,o.default)(e,(function(e,t,n){return s(s({},e),{},c({},n,(0,i.getAlignIconName)(n)))}),{})};t.ETBuilderControlAlign=function(e){var t=e.name,n=e.value,o=e.options,i=e._onChange;return r.default.createElement(a.ETBuilderControlIconPicker,{_onChange:i,options:d(o),name:t,value:n,size:12})}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=p(n(3)),i=p(n(1)),l=p(n(9));n(1496);var u=p(n(14)),s=p(n(1757)),c=p(n(6)),d=p(n(22)),f=["name"];function p(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function v(e){var t=function(){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}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=function(e){!function(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&&b(e,t)}(p,e);var t,n,r,a=v(p);function p(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),k(w(t=a.call(this,e)),"setOptions",(function(e){d.default.setWoocommerceCheckboxOptions(e)})),k(w(t),"getArguments",(function(e,t){var n={};return n[e]=t,n.action="et_builder_get_woocommerce_tabs",n.nonce=ETBuilderBackend.nonces.getWoocommerceTabs,n})),k(w(t),"getProp",(function(e,t){return(0,i.default)(e,"moduleAttrs.".concat(t),null)}));var n=u.default.getCurrentPage("woocommerceTabs",{});return["current","latest"].includes(t.getProp(t.props,"product",null))||(n={}),t.state={options:n},t.currentProductOptions={},t.computedDependsOn=[],t.updateStateOptions=t.updateStateOptions.bind(w(t)),t.getArguments=t.getArguments.bind(w(t)),t}return t=p,(n=[{key:"componentDidMount",value:function(){var e=this.state.options;this.computedDependsOn=(0,i.default)(this.props,"computed_depends_on",[]),this.currentProductOptions=e,this.setOptions(this.currentProductOptions),c.default.addWoocommerceCheckboxOptionsUpdatedListener(this.updateStateOptions)}},{key:"componentDidUpdate",value:function(e){var t=this;(0,l.default)(this.computedDependsOn,(function(n){var r=t.getProp(t.props,n);r!==t.getProp(e,n)&&"current"===r&&(t.setOptions(t.currentProductOptions),c.default.addWoocommerceCheckboxOptionsUpdatedListener(t.updateStateOptions))}))}},{key:"componentWillUnMount",value:function(){c.default.removeWoocommerceCheckboxOptionsUpdatedListener(this.updateStateOptions)}},{key:"updateStateOptions",value:function(){var e=c.default.getWooCommerceCheckboxOptions();this.setState({options:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=y(t,f);return o.default.createElement(s.default,m({},r,{name:n,options:this.state.options,computedDependsOn:this.computedDependsOn,arguments:this.getArguments,setOptions:function(t){return e.setOptions(t)},skipRequest:"current"===this.getProp(this.props,"product",null)}))}}])&&g(t.prototype,n),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Component);S.propTypes={moduleAttrs:a.default.object.isRequired},S.defaultProps={};var C=S;t.default=C},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=h(n(3)),i=h(n(1)),l=h(n(5)),u=h(n(9)),s=h(n(363)),c=h(n(124)),d=h(n(10));n(1496);var f=h(n(1507)),p=(h(n(14)),h(n(1517)),["name"]);function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function g(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function _(e){var t=function(){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}}();return function(){var n,r=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=function(t){!function(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&&v(e,t)}(m,t);var n,r,a,h=_(m);function m(t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),S(O(n=h.call(this,t)),"getProp",(function(e,t){return(0,i.default)(e,"moduleAttrs.".concat(t),null)})),S(O(n),"memoizeSerializer",(function(e){var t={};return t=1===e.length?e[0]:e,t=(0,d.default)({},(0,c.default)(t,(function(e,t){return"nonce"!==t}))),JSON.stringify(t)})),S(O(n),"sendRequest",(function(e,t){n.setState({loading:!0});var r=n.props.arguments(e,t);(0,s.default)(n.request,{strategy:s.default.strategies.variadic,serializer:n.memoizeSerializer})(r).done((function(e){var t=e.data||{},r={};(0,u.default)(t,(function(e){r[e.name]={value:e.name,label:e.title}})),n.props.setOptions(r),n.setState({loading:!1})}))})),S(O(n),"request",(function(t){return e.ajax({dataType:"json",type:"POST",url:ETBuilderBackend.ajaxUrl,data:t}).promise()})),n.state={options:n.props.options,loading:!1},n}return n=m,(r=[{key:"componentDidMount",value:function(){var e=this.props.options;(0,l.default)(e)&&this.sendRequest("product",this.getProp(this.props,"product",null))}},{key:"componentDidUpdate",value:function(e){var t=this;this.props.skipRequest||(0,u.default)(this.props.computedDependsOn,(function(n){var r=t.getProp(t.props,n);r!==t.getProp(e,n)&&t.sendRequest(n,r)}))}},{key:"render",value:function(){var e=this.props,t=e.name,n=g(e,p);return o.default.createElement(f.default,y({},n,{name:t,options:this.props.options,loading:this.state.loading}))}}])&&b(n.prototype,r),a&&b(n,a),Object.defineProperty(n,"prototype",{writable:!1}),m}(o.Component);C.propTypes={moduleAttrs:a.default.object.isRequired,options:a.default.object.isRequired,computedDependsOn:a.default.array.isRequired,arguments:a.default.func.isRequired,setOptions:a.default.func.isRequired,skipRequest:a.default.bool},C.defaultProps={skipRequest:!1};var E=C;t.default=E}).call(this,n(8))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=_(n(0)),a=b(n(3)),i=b(n(184)),l=_(n(365)),u=_(n(634)),s=n(115),c=b(n(1759)),d=b(n(1761)),f=b(n(1763)),p=b(n(1765)),h=b(n(1770)),m=_(n(1485)),y=_(n(1558)),g=n(1512);function b(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function C(e){var t=function(){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}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1772);var j=function(t){!function(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&&S(e,t)}(b,t);var n,r,a,l=C(b);function b(t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),M(P(n=l.call(this,t)),"rangeWidth",0),M(P(n),"calculateValue",(function(e){return function(t){return function(r){return function(o){var a=(0,s.getPercent)(o,n.getRangeWidth()),i=e(r),l=(0,s.roundOff)(i,i+n.normalize(a));return t(l,r)}}}})),M(P(n),"onRangeChange",(function(e){return function(t){return function(r){var o=n.calculateValue(e)(t)(n.getRangeValue())(r);n.updateValue(o)}}})),M(P(n),"onSingleChange",(function(e){var t=n.getResolver(),r=e<0,o=r?t.getStartMiddle:t.getEndMiddle,a=r?t.setStartMiddle:t.setEndMiddle,i=r?t.setEndMiddle:t.setStartMiddle,l=n.calculateValue(o)(a)(n.getRangeValue())(e),u=i(o(l),l);n.updateValue(u)})),M(P(n),"updateValue",(function(e){n.setState({value:e}),n.props._onChange(n.props.name,e)})),M(P(n),"_onChange",(0,i.default)((function(){var e;return(e=n.props)._onChange.apply(e,arguments)}),100)),M(P(n),"getResolver",(function(){return u.get(n.props.resolver)})),M(P(n),"getValue",(function(){return n.getResolver().merge(n.props.value,n.props.default)})),M(P(n),"getRangeValue",(function(){return n.state.dragging?n.state.value:n.getValue()})),M(P(n),"getRangeWidth",(function(){return n.rangeWidth||(n.rangeWidth=parseInt(e(n.rangeRef.current).width())||0)})),M(P(n),"normalize",(function(e){return n.normalizer(e)})),M(P(n),"onDragStart",(function(){n.rangeWidth=0,n.setState({dragging:!0,value:n.getValue()})})),M(P(n),"onDragEnd",(function(){n.setState({dragging:!1})})),M(P(n),"onClick",(function(){var e=n.getResolver(),t=n.getValue(),r=e.getStartMiddle(t),o=e.getEndMiddle(t);if(r===o){var a=e.setStartMiddle(r-y.splitDistance,t),i=e.setEndMiddle(o+y.splitDistance,a);n.updateValue(i)}})),n.rangeRef=o.default.createRef(),n.normalizer=(new s.Normalizer)(1),n.state={dragging:!1,value:n.getValue()},n}return n=b,a=[{key:"getDerivedStateFromProps",value:function(e,t){if(t.dragging)return t;var n=u.get(e.resolver).merge(e.value,e.default);return n!==t.value?O(O({},t),{},{value:n}):null}}],(r=[{key:"componentDidMount",value:function(){this.forceUpdate()}},{key:"render",value:function(){var e=this.getResolver(),t=this.getRangeValue(),n=e.getStartLimit(t),r=e.getStartMiddle(t),a=e.getEndMiddle(t),i=e.getEndLimit(t),l=this.state.dragging?m.dragging:"",u=(0,g.isSingle)(t)?m.isSingleMiddle:"";return o.default.createElement("div",{className:"".concat(m.className," ").concat(l," ").concat(u)},o.default.createElement(c.default,{title:this.props.i10n.startTitle}),o.default.createElement("div",{className:m.rangeWrapper,ref:this.rangeRef},o.default.createElement(p.default,{value:t,width:this.getRangeWidth()}),o.default.createElement("div",{className:m.range},o.default.createElement(f.default,{className:m.trackLv1}),o.default.createElement(f.default,{className:m.trackLv2,offset:n,width:i-n}),o.default.createElement(f.default,{className:m.trackLv3,offset:r,width:a-r}),o.default.createElement(d.default,{className:m.startLimit,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd,onChange:this.onRangeChange(e.getStartLimit)(e.setStartLimit),style:{left:"".concat(n,"%")}}),o.default.createElement(d.default,{className:"".concat(m.startMiddle," ").concat((0,g.getMinBoundClass)(t)),onDragStart:this.onDragStart,onDragEnd:this.onDragEnd,onClick:this.onClick,onChange:this.onRangeChange(e.getStartMiddle)(e.setStartMiddle),style:{left:"".concat(r,"%")}}),o.default.createElement(d.default,{className:m.singleMiddle,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd,onChange:this.onSingleChange,style:{left:"".concat(r,"%")}}),o.default.createElement(d.default,{className:"".concat(m.endMiddle," ").concat((0,g.getMaxBoundClass)(t)),onDragStart:this.onDragStart,onDragEnd:this.onDragEnd,onClick:this.onClick,onChange:this.onRangeChange(e.getEndMiddle)(e.setEndMiddle),style:{left:"".concat(a,"%")}}),o.default.createElement(d.default,{className:m.endLimit,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd,onChange:this.onRangeChange(e.getEndLimit)(e.setEndLimit),style:{left:"".concat(i,"%")}})),o.default.createElement(h.default,{value:this.getValue(),defaultValue:this.props.default,onChange:this.updateValue,width:this.getRangeWidth(),resolver:this.getResolver(),i10n:this.props.i10n})),o.default.createElement(c.default,{title:this.props.i10n.endTitle}))}}])&&k(n.prototype,r),a&&k(n,a),Object.defineProperty(n,"prototype",{writable:!1}),b}(o.Component);j.propTypes={_onChange:a.default.func.isRequired,name:a.default.string.isRequired,value:a.default.string,default:a.default.string,resolver:a.default.string,i10n:a.default.shape({startTitle:a.default.string,endTitle:a.default.string,startValueTitle:a.default.string,middleValueTitle:a.default.string,endValueTitle:a.default.string})},j.defaultProps={value:"",default:l.getDefaultValue(),i10n:{startTitle:"",endTitle:"",startValueTitle:"",middleValueTitle:"",endValueTitle:""}};var x=j;t.default=x}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(0)),o=l(n(3)),a=l(n(13)),i=n(1485);function l(e){return e&&e.__esModule?e:{default:e}}n(1760);var u=function(e){var t=e.className,n=e.title;return n&&r.default.createElement("div",{className:(0,a.default)(t,i.rangeLabel)},n)};u.propTypes={className:o.default.string,title:o.default.string},u.defaultProps={className:"",title:""};var s=u;t.default=s},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(0)),o=s(n(3)),a=s(n(13)),i=s(n(626)),l=n(1485);n(1762);var u=["onChange","className"];function s(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var f=function(e){var t=e.onChange,n=e.className,o=d(e,u);return r.default.createElement(i.default,c({className:(0,a.default)(l.handler,n),onDragX:t},o))};f.propTypes={onChange:o.default.func.isRequired,className:o.default.string},f.defaultProps={className:""};var p=f;t.default=p},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(0)),o=l(n(3)),a=l(n(13)),i=n(1485);function l(e){return e&&e.__esModule?e:{default:e}}n(1764);var u=function(e){var t=e.offset,n=e.width,o=e.className;return r.default.createElement("div",{className:(0,a.default)(i.track,o),style:{left:"".concat(t,"%"),width:"".concat(n,"%")}})};u.propTypes={className:o.default.string,offset:o.default.number,width:o.default.number},u.defaultProps={className:"",offset:0,width:100};var s=u;t.default=s},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(0)),o=u(n(3)),a=u(n(1766)),i=n(1485),l=n(1512);function u(e){return e&&e.__esModule?e:{default:e}}n(1769);var s=function(e){var t=e.value,n=e.width;return r.default.createElement("ul",{className:i.counters},(0,l.getCounters)(t,n).map((function(e,t){return r.default.createElement(a.default,{key:t,values:e})})))};s.propTypes={value:o.default.string.isRequired,width:o.default.number.isRequired};var c=s;t.default=c},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=f(n(3)),i=f(n(13)),l=f(n(147)),u=f(n(88)),s=n(94),c=n(115),d=n(1485);function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}n(1767);var h=function(e){var t=e.values,n=t.filter(s.hasValue),r=n.map((function(e){return"".concat(e,"%")})).join(" "),a=n.length>1?d.counterMulti:"",f=Math.round((0,c.average)([(0,l.default)(t),(0,u.default)(t)]));return o.default.createElement("span",{className:(0,i.default)(d.counter,a),style:{left:"".concat(f,"%")}},r)};h.propTypes={values:a.default.arrayOf(a.default.number)},h.defaultProps={values:[]};var m=h;t.default=m},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.intersperse=t.groupBy=void 0;var r=i(n(367)),o=i(n(88)),a=i(n(460));function i(e){return e&&e.__esModule?e:{default:e}}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.intersperse=function(e,t){if(!Array.isArray(t)||0===t.length||1===t.length)return t;for(var n=[],r=0;r<t.length;r++)n.push(t[r]),n.push(e);return n.pop(),n};t.groupBy=function(e,t){return Array.isArray(t)&&0!==t.length?1===t.length?[t]:(0,r.default)(t).reduce((function(t,n){var r=(0,a.default)(t),i=(0,o.default)(t),u=(0,o.default)(i);return e(u,n)?[].concat(l(r),[[].concat(l(i),[n])]):[].concat(l(r),[i,[n]])}),[[t[0]]]):t}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=f(n(0)),a=f(n(3)),i=f(n(13)),l=n(115),u=f(n(1506)),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(1485)),c=n(1512);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1771);var h=function(e){var t=e.value,n=e.defaultValue,r=e.onChange,a=e.width,d=e.resolver,f=e.i10n,h=function(e){return function(n){return r(e(n,t))}},m=[o.default.createElement("div",{key:0,className:s.inputStart},o.default.createElement(u.default,{value:(0,c.emptyOnDefault)(d.getStartValue,n,t),defaultValue:d.getStartValue(n),onChange:h(d.setStartValue),label:f.startValueTitle,step:d.getInputStep(),speed:d.getInputSpeed()})),o.default.createElement("div",{key:1,className:s.inputMiddle},o.default.createElement(u.default,{value:(0,c.emptyOnDefault)(d.getMiddleValue,n,t),defaultValue:d.getMiddleValue(n),onChange:h(d.setMiddleValue),label:f.middleValueTitle,step:d.getInputStep(),speed:d.getInputSpeed()})),o.default.createElement("div",{key:2,className:s.inputEnd},o.default.createElement(u.default,{value:(0,c.emptyOnDefault)(d.getEndValue,n,t),defaultValue:d.getEndValue(n),onChange:h(d.setEndValue),label:f.endValueTitle,step:d.getInputStep(),speed:d.getInputSpeed()}))],y=0,g=(0,c.getInputs)(t,a).map((function(e,t){var n,r=(0,i.default)((p(n={},s.input,!0),p(n,s.inputs,e.length>1),n));return o.default.createElement("div",{key:t,className:r,style:{left:"".concat((0,l.average)(e),"%")}},e.map((function(){return m[y++]})))}));return o.default.createElement("div",{className:s.inputsList},g)};h.propTypes={onChange:a.default.func.isRequired,value:a.default.string,defaultValue:a.default.string,width:a.default.number.isRequired,resolver:a.default.shape({getStartValue:a.default.func.isRequired,setStartValue:a.default.func.isRequired,getMiddleValue:a.default.func.isRequired,setMiddleValue:a.default.func.isRequired,getEndValue:a.default.func.isRequired,setEndValue:a.default.func.isRequired}).isRequired,i10n:a.default.shape({startValueTitle:a.default.string,middleValueTitle:a.default.string,endValueTitle:a.default.string})},h.defaultProps={value:"",defaultValue:"",i10n:{startValueTitle:"",middleValueTitle:"",endValueTitle:""}};var m=h;t.default=m},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=T(n(1559)),a=T(n(56)),i=T(n(11)),l=T(n(1)),u=T(n(627)),s=T(n(10));n(1774);var c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=P(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),d=T(n(3)),f=n(282),p=n(1775),h=n(1560),m=T(n(1797)),y=T(n(1798)),g=T(n(616)),b=T(n(1547)),v=T(n(1824)),_=T(n(1825)),w=n(1827),O=n(1828),k=n(1486),S=T(n(123)),C=T(n(6)),E=n(1481);function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(P=function(e){return e?n:t})(e)}function T(e){return e&&e.__esModule?e:{default:e}}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M.apply(this,arguments)}function j(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||R(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||R(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var I=function(e){var t=["loggedInStatus","authorDisplay","browserDisplay","cartContentsDisplay","categoriesDisplay","categoryPageDisplay","cookieDisplay","dateTimeDisplay","postTypeDisplay","tagPageDisplay","tagsDisplay","userRoleDisplay","pageVisitDisplay","dateArchiveDisplay","dynamicPostsDisplay","operatingSystemDisplay","productPurchaseDisplay","searchResultsDisplay"],n=e.value?(0,E.decodeString)(e.value):"[]",r=JSON.parse(n).map((function(e,n){return t.forEach((function(t,n){e.conditionSettings.hasOwnProperty(t)&&(e.conditionSettings.displayRule=e.conditionSettings[t],delete e.conditionSettings[t])})),e})),d=L((0,c.useState)({conditions:r,currentSelected:{condition:"",conditionSettings:"",operator:(0,i.default)(r[0])?"OR":r[0].operator},isSettingsModalOpen:!1,editingConditionId:null,moduleType:(0,l.default)(e,"module.props.module.props.type",""),settingsModalValues:{}}),2),P=d[0],T=d[1],x=L((0,c.useState)(!1),2),N=x[0],R=x[1],A=L((0,c.useState)(!0),2),I=A[0],B=A[1],F=(0,c.useRef)(null),W=(0,c.useRef)(null),V=!!C.default.getExtendStylesModal(),U=(0,w.useGetDisplayConditionsStatus)(),G=U.displayConditionsStatus,H=U.getDisplayConditionsStatus,z=(0,k.useGetPostTypes)(),q=z.postTypes,K=z.getPostTypes;(0,c.useEffect)((function(){H(JSON.stringify(P.conditions)),ae(),K()}),[]),(0,c.useEffect)((function(){T((function(e){return e.conditions=r,D({},e)}))}),[n]),(0,c.useEffect)((function(){ae(),P.conditions.length<=1&&"OR"!==P.currentSelected.operator&&ee(void 0,"OR")}),[P.conditions]),(0,c.useEffect)((function(){ie()}),[q]),(0,c.useEffect)((function(){ue()}),[G]);var $=function(){setTimeout((function(){var t=0===P.conditions.length?(0,E.encodeString)("[]"):(0,E.encodeString)(JSON.stringify(P.conditions));e._onChange(e.name,t,e.type),le(),H(JSON.stringify(P.conditions))}),0),ae()},Y=function(){T((function(e){return e.isSettingsModalOpen=!0,D({},e)})),le();var t=(0,l.default)(e,"module.settingsModalTabPanelNode.current","");if(t){var n=t.scrollHeight-t.scrollTop===t.clientHeight;0===t.scrollTop?t.scrollTop+=1:n&&(t.scrollTop-=1)}},X=function(){T((function(e){return e.isSettingsModalOpen=!1,D({},e)})),ue()},J=function(){T((function(e){return e.settingsModalValues={},D({},e)}))},Q=function(e){if("urlParameter"===P.currentSelected.condition){var t="specificUrlParameter"===e.selectUrlParameter,n="exist"===e.displayRule||"doesNotExist"===e.displayRule;(0,a.default)(p.conditionFields,"urlParameter.urlParameterName.visibility",t),(0,a.default)(p.conditionFields,"urlParameter.urlParameterValue.visibility",!n)}if("numberOfViews"===P.currentSelected.condition){var r="on"===e.resetAfterDuration;(0,a.default)(p.conditionFields,"numberOfViews.displayAgainAfter.visibility",r),(0,a.default)(p.conditionFields,"numberOfViews.displayAgainAfterUnit.visibility",r)}if("cookie"===P.currentSelected.condition){var o="cookieValueEquals"===e.displayRule||"cookieValueDoesNotEqual"===e.displayRule;(0,a.default)(p.conditionFields,"cookie.cookieValue.visibility",!!o)}if("searchResults"===P.currentSelected.condition){var i="specificSearchQueries"===e.displayRule,l="excludedSearchQueries"===e.displayRule;(0,a.default)(p.conditionFields,"searchResults.specificSearchQueries.visibility",!!i),(0,a.default)(p.conditionFields,"searchResults.excludedSearchQueries.visibility",!!l)}if("productPurchase"===P.currentSelected.condition){var u="hasBoughtProduct"===e.displayRule||"hasNotBoughtProduct"===e.displayRule;(0,a.default)(p.conditionFields,"productPurchase.products.visibility",!u)}if("cartContents"===P.currentSelected.condition){var s="hasProducts"===e.displayRule||"isEmpty"===e.displayRule;(0,a.default)(p.conditionFields,"cartContents.products.visibility",!s)}if("dateTime"===P.currentSelected.condition){var c="isAfter"!==e.displayRule&&"isBefore"!==e.displayRule,d="isAfter"===e.displayRule||"isBefore"===e.displayRule,f="isOnSpecificDays"===e.displayRule||"isFirstDayOfMonth"===e.displayRule||"isLastDayOfMonth"===e.displayRule,m="isOnSpecificDays"===e.displayRule,y="isOnSpecificDate"===e.displayRule,g="off"===e.allDay,b="untilDate"===e.repeatEnd,v="afterNumberOfTimes"===e.repeatEnd,_="on"===e.repeat;(0,a.default)(p.conditionFields,"dateTime.allDay.visibility",!!c),(0,a.default)(p.conditionFields,"dateTime.time.visibility",!!d),(0,a.default)(p.conditionFields,"dateTime.date.visibility",!f),(0,a.default)(p.conditionFields,"dateTime.weekdays.visibility",!!m),(0,a.default)(p.conditionFields,"dateTime.fromTime.visibility",!(!g||!c)),(0,a.default)(p.conditionFields,"dateTime.untilTime.visibility",!(!g||!c)),(0,a.default)(p.conditionFields,"dateTime.repeat.visibility",!(!m&&!y)),(0,a.default)(p.conditionFields,"dateTime.repeatFrequency.visibility",!(!_||!y)),(0,a.default)(p.conditionFields,"dateTime.repeatFrequencySpecificDays.visibility",!(!_||!m)),(0,a.default)(p.conditionFields,"dateTime.repeatEnd.visibility",!(!_||!m&&!y)),(0,a.default)(p.conditionFields,"dateTime.repeatEnd.options",m?h.onSpecificDaysRepeatEndOptions:h.repeatEndOptions),(0,a.default)(p.conditionFields,"dateTime.repeatUntilDate.visibility",!(!_||!b||!m&&!y)),(0,a.default)(p.conditionFields,"dateTime.repeatTimes.visibility",!(!_||!v||!m&&!y))}},Z=function(e){""===e.adminLabel&&(e.adminLabel=(0,l.default)(p.conditionFields,[P.currentSelected.condition,"adminLabel","default"])),""===e.userIds&&(e.userIds=(0,l.default)(p.conditionFields,[P.currentSelected.condition,"userIds","default"])),""===e.specificSearchQueries&&(e.specificSearchQueries=(0,l.default)(p.conditionFields,[P.currentSelected.condition,"specificSearchQueries","default"])),""===e.excludedSearchQueries&&(e.excludedSearchQueries=(0,l.default)(p.conditionFields,[P.currentSelected.condition,"excludedSearchQueries","default"])),""===e.cookieName&&(e.cookieName=(0,l.default)(p.conditionFields,[P.currentSelected.condition,"cookieName","default"])),""===e.cookieValue&&(e.cookieValue=(0,l.default)(p.conditionFields,[P.currentSelected.condition,"cookieValue","default"])),T((function(t){return t.settingsModalValues=(0,s.default)({},t.settingsModalValues,e),D({},t)})),T((function(t){return t.currentSelected.conditionSettings=e,D({},t)}))},ee=function(){var e=arguments.length>1?arguments[1]:void 0;T((function(t){return t.conditions=t.conditions.map((function(t){return t.operator=e,t})),t.currentSelected.operator=e,D({},t)})),$()},te=function(e){V||se()||P.isSettingsModalOpen||(T((function(t){return t.conditions=j(t.conditions.filter((function(t){return t.id!==e}))),D({},t)})),$())},ne=function(e){if(!V&&!se()){var t=P.conditions.find((function(t){return t.id===e}));T((function(n){return n.currentSelected.condition=t.condition,n.settingsModalValues=n.conditions.find((function(t){return t.id===e})).conditionSettings,D({},n)})),function(e){T((function(t){return t.editingConditionId=e,D({},t)}))}(e),Y()}},re=function(e){V||se()||(T((function(t){return t.conditions=t.conditions.flatMap((function(t){return t.id===e?[t,(0,s.default)({},t,{id:(0,f.v4)()})]:t})),D({},t)})),$())},oe=function(e,t){V||se()||(T((function(n){var r="",o="";n.conditions.forEach((function(n,a){n.id===e?r=a:n.id===t&&(o=a)}));var a=[n.conditions[o],n.conditions[r]];return n.conditions[r]=a[0],n.conditions[o]=a[1],D({},n)})),$())},ae=function(){var e=["loggedInStatus","userRole","dateTime","productPurchase","cartContents","operatingSystem","browser","pageVisit","postVisit","cookie","numberOfViews"],t=P.conditions.filter((function(t){var n=t.condition;return e.includes(n)})).length>0;R(t)},ie=function(){q.forEach((function(e){var t=e.value.toString(),n=e.label,r=e.singular_label;(0,a.default)(p.conditionNames,"location."+t,n);var i=(0,u.default)((0,o.default)("displayRule.label","".concat(O.dynamicPostsFields.displayRule.label," ").concat(r)),(0,o.default)("adminLabel.default","".concat(n)),(0,o.default)("dynamicPosts.options.postType","".concat(t)),(0,o.default)("postTypeLabel.default","".concat(n)))(O.dynamicPostsFields);p.conditionFields[t]=i}))},le=function(){S.default.hide(),B(!1)},ue=function(){B(!0)},se=function(){return!(!C.default.getFindReplaceModal()||!W.current)&&!!W.current.closest(".et-fb-form__group--find-replace__find")};return parseFloat(window.etCore.wp_version.toString().substr(0,3))>=5.3?c.default.createElement("div",{ref:W},c.default.createElement(_.default,null,P.conditions.length>1&&c.default.createElement("div",{className:"et-fb-display-conditions-operator-container"},c.default.createElement(g.default,{className:"et-fb-display-conditions-operator",name:"display-conditions-operator",value:P.currentSelected.operator,options:{OR:(0,E.i18nDisplayConditions)("Display if any condition is true"),AND:(0,E.i18nDisplayConditions)("Display if all conditions are true")},_onChange:ee,selectFirst:!1})),P.conditions.map((function(e){return c.default.createElement(v.default,{key:e.id,id:e.id,onSort:oe,onEndDrag:ue},c.default.createElement(y.default,M({},e,{conditionId:e.id,conditions:P.conditions,conditionsStatus:G,onDelete:te,onEdit:ne,onDuplicate:re,onMouseDown:le,onMouseUp:ue,tooltipVisibility:I})))})),c.default.createElement("div",{className:"et-fb-display-conditions-container"},c.default.createElement(g.default,{role:"display-conditions-list",className:"et-fb-display-condition-list",name:"display-conditions",ref:F,value:"",options:p.conditionNames,_onChange:function(e,t){T((function(e){return e.currentSelected.condition=t,D({},e)})),Y()},selectFirst:!1,optionGroups:p.conditionGroups})),P.isSettingsModalOpen&&c.default.createElement(b.default,{title:p.conditionNames[P.currentSelected.condition],fields:p.conditionFields[P.currentSelected.condition],values:P.settingsModalValues,onChange:function(e){Z(e),Q(e)},onSave:function(){!function(){if(P.editingConditionId){var e={id:P.editingConditionId,condition:P.currentSelected.condition,conditionSettings:P.currentSelected.conditionSettings,operator:P.currentSelected.operator};T((function(t){return t.conditions=t.conditions.map((function(n){return n.id===t.editingConditionId?e:n})),D({},t)}))}else T((function(e){var t={id:(0,f.v4)(),condition:e.currentSelected.condition,conditionSettings:e.currentSelected.conditionSettings,operator:e.currentSelected.operator};return e.conditions=[].concat(j(e.conditions),[t]),D({},e)}))}(),$(),T((function(e){return e.editingConditionId=null,D({},e)})),J(),X()},onClose:function(){J(),X()}}),c.default.createElement(m.default,{onClick:function(){return F.current.toggleMenu({target:null})}})),N&&c.default.createElement("div",{className:"display-conditions-cache-notice"},(0,E.i18nDisplayConditions)("Translatable Cache Notice"))):c.default.createElement("div",{className:"display-conditions-cache-notice"},(0,E.i18nDisplayConditions)("Display Conditions Min Requirements"))};I.propTypes={_onChange:d.default.func,name:d.default.string,type:d.default.string,value:d.default.string},I.defaultProps={_onChange:function(){},name:"",type:"",value:[]},I.displayName="ETBuilderConditionalDisplay";var B=I;t.default=B},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conditionNames=t.conditionGroups=t.conditionFields=void 0;var r=P(n(11)),o=P(n(1)),a=n(1560),i=n(1776),l=n(1777),u=n(1778),s=n(1779),c=n(1780),d=n(1781),f=n(1782),p=n(1783),h=n(1784),m=n(1785),y=n(1786),g=n(1787),b=n(1788),v=n(1789),_=n(1790),w=n(1791),O=n(1792),k=n(1793),S=n(1794),C=n(1795),E=n(1796);function P(e){return e&&e.__esModule?e:{default:e}}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=ETBuilderBackend.i18n.displayConditions,D={};(0,r.default)(window.woocommerce_params)||(D={productPurchase:(0,o.default)(x,"Product Purchase"),cartContents:(0,o.default)(x,"Cart Contents"),productStock:(0,o.default)(x,"Product Stock")});var N={postInfo:{postType:(0,o.default)(x,"Post Type"),categories:(0,o.default)(x,"Post Category"),tags:(0,o.default)(x,"Post Tag"),author:(0,o.default)(x,"Author"),customField:(0,o.default)(x,"Custom Field")},location:{tagPage:(0,o.default)(x,"Tag Page"),categoryPage:(0,o.default)(x,"Category Page"),dateArchive:(0,o.default)(x,"Date Archive"),searchResults:(0,o.default)(x,"Search Results")},user:{loggedInStatus:(0,o.default)(x,"Logged In Status"),userRole:(0,o.default)(x,"User Role")},interaction:M(M({dateTime:(0,o.default)(x,"Date & Time").replace(/&amp;/g,"&"),pageVisit:(0,o.default)(x,"Page Visit"),postVisit:(0,o.default)(x,"Post Visit")},D),{},{numberOfViews:(0,o.default)(x,"Number of Views"),urlParameter:(0,o.default)(x,"URL Parameter")}),device:{browser:(0,o.default)(x,"Browser"),operatingSystem:(0,o.default)(x,"Operating System"),cookie:(0,o.default)(x,"Cookie")}};t.conditionNames=N;t.conditionGroups={postInfo:"Post Info",location:"Location",user:"User",interaction:"Interaction",device:"Device"};var L={loggedInStatus:i.loggedInStatusField,userRole:l.userRoleFields,dateTime:a.dateTimeFields,postType:u.postTypeFields,author:s.authorFields,categories:c.categoriesFields,tags:d.tagsFields,dateArchive:f.dateArchiveFields,productPurchase:p.productPurchaseFields,cartContents:h.cartContentsField,searchResults:m.searchResultsFields,operatingSystem:y.operatingSystemFields,browser:g.browserFields,pageVisit:b.pageVisitFields,postVisit:v.postVisitFields,cookie:_.cookieFields,categoryPage:w.categoryPageFields,tagPage:O.tagPageFields,numberOfViews:k.numberOfViewsFields,customField:S.customFieldFields,urlParameter:C.urlParameterFields,productStock:E.productStockFields};t.conditionFields=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loggedInStatusField=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If"),type:"select",options:{loggedIn:(0,o.default)(a,"User is Logged In"),loggedOut:(0,o.default)(a,"User is Logged Out")},default:"loggedIn"},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Logged In Status"),defaultIfEmpty:!0},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.loggedInStatusField=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.userRoleFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If User Role"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},userRoles:{type:"multiselect_user_roles",default:[]},userIds:{label:"",type:"text",default:"User IDs separated by commas"},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"User Role")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.userRoleFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postTypeFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If Post Type"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},postTypes:{type:"multiselect_post_types",default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Post Type")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.postTypeFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If Author"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},authors:{type:"multiselect_authors",default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Author")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.authorFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.categoriesFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If Post Category"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},categories:{type:"multiselect_categories",default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Post Category")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.categoriesFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tagsFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If Post Tag"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},tags:{type:"multiselect_tags",default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Post Tag")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.tagsFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateArchiveFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i=new Date,l=i.getFullYear()+"-"+(i.getMonth()+1)+"-"+i.getDate(),u={displayRule:{label:(0,o.default)(a,"Display Only on Date Archives"),type:"select",options:{isAfter:(0,o.default)(a,"Is After"),isBefore:(0,o.default)(a,"Is Before")},default:"isAfter"},dateArchive:{type:"date_picker",showTimeSelect:!1,default:l},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Date Archive")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.dateArchiveFields=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.productPurchaseFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If User"),type:"select",options:{hasBoughtProduct:(0,o.default)(a,"Has Bought a Product"),hasNotBoughtProduct:(0,o.default)(a,"Has Not Bought a Product"),hasBoughtSpecificProduct:(0,o.default)(a,"Has Bought a Specific Product"),hasNotBoughtSpecificProduct:(0,o.default)(a,"Has Not Bought a Specific Product")},default:"hasBoughtProduct"},products:{type:"multiselect_products",default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Product Purchase")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.productPurchaseFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cartContentsField=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If User's Cart").replace(/&#039;/g,"'"),type:"select",options:{hasProducts:(0,o.default)(a,"Has Products"),isEmpty:(0,o.default)(a,"Is Empty"),hasSpecificProduct:(0,o.default)(a,"Has a Specific Product"),doesNotHaveSpecificProduct:(0,o.default)(a,"Does Not Have a Specific Product")},default:"hasProducts"},products:{type:"multiselect_products",default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Cart Contents")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.cartContentsField=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchResultsFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only on Search Results for"),type:"select",options:{specificSearchQueries:(0,o.default)(a,"Specific Search Queries"),excludedSearchQueries:(0,o.default)(a,"Excluded Search Queries")},default:"specificSearchQueries"},specificSearchQueries:{label:(0,o.default)(a,"Specific Search Queries"),type:"text",default:(0,o.default)(a,"Search queries separated by commas")},excludedSearchQueries:{label:(0,o.default)(a,"Excluded Search Queries"),type:"text",default:(0,o.default)(a,"Search queries separated by commas"),visibility:!1},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Search Results")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.searchResultsFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operatingSystemFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If Operating System"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},operatingSystems:{type:"checkboxes",options:{windows:{value:"windows",label:"Windows"},macos:{value:"macos",label:"Mac OS"},linux:{value:"linux",label:"Linux"},android:{value:"android",label:"Android"},iphone:{value:"iphone",label:"iPhone (iOS)"},ipad:{value:"ipad",label:"iPad (iOS/iPadOS)"},ipod:{value:"ipod",label:"iPod (iOS)"},appletv:{value:"appletv",label:"Apple TV (tvOS)"},playstation:{value:"playstation",label:"Playstation"},xbox:{value:"xbox",label:"Xbox"},nintendo:{value:"nintendo",label:"Nintendo"},kindle:{value:"webos",label:"Web OS"}},default:""},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Operating System")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.operatingSystemFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If Browser"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},browsers:{type:"checkboxes",options:{chrome:{value:"chrome",label:(0,o.default)(a,"Chromium Browsers (Chrome, Edge, etc)")},firefox:{value:"firefox",label:"Firefox"},safari:{value:"safari",label:"Safari"},edge:{value:"edge",label:"Edge"},ie:{value:"ie",label:"Internet Explorer"},opera:{value:"opera",label:"Opera"},maxthon:{value:"maxthon",label:"Maxthon"},ucbrowser:{value:"ucbrowser",label:"UC Browser"}},default:""},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Browser")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.browserFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pageVisitFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If User"),type:"select",options:{hasVisitedSpecificPage:(0,o.default)(a,"Has Visited a Specific Page"),hasNotVisitedSpecificPage:(0,o.default)(a,"Has Not Visited a Specific Page")},default:"hasVisitedSpecificPage"},pages:{type:"searchable_posts",options:{postType:"page"},default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Page Visit")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.pageVisitFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postVisitFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If User"),type:"select",options:{hasVisitedSpecificPage:(0,o.default)(a,"Has Visited a Specific Post"),hasNotVisitedSpecificPage:(0,o.default)(a,"Has Not Visited a Specific Post")},default:"hasVisitedSpecificPage"},pages:{type:"searchable_posts",options:{postType:"post"},default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Post Visit")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.postVisitFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cookieFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If"),type:"select",options:{cookieExists:(0,o.default)(a,"Cookie Exists"),cookieDoesNotExist:(0,o.default)(a,"Cookie Does Not Exist"),cookieValueEquals:(0,o.default)(a,"Cookie Value Equals"),cookieValueDoesNotEqual:(0,o.default)(a,"Cookie Value Does Not Equal")},default:"cookieExists"},cookieName:{type:"text",default:(0,o.default)(a,"Cookie Name")},cookieValue:{label:"",type:"text",default:(0,o.default)(a,"Cookie Value"),visibility:!1},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Cookie")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.cookieFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.categoryPageFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If Category Page"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},categories:{type:"multiselect_categories",default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Category Page")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.categoryPageFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tagPageFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If Tag Page"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},tags:{type:"multiselect_tags",default:[]},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Tag Page")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.tagPageFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberOfViewsFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={numberOfViews:{label:(0,o.default)(a,"Only Display This Many Times"),type:"text",default:(0,o.default)(a,"Number of Views"),visible:!1,value_type:"int"},resetAfterDuration:{label:(0,o.default)(a,"Reset After Duration"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"off"},displayAgainAfter:{label:(0,o.default)(a,"Display again after"),type:"text",default:"",visibility:!1,value_type:"int"},displayAgainAfterUnit:{type:"select",options:{days:(0,o.default)(a,"Days"),hours:(0,o.default)(a,"Hours"),minutes:(0,o.default)(a,"Minutes")},default:"days",visibility:!1},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Number of Views")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.numberOfViewsFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customFieldFields=void 0;var r=n(1481),o={selectConditionalMetaField:{type:"select_conditional_meta_field"},adminLabel:{label:(0,r.i18nDisplayConditions)("Admin Label"),type:"text",default:(0,r.i18nDisplayConditions)("Custom Field")},enableCondition:{label:(0,r.i18nDisplayConditions)("Enable Condition"),type:"yes_no_button",options:{on:(0,r.i18nDisplayConditions)("Yes"),off:(0,r.i18nDisplayConditions)("No")},default:"on"}};t.customFieldFields=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.urlParameterFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={selectUrlParameter:{label:(0,o.default)(a,"Display Only If"),type:"select",options:{specificUrlParameter:(0,o.default)(a,"A Specific URL Parameter"),anyUrlParameter:(0,o.default)(a,"Any URL Parameter")},default:"specificUrlParameter"},urlParameterName:{type:"text",default:(0,o.default)(a,"URL Parameter Name")},displayRule:{type:"select",options:{equals:(0,o.default)(a,"Equals"),exist:(0,o.default)(a,"Exist"),doesNotExist:(0,o.default)(a,"Does not Exist"),doesNotEqual:(0,o.default)(a,"Does not Equal"),contains:(0,o.default)(a,"Contains"),doesNotContain:(0,o.default)(a,"Does not Contain")},default:"equals"},urlParameterValue:{type:"text",default:(0,o.default)(a,"URL Parameter Value")},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"URL Parameter")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.urlParameterFields=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.productStockFields=void 0;var r=n(1481),o={displayRule:{label:(0,r.i18nDisplayConditions)("Display Only If a Specific Product"),type:"select",options:{isInStock:(0,r.i18nDisplayConditions)("Is in stock"),isOutOfStock:(0,r.i18nDisplayConditions)("Is out of stock")},default:"isInStock"},products:{type:"multiselect_products",default:[]},adminLabel:{label:(0,r.i18nDisplayConditions)("Admin Label"),type:"text",default:(0,r.i18nDisplayConditions)("Product Stock")},enableCondition:{label:(0,r.i18nDisplayConditions)("Enable Condition"),type:"yes_no_button",options:{on:(0,r.i18nDisplayConditions)("Yes"),off:(0,r.i18nDisplayConditions)("No")},default:"on"}};t.productStockFields=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(1)),o=u(n(0)),a=u(n(806)),i=u(n(59)),l=n(67);function u(e){return e&&e.__esModule?e:{default:e}}var s=ETBuilderBackend.i18n.displayConditions,c=function(e){return o.default.createElement("span",{className:"et-fb-item-button-wrap--add"},o.default.createElement(l.Motion,{style:{size:1,opacity:1}},(function(t){return o.default.createElement(a.default,{role:"add-condition-button",buttonName:i.default.MODULE_ITEM_ADD,style:{opacity:t.opacity,transform:"scale( ".concat(t.size," )")},title:(0,r.default)(s,"Add Condition"),_onClick:e.onClick})})))};c.displayName="ETBuilderConditionalDisplayAddButton";var d=c;t.default=d},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=n(282),i=(c(n(123)),c(n(63))),l=c(n(43)),u=c(n(84)),s=c(n(1799));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}var f=function(e){var t={opacity:"off"===e.conditionSettings.enableCondition||e.isDragging?.5:1},n=(0,a.v4)();return o.default.createElement("li",{"data-tip":!0,"data-for":n,className:"et-fb-display-conditions-item",style:t,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp},"on"===e.conditionSettings.enableCondition&&e.tooltipVisibility&&o.default.createElement(s.default,{tooltipId:n,conditionId:e.conditionId,conditions:e.conditions,conditionsStatus:e.conditionsStatus}),o.default.createElement(i.default,{buttonName:"button edit",className:"et-fb-settings-module-item-button et-fb-settings-module-item-button--edit",small:!0,ink:!1,__onClick:function(){e.onEdit(e.id)}},o.default.createElement(l.default,{icon:"setting",color:u.default.moduleItemControlIcons})),o.default.createElement(i.default,{buttonName:"button copy",className:"et-fb-settings-module-item-button et-fb-settings-module-item-button--copy",small:!0,ink:!1,__onClick:function(){e.onDuplicate(e.id)}},o.default.createElement(l.default,{icon:"copy",color:u.default.moduleItemControlIcons})),o.default.createElement(i.default,{buttonName:"button delete",className:"et-fb-settings-module-item-button et-fb-settings-module-item-button--delete",small:!0,style:{right:"5px"},ink:!1,__onClick:function(){e.onDelete(e.id)}},o.default.createElement(l.default,{icon:"delete",color:u.default.moduleItemControlIcons})),o.default.createElement("span",{className:"et-fb-settings-module-item-title"},e.conditionSettings.adminLabel))};f.displayName="ETBuilderConditionalDisplayItem";var p=f;t.default=p},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getTooltipDisplayStatus=t.default=void 0;var o=d(n(34)),a=d(n(58)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),l=n(282),u=d(n(123)),s=n(1800);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){return["isNot","isNotOnSpecificDate","hasNotVisitedSpecificPage","hasNotBoughtProduct","hasNotBoughtSpecificProduct","excludedSearchQueries","cookieDoesNotExist","cookieValueDoesNotEqual"].includes(e)?"sub":"sum"};t.getTooltipDisplayStatus=f;var p=function(e){return i.default.createElement(u.default,{id:e.tooltipId,effect:"solid",className:"et-fb-settings-display-conditions-tooltip"},e.conditions.filter((function(e){return"on"===e.conditionSettings.enableCondition})).map((function(t){var n=t.id,r=t.condition,u=t.conditionSettings,c=["display-conditions-tooltip"],d=(0,a.default)(e.conditionsStatus,{id:n}),p=!!(0,o.default)(d,"is_conflicted")&&d.is_conflicted,h="sub"===f(u.displayRule)?"display-conditions-sub-indicator":"display-conditions-sum-indicator",m="";return p&&(c.push("display-conditions-tooltip-conflicted"),h="display-conditions-conf-indicator"),n===e.conditionId&&c.push("display-conditions-tooltip-highlight"),(0,o.default)(s.tooltips,r)?m=s.tooltips[r](u):(0,o.default)(u,"dynamicPosts")&&(m=s.tooltips.dynamicPosts(u)),i.default.createElement("div",{className:c.join(" "),key:(0,l.v4)()},i.default.createElement("div",{className:"display-conditions-tooltip-col1"},i.default.createElement("span",{className:h})),i.default.createElement("div",{className:"display-conditions-tooltip-col2"},m))})))};p.displayName="ETBuilderConditionalDisplayTooltip";var h=p;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tooltips=void 0;var r=E(n(1801)),o=E(n(1802)),a=E(n(1803)),i=E(n(1804)),l=E(n(1805)),u=E(n(1806)),s=E(n(1807)),c=E(n(1808)),d=E(n(1809)),f=E(n(1810)),p=E(n(1811)),h=E(n(1812)),m=E(n(1813)),y=E(n(1814)),g=E(n(1815)),b=E(n(1816)),v=E(n(1817)),_=E(n(1818)),w=E(n(1819)),O=E(n(1820)),k=E(n(1821)),S=E(n(1822)),C=E(n(1823));function E(e){return e&&e.__esModule?e:{default:e}}var P=Object.freeze({loggedInStatus:function(e){return React.createElement(f.default,{conditionSettings:e})},userRole:function(e){return React.createElement(_.default,{conditionSettings:e})},dateTime:function(e){return React.createElement(c.default,{conditionSettings:e})},postType:function(e){return React.createElement(g.default,{conditionSettings:e})},author:function(e){return React.createElement(r.default,{conditionSettings:e})},categories:function(e){return React.createElement(i.default,{conditionSettings:e})},tags:function(e){return React.createElement(v.default,{conditionSettings:e})},categoryPage:function(e){return React.createElement(l.default,{conditionSettings:e})},tagPage:function(e){return React.createElement(b.default,{conditionSettings:e})},browser:function(e){return React.createElement(o.default,{conditionSettings:e})},cartContents:function(e){return React.createElement(a.default,{conditionSettings:e})},cookie:function(e){return React.createElement(u.default,{conditionSettings:e})},dateArchive:function(e){return React.createElement(s.default,{conditionSettings:e})},dynamicPosts:function(e){return React.createElement(d.default,{conditionSettings:e})},numberOfViews:function(e){return React.createElement(p.default,{conditionSettings:e})},operatingSystem:function(e){return React.createElement(h.default,{conditionSettings:e})},pageVisit:function(e){return React.createElement(m.default,{conditionSettings:e})},postVisit:function(e){return React.createElement(y.default,{conditionSettings:e})},productPurchase:function(e){return React.createElement(w.default,{conditionSettings:e})},searchResults:function(e){return React.createElement(O.default,{conditionSettings:e})},customField:function(e){return React.createElement(k.default,{conditionSettings:e})},urlParameter:function(e){return React.createElement(S.default,{conditionSettings:e})},productStock:function(e){return React.createElement(C.default,{conditionSettings:e})}});t.tooltips=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.authors.map((function(e){return e.label})).join(", ");return{is:(0,a.i18nDisplayConditions)("Only display on posts authored by")+" ".concat(r),isNot:(0,a.i18nDisplayConditions)("Don't display on posts authored by")+" ".concat(r)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderAuthorTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.browsers.split("|").filter((function(e){return e.length>0})),o=r.length?r.reduce((function(e,t){return e+", "+t})):"";return{is:(0,a.i18nDisplayConditions)("Only display on")+" ".concat(o),isNot:(0,a.i18nDisplayConditions)("Don't display on")+" ".concat(o)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderBrowserTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.products.map((function(e){return e.label})).join(", ");return{hasProducts:(0,a.i18nDisplayConditions)("Cart Contents Has Products"),isEmpty:(0,a.i18nDisplayConditions)("Cart Contents Is Empty"),hasSpecificProduct:(0,a.i18nDisplayConditions)("Only display to users with")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("in their cart"),doesNotHaveSpecificProduct:(0,a.i18nDisplayConditions)("Only display to users without")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("in their cart")}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderCartContentsTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(31)),o=l(n(11)),a=l(n(3)),i=n(1481);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){var t=e.conditionSettings,n=t.displayRule,a=t.categories,l={};a.forEach((function(e){l[e.group]=(0,o.default)(l[e.group])?[e.label]:[].concat(u(l[e.group]),[e.label])}));var s=(0,r.default)(l,(function(e,t){return e.join(" & ")+" ".concat(t)})).join(", ");return{is:(0,i.i18nDisplayConditions)("Only display on")+" ".concat(s),isNot:(0,i.i18nDisplayConditions)("Don't display on")+" ".concat(s)}[n]};c.propTypes={conditionSettings:a.default.object.isRequired},c.displayName="ETBuilderCategoriesTooltip";var d=c;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(31)),o=l(n(11)),a=l(n(3)),i=n(1481);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){var t=e.conditionSettings,n=t.displayRule,a=t.categories,l={};a.forEach((function(e){l[e.group]=(0,o.default)(l[e.group])?[e.label]:[].concat(u(l[e.group]),[e.label])}));var s=(0,r.default)(l,(function(e,t){return e.join(" & ")+" ".concat(t)})).join(", ");return{is:(0,i.i18nDisplayConditions)("Only display on")+" ".concat(s," ")+(0,i.i18nDisplayConditions)("Pages"),isNot:(0,i.i18nDisplayConditions)("Don't display on")+" ".concat(s," ")+(0,i.i18nDisplayConditions)("Pages")}[n]};c.propTypes={conditionSettings:a.default.object.isRequired},c.displayName="ETBuilderCategoryPageTooltip";var d=c;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.cookieName,o=t.cookieValue;return{cookieExists:(0,a.i18nDisplayConditions)("Only display to users who have")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("cookie"),cookieDoesNotExist:(0,a.i18nDisplayConditions)("Don't display to users who have")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("cookie"),cookieValueEquals:(0,a.i18nDisplayConditions)("Only display to users who have")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("cookie with")+" ".concat(o," ")+(0,a.i18nDisplayConditions)("value"),cookieValueDoesNotEqual:(0,a.i18nDisplayConditions)("Don't display to users who have")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("cookie with")+" ".concat(o," ")+(0,a.i18nDisplayConditions)("value")}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderCookieTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.dateArchive;return{isAfter:(0,a.i18nDisplayConditions)("Only display on date archives after")+" ".concat(r),isBefore:(0,a.i18nDisplayConditions)("Only display on date archives before")+" ".concat(r)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderDateArchiveTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.date,o=t.time,i=t.allDay,l=t.fromTime,u=t.untilTime,s=t.repeat,c=t.repeatFrequency,d=t.repeatEnd,f=t.repeatTimes,p=t.weekdays,h="off"===i?"from ".concat(l," until ").concat(u):"",m="on"===s?", Repeat ".concat(c):"",y="untilDate"===d?"until ".concat(repeatUntilDate):"",g="afterNumberOfTimes"===d?"".concat(f," times"):"",b=p.split("|").filter((function(e){return e.length>0})),v=b.length?b.reduce((function(e,t){return e+", "+t})):"";return{isAfter:(0,a.i18nDisplayConditions)("Only display after")+" ".concat(r," at ").concat(o),isBefore:(0,a.i18nDisplayConditions)("Only display before")+" ".concat(r," at ").concat(o),isOnSpecificDate:(0,a.i18nDisplayConditions)("Only display on")+" ".concat(r," ").concat(h).concat(m," ").concat(y).concat(g),isNotOnSpecificDate:(0,a.i18nDisplayConditions)("Don't display on")+" ".concat(r," ").concat(h),isOnSpecificDays:(0,a.i18nDisplayConditions)("Only display on")+" ".concat(v," ").concat(h).concat(m," ").concat(y).concat(g),isFirstDayOfMonth:(0,a.i18nDisplayConditions)("Only display on first day of month")+" ".concat(h),isLastDayOfMonth:(0,a.i18nDisplayConditions)("Only display on last day of month")+" ".concat(h)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderDateTimeTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.dynamicPosts,o=t.postTypeLabel,i=r.map((function(e){return e.label})).join(", ");return{is:(0,a.i18nDisplayConditions)("Only display on")+" ".concat(i," ").concat(o),isNot:(0,a.i18nDisplayConditions)("Don't display on")+" ".concat(i," ").concat(o)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderDynamicPostsTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings.displayRule;return{loggedIn:(0,a.i18nDisplayConditions)("Only display to logged in visitors"),loggedOut:(0,a.i18nDisplayConditions)("Only display to logged out visitors")}[t]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderLoggedInStatusTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.numberOfViews,r=t.resetAfterDuration,o=t.displayAgainAfter,i=t.displayAgainAfterUnit,l="on"===r?(0,a.i18nDisplayConditions)(", Reset after")+" ".concat(o," ").concat(i):"";return(0,a.i18nDisplayConditions)("Only display")+" ".concat(n," ")+(0,a.i18nDisplayConditions)("times")+l};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderNumberOfViewsTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.operatingSystems.split("|").filter((function(e){return e.length>0}));return r.length&&(r=r.reduce((function(e,t){return e+", "+t}))),{is:(0,a.i18nDisplayConditions)("Only display on")+" ".concat(r),isNot:(0,a.i18nDisplayConditions)("Don't display on")+" ".concat(r)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderOperatingSystemTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.pages.map((function(e){return e.label})).join(", ");return{hasVisitedSpecificPage:(0,a.i18nDisplayConditions)("Only display to users visited")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("Pages"),hasNotVisitedSpecificPage:(0,a.i18nDisplayConditions)("Don't display to users visited")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("Pages")}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderPageVisitTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.pages.map((function(e){return e.label})).join(", ");return{hasVisitedSpecificPage:(0,a.i18nDisplayConditions)("Only display to users visited")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("Posts"),hasNotVisitedSpecificPage:(0,a.i18nDisplayConditions)("Don't display to users visited")+" ".concat(r," ")+(0,a.i18nDisplayConditions)("Posts")}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderPostVisitTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.postTypes.map((function(e){return e.label})).join(", ");return{is:(0,a.i18nDisplayConditions)("Only display on")+" ".concat(r),isNot:(0,a.i18nDisplayConditions)("Don't display on")+" ".concat(r)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderPostTypeTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(31)),o=l(n(11)),a=l(n(3)),i=n(1481);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){var t=e.conditionSettings,n=t.displayRule,a=t.tags,l={};a.forEach((function(e){l[e.group]=(0,o.default)(l[e.group])?[e.label]:[].concat(u(l[e.group]),[e.label])}));var s=(0,r.default)(l,(function(e,t){return e.join(" & ")+" ".concat(t)})).join(", ");return{is:(0,i.i18nDisplayConditions)("Only display on")+" ".concat(s," ")+(0,i.i18nDisplayConditions)("Pages"),isNot:(0,i.i18nDisplayConditions)("Don't display on")+" ".concat(s," ")+(0,i.i18nDisplayConditions)("Pages")}[n]};c.propTypes={conditionSettings:a.default.object.isRequired},c.displayName="ETBuilderTagPageTooltip";var d=c;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(31)),o=l(n(11)),a=l(n(3)),i=n(1481);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){var t=e.conditionSettings,n=t.displayRule,a=t.tags,l={};a.forEach((function(e){l[e.group]=(0,o.default)(l[e.group])?[e.label]:[].concat(u(l[e.group]),[e.label])}));var s=(0,r.default)(l,(function(e,t){return e.join(" & ")+" ".concat(t)})).join(", ");return{is:(0,i.i18nDisplayConditions)("Only display on")+" ".concat(s),isNot:(0,i.i18nDisplayConditions)("Don't display on")+" ".concat(s)}[n]};c.propTypes={conditionSettings:a.default.object.isRequired},c.displayName="ETBuilderTagsTooltip";var d=c;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.userRoles,o=t.userIds,i=r.map((function(e){return e.label})).join(", "),l=o.replaceAll(",",""),u=isNaN(l)?"":", ".concat(o);return{is:(0,a.i18nDisplayConditions)("Only display to")+" ".concat(i).concat(u),isNot:(0,a.i18nDisplayConditions)("Don't display to")+" ".concat(i).concat(u)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderUserRoleTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.products.map((function(e){return e.label})).join(", ");return{hasBoughtProduct:(0,a.i18nDisplayConditions)("Only display to users bought product"),hasNotBoughtProduct:(0,a.i18nDisplayConditions)("Don't display to users bought product"),hasBoughtSpecificProduct:(0,a.i18nDisplayConditions)("Only Display to users who bought")+" ".concat(r),hasNotBoughtSpecificProduct:(0,a.i18nDisplayConditions)("Don't display to users who bought")+" ".concat(r)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderProductPurchaseTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.specificSearchQueries,o=t.excludedSearchQueries;return{specificSearchQueries:(0,a.i18nDisplayConditions)("Only display on search results for")+" ".concat(r),excludedSearchQueries:(0,a.i18nDisplayConditions)("Don't display on search results for")+" ".concat(o)}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderSearchResultsTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings.selectConditionalMetaField,n=t?JSON.parse((0,a.decodeString)(t)):{},r=n.displayRule,o=n.selectedFieldName,i=n.customFieldName,l=n.selectedFieldValue,u=n.customFieldValue,s="manualCustomFieldName"===o?i:o,c="manualCustomFieldValue"===l?u:l,d=(0,a.i18nDisplayConditions)("Only display on posts where")+" ".concat(s," ")+(0,a.i18nDisplayConditions)("custom field")+" ",f="manualCustomFieldValue"===l?"":(0,a.i18nDisplayConditions)("custom field");return{is:d+(0,a.i18nDisplayConditions)("is equal to")+" ".concat(c," ")+f,isNot:d+(0,a.i18nDisplayConditions)("is not equal to")+" ".concat(c," ")+f,contains:d+(0,a.i18nDisplayConditions)("contains")+" ".concat(c," ")+f,doesNotContain:d+(0,a.i18nDisplayConditions)("does not contain")+" ".concat(c," ")+f,isAnyValue:d+(0,a.i18nDisplayConditions)("is any value"),hasNoValue:d+(0,a.i18nDisplayConditions)("has no value"),isGreaterThan:d+(0,a.i18nDisplayConditions)("is greater than")+" ".concat(c," ")+f,isLessThan:d+(0,a.i18nDisplayConditions)("is less than")+" ".concat(c," ")+f}[r]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderCustomFieldTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.selectUrlParameter,r=t.urlParameterName,o=t.displayRule,i=t.urlParameterValue,l="anyUrlParameter"===n?(0,a.i18nDisplayConditions)("Any"):r;return{equals:"".concat((0,a.i18nDisplayConditions)("Display Only If")," ").concat(l," ").concat((0,a.i18nDisplayConditions)("URL Parameter")," ").concat((0,a.i18nDisplayConditions)("Equals")," ").concat(i),exist:"".concat((0,a.i18nDisplayConditions)("Display Only If")," ").concat(l," ").concat((0,a.i18nDisplayConditions)("URL Parameter")," ").concat((0,a.i18nDisplayConditions)("Exist")),doesNotExist:"".concat((0,a.i18nDisplayConditions)("Display Only If")," ").concat(l," ").concat((0,a.i18nDisplayConditions)("URL Parameter")," ").concat((0,a.i18nDisplayConditions)("Does not Exist")),doesNotEqual:"".concat((0,a.i18nDisplayConditions)("Display Only If")," ").concat(l," ").concat((0,a.i18nDisplayConditions)("URL Parameter")," ").concat((0,a.i18nDisplayConditions)("Does not Equal")," ").concat(i),contains:"".concat((0,a.i18nDisplayConditions)("Display Only If")," ").concat(l," ").concat((0,a.i18nDisplayConditions)("URL Parameter")," ").concat((0,a.i18nDisplayConditions)("Contains")," ").concat(i),doesNotContain:"".concat((0,a.i18nDisplayConditions)("Display Only If")," ").concat(l," ").concat((0,a.i18nDisplayConditions)("URL Parameter")," ").concat((0,a.i18nDisplayConditions)("Does not Contain")," ").concat(i)}[o]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderUrlParameterTooltip";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3))&&r.__esModule?r:{default:r},a=n(1481);var i=function(e){var t=e.conditionSettings,n=t.displayRule,r=t.products,o=r.map((function(e){return e.label})).join(", "),i=1===r.length?(0,a.i18nDisplayConditions)("product is in stock"):(0,a.i18nDisplayConditions)("products are in stock"),l=1===r.length?(0,a.i18nDisplayConditions)("product is out of stock"):(0,a.i18nDisplayConditions)("products are out of stock");return{isInStock:(0,a.i18nDisplayConditions)("Only display if")+" ".concat(o," ")+i,isOutOfStock:(0,a.i18nDisplayConditions)("Only display if")+" ".concat(o," ")+l}[n]};i.propTypes={conditionSettings:o.default.object.isRequired},i.displayName="ETBuilderProductStockTooltip";var l=i;t.default=l},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(o,i,u):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=(o=n(1524))&&o.__esModule?o:{default:o};function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){var t=function(){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}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(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&&s(e,t)}(l,e);var t,n,r,o=c(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),h(f(t=o.call(this,e)),"state",{checked:!1}),h(f(t),"moveItem",(function(e,n){t.props.onSort(e,n,t.props.id)})),t}return t=l,(n=[{key:"render",value:function(){return a.default.createElement(i.default,{key:this.props.id,id:this.props.id,moveItem:this.moveItem.bind(this),onEndDrag:this.props.onEndDrag},this.props.children)}}])&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(a.Component);h(m,"displayName","ETBuilderSortableRow");var y=m;t.default=y},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(o,i,u):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=(o=n(1492))&&o.__esModule?o:{default:o};function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){var t=function(){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}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}n(1826);var p=function(e){!function(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&&s(e,t)}(l,e);var t,n,r,o=c(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),o.call(this,e)}return t=l,(n=[{key:"render",value:function(){return a.default.createElement("div",null,a.default.createElement(i.default,null,a.default.createElement("ul",{className:"et-fb-settings-sortable-rows"},this.props.children)))}}])&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(a.Component);!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(p,"displayName","ETBuilderSortableRows");var h=p;t.default=h},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useGetDisplayConditionsStatus=void 0;var r=n(0);function o(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useGetDisplayConditionsStatus=function(){var t=a((0,r.useState)([]),2),n=t[0],i=t[1],l=a((0,r.useState)(!1),2),u=l[0],s=l[1],c=null;(0,r.useEffect)((function(){return function(){c&&c.abort("Unmounted, jQuery Ajax Cancelled.")}}),[]);return{displayConditionsStatus:n,getDisplayConditionsStatus:function(t){return 0==JSON.parse(t).length?Promise.resolve():(s(!0),c=e.ajax({type:"POST",dataType:"json",url:ETBuilderBackend.ajaxUrl,data:{conditions:t,action:"et_builder_ajax_get_display_conditions_status",nonce:ETBuilderBackend.nonces.getDisplayConditionsStatus}}).fail((function(e,t,n){console.log(e,t,n)})).done((function(e){e.hasOwnProperty("success")&&e.success?i((function(t){return o(e.data)})):console.log(e),s(!1)})))},isLoading:u}}}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dynamicPostsFields=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};var a=ETBuilderBackend.i18n.displayConditions,i={displayRule:{label:(0,o.default)(a,"Display Only If"),type:"select",options:{is:(0,o.default)(a,"Is"),isNot:(0,o.default)(a,"Is Not")},default:"is"},dynamicPosts:{type:"searchable_posts",options:{postType:"page"},default:[]},postTypeLabel:{type:"input",readonly:!0,visibility:!1},adminLabel:{label:(0,o.default)(a,"Admin Label"),type:"text",default:(0,o.default)(a,"Dynamic Posts")},enableCondition:{label:(0,o.default)(a,"Enable Condition"),type:"yes_no_button",options:{on:(0,o.default)(a,"Yes"),off:(0,o.default)(a,"No")},default:"on"}};t.dynamicPostsFields=i},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useSearchPosts=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r},a=n(0);function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useSearchPosts=function(){var t=l((0,a.useState)([]),2),n=t[0],r=t[1],u=l((0,a.useState)(!1),2),s=u[0],c=u[1],d=l((0,a.useState)(1),2),f=d[0],p=d[1],h=null;(0,a.useEffect)((function(){return function(){h&&h.abort("Unmounted, jQuery Ajax Cancelled.")}}),[]);return{searchResponse:n,searchPosts:function(t){var n=(0,o.default)(t,"search",""),a=(0,o.default)(t,"page",1),l=(0,o.default)(t,"postType","post");return c(!0),h=e.ajax({type:"GET",dataType:"json",url:ETBuilderBackend.ajaxUrl,data:{action:"et_builder_search_posts",nonce:ETBuilderBackend.nonces.searchPosts,post_type:l,page:a,search:n}}).fail((function(e,t,n){console.log(e,t,n)})).done((function(e){p(e.data.meta.pagination.pages.total),r((function(t){return 1===a?i(e.data.results):[].concat(i(t),i(e.data.results))})),c(!1)}))},isLoading:s,totalPages:f}}}).call(this,n(8))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useGetAuthors=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r},a=n(0);function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useGetAuthors=function(){var t=l((0,a.useState)([]),2),n=t[0],r=t[1],u=l((0,a.useState)(!1),2),s=u[0],c=u[1],d=l((0,a.useState)(1),2),f=d[0],p=d[1],h=null;(0,a.useEffect)((function(){return function(){h&&h.abort("Unmounted, jQuery Ajax Cancelled.")}}),[]);return{authors:n,getAuthors:function(t){var n=(0,o.default)(t,"page",1);return c(!0),h=e.ajax({type:"GET",dataType:"json",url:ETBuilderBackend.ajaxUrl,data:{action:"et_builder_ajax_get_authors",nonce:ETBuilderBackend.nonces.getAuthors}}).fail((function(e,t,n){console.log(e,t,n)})).done((function(e){p(e.data.meta.pagination.pages.total),r((function(t){return 1===n?i(e.data.results):[].concat(i(t),i(e.data.results))})),c(!1)}))},isLoading:s,totalPages:f}}}).call(this,n(8))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useGetPostTypes=void 0;var r=i(n(11)),o=i(n(1)),a=n(0);function i(e){return e&&e.__esModule?e:{default:e}}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useGetPostTypes=function(){var t=u((0,a.useState)([]),2),n=t[0],i=t[1],s=u((0,a.useState)(!1),2),c=s[0],d=s[1],f=u((0,a.useState)(1),2),p=f[0],h=f[1],m=null;(0,a.useEffect)((function(){return function(){m&&m.abort("Unmounted, JQuery Ajax Cancelled.")}}),[]);return{postTypes:n,getPostTypes:function(t){var n=(0,o.default)(t,"search",""),a=(0,o.default)(t,"page",1);return d(!0),m=e.ajax({type:"GET",dataType:"json",url:ETBuilderBackend.ajaxUrl,data:{action:"et_builder_ajax_get_post_types",nonce:ETBuilderBackend.nonces.getPostTypes,page:a,search:n}}).fail((function(e,t,n){console.log(e,t,n)})).done((function(e){h((0,r.default)(e.data.meta.pagination.pages.total)?1:e.data.meta.pagination.pages.total),i((function(t){return 1===a?l(e.data.results):[].concat(l(t),l(e.data.results))})),d(!1)}))},isLoading:c,totalPages:p}}}).call(this,n(8))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useGetCategories=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r},a=n(0);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useGetCategories=function(){var t=i((0,a.useState)({}),2),n=t[0],r=t[1],l=i((0,a.useState)(!1),2),u=l[0],s=l[1],c=null;(0,a.useEffect)((function(){return function(){c&&c.abort("Unmounted, jQuery Ajax Cancelled.")}}),[]);return{categories:n,getCategories:function(t){var n=(0,o.default)(t,"search","");return s(!0),c=e.ajax({type:"GET",dataType:"json",url:ETBuilderBackend.ajaxUrl,data:{action:"et_builder_ajax_get_categories",nonce:ETBuilderBackend.nonces.getCategories,search:n}}).fail((function(e,t,n){console.log(e,t,n)})).done((function(e){r((function(t){return e.data.results})),s(!1)}))},isLoading:u}}}).call(this,n(8))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useGetTags=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r},a=n(0);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useGetTags=function(){var t=i((0,a.useState)({}),2),n=t[0],r=t[1],l=i((0,a.useState)(!1),2),u=l[0],s=l[1],c=null;(0,a.useEffect)((function(){return function(){c&&c.abort("Unmounted, jQuery Ajax Cancelled.")}}),[]);return{tags:n,getTags:function(t){var n=(0,o.default)(t,"search","");return s(!0),c=e.ajax({type:"GET",dataType:"json",url:ETBuilderBackend.ajaxUrl,data:{action:"et_builder_ajax_get_tags",nonce:ETBuilderBackend.nonces.getTags,search:n}}).fail((function(e,t,n){console.log(e,t,n)})).done((function(e){r((function(t){return e.data.results})),s(!1)}))},isLoading:u}}}).call(this,n(8))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useSearchProducts=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r},a=n(0);function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useSearchProducts=function(){var t=l((0,a.useState)([]),2),n=t[0],r=t[1],u=l((0,a.useState)(!1),2),s=u[0],c=u[1],d=l((0,a.useState)(1),2),f=d[0],p=d[1],h=null;(0,a.useEffect)((function(){return function(){h&&h.abort("Unmounted, jQuery Ajax Cancelled.")}}),[]);return{searchResponse:n,searchProducts:function(t){var n=(0,o.default)(t,"search",""),a=(0,o.default)(t,"page",1);return c(!0),h=e.ajax({type:"GET",dataType:"json",url:ETBuilderBackend.ajaxUrl,data:{action:"et_builder_ajax_search_products",nonce:ETBuilderBackend.nonces.searchProducts,page:a,search:n}}).fail((function(e,t,n){console.log(e,t,n)})).done((function(e){p(e.data.meta.pagination.pages.total),r((function(t){return 1===a?i(e.data.results):[].concat(i(t),i(e.data.results))})),c(!1)}))},isLoading:s,totalPages:f}}}).call(this,n(8))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useGetUserRoles=void 0;var r=n(0);function o(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useGetUserRoles=function(){var t=a((0,r.useState)([]),2),n=t[0],i=t[1],l=a((0,r.useState)(!1),2),u=l[0],s=l[1],c=null;(0,r.useEffect)((function(){return function(){c&&c.abort("Unmounted, jQuery Ajax Cancelled.")}}),[]);return{userRoles:n,getUserRoles:function(){return s(!0),c=e.ajax({type:"GET",dataType:"json",url:ETBuilderBackend.ajaxUrl,data:{action:"et_builder_ajax_get_user_roles",nonce:ETBuilderBackend.nonces.getUserRoles}}).fail((function(e,t,n){console.log(e,t,n)})).done((function(e){i((function(t){return o(e.data.results)})),s(!1)}))},isLoading:u}}}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var u=a?Object.getOwnPropertyDescriptor(e,l):null;u&&(u.get||u.set)?Object.defineProperty(o,l,u):o[l]=e[l]}o.default=e,n&&n.set(e,o);return o}(n(0));(o=n(457))&&o.__esModule;function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(1837);var s=function(e){var t=e.value?e.value.split(":"):["00","00"],n=l((0,a.useState)(t[0]),2),r=n[0],o=n[1],i=l((0,a.useState)(t[1]),2),u=i[0],s=i[1],c=function(t){var n=parseInt(t.target.value,10),a=n.toString(),i=1===a.length?"0"+a:a,l=t.target.name,c=r+":"+u;"input-time-hour"===l&&n<=24?(o(i),c=i+":"+u):"input-time-minute"===l&&n<=59&&(s(i),c=r+":"+i),e._onChange(e.name,c)},d=function(e){e.target.select()};return a.default.createElement("div",{className:"et-fb-settings-option-input-time"},a.default.createElement("div",{className:"et-fb-input-time-col et-fb-input-time-col-1"},a.default.createElement("label",{className:"et-fb-form__label"},e.hourLabel),a.default.createElement("input",{type:"number",min:"0",max:"23",step:"1",className:"et-fb-settings-option-input et-fb-input-time-hour-input",name:"input-time-hour",value:r,onChange:c,onFocus:d})),a.default.createElement("div",{className:"et-fb-input-time-col et-fb-input-time-col-2"},a.default.createElement("label",{className:"et-fb-form__label"},e.minuteLabel),a.default.createElement("input",{type:"number",min:"0",max:"59",step:"1",className:"et-fb-settings-option-input et-fb-input-time-minute-input",name:"input-time-minute",value:u,onChange:c,onFocus:d})))};s.displayName="ETBuilderInputTime";var c=s;t.default=c},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=n(1486),l=(o=n(1487))&&o.__esModule?o:{default:o};function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(e){var t=s((0,a.useState)(1),2),n=t[0],r=t[1],o=s((0,a.useState)(""),2),u=o[0],c=o[1],d=(0,i.useSearchPosts)(),f=d.searchResponse,p=d.searchPosts,h=d.isLoading,m=d.totalPages;(0,a.useEffect)((function(){p({postType:e.options.postType,page:n,search:u})}),[n,u]);var y=f.map((function(e){return{label:e.label,value:e.value.toString()}}));return a.default.createElement(l.default,{onSearch:function(e){c(e),r(1)},onScrollLoad:function(){r(n+1)},onUpdate:function(t){e._onChange(e.name,t)},isLoading:h,currentPage:n,totalPages:m,items:y,value:e.value,className:"et-fb-settings-option-searchable-posts"})};d.displayName="ETBuilderMultiselectPosts";var f=d;t.default=f},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=n(1486),l=(o=n(1487))&&o.__esModule?o:{default:o};function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(e){var t=s((0,a.useState)(1),2),n=t[0],r=t[1],o=(0,i.useGetPostTypes)(),u=o.postTypes,c=o.getPostTypes,d=o.isLoading,f=o.totalPages;(0,a.useEffect)((function(){c({page:n})}),[n]);var p=u.map((function(e){return{label:e.label,value:e.value.toString()}}));return a.default.createElement(l.default,{isSearchable:!1,onScrollLoad:function(){r(n+1)},onUpdate:function(t){e._onChange(e.name,t)},isLoading:d,currentPage:n,totalPages:f,items:p,value:e.value,className:"et-fb-settings-option-searchable-posts"})};d.displayName="ETBuilderMultiselectPostTypes";var f=d;t.default=f},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=n(1486),l=(o=n(1487))&&o.__esModule?o:{default:o};function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(e){var t=s((0,a.useState)(1),2),n=t[0],r=t[1],o=(0,i.useGetAuthors)(),u=o.authors,c=o.getAuthors,d=o.isLoading,f=o.totalPages;(0,a.useEffect)((function(){c({page:n})}),[n]);var p=u.map((function(e){return{label:e.label,value:e.value.toString()}}));return a.default.createElement(l.default,{isSearchable:!1,onScrollLoad:function(){r(n+1)},onUpdate:function(t){e._onChange(e.name,t)},isLoading:d,currentPage:n,totalPages:f,items:p,value:e.value,className:"et-fb-settings-option-searchable-posts"})};d.displayName="ETBuilderMultiselectAuthors";var f=d;t.default=f},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=d(n(1843)),a=d(n(31)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),l=d(n(3)),u=n(1486),s=d(n(1487));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}function f(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y=function(e){var t=p((0,i.useState)(""),2),n=t[0],r=t[1],l=(0,u.useGetCategories)(),c=l.categories,d=l.getCategories,h=l.isLoading,m=l.totalPages;(0,i.useEffect)((function(){d({search:n})}),[n]);var y=(0,a.default)(c,(function(e,t){return[{name:"All "+e[0].taxonomyName,id:"all_"+e[0].taxonomySlug,taxonomyName:e[0].taxonomyName,taxonomySlug:e[0].taxonomySlug,isCatchAll:!0}].concat(f(e)).map((function(e){return{label:e.name,value:e.id.toString(),group:e.taxonomyName,groupSlug:e.taxonomySlug,isCatchAll:!(0,o.default)(e.isCatchAll)&&e.isCatchAll}}))})).flat();return i.default.createElement(s.default,{onSearch:function(e){r(e)},onUpdate:function(t){e._onChange(e.name,t)},isLoading:h,totalPages:m,items:y,value:e.value,className:"et-fb-settings-option-multiselect-categories"})};y.propTypes={_onChange:l.default.func,name:l.default.string,value:l.default.array},y.defaultProps={_onChange:function(){},name:"",value:[]},y.displayName="ETBuilderMultiselectCategories";var g=y;t.default=g},function(e,t,n){var r=n(54)("isUndefined",n(11),n(130));r.placeholder=n(48),e.exports=r},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=c(n(31)),a=c(n(11)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),l=n(1486),u=c(n(1487));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e){return e&&e.__esModule?e:{default:e}}function d(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=function(e){var t=f((0,i.useState)(""),2),n=t[0],r=t[1],s=(0,l.useGetTags)(),c=s.tags,p=s.getTags,h=s.isLoading,m=s.totalPages;(0,i.useEffect)((function(){p({search:n})}),[n]);var y=(0,o.default)(c,(function(e,t){return[{name:"All "+e[0].taxonomyName,id:"all_"+e[0].taxonomySlug,taxonomyName:e[0].taxonomyName,taxonomySlug:e[0].taxonomySlug,isCatchAll:!0}].concat(d(e)).map((function(e){return{label:e.name,value:e.id.toString(),group:e.taxonomyName,groupSlug:e.taxonomySlug,isCatchAll:!(0,a.default)(e.isCatchAll)&&e.isCatchAll}}))})).flat();return i.default.createElement(u.default,{onSearch:function(e){r(e)},onScrollLoad:function(){},onUpdate:function(t){e._onChange(e.name,t)},isLoading:h,totalPages:m,items:y,value:e.value,className:"et-fb-settings-option-multiselect-categories"})};m.displayName="ETBuilderMultiselectTags";var y=m;t.default=y},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=n(1486),l=(o=n(1487))&&o.__esModule?o:{default:o};function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(e){var t=s((0,a.useState)(1),2),n=t[0],r=t[1],o=s((0,a.useState)(""),2),u=o[0],c=o[1],d=(0,i.useSearchProducts)(),f=d.searchResponse,p=d.searchProducts,h=d.isLoading,m=d.totalPages;(0,a.useEffect)((function(){p({page:n,search:u})}),[n,u]);var y=f.map((function(e){return{label:e.label,value:e.value.toString()}}));return a.default.createElement(l.default,{onSearch:function(e){c(e),r(1)},onScrollLoad:function(){r(n+1)},onUpdate:function(t){e._onChange(e.name,t)},isLoading:h,currentPage:n,totalPages:m,items:y,value:e.value,className:"et-fb-settings-option-multiselect-products"})};d.displayName="ETBuilderMultiselectProducts";var f=d;t.default=f},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=n(1486),l=(o=n(1487))&&o.__esModule?o:{default:o};function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}var s=function(e){var t=(0,i.useGetUserRoles)(),n=t.userRoles,r=t.getUserRoles,o=t.isLoading;(0,a.useEffect)((function(){r()}),[]);var u=n.map((function(e){return{label:e.label,value:e.value.toString()}}));return a.default.createElement(l.default,{isSearchable:!1,onUpdate:function(t){e._onChange(e.name,t)},isLoading:o,items:u,value:e.value,className:"et-fb-settings-option-searchable-posts"})};s.displayName="ETBuilderMultiselectUserRoles";var c=s;t.default=c},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=c(n(3));n(1848);var i=c(n(457)),l=n(1849),u=c(n(616)),s=n(1481);function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e){var t=e.value?JSON.parse((0,s.decodeString)(e.value)):{},n=m((0,o.useState)({manualCustomFieldName:(0,s.i18nDisplayConditions)("Manual Custom Field Name")}),2),r=n[0],a=n[1],c=m((0,o.useState)({manualCustomFieldValue:(0,s.i18nDisplayConditions)("Manual Custom Field Value")}),2),d=c[0],f=c[1],y=m((0,o.useState)({selectedFieldName:t.selectedFieldName?t.selectedFieldName:"manualCustomFieldName",customFieldName:t.customFieldName?t.customFieldName:""}),2),g=y[0],b=y[1],v=m((0,o.useState)({selectedFieldValue:t.selectedFieldValue?t.selectedFieldValue:"manualCustomFieldValue",customFieldValue:t.customFieldValue?t.customFieldValue:""}),2),_=v[0],w=v[1],O=m((0,o.useState)({selectList:{is:(0,s.i18nDisplayConditions)("Is"),isNot:(0,s.i18nDisplayConditions)("Is Not"),contains:(0,s.i18nDisplayConditions)("Contains"),doesNotContain:(0,s.i18nDisplayConditions)("Does Not Contain"),isAnyValue:(0,s.i18nDisplayConditions)("Is Any Value"),hasNoValue:(0,s.i18nDisplayConditions)("Has No Value"),isGreaterThan:(0,s.i18nDisplayConditions)("Is Greater Than (numeric values only)"),isLessThan:(0,s.i18nDisplayConditions)("Is Less Than (numeric values only)")},value:t.displayRule?t.displayRule:"is"}),2),k=O[0],S=O[1],C=(0,l.useGetPostMetaFields)(),E=C.postMetaFields,P=C.getPostMetaFields;(0,o.useEffect)((function(){P({postId:ETBuilderBackend.postId})}),[]),(0,o.useEffect)((function(){var t=(0,s.encodeString)(JSON.stringify({displayRule:k.value,selectedFieldName:g.selectedFieldName,customFieldName:g.customFieldName,selectedFieldValue:_.selectedFieldValue,customFieldValue:_.customFieldValue}));e._onChange(e.name,t)}),[g,_,k]),(0,o.useEffect)((function(){var e=Object.keys(E).reduce((function(e,t){var n=h({},t,t);return p(p({},e),n)}),{});a((function(t){return p(p({},t),e)})),f((function(t){return p(p({},t),e)}))}),[E]);var T="isAnyValue"!==k.value&&"hasNoValue"!==k.value,M="manualCustomFieldValue"===_.selectedFieldValue,j="manualCustomFieldName"===g.selectedFieldName;return o.default.createElement("div",{className:"".concat(e.className)},o.default.createElement("p",{className:"et-fb-form__label"},(0,s.i18nDisplayConditions)("Display Only If")),o.default.createElement("div",{className:"et-fb-select-conditional-meta-field-field"},o.default.createElement(u.default,{name:"select-custom-field-name",options:r,_onChange:function(e,t){b((function(e){return p(p({},e),{},{selectedFieldName:t})}))},selectFirst:!1,searchable:!0,value:g.selectedFieldName})),j&&o.default.createElement("div",{className:"et-fb-select-conditional-meta-field-field"},o.default.createElement(i.default,{name:"custom-field-name",type:"text",value:g.customFieldName,default:"Custom field name",defaultIfEmpty:!0,_onChange:function(e,t){b((function(e){return p(p({},e),{},{customFieldName:t})}))}})),o.default.createElement("div",{className:"et-fb-select-conditional-meta-field-field"},o.default.createElement(u.default,{name:"multiselect-selected-checkboxes",options:k.selectList,_onChange:function(e,t){S((function(e){return p(p({},e),{},{value:t})}))},selectFirst:!1,value:k.value})),T&&o.default.createElement("div",{className:"et-fb-select-conditional-meta-field-field"},o.default.createElement(u.default,{name:"select-custom-field-name-value",options:d,_onChange:function(e,t){w((function(e){return p(p({},e),{},{selectedFieldValue:t})}))},selectFirst:!1,searchable:!0,value:_.selectedFieldValue})),T&&M&&o.default.createElement("div",{className:"et-fb-select-conditional-meta-field-field"},o.default.createElement(i.default,{name:"custom-field-name-value",type:"text",value:_.customFieldValue,default:"Custom field value",defaultIfEmpty:!0,_onChange:function(e,t){w((function(e){return p(p({},e),{},{customFieldValue:t})}))}})))};g.propTypes={className:a.default.string,value:a.default.string},g.defaultProps={className:"",value:""},g.displayName="ETBuilderSelectConditionalMetaField";var b=g;t.default=b},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useGetPostMetaFields=void 0;var r=n(0);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useGetPostMetaFields=function(){var t=o((0,r.useState)({}),2),n=t[0],a=t[1],i=o((0,r.useState)(!1),2),l=i[0],u=i[1],s=null;(0,r.useEffect)((function(){return function(){s&&s.abort("Unmounted, jQuery Ajax Cancelled.")}}),[]);return{postMetaFields:n,getPostMetaFields:function(t){return u(!0),s=e.ajax({type:"GET",dataType:"json",url:ETBuilderBackend.ajaxUrl,data:{action:"et_builder_ajax_get_post_meta_fields",nonce:ETBuilderBackend.nonces.getPostMetaFields,postId:t.postId}}).fail((function(e,t,n){console.log(e,t,n)})).done((function(e){a((function(t){return e.data.results})),u(!1)}))},isLoading:l}}}).call(this,n(8))},function(e,t,n){"use strict";(function(e,r){function o(e){return o="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},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(0)),i=f(n(3)),l=f(n(5)),u=f(n(11)),s=f(n(1)),c=f(n(392));n(1851);var d=f(n(790));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var v=function(t){!function(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&&m(e,t)}(f,t);var n,o,i,d=y(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.call(this,e)}return n=f,(o=[{key:"_openLinkInNewTab",value:function(t){var n=t.target.href;(0,u.default)(n)||(t.preventDefault(),e.topWindow().open(n,"_blank").focus())}},{key:"componentDidMount",value:function(){this.$creditsContainer=r(this.creditsContainer),this.$creditsContainer.on("click","a",this._openLinkInNewTab)}},{key:"componentWillUnmount",value:function(){this.$creditsContainer.off("click","a",this._openLinkInNewTab)}},{key:"render",value:function(){var e=this,t=this.props,n=t.moduleTitle,r=t.moduleType,o=(0,s.default)(ETBuilderBackend,"customModuleCredits.".concat(r),!1),i=(0,s.default)(ETBuilderBackend,"customModuleCredits.".concat(r,".author"),"");if(!o||(0,l.default)(i))return!1;var u=(0,l.default)(o.module_uri)?n:'<a href="'.concat(o.module_uri,'">').concat(n,"</a>"),d=(0,l.default)(o.author_uri)?i:'<a href="'.concat(o.author_uri,'">').concat(i,"</a>");return a.default.createElement("div",{className:"et-fb-settings-modal-module-credits",dangerouslySetInnerHTML:{__html:(0,c.default)("".concat(u," by ").concat(d))},ref:function(t){return e.creditsContainer=t}})}}])&&h(n.prototype,o),i&&h(n,i),Object.defineProperty(n,"prototype",{writable:!1}),f}(a.PureComponent),_={moduleTitle:i.default.string,moduleType:i.default.string};d.default.propTypes=_;var w=v;t.default=w}).call(this,n(2),n(8))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=v(n(0)),a=v(n(123)),i=v(n(3)),l=v(n(40)),u=v(n(13));n(1853);var s=v(n(6)),c=v(n(14)),d=v(n(1854)),f=n(1561),p=v(n(22)),h=v(n(1872)),m=v(n(623)),y=v(n(1874)),g=v(n(43)),b=v(n(84));function v(e){return e&&e.__esModule?e:{default:e}}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function O(e){var t=function(){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}}();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P=ETBuilderBackend.i18n.modals.globalPresets.presets,T=ETBuilderBackend.i18n.tooltip.modal.globalPresets,M=function(e){!function(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&&w(e,t)}(l,e);var t,n,r,i=O(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),E(S(t=i.call(this,e)),"onPresetSelect",(function(e){var t=e.key;a.default.hide(),p.default.modulePresetChange(t)})),E(S(t),"onPresetButtonClick",(function(){a.default.hide(),t.dropdownRef.current.close()})),E(S(t),"onPresetSettingsChange",(function(){t.forceUpdate()})),t.dropdownRef=o.default.createRef(),t.dropdownAnchorRef=o.default.createRef(),t}return t=l,n=[{key:"module",get:function(){return this.props.module}},{key:"presetsList",get:function(){return c.default.getModulePresetsList(this.module)}},{key:"moduleTitle",get:function(){return(0,m.default)(this.module)}},{key:"currentPreset",get:function(){return this.presetsList.length<2?"default":s.default.getCurrentModulePresetId(this.module,!1)}},{key:"componentDidMount",value:function(){s.default.addGlobalPresetsSettingsChangeListener(this.onPresetSettingsChange)}},{key:"componentWillUnmount",value:function(){s.default.removeGlobalPresetsSettingsChangeListener(this.onPresetSettingsChange)}},{key:"renderDefaultPreset",value:function(){var e=this.presetsList.find((function(e){return e.isDefault}));return o.default.createElement(o.default.Fragment,null,o.default.createElement(f.ETCoreMenuItem,{key:"default",value:"default",className:"et-core-control-menu__item__preset--default-only"},o.default.createElement("div",{className:"et-fb-modal__module-settings__default-preset-wrapper"},o.default.createElement(h.default,{id:"default",title:"".concat(this.moduleTitle," ").concat(P.defaultPreset),onButtonClick:this.onPresetButtonClick}),o.default.createElement("div",{className:"et-fb-modal__module-settings__default-based-on-name"},o.default.createElement(g.default,{icon:"star",color:b.default.button,style:{marginRight:0}}),o.default.createElement("span",null,"".concat(P.basedOn,": ").concat(e.name))))),o.default.createElement(f.ETCoreMenuDivider,null))}},{key:"renderPresetsList",value:function(){var e=this;return this.presetsList.sort((function(e,t){return e.created-t.created})).map((function(t){var n=t.id,r=t.name,a=(0,u.default)("et-core-control-menu__item__preset",{"et-core-control-menu__item__preset--default":t.isDefault}),i=n===e.currentPreset?T.disablePreset:T.activatePreset;return!(t.is_temp&&!s.default.isRemoteItemEditing())&&o.default.createElement(f.ETCoreMenuItem,{key:n,value:n,className:a,tooltip:i},o.default.createElement(h.default,{id:n,title:r,isDefault:t.isDefault,isSelected:n===e.currentPreset,onButtonClick:e.onPresetButtonClick}))}))}},{key:"renderSinglePresetOnly",value:function(){var e=(0,u.default)("et-core-control-menu__item__preset","et-core-control-menu__item__preset--default-only");return o.default.createElement(f.ETCoreMenuItem,{key:"default",value:"default",className:e},o.default.createElement(h.default,{id:"default",title:"".concat(this.moduleTitle," ").concat(P.defaultPreset),onButtonClick:this.onPresetButtonClick}))}},{key:"renderMenu",value:function(){var e=this.presetsList;return o.default.createElement(f.ETCoreMenu,{selectedKey:this.currentPreset},1===e.length&&this.renderSinglePresetOnly(),e.length>1&&this.renderDefaultPreset(),e.length>1&&this.renderPresetsList())}},{key:"render",value:function(){var e=this.props,t=e.module,n=e.onMouseEnter,r=e.onMouseLeave,a=c.default.getModulePreset(this.module,this.currentPreset).name,i=s.default.getGlobalPresetsState().presetsDropdownVisible,l=1===c.default.getModulePresetsCount(this.module)?P.default:a||P.default,u="".concat(P.preset,": ").concat(l);return o.default.createElement(o.default.Fragment,null,o.default.createElement(d.default,{anchor:this.dropdownAnchorRef,menu:this.renderMenu(),module:t,open:i,onMouseEnter:n,onMouseLeave:r,onSelect:this.onPresetSelect,ref:this.dropdownRef},u),o.default.createElement(y.default,{anchor:this.dropdownAnchorRef,onMouseEnter:n,onMouseLeave:r}))}}],n&&_(t.prototype,n),r&&_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.default.PureComponent);E(M,"propTypes",{module:i.default.shape({props:i.default.shape({type:i.default.string.isRequired}).isRequired}).isRequired,onMouseEnter:i.default.func,onMouseLeave:i.default.func}),E(M,"defaultProps",{onMouseEnter:l.default,onMouseLeave:l.default});var j=M;t.default=j},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=m(n(0)),a=m(n(3)),i=m(n(123)),l=m(n(40));n(1855);var u=m(n(22)),s=n(1561),c=n(788),d=m(n(1868)),f=m(n(1870)),p=n(358),h=m(n(802));function m(e){return e&&e.__esModule?e:{default:e}}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function v(e){var t=function(){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}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=ETBuilderBackend.i18n.tooltip.modal.globalPresets,C=function(e){!function(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&&b(e,t)}(l,e);var t,n,r,a=v(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),k(w(t=a.call(this,e)),"handleVisibilityChange",(function(e){i.default.rebuild(),e?(u.default.openPresetsDropdown(),(0,c.disableGlobalPageScroll)("et-fb-modal__module-settings__header-dropdown--visible")):(u.default.closePresetsDropdown(),(0,c.enableGlobalPageScroll)("et-fb-modal__module-settings__header-dropdown--visible"))})),k(w(t),"onPresetButtonClick",(function(){t.dropdownRef.current.close()})),k(w(t),"renderCustomMenu",(function(){var e=t.props,n=e.menu,r=e.onMouseEnter,a=e.onMouseLeave;return o.default.cloneElement(n,{customRender:t.renderCustomMenuItems,onMouseEnter:r,onMouseLeave:a})})),k(w(t),"renderCustomMenuItems",(function(e){return o.default.createElement("div",null,e,o.default.createElement(d.default,null),o.default.createElement(f.default,{module:t.props.module,onButtonClick:t.onPresetButtonClick}))})),t.dropdownRef=o.default.createRef(),t.anchorRef=o.default.createRef(),t}return t=l,(n=[{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(!0===this.props.open?(0,c.disableGlobalPageScroll)("et-fb-modal__module-settings__header-dropdown--visible"):(0,c.enableGlobalPageScroll)("et-fb-modal__module-settings__header-dropdown--visible"))}},{key:"componentWillUnmount",value:function(){(0,c.enableGlobalPageScroll)("et-fb-modal__module-settings__header-dropdown--visible")}},{key:"getRootDocument",value:function(){return(0,c.getBody)()[0]}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.forwardedRef,r=e.onSelect,a=e.anchor,i=e.open,l=this.renderCustomMenu(),u=(0,p.composeRef)(n,this.dropdownRef);return o.default.createElement("div",{className:"et-fb-modal__module-settings__header-dropdown"},o.default.createElement(s.ETCoreDropdown,{animation:"popup",closeOnClick:!0,getDocument:this.getRootDocument,menu:l,onVisibleChange:this.handleVisibilityChange,offsetV:h.default.modal.headerDropdownVOffset,onSelect:r,open:i,ref:u,trigger:"click"},o.default.createElement("div",{ref:a,"data-tip":S.selectPreset},o.default.createElement("div",{className:"et-fb-modal__module-settings__header-dropdown__overflow-container"},o.default.createElement("span",null,t),o.default.createElement("span",null)))))}}])&&g(t.prototype,n),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.default.PureComponent);k(C,"propTypes",{anchor:a.default.shape({current:p.validateRefType}),module:a.default.shape({props:a.default.shape({type:a.default.string.isRequired}).isRequired}).isRequired,menu:a.default.element.isRequired,open:a.default.bool,onSelect:a.default.func,onMouseEnter:a.default.func,onMouseLeave:a.default.func}),k(C,"defaultProps",{onSelect:l.default,onMouseEnter:l.default,onMouseLeave:l.default});var E=o.default.forwardRef((function(e,t){return o.default.createElement(C,y({},e,{forwardedRef:t}))}));t.default=E},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=c(n(0)),a=c(n(3)),i=c(n(40)),l=c(n(13)),u=n(1562),s=n(358);function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1861);var _="click",w="hover",O=function(e){!function(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&&h(e,t)}(i,e);var t,n,r,a=m(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),v(g(t=a.call(this,e)),"handleTriggerClick",(function(e){var n=t.props,r=n.trigger,o=n.onClick,a=n.open,i=n.closeOnClick;if(_===r)if(i){var l=void 0!==a?a:t.state.isVisible;t.setVisible(!l)}else t.setVisible(!0);o(e)})),v(g(t),"handleMouseEnter",(function(e){var n=t.props,r=n.trigger,o=n.onMouseEnter;w===r&&t.setVisible(!0),o(e)})),v(g(t),"handleMouseLeave",(function(e){var n=t.props,r=n.trigger,o=n.onMouseLeave;w===r&&t.setVisible(!1),o(e)})),v(g(t),"onSelect",(function(e){var n=t.props.onSelect;t.setVisible(!1),n(e)})),v(g(t),"close",(function(){t.setVisible(!1)})),t.triggerRef=o.default.createRef(),t.state={isVisible:!1},t}return t=i,(n=[{key:"visible",get:function(){var e=this.props.open;return void 0!==e?e:this.state.isVisible}},{key:"setVisible",value:function(e){var t=this.props,n=t.open,r=t.onVisibleChange;void 0===n&&this.setState({isVisible:e}),r(e)}},{key:"renderMenu",value:function(){if(!this.visible)return null;var e=this.props,t=e.menu,n=e.animation,r=e.offsetV,a=e.getDocument,i=this.triggerRef.current?this.triggerRef.current.offsetWidth:0,l=o.default.Children.only(t),s=o.default.cloneElement(l,{style:f(f({},l.props.style),{},{width:l.props.style&&l.props.style.width?l.props.style.width:i}),onSelect:this.onSelect});return o.default.createElement(u.ETCorePopup,{anchor:this.triggerRef,animation:n,getDocument:a,visible:this.visible,offsetV:r,onClose:this.close},s)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.disabled,r=o.default.Children.only(t),a=o.default.cloneElement(r,{className:(0,l.default)(r.props.className,"et-core-control-dropdown"),onClick:this.handleTriggerClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,ref:(0,s.composeRef)(r.ref,this.triggerRef),disabled:n}),i=this.renderMenu();return o.default.createElement(o.default.Fragment,null,a,i)}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.default.PureComponent);v(O,"propTypes",{animation:a.default.oneOf([u.ANIMATION_FOLD,u.ANIMATION_POPUP]),closeOnClick:a.default.bool,disabled:a.default.bool,getDocument:a.default.func,menu:a.default.element,offsetH:a.default.number,offsetV:a.default.number,onClick:a.default.func,onMouseEnter:a.default.func,onMouseLeave:a.default.func,onVisibleChange:a.default.func,onSelect:a.default.func,open:a.default.bool,trigger:a.default.oneOf([_,w])}),v(O,"defaultProps",{animation:u.ANIMATION_FOLD,closeOnClick:!1,disabled:!1,getDocument:function(){return window.document},menu:!1,offsetH:0,offsetV:0,onClick:i.default,onMouseEnter:i.default,onMouseLeave:i.default,onVisibleChange:i.default,trigger:_});var k=O;t.default=k},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return a="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},a(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l;n.r(t),n.d(t,"alignElement",(function(){return ne})),n.d(t,"alignPoint",(function(){return re}));var u={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function s(){if(void 0!==l)return l;l="";var e=document.createElement("p").style;for(var t in u)t+"Transform"in e&&(l=t);return l}function c(){return s()?"".concat(s(),"TransitionProperty"):"transitionProperty"}function d(){return s()?"".concat(s(),"Transform"):"transform"}function f(e,t){var n=c();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function p(e,t){var n=d();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var h,m=/matrix\((.*)\)/,y=/matrix3d\((.*)\)/;function g(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function b(e,t,n){var r=n;if("object"!==a(t))return void 0!==r?("number"==typeof r&&(r="".concat(r,"px")),void(e.style[t]=r)):h(e,t);for(var o in t)t.hasOwnProperty(o)&&b(e,o,t[o])}function v(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function _(e){return v(e)}function w(e){return v(e,!0)}function O(e){var t=function(e){var t,n,r,o=e.ownerDocument,a=o.body,i=o&&o.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),r=Math.floor(t.top),{left:n-=i.clientLeft||a.clientLeft||0,top:r-=i.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=_(r),t.top+=w(r),t}function k(e){return null!=e&&e==e.window}function S(e){return k(e)?e.document:9===e.nodeType?e:e.ownerDocument}var C=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),E=/^(top|right|bottom|left)$/;function P(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function T(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function M(e,t,n){"static"===b(e,"position")&&(e.style.position="relative");var r=-999,o=-999,a=P("left",n),i=P("top",n),l=T(a),u=T(i);"left"!==a&&(r=999),"top"!==i&&(o=999);var s,d="",p=O(e);("left"in t||"top"in t)&&(d=(s=e).style.transitionProperty||s.style[c()]||"",f(e,"none")),"left"in t&&(e.style[l]="",e.style[a]="".concat(r,"px")),"top"in t&&(e.style[u]="",e.style[i]="".concat(o,"px")),g(e);var h=O(e),m={};for(var y in t)if(t.hasOwnProperty(y)){var v=P(y,n),_="left"===y?r:o,w=p[y]-h[y];m[v]=v===y?_+w:_-w}b(e,m),g(e),("left"in t||"top"in t)&&f(e,d);var k={};for(var S in t)if(t.hasOwnProperty(S)){var C=P(S,n),E=t[S]-p[S];k[C]=S===C?m[C]+E:m[C]-E}b(e,k)}function j(e,t){var n=O(e),r=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(d());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(e),o={x:r.x,y:r.y};"left"in t&&(o.x=r.x+t.left-n.left),"top"in t&&(o.y=r.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(d());if(r&&"none"!==r){var o,a=r.match(m);a?((o=(a=a[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,o[5]=t.y,p(e,"matrix(".concat(o.join(","),")"))):((o=r.match(y)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,o[13]=t.y,p(e,"matrix3d(".concat(o.join(","),")")))}else p(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,o)}function x(e,t){for(var n=0;n<e.length;n++)t(e[n])}function D(e){return"border-box"===h(e,"boxSizing")}"undefined"!=typeof window&&(h=window.getComputedStyle?function(e,t,n){var r=n,o="",a=S(e);return(r=r||a.defaultView.getComputedStyle(e,null))&&(o=r.getPropertyValue(t)||r[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(C.test(n)&&!E.test(t)){var r=e.style,o=r.left,a=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,r.left="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r.left=o,e.runtimeStyle.left=a}return""===n?"auto":n});var N=["margin","border","padding"];function L(e,t,n){var r,o={},a=e.style;for(r in t)t.hasOwnProperty(r)&&(o[r]=a[r],a[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(a[r]=o[r])}function R(e,t,n){var r,o,a,i=0;for(o=0;o<t.length;o++)if(r=t[o])for(a=0;a<n.length;a++){var l=void 0;l="border"===r?"".concat(r).concat(n[a],"Width"):r+n[a],i+=parseFloat(h(e,l))||0}return i}var A={getParent:function(e){var t=e;do{t=11===t.nodeType&&t.host?t.host:t.parentNode}while(t&&1!==t.nodeType&&9!==t.nodeType);return t}};function I(e,t,n){var r=n;if(k(e))return"width"===t?A.viewportWidth(e):A.viewportHeight(e);if(9===e.nodeType)return"width"===t?A.docWidth(e):A.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],a="width"===t?Math.floor(e.getBoundingClientRect().width):Math.floor(e.getBoundingClientRect().height),i=D(e),l=0;(null==a||a<=0)&&(a=void 0,(null==(l=h(e,t))||Number(l)<0)&&(l=e.style[t]||0),l=parseFloat(l)||0),void 0===r&&(r=i?1:-1);var u=void 0!==a||i,s=a||l;return-1===r?u?s-R(e,["border","padding"],o):l:u?1===r?s:s+(2===r?-R(e,["border"],o):R(e,["margin"],o)):l+R(e,N.slice(r),o)}x(["Width","Height"],(function(e){A["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],A["viewport".concat(e)](n))},A["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,o=r.body,a=r.documentElement[n];return"CSS1Compat"===r.compatMode&&a||o&&o[n]||a}}));var B={position:"absolute",visibility:"hidden",display:"block"};function F(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=t[0];return 0!==o.offsetWidth?r=I.apply(void 0,t):L(o,B,(function(){r=I.apply(void 0,t)})),r}function W(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}x(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);A["outer".concat(t)]=function(t,n){return t&&F(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];A[e]=function(t,r){var o=r;return void 0!==o?t?(D(t)&&(o+=R(t,["padding","border"],n)),b(t,e,o)):void 0:t&&F(t,e,-1)}}));var V={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:S,offset:function(e,t,n){if(void 0===t)return O(e);!function(e,t,n){if(n.ignoreShake){var r=O(e),o=r.left.toFixed(0),a=r.top.toFixed(0),i=t.left.toFixed(0),l=t.top.toFixed(0);if(o===i&&a===l)return}n.useCssRight||n.useCssBottom?M(e,t,n):n.useCssTransform&&d()in document.body.style?j(e,t):M(e,t,n)}(e,t,n||{})},isWindow:k,each:x,css:b,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:W,getWindowScrollLeft:function(e){return _(e)},getWindowScrollTop:function(e){return w(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)V.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};W(V,A);var U=V.getParent;function G(e){if(V.isWindow(e)||9===e.nodeType)return null;var t,n=V.getDocument(e).body,r=V.css(e,"position");if(!("fixed"===r||"absolute"===r))return"html"===e.nodeName.toLowerCase()?null:U(e);for(t=U(e);t&&t!==n&&9!==t.nodeType;t=U(t))if("static"!==(r=V.css(t,"position")))return t;return null}var H=V.getParent;function z(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=G(e),o=V.getDocument(e),a=o.defaultView||o.parentWindow,i=o.body,l=o.documentElement;r;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===r.clientWidth||r===i||r===l||"visible"===V.css(r,"overflow")){if(r===i||r===l)break}else{var u=V.offset(r);u.left+=r.clientLeft,u.top+=r.clientTop,n.top=Math.max(n.top,u.top),n.right=Math.min(n.right,u.left+r.clientWidth),n.bottom=Math.min(n.bottom,u.top+r.clientHeight),n.left=Math.max(n.left,u.left)}r=G(r)}var s=null;V.isWindow(e)||9===e.nodeType||(s=e.style.position,"absolute"===V.css(e,"position")&&(e.style.position="fixed"));var c=V.getWindowScrollLeft(a),d=V.getWindowScrollTop(a),f=V.viewportWidth(a),p=V.viewportHeight(a),h=l.scrollWidth,m=l.scrollHeight,y=window.getComputedStyle(i);if("hidden"===y.overflowX&&(h=a.innerWidth),"hidden"===y.overflowY&&(m=a.innerHeight),e.style&&(e.style.position=s),t||function(e){if(V.isWindow(e)||9===e.nodeType)return!1;var t=V.getDocument(e),n=t.body,r=null;for(r=H(e);r&&r!==n&&r!==t;r=H(r))if("fixed"===V.css(r,"position"))return!0;return!1}(e))n.left=Math.max(n.left,c),n.top=Math.max(n.top,d),n.right=Math.min(n.right,c+f),n.bottom=Math.min(n.bottom,d+p);else{var g=Math.max(h,c+f);n.right=Math.min(n.right,g);var b=Math.max(m,d+p);n.bottom=Math.min(n.bottom,b)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function q(e){var t,n,r;if(V.isWindow(e)||9===e.nodeType){var o=V.getWindow(e);t={left:V.getWindowScrollLeft(o),top:V.getWindowScrollTop(o)},n=V.viewportWidth(o),r=V.viewportHeight(o)}else t=V.offset(e),n=V.outerWidth(e),r=V.outerHeight(e);return t.width=n,t.height=r,t}function K(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,a=e.height,i=e.left,l=e.top;return"c"===n?l+=a/2:"b"===n&&(l+=a),"c"===r?i+=o/2:"r"===r&&(i+=o),{left:i,top:l}}function $(e,t,n,r,o){var a=K(t,n[1]),i=K(e,n[0]),l=[i.left-a.left,i.top-a.top];return{left:Math.round(e.left-l[0]+r[0]-o[0]),top:Math.round(e.top-l[1]+r[1]-o[1])}}function Y(e,t,n){return e.left<n.left||e.left+t.width>n.right}function X(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function J(e,t,n){var r=[];return V.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function Q(e,t){return e[t]=-e[t],e}function Z(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function ee(e,t){e[0]=Z(e[0],t.width),e[1]=Z(e[1],t.height)}function te(e,t,n,r){var o=n.points,a=n.offset||[0,0],i=n.targetOffset||[0,0],l=n.overflow,u=n.source||e;a=[].concat(a),i=[].concat(i);var s={},c=0,d=z(u,!(!(l=l||{})||!l.alwaysByViewport)),f=q(u);ee(a,f),ee(i,t);var p=$(f,t,o,a,i),h=V.merge(f,p);if(d&&(l.adjustX||l.adjustY)&&r){if(l.adjustX&&Y(p,f,d)){var m=J(o,/[lr]/gi,{l:"r",r:"l"}),y=Q(a,0),g=Q(i,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})($(f,t,m,y,g),f,d)||(c=1,o=m,a=y,i=g)}if(l.adjustY&&X(p,f,d)){var b=J(o,/[tb]/gi,{t:"b",b:"t"}),v=Q(a,1),_=Q(i,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})($(f,t,b,v,_),f,d)||(c=1,o=b,a=v,i=_)}c&&(p=$(f,t,o,a,i),V.mix(h,p));var w=Y(p,f,d),O=X(p,f,d);if(w||O){var k=o;w&&(k=J(o,/[lr]/gi,{l:"r",r:"l"})),O&&(k=J(o,/[tb]/gi,{t:"b",b:"t"})),o=k,a=n.offset||[0,0],i=n.targetOffset||[0,0]}s.adjustX=l.adjustX&&w,s.adjustY=l.adjustY&&O,(s.adjustX||s.adjustY)&&(h=function(e,t,n,r){var o=V.clone(e),a={width:t.width,height:t.height};return r.adjustX&&o.left<n.left&&(o.left=n.left),r.resizeWidth&&o.left>=n.left&&o.left+a.width>n.right&&(a.width-=o.left+a.width-n.right),r.adjustX&&o.left+a.width>n.right&&(o.left=Math.max(n.right-a.width,n.left)),r.adjustY&&o.top<n.top&&(o.top=n.top),r.resizeHeight&&o.top>=n.top&&o.top+a.height>n.bottom&&(a.height-=o.top+a.height-n.bottom),r.adjustY&&o.top+a.height>n.bottom&&(o.top=Math.max(n.bottom-a.height,n.top)),V.mix(o,a)}(p,f,d,s))}return h.width!==f.width&&V.css(u,"width",V.width(u)+h.width-f.width),h.height!==f.height&&V.css(u,"height",V.height(u)+h.height-f.height),V.offset(u,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:a,targetOffset:i,overflow:s}}function ne(e,t,n){var r=n.target||t,o=q(r),a=!function(e,t){var n=z(e,t),r=q(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport);return te(e,o,n,a)}function re(e,t,n){var r,a,i=V.getDocument(e),l=i.defaultView||i.parentWindow,u=V.getWindowScrollLeft(l),s=V.getWindowScrollTop(l),c=V.viewportWidth(l),d=V.viewportHeight(l),f={left:r="pageX"in t?t.pageX:u+t.clientX,top:a="pageY"in t?t.pageY:s+t.clientY,width:0,height:0},p=r>=0&&r<=u+c&&a>=0&&a<=s+d,h=[n.points[0],"cc"];return te(e,f,o(o({},n),{},{points:h}),p)}ne.__getOffsetParent=G,ne.__getVisibleRectForElement=z,t.default=ne},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(n(0)),a=l(n(3)),i=n(67);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){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}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(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&&f(e,t)}(l,e);var t,n,r,a=p(l);function l(){return c(this,l),a.apply(this,arguments)}return t=l,(n=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.enabled,r=e.scale,a=o.default.Children.only(t);return o.default.createElement(i.Motion,{defaultStyle:{scale:r,opacity:0},style:{scale:n?(0,i.spring)(1,{stiffness:300,damping:20}):1,opacity:n?(0,i.spring)(1,{stiffness:300,damping:20}):1}},(function(e){return o.default.cloneElement(a,{style:s(s({},a.props.style),{},{opacity:e.opacity,transform:"scale( ".concat(e.scale," )")})})}))}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.default.PureComponent);y(g,"propTypes",{enabled:a.default.bool,scale:a.default.number,children:a.default.element.isRequired}),y(g,"defaultProps",{enabled:!0,scale:.5});var b=g;t.default=b},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(n(0)),a=l(n(3)),i=n(67);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){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}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(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&&f(e,t)}(l,e);var t,n,r,a=p(l);function l(){return c(this,l),a.apply(this,arguments)}return t=l,(n=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.enabled,r=e.scale,a=o.default.Children.only(t);return o.default.createElement(i.Motion,{defaultStyle:{scale:r,opacity:0},style:{scale:n?(0,i.spring)(1,{stiffness:300,damping:20}):1,opacity:n?(0,i.spring)(1,{stiffness:300,damping:20}):1}},(function(e){return o.default.cloneElement(a,{style:s(s({},a.props.style),{},{opacity:e.opacity,transform:"scaleY( ".concat(e.scale," )"),transformOrigin:"top"})})}))}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.default.PureComponent);y(g,"propTypes",{enabled:a.default.bool,scale:a.default.number,children:a.default.element.isRequired}),y(g,"defaultProps",{enabled:!0,scale:.6});var b=g;t.default=b},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(0)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(837)),i=s(n(3)),l=s(n(40));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){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}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1863);var b=function(e){!function(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&&f(e,t)}(l,e);var t,n,r,i=p(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),g(m(t=i.call(this,e)),"handleMouseEnter",(function(){t.mouseEntered=!0,t.props.onMouseEnter()})),g(m(t),"handleMouseLeave",(function(){t.mouseEntered=!1,t.props.onMouseLeave()})),g(m(t),"renderMenuItem",(function(e){if(!e)return null;if(a.isFragment(e))return o.default.Children.map(e.props.children,t.renderMenuItem);var n=e.key,r=t.props,i=r.selectedKey,l=r.onSelect,u=n||t.currentIndex,s=u===i;return t.currentIndex++,o.default.cloneElement(e,{itemKey:u,isSelected:s,onSelect:l})})),t.mouseEntered=!1,t.currentIndex=0,t}return t=l,(n=[{key:"renderMenuItems",value:function(){var e=this.props,t=e.customRender,n=e.children;this.currentIndex=0;var r=o.default.createElement("ul",{className:"et-core-control-menu"},o.default.Children.map(n,this.renderMenuItem));return t?t(r):r}},{key:"render",value:function(){var e=this.props.forwardedRef;return o.default.createElement("div",{className:"et-core-control-menu__wrapper",style:this.props.style,ref:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},this.renderMenuItems())}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.default.PureComponent);g(b,"propTypes",{selectedKey:i.default.string,onMouseEnter:i.default.func,onMouseLeave:i.default.func,customRender:i.default.func}),g(b,"defaultProps",{onMouseEnter:l.default,onMouseLeave:l.default,customRender:l.default});var v=o.default.forwardRef((function(e,t){return o.default.createElement(b,c({},e,{forwardedRef:t}))}));t.default=v},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(0)),a=s(n(3)),i=s(n(13)),l=s(n(43)),u=s(n(1865));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){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}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(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&&d(e,t)}(s,e);var t,n,r,a=f(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),y(h(t=a.call(this,e)),"handleMouseEnter",(function(){t.setState({hovered:!0})})),y(h(t),"handleMouseLeave",(function(){t.setState({hovered:!1})})),y(h(t),"handleMouseDown",(function(e){if(1===e.nativeEvent.which){var n=t.props,r=n.onSelect,o=n.itemKey,a=n.value;r&&r({key:o,value:a})}})),t.state={hovered:!1},t}return t=s,(n=[{key:"render",value:function(){var e=this.state.hovered,t=this.props,n=t.isSelected,r=t.className,a=t.itemKey,s=t.tooltip,c=(0,i.default)({"et-core-control-menu__item":!0,"et-core-control-menu__item--hovered":e,"et-core-control-menu__item--selected":n},r),d=e?u.default.checkMarkColorHovered:u.default.checkMarkColor;return o.default.createElement("li",{key:a,className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onTouchStart:this.handleMouseDown,"data-tip":s},o.default.createElement("div",{className:"et-core-control-menu__item__content"},this.props.children),n&&o.default.createElement("div",{className:"et-core-control-menu__item__check-mark"},o.default.createElement(l.default,{icon:"check",color:d})))}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.default.PureComponent);y(g,"propTypes",{className:a.default.string,itemKey:a.default.oneOfType([a.default.string,a.default.number]),value:a.default.oneOfType([a.default.string,a.default.number]),isSelected:a.default.bool,tooltip:a.default.string}),y(g,"defaultProps",{isSelected:!1});var b=g;t.default=b},function(e,t,n){"use strict";n.r(t),t.default={checkMarkColor:"#37C4AA",checkMarkColorHovered:"#fff"}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=(o=n(0))&&o.__esModule?o:{default:o};function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){var t=function(){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}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}n(1867);var f=function(e){!function(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&&u(e,t)}(c,e);var t,n,r,o=s(c);function c(){return i(this,c),o.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){return a.default.createElement("li",{className:"et-core-control-menu__divider"})}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(a.default.PureComponent),p=f;t.default=p},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=(o=n(0))&&o.__esModule?o:{default:o};function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){var t=function(){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}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}n(1869);var f=function(e){!function(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&&u(e,t)}(c,e);var t,n,r,o=s(c);function c(){return i(this,c),o.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){return a.default.createElement("div",{className:"et-core-divider"})}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(a.default.PureComponent),p=f;t.default=p},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=f(n(0)),a=f(n(3)),i=f(n(40));n(1871);var l=f(n(784)),u=f(n(63)),s=f(n(59)),c=f(n(22)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=ETBuilderBackend.i18n.tooltips.globalPresets.presets,O=function(e){!function(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&&m(e,t)}(i,e);var t,n,r,a=y(i);function i(){var e;p(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _(b(e=a.call.apply(a,[this].concat(n))),"onCreatePresetButtonClick",(function(){c.default.showNewPresetFromCurrentStylesDialog(),e.props.onButtonClick()})),e}return t=i,(n=[{key:"render",value:function(){var e=this.props.onButtonClick,t=d.default.isViewGlobalPresetsAllowed();return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"et-fb-modal__preset-dropdown__buttons"},t?o.default.createElement(o.default.Fragment,null,o.default.createElement(u.default,{block:!0,inverse:!0,className:"et-fb-button--within-dropdown",_onClick:this.onCreatePresetButtonClick},w.createNewPreset),o.default.createElement(u.default,{buttonName:s.default.BUTTON_GLOBAL_PRESETS_ADD_NEW_PRESET,block:!0,inverse:!0,className:"et-fb-button--within-dropdown",__onClick:e},w.addNewPreset)):null),o.default.createElement(l.default,{videoListId:"et_pb_global_presets",onClick:e}))}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.default.PureComponent);_(O,"propTypes",{module:a.default.shape({props:a.default.shape({type:a.default.string.isRequired}).isRequired}).isRequired,onButtonClick:a.default.func}),_(O,"defaultProps",{onButtonClick:i.default});var k=O;t.default=k},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=f(n(0)),a=f(n(3)),i=f(n(40));n(1873);var l=f(n(63)),u=f(n(43)),s=f(n(22)),c=f(n(84)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=ETBuilderBackend.i18n.tooltip.modal.globalPresets,O=function(e){!function(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&&m(e,t)}(i,e);var t,n,r,a=y(i);function i(){var e;p(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _(b(e=a.call.apply(a,[this].concat(n))),"handleButtonClick",(function(t){t.stopPropagation(),e.props.onButtonClick()})),_(b(e),"onEditButtonClickHandler",(function(t){return e.allowLeftButtonClickOnly(t,e.onEditButtonClick)})),_(b(e),"onEditButtonClick",(function(t){e.handleButtonClick(t),s.default.editPresetStyles(e.props.id)})),_(b(e),"onSettingsButtonClickHandler",(function(t){return e.allowLeftButtonClickOnly(t,e.onSettingsButtonClick)})),_(b(e),"onSettingsButtonClick",(function(t){e.handleButtonClick(t),s.default.editPresetSettings(e.props.id)})),_(b(e),"onUpdateWithCurrentStylesButtonClickHandler",(function(t){return e.allowLeftButtonClickOnly(t,e.onUpdateWithCurrentStylesButtonClick)})),_(b(e),"onUpdateWithCurrentStylesButtonClick",(function(t){e.handleButtonClick(t);var n=e.props,r=n.title,o=n.id;s.default.updatePresetWithCurrentStyles(r,o)})),_(b(e),"onCopyButtonClickHandler",(function(t){return e.allowLeftButtonClickOnly(t,e.onCopyButtonClick)})),_(b(e),"onCopyButtonClick",(function(t){e.handleButtonClick(t),s.default.clonePreset(e.props.id)})),_(b(e),"onDeleteButtonClickHandler",(function(t){return e.allowLeftButtonClickOnly(t,e.onDeleteButtonClick)})),_(b(e),"onDeleteButtonClick",(function(t){e.handleButtonClick(t);var n=e.props,r=n.title,o=n.id;s.default.deletePreset(r,o)})),_(b(e),"onAssignAsDefaultButtonClickHandler",(function(t){return e.allowLeftButtonClickOnly(t,e.onAssignAsDefaultButtonClick)})),_(b(e),"onAssignAsDefaultButtonClick",(function(t){e.handleButtonClick(t);var n=e.props,r=n.title,o=n.id;s.default.assignPresetToDefault(r,o)})),_(b(e),"allowLeftButtonClickOnly",(function(e,t){1===e.nativeEvent.which?t(e):e.stopPropagation()})),e}return t=i,(n=[{key:"render",value:function(){var e=this.props,t=e.title,n=e.isDefault,r=e.isSelected,a=d.default.isViewGlobalPresetsAllowed();return o.default.createElement("div",{className:"et-core-control-menu__item__content--customized"},o.default.createElement("div",{className:"et-core-control-menu__item__text-wrapper"},t),o.default.createElement(o.default.Fragment,null),a?o.default.createElement(o.default.Fragment,null,o.default.createElement(l.default,{onMouseDown:this.onEditButtonClickHandler,tooltip:w.editPresetStyles},o.default.createElement(u.default,{icon:"pencil",color:"white"})),o.default.createElement(l.default,{onMouseDown:this.onSettingsButtonClickHandler,tooltip:w.presetSettings,className:"et-fb-button--preset-settings"},o.default.createElement(u.default,{icon:"setting",color:"white"})),o.default.createElement(l.default,{onMouseDown:this.onUpdateWithCurrentStylesButtonClickHandler,tooltip:w.updateWithCurrentStyles},o.default.createElement(u.default,{icon:"update-with-current-styles",color:"white"})),o.default.createElement(l.default,{onMouseDown:this.onCopyButtonClickHandler,tooltip:w.duplicatePreset},o.default.createElement(u.default,{icon:"copy",color:"white"})),o.default.createElement(l.default,{className:"et-fb-button--delete-preset",onMouseDown:this.onDeleteButtonClickHandler,tooltip:w.deletePreset},o.default.createElement(u.default,{icon:"delete",color:"white"})),o.default.createElement(l.default,{onMouseDown:this.onAssignAsDefaultButtonClickHandler,tooltip:w.assignAsDefault,className:"et-core-control-menu__item__button--star"},o.default.createElement(u.default,{icon:"star",color:"white"}))):o.default.createElement(u.default,{icon:"star",color:"white",className:"et-fb-icon--based-on-indicator"}),n&&r&&o.default.createElement("div",{className:"et-core-control-menu__item__icon-wrapper"},o.default.createElement(u.default,{icon:"check",color:c.default.checkMark})),n&&o.default.createElement(u.default,{icon:"star",color:c.default.button,className:"et-core-control-menu__item__icon--star"}))}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.default.PureComponent);_(O,"propTypes",{id:a.default.string.isRequired,isDefault:a.default.bool,onButtonClick:a.default.func,isSelected:a.default.bool,title:a.default.string.isRequired}),_(O,"defaultProps",{onButtonClick:i.default});var k=O;t.default=k},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=w(n(0)),a=w(n(3)),i=w(n(40));n(1875);var l=w(n(6)),u=w(n(1562)),s=n(506),c=w(n(457)),d=w(n(1489)),f=w(n(198)),p=w(n(63)),h=w(n(43)),m=n(788),y=n(358),g=w(n(821)),b=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(94)),v=w(n(802));function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}function w(e){return e&&e.__esModule?e:{default:e}}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function C(e){var t=function(){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}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=ETBuilderBackend.i18n.modals.globalPresets.presets,x=function(e){!function(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&&S(e,t)}(i,e);var t,n,r,a=C(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),M(P(t=a.call(this,e)),"onSettingMouseOver",(function(){t.setState({presetNameHovered:!0})})),M(P(t),"onSettingMouseLeave",(function(){t.setState({presetNameHovered:!1})})),M(P(t),"onPresetSettingsChange",(function(){var e=l.default.getGlobalPresetsState().presetSettingsPopup;t.setState(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))})),M(P(t),"onSettingsClose",(function(){g.default.closePresetSettingsModal()})),M(P(t),"onSettingsSave",(function(){var e=l.default.getModuleEdit(),n=t.state,r=n.presetId,o=n.presetName,a=n.presetDefaultName,i=n.isPresetDefault,u=n.isMakingClone,s=n.isAssignToDefaultHidden,c=o||a;b.isOn(i)&&!s?g.default.savePresetSettings():t.state.isMakingPresetFromCurrentStyles?g.default.confirmCreatePresetFromCurrentStyles(e,c,b.isOn(i)):g.default.confirmSavePresetSettings(e,r,c,b.isOn(i),u)})),M(P(t),"onPresetSettingChange",(function(e,t){g.default.presetSettingChange(e,t)})),M(P(t),"onPresetTitleReset",(function(){t.onPresetSettingChange("presetName",t.state.presetDefaultName)})),t.state={isVisible:!1,presetId:null,presetName:"",presetDefaultName:"",isPresetDefault:"off",presetNameHovered:!1,isAssignToDefaultHidden:!1,isMakingClone:!1,isMakingPresetFromCurrentStyles:!1},t}return t=i,(n=[{key:"componentDidMount",value:function(){l.default.addGlobalPresetsSettingsChangeListener(this.onPresetSettingsChange)}},{key:"componentWillUnmount",value:function(){l.default.removeGlobalPresetsSettingsChangeListener(this.onPresetSettingsChange)}},{key:"componentDidUpdate",value:function(e,t){t.isVisible!==this.state.isVisible&&this.handleSettingsVisibilityChange()}},{key:"handleSettingsVisibilityChange",value:function(){this.state.isVisible?(0,m.disableGlobalPageScroll)("et-core-popup__wrapper--visible"):(0,m.enableGlobalPageScroll)("et-core-popup__wrapper--visible")}},{key:"getRootDocument",value:function(){return(0,m.getBody)()[0]}},{key:"render",value:function(){var e=this.state,t=e.isVisible,n=e.presetName,r=e.presetDefaultName,a=e.isPresetDefault,i=e.presetNameHovered,l=e.isAssignToDefaultHidden,m=this.props,y=m.anchor,g=m.onMouseEnter,b=m.onMouseLeave;return o.default.createElement(u.default,{anchor:y,animation:"popup",getDocument:this.getRootDocument,ignoreDocumentClicks:!0,offsetV:v.default.modal.headerDropdownVOffset,visible:t,onClose:this.onSettingsClose},o.default.createElement("div",{className:"et-fb-preset-settings__wrapper"},o.default.createElement("div",{className:"et-fb-modal__title et-fb-preset-settings__title"},j.presetSettings),o.default.createElement(s.ETBuilderFormGroup,{onMouseEnterGroup:this.onSettingMouseOver,onMouseLeaveGroup:this.onSettingMouseLeave},o.default.createElement(s.ETBuilderFormLabel,{isResetActive:n!==r,hoveredGroup:i,onClickReset:this.onPresetTitleReset},j.presetName),o.default.createElement(c.default,{name:"presetName",default:r,value:n,defaultIfEmpty:!0,_onChange:this.onPresetSettingChange})),!l&&o.default.createElement(s.ETBuilderFormGroup,null,o.default.createElement(s.ETBuilderFormLabel,null,j.assignPresetToDefault.title),o.default.createElement(d.default,{name:"isPresetDefault",options:j.assignPresetToDefault.options,value:a,_onChange:this.onPresetSettingChange})),o.default.createElement(f.default,{block:!0},o.default.createElement(p.default,{block:!0,danger:!0,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel,_onClick:this.onSettingsClose},o.default.createElement(h.default,{icon:"exit",color:"#FFFFFF"})),o.default.createElement(p.default,{block:!0,success:!0,tooltip:ETBuilderBackend.i18n.tooltip.modal.save,_onClick:this.onSettingsSave,onMouseEnter:g,onMouseLeave:b},o.default.createElement(h.default,{icon:"check",color:"#FFFFFF"})))))}}])&&k(t.prototype,n),r&&k(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.default.PureComponent);M(x,"propTypes",{anchor:a.default.shape({current:y.validateRefType}),onMouseEnter:a.default.func,onMouseLeave:a.default.func}),M(x,"defaultProps",{onMouseEnter:i.default,onMouseLeave:i.default});var D=x;t.default=D},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=y(n(41)),i=y(n(1)),l=y(n(42)),u=y(n(84)),s=y(n(63)),c=y(n(59)),d=y(n(619)),f=y(n(6)),p=y(n(514)),h=n(2),m=n(509);function y(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function w(e){var t=function(){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}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function O(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){!function(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&&_(e,t)}(g,e);var t,n,r,y=w(g);function g(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),C(k(t=y.call(this,e)),"setHoveredState",(0,a.default)((function(){t.isComponentMounted&&t.setState({hovered:!0})}),50)),C(k(t),"unsetHoveredState",(0,a.default)((function(){t.isComponentMounted&&t.setState({hovered:!1})}),50)),C(k(t),"handleLayerMouseEnter",(function(){t.unsetHoveredState.cancel(),t.isHovered()||t.setHoveredState()})),C(k(t),"handleLayerMouseLeave",(function(){t.setHoveredState.cancel(),t.isHovered()&&t.unsetHoveredState()})),t.containerRef=o.default.createRef(),t.slug="layers-view-add-button",t.state={index:null},t.isComponentMounted=!1,t.handleAddButton=t.handleAddButton.bind(k(t)),t}return t=g,(n=[{key:"componentDidMount",value:function(){this.isComponentMounted=!0}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,l.default)(e,this.props)||!(0,l.default)(t,this.state)}},{key:"componentWillUnmount",value:function(){this.isComponentMounted=!1}},{key:"isHovered",value:function(){return this.state.hovered}},{key:"handleAddButton",value:function(e){(0,m.handleAddLayerButton)(e,this,this.handleAddButton,{isParent:!0})}},{key:"render",value:function(){if(d.default.isFilterActive())return null;var e,t=this.props,n=(0,h.getComponentType)(t),r="column"===n&&t.isColumnSpecialty;(0,h.is)("fullwidth",t)||"column"===n&&!r?e="et_pb_module":("section"===n||r)&&(e="et_pb_row"),this.module={props:(0,m.prepareProps)(this.props,{type:e})};var a=this.module.props,l=(0,i.default)(ETBuilderBackend,"i18n.tooltip.".concat((0,h.getComponentType)(a))),y={buttonName:c.default.TAB_BUTTON_MODULE_ADD,parentModule:{props:(0,m.prepareProps)(t,f.default.getComponentAtAddress(t.address))},tooltip:l.addButton,ink:!1,block:!0,stopPropagation:!0,_onClick:this.handleAddButton},g={color:(0,m.getColorCode)(a),backgroundColor:(0,p.default)(u.default.layerBackground,this.isHovered()?1:.6)};return o.default.createElement("div",{className:"et-fb-layers-view--layer lv-add-button"},o.default.createElement("div",{className:"et-fb-layers-view--header"},o.default.createElement("div",{className:"et-fb-button-group et-fb-layers-view--toggle"}),o.default.createElement("div",{className:"et-fb-layers-view--content",onMouseEnter:this.handleLayerMouseEnter,onMouseLeave:this.handleLayerMouseLeave,style:{backgroundColor:g.backgroundColor},role:"presentation"},o.default.createElement(s.default,b({style:{color:g.color}},y),l.addButton)),o.default.createElement("div",{className:"et-fb-layers-view--add"})))}}])&&v(t.prototype,n),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),g}(o.Component);C(E,"propTypes",{}),C(E,"defaultProps",{});var P=E;t.default=P},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=q(n(631)),i=q(n(72)),l=q(n(125)),u=q(n(31)),s=q(n(11)),c=q(n(35)),d=q(n(42)),f=q(n(5)),p=q(n(34)),h=q(n(1)),m=q(n(9)),y=q(n(41)),g=q(n(10)),b=z(n(0)),v=n(67),_=q(n(3)),w=q(n(13)),O=q(n(84)),k=q(n(22)),S=q(n(63)),C=q(n(198)),E=q(n(14)),P=q(n(59)),T=q(n(281)),M=q(n(43)),j=q(n(619)),x=q(n(337)),D=q(n(6)),N=q(n(98)),L=q(n(512)),R=q(n(514)),A=q(n(401)),I=q(n(1563)),B=z(n(2)),F=n(524),W=n(94),V=n(284),U=n(509),G=n(1880);function H(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(H=function(e){return e?n:t})(e)}function z(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=H(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function q(e){return e&&e.__esModule?e:{default:e}}function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K.apply(this,arguments)}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}function X(e){var t=function(){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}}();return function(){var n,r=Z(e);if(t){var o=Z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return J(this,n)}}function J(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Q(e)}function Q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var te=function e(t,n){if((0,h.default)(t,"globalParent")!==(0,h.default)(n,"globalParent"))return!0;if((0,h.default)(t,"lockedParent")!==(0,h.default)(n,"lockedParent"))return!0;if((0,h.default)(t,"hash")!==(0,h.default)(n,"hash"))return!0;if((0,l.default)((0,h.default)(t,"children"))!==(0,l.default)((0,h.default)(n,"children")))return!0;for(var r=0;r<(0,l.default)((0,h.default)(t,"children"));r+=1)if(e((0,h.default)(t,"children.".concat(r,".props")),(0,h.default)(n,"children.".concat(r,".props"))))return!0;return!1},ne=function(t){!function(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&&Y(e,t)}(H,t);var n,r,l,_=X(H);function H(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,H),ee(Q(t=_.call(this,e)),"requestAnimationFrameID",null),ee(Q(t),"setHoveredState",(0,y.default)((function(){t.isComponentMounted&&(t.setState({hovered:!0}),(0,U.highlightLayerOnBuilder)(Q(t),!0))}),50)),ee(Q(t),"unsetHoveredState",(0,y.default)((function(){t.isComponentMounted&&(t.setState({hovered:!1}),(0,U.highlightLayerOnBuilder)(Q(t),!1))}),50)),ee(Q(t),"handleLayerMouseEnter",(function(){t.unsetHoveredState.cancel(),t.isHovered()||t.setHoveredState()})),ee(Q(t),"handleLayerMouseLeave",(function(){t.setHoveredState.cancel(),t.isHovered()&&t.unsetHoveredState()})),t.layerRef=b.default.createRef(),t.slug="layers-view-item",t.module={props:{}},t.dragId=0,t.dragOptions={update:G.layerDragUpdate,placeholderHeight:"4px",preSortableInit:G.layerPreSortableInit,wireframeMode:!1,layersView:!0},t.state={index:null,hovered:!1,isLabelEditable:!1,isRenderItem:!1},t.isComponentMounted=!1,t.scrollTimeout=100,t.sortableTimeout=100,t.callbackLabelEditing=t.callbackLabelEditing.bind(Q(t)),t.handleAddButton=t.handleAddButton.bind(Q(t)),t.handleLayerClick=t.handleLayerClick.bind(Q(t)),t.handleLayerDoubleClick=t.handleLayerDoubleClick.bind(Q(t)),t.handleLayerRightClick=t.handleLayerRightClick.bind(Q(t)),t.handleLayerSettingsClick=t.handleLayerSettingsClick.bind(Q(t)),t.handleLayerToggle=t.handleLayerToggle.bind(Q(t)),t.handleLayerToggleAll=t.handleLayerToggleAll.bind(Q(t)),t.isLayerExpanded=t.isLayerExpanded.bind(Q(t)),t.isHovered=t.isHovered.bind(Q(t)),t.isLayerSelected=t.isLayerSelected.bind(Q(t)),t.renderActionButtons=t.renderActionButtons.bind(Q(t)),t.renderAddButton=t.renderAddButton.bind(Q(t)),t.renderLabel=t.renderLabel.bind(Q(t)),t.renderToggle=t.renderToggle.bind(Q(t)),t.startRender=t.startRender.bind(Q(t)),t._ABTestingSet=F._ABTestingSet.bind(Q(t)),t}return n=H,r=[{key:"componentDidMount",value:function(){var t=this;this.isComponentMounted=!0,this.requestAnimationFrameID=B.default.topWindow().requestAnimationFrame(this.startRender);var n=this.props.isFilterActive,r=D.default.getActiveProductTourElement();if(!n){var o=e(this.layerRef.current);(0,B.is)("section",this)?(0,W.hasValue)(r)||setTimeout((function(){(0,A.default)(o,(0,g.default)(t.dragOptions,{isSection:!0}))}),this.sortableTimeout):(0,B.is)("row",this)?setTimeout((function(){(0,A.default)(o,(0,g.default)(t.dragOptions,{isRow:!0}))}),this.sortableTimeout):(0,B.is)("column",this)&&((0,W.hasValue)(r)||setTimeout((function(){(0,A.default)(o,(0,g.default)(t.dragOptions,{isColumn:!0}))}),this.sortableTimeout)),this.applyDropEffect()}}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,d.default)(t,this.state)||te(e,this.props)}},{key:"componentDidUpdate",value:function(){var t=this,n=this.props.isFilterActive,r=e(this.layerRef.current),o=D.default.getActiveProductTourElement();if((0,B.is)("section",this)){if(!(0,W.hasValue)(o)){var l=x.default.shouldMultiItemMixed(this.props.address,this.props.type),u=l.isItemsMixed,s=l.newConnectWith,c=l.newChildSlug;setTimeout((function(){(0,A.default)(r,(0,g.default)(t.dragOptions,{isSection:!0,force:!0,disabled:n,isItemsMixed:u,newConnectWith:s,newChildSlug:c}))}),this.sortableTimeout)}}else if((0,B.is)("row",this)){var d=x.default.shouldMultiItemMixed(this.props.address,this.props.type),f=d.isItemsMixed,p=d.newConnectWith,h=d.newChildSlug;setTimeout((function(){(0,A.default)(r,(0,g.default)(t.dragOptions,{isRow:!0,force:!0,disabled:n,isItemsMixed:f,newConnectWith:p,newChildSlug:h}))}),this.sortableTimeout)}else if((0,B.is)("column",this)&&("moveModule"===o||!(0,W.hasValue)(o))){var m=(0,W.hasValue)(o)?D.default.getProductTourModule():"not_set";if("not_set"===m||(0,i.default)(m,(0,a.default)(this.props.address,{length:3,omission:""}))){var y=x.default.shouldMultiItemMixed(this.props.address,this.props.type,r),b=y.isItemsMixed,v=y.newConnectWith,_=y.newChildSlug;setTimeout((function(){(0,A.default)(r,(0,g.default)(t.dragOptions,{isColumn:!0,force:!0,disabled:n,isItemsMixed:b,newConnectWith:v,newChildSlug:_}))}),this.sortableTimeout)}}this.applyDropEffect(),n||(0,B.is)("column",this)||D.default.isMultiItemUpdateNeeded(this.props.address)&&setTimeout((function(){return k.default.multiSelectShouldItemUpdateData(t.props.address,t)}),0)}},{key:"componentWillUnmount",value:function(){B.default.topWindow().cancelAnimationFrame(this.requestAnimationFrameID),this.isComponentMounted=!1}},{key:"applyDropEffect",value:function(){if(!this.props.isFilterActive){var t=D.default.getDragDestination(),n=D.default.getDragId();if(t===this.props.address&&this.dragId<n){var r=e(this.layerRef.current),o=D.default.getAppPreference("builder_animation");r.hide().slideDown({duration:o?900:0,start:function(){r.css({opacity:0})},progress:function(e,t){r.css({opacity:t})},done:function(){r.css({opacity:"",display:"",height:""})}}),this.dragId=n,setTimeout((function(){return k.default.setDragDestination(null)}),0)}}}},{key:"callbackLabelEditing",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n!==this.state.isLabelEditable&&(this.setState({isLabelEditable:n}),e(t.target).closest(".et-fb-layers-view--label").toggleClass("et-fb-editable-label",n))}},{key:"isAllowedAction",value:function(e){var t=(0,h.default)(this,"props"),n=(0,h.default)(t,"attrs.global_module"),r=(0,h.default)(t,"globalParent",!1),o=(0,W.isOn)((0,h.default)(t,"attrs.locked")),a=(0,h.default)(t,"lockedParent",!1),i=(0,h.default)(t,"type"),l=(0,B.getComponentType)(t),u=function(){return!(!D.default.isAllowedAction("add_module")||!(0,V.isInteractable)(o,a,r)||!(0,V.canAddSiblings)(a,r,l))},s=D.default.isEditingLibraryItem("row");switch(e){case"add_module":if(!u())return!1;break;case"edit_module":if(!D.default.isAllowedAction("edit_module")||!(0,V.isEditable)(o,a,n,r,i))return!1;break;case"new_column":if(!(0,B.is)("column",this)||!u()||s||(0,h.default)(this,"props.isColumnSingle",!1)||(0,h.default)(this,"props.columnCount",0)>=(0,h.default)(this,"props.columnLimit",3))return!1;break;case"delete_column":if(!(0,B.is)("column",this)||!u()||s||(0,h.default)(this,"props.columnCount",0)<2)return!1;break;default:return!1}return!0}},{key:"isLayerExpanded",value:function(){var e=this.props;return e.isLayerExpanded||(0,h.default)(e,"isColumnSpecialty")||(0,U.isLibraryParent)(e)}},{key:"isFilterResult",value:function(){var e=this.props,t=e.isFilterActive,n=e.isFilterResult;return t&&n}},{key:"isFilterResultParent",value:function(){var e=this.props,t=e.isFilterActive,n=e.isFilterResult;return t&&!n}},{key:"isHovered",value:function(){return this.state.hovered}},{key:"isLayerSelected",value:function(){return this.props.isLayerSelected&&!this.isFilterResultParent()}},{key:"getWooModuleInactiveNotice",value:function(){var e=this.module.props;return!!L.default.isInactiveWooModule(e)&&E.default.getCurrentPage(["woocommerce","inactive_module_notice"],"")}},{key:"handleAddButton",value:function(e){(0,U.handleAddLayerButton)(e,this,this.handleAddButton,{scrollTimeout:this.scrollTimeout})}},{key:"handleLayerClick",value:function(e){if("pointer"!==D.default.getQuickActionsContext()){if(D.default.abIsMode("selecting",this.props.themeBuilderArea))return e.stopPropagation(),!(0,B.is)("removed",this.module)&&void((0,B.is)("column",this)||this.isFilterResultParent()||(0,U.isLayerLocked)(this)||this._ABTestingSet(this.module));var t={props:(0,U.prepareProps)(this.module.props,{skipLayer:(0,B.is)("column",this)})};x.default.shouldItemSelected(e,this.props.address,t)?e.stopPropagation():(this.isFilterResultParent()||(0,U.isLayerLocked)(this)||k.default.setActiveLayer(this.module),(0,U.scrollToLayerOnBuilder)(this))}}},{key:"handleLayerDoubleClick",value:function(e){var t=this;"pointer"!==D.default.getQuickActionsContext()&&(this.isFilterResultParent()||(0,h.default)(this,"props.isColumnSingle")||D.default.abIsMode("selecting",this.props.themeBuilderArea)||(e.preventDefault(),x.default.isItemSelection(e)||this.isAllowedAction("edit_module")&&!(0,B.is)("removed",this.module)&&(clearTimeout(o),o=setTimeout((function(){return k.default.openModuleSettings(t.module)}),850))))}},{key:"handleLayerRightClick",value:function(t){D.default.abIsMode("selecting",this.props.themeBuilderArea)||this.isFilterResultParent()||(0,h.default)(this,"props.isColumnSingle")||((0,U.forceSettingsClose)(this),D.default.setIsContextMenuActive(!0),D.default.setContextMenuModule(this.module),k.default.setActiveLayer(this.module),k.default.setHoveredModuleElement(this.module),e(t.target).closest(".lv-context-button").length>0&&j.default.getContextMenuCallback()(t))}},{key:"handleLayerSettingsClick",value:function(e){var t=(0,h.default)(e,"props.editingModule"),n=(0,h.default)(e,"props.additionalAttrs");D.default.isSettingsModalOpen()?((0,U.scrollToLayerOnBuilder)(t),k.default.buttonClick(e,t,void 0,n)):(0,U.scrollToLayerOnBuilder)(t,(function(){k.default.buttonClick(e,t,void 0,n)})),k.default.setActiveLayer(t)}},{key:"handleLayerToggle",value:function(e){k.default.toggleLayers(this.props.address,!this.isLayerExpanded())}},{key:"handleLayerToggleAll",value:function(e){var t=j.default.getLayerChildren(this);k.default.toggleLayers(t,this.isLayerExpanded())}},{key:"renderActionButtons",value:function(){if(this.isFilterResultParent()||(0,h.default)(this,"props.isColumnSingle"))return!1;var e,t=this.module.props,n=B.default.condition("is_rtl")&&!B.default.condition("is_no_rtl"),r=(0,B.is)("column",t)?(0,h.default)(ETBuilderBackend,"i18n.modals.layersView.column"):(0,h.default)(ETBuilderBackend,"i18n.tooltip.".concat((0,B.getComponentType)(t),".tab")),o=!D.default.abIsMode("off",t.themeBuilderArea),a=o&&D.default.abIsSubject(t),i=o&&D.default.abIsGoal(t),l=D.default.isMultiItemSelected(t.address),d=D.default.isMultiSelectSingleItem(),y=!l||l&&d,_=[],E={buttonName:P.default.LAYERS_VIEW_CONTEXT_MENU_BUTTON,className:"lv-context-button et-fb-button--right-menu",needEvent:!0,icon:"overflow",iconStyles:{height:28,width:15,minWidth:15,margin:n?"0 0 0 6px":"0 6px 0 0"},viewBox:"0 0 15 28",__onClick:this.handleLayerRightClick};if((0,U.isLayerLocked)(t))(0,U.isLockedParent)(t)?(_.push({buttonName:P.default.TAB_BUTTON_MODULE_UNLOCK,editingModule:this.module,className:"lv-button-place-holder",needEvent:!1,icon:"lock",tagName:"div"}),(0,B.is)("removed",t)||_.push(E)):(_.push({buttonName:!1,className:"lv-button-place-holder",needEvent:!1,icon:"lock",tagName:"div"}),_.push((0,g.default)({},E,{buttonName:!1,className:"lv-button-place-holder",icon:"blank",tagName:"div"})));else if(y){if(this.isAllowedAction("edit_module")&&!L.default.isInactiveWooModule(t)&&!(0,B.is)("removed",t)){var T=(0,B.is)("column",t)?P.default.MODULE_ITEM_EDIT:P.default.TAB_BUTTON_MODULE_EDIT;_.push({buttonName:T,editingModule:this.module,icon:"setting",tooltip:r.settings,additionalAttrs:{isColumnLayer:(0,B.is)("column",t)},_onClick:this.handleLayerSettingsClick})}!this.isAllowedAction("add_module")||L.default.isInactiveWooModule(t)||(0,B.is)("column",t)||(0,B.is)("removed",t)||i&&!a||_.push({buttonName:P.default.TAB_BUTTON_MODULE_COPY,className:"et_fb_duplicate_module_handler",editingModule:this.module,icon:"copy",tooltip:r.duplicate}),(a||i)&&_.push({buttonName:P.default.AB_VIEW_REPORT,iconUrl:"".concat(ETBuilderBackend.images_uri,"/stats.svg"),_onClick:k.default.abViewReport}),!this.isAllowedAction("add_module")||i||a&&!D.default.abHasAdditionalSubject()||(0,B.is)("column",t)||_.push({buttonName:P.default.TAB_BUTTON_MODULE_DELETE,editingModule:this.module,icon:"delete",tooltip:r.delete}),this.isAllowedAction("new_column")&&_.push({buttonName:P.default.MODULE_ITEM_COPY,className:"et_fb_duplicate_module_handler",editingModule:this.module,icon:"copy",tooltip:r.duplicate,additionalAttrs:{isColumnLayer:!0}}),this.isAllowedAction("delete_column")&&_.push({buttonName:P.default.MODULE_ITEM_DELETE,editingModule:this.module,icon:"delete",tooltip:r.delete,additionalAttrs:{isColumnLayer:!0}}),(0,B.is)("removed",t)||_.push(E)}else this.isAllowedAction("edit_module")&&_.push({buttonName:P.default.TAB_BUTTON_MODULE_EDIT,editingModule:this.module,icon:"setting",tooltip:r.settings}),this.isAllowedAction("add_module")&&!(i||a&&!D.default.abHasAdditionalSubject())&&_.push({buttonName:P.default.TAB_BUTTON_ITEMS_DELETE,editingModule:this.module,icon:"delete",tooltip:r.delete}),_.push(E);switch(!0){case(0,U.isLayerLocked)(t):case this.isLayerSelected():e={color:O.default.white,opacity:1};break;case this.isHovered()&&!this.isLayerSelected():e={color:O.default.shuttleGrey,opacity:1};break;default:e={color:O.default.shuttleGrey,opacity:.6}}var j=D.default.getAppPreference("builder_animation"),x=300,N=(0,w.default)({"et-fb-layers-view--actions":!0});return b.default.createElement("div",{className:"et-fb-layers-view--actions-group"},!!a&&b.default.createElement("div",{className:"et-fb-layers-view__subject-wrapper"},b.default.createElement("div",{className:"et-fb-layers-view__subject-id"},(0,h.default)(t,"attrs.ab_subject_id"))),b.default.createElement(v.Motion,{defaultStyle:{opacity:0,size:.8},style:{opacity:j?(0,v.spring)(e.opacity,{stiffness:x,damping:20}):e.opacity,size:j?(0,v.spring)(1,{stiffness:x,damping:20}):1}},(function(n){return b.default.createElement(C.default,{className:N,style:{opacity:n.opacity,transform:"scale( ".concat(n.size," )")}},b.default.createElement(v.StaggeredMotion,{defaultStyles:(0,u.default)(_,(function(){return{opacity:e.opacity}})),styles:function(t){return t.map((function(n,r){return 0===r?{opacity:j?(0,v.spring)(e.opacity,{stiffness:x,damping:20}):e.opacity}:{opacity:j?(0,v.spring)(t[r-1].opacity,{stiffness:x,damping:20}):e.opacity}}))}},(function(n){return b.default.createElement(C.default,null,_.map((function(r,o){var a={};(0,m.default)(["_onClick","__onClick","tagName","className","additionalAttrs"],(function(e){(0,f.default)(r[e])&&!(0,c.default)(r[e])||(a[e]=r[e])}));var i=(0,f.default)(r.iconStyles)?{margin:0}:r.iconStyles;return b.default.createElement(S.default,K({key:"lv-action-button-".concat(t.address,"-").concat(o),buttonName:r.buttonName,editingModule:r.editingModule,needEvent:r.needEvent,tooltip:r.tooltip,ink:(0,p.default)(r,"iconUrl"),stopPropagation:!0},a),(0,p.default)(r,"iconUrl")?b.default.createElement("object",{type:"image/svg+xml",className:"fitvidsignore",data:"".concat(ETBuilderBackend.images_uri,"/stats.svg"),width:"28",height:"16"}):b.default.createElement(M.default,{color:e.color,icon:r.icon,size:"14",style:(0,g.default)({opacity:(0,s.default)(n[o])?e.opacity:n[o].opacity,transform:"scale(".concat((0,s.default)(n[o])?e.top:n[o].top,")")},i),viewBox:r.viewBox}))})))})))})))}},{key:"renderAddButton",value:function(){var e=this,t=this.props.isFilterActive,n=(0,B.getComponentType)(this),r=(0,w.default)({"et-fb-layers-view--add":!0});if(t||!this.isAllowedAction("add_module")||"column"===n&&!this.isAllowedAction("new_column")||D.default.abIsMode("selecting",this.props.themeBuilderArea))return b.default.createElement("div",{className:r});var o="column"===n?"row":n,a=(0,h.default)(ETBuilderBackend,"i18n.tooltip.".concat(o)),i=D.default.getAppPreference("builder_animation"),l=this.isHovered()?1:0,u=this.isHovered()?1:.5,s={buttonName:P.default.TAB_BUTTON_MODULE_ADD,editingModule:this.module,tooltip:a.addButton,ink:!1,block:!0,stopPropagation:!0,_onClick:this.handleAddButton};return"column"===n&&(s=(0,g.default)(s,{buttonName:P.default.MODULE_ITEM_ADD_COLUMN,tooltip:a.addColumnButton,additionalAttrs:{isColumnLayer:!0,columnIndex:this.props.index+1}})),b.default.createElement("div",{className:r,onMouseEnter:this.handleLayerMouseEnter,onMouseLeave:this.handleLayerMouseLeave},b.default.createElement(v.Motion,{defaultStyle:{opacity:0,size:.5},style:{opacity:i?(0,v.spring)(l,{stiffness:300,damping:20}):l,size:i?(0,v.spring)(u,{stiffness:300,damping:20}):u}},(function(t){return b.default.createElement(S.default,K({},s,{style:{opacity:t.opacity,transform:"scale( ".concat(t.size," )")}}),b.default.createElement(M.default,{color:(0,U.getColorCode)(e),icon:"add",size:"14",style:{margin:0}}))})))}},{key:"renderToggle",value:function(){var e=this.props.isFilterActive,t=(0,w.default)({"et-fb-button-group":!0,"et-fb-layers-view--toggle":!0,"et-fb-layers-view--toggle-expanded":this.isLayerExpanded()});if((0,B.is)("module",this.props)||e)return b.default.createElement("div",{className:t});var n=B.default.condition("is_rtl")&&!B.default.condition("is_no_rtl")?"caret-left":"caret-right",r={margin:0,opacity:.5};return b.default.createElement("div",{className:t},b.default.createElement(I.default,{singleClick:this.handleLayerToggle,doubleClick:this.handleLayerToggleAll},b.default.createElement("button",{className:"et-fb-button et-fb-button--block"},b.default.createElement(M.default,{color:O.default.inactiveGrey,icon:"caret-down",size:"14",style:r}),b.default.createElement(M.default,{color:O.default.inactiveGrey,icon:n,size:"14",style:r}))))}},{key:"startRender",value:function(){this.props.isDelayRender&&this.setState({isRenderItem:!0})}},{key:"renderLabel",value:function(){var e=this.module.props,t=e.attrs,n=(0,h.default)(e,"label")?(0,h.default)(e,"label"):(0,U.getLayerName)(e),r=(0,h.default)(t,"admin_label")?(0,h.default)(t,"admin_label"):n,o=!D.default.abIsMode("off",e.themeBuilderArea)&&D.default.abIsSubject(e),a=!1,i=this.getWooModuleInactiveNotice();if(o){var l=D.default.abGetSubjectRank(e,"percentage");a=!!(0,W.hasValue)(l)&&" (".concat(D.default.abGetSubjectRank(e,"percentage"),")")}return!this.isAllowedAction("edit_module")||this.isFilterResultParent()||(0,U.isLayerLocked)(e)||(0,B.is)("removed",e)?b.default.createElement(I.default,{singleClick:this.handleLayerClick,doubleClick:this.handleLayerDoubleClick},b.default.createElement("div",{className:"et-fb-layers-view--label"},b.default.createElement("span",{className:"lv-placeholder"},r),!!a&&b.default.createElement("span",{className:"et-fb-layers-view--percentage"},a))):b.default.createElement(I.default,{singleClick:this.handleLayerClick,doubleClick:this.handleLayerDoubleClick},b.default.createElement("div",{className:"et-fb-layers-view--label"},b.default.createElement(N.default,{defaultText:n,text:r,tagName:"span",module:this.module,allModuleProps:e,name:"admin_label",callbackEditingStatusChange:this.callbackLabelEditing}),!!i&&b.default.createElement("span",{className:"et-fb-layers-view--inactive-notice"},i),!!a&&b.default.createElement("span",{className:"et-fb-layers-view--percentage"},a)))}},{key:"render",value:function(){var e;if((0,h.default)(this.props.attrs,"_deleted")||!this.props.isLayerVisible)return null;this.module={props:(0,U.prepareProps)(this.props,D.default.getComponentAtAddress(this.props.address))};var t=this.module.props,n=t.attrs;if(D.default.getAppPreference("hide_disabled_modules")&&(0,B.is)("disabled",t))return null;var r,o=D.default.getActiveProductTourElement(),a=!D.default.abIsMode("off",t.themeBuilderArea),i=a&&D.default.abIsSubject(t),l=a&&D.default.abIsGoal(t),u=D.default.isAllowedAction("move_module")&&!((0,U.isLayerLocked)(t)||t.isColumnSingle),s=x.default.shouldMultiItemMixed(t.address,t.type).isItemsMixed;switch(!0){case this.isLayerSelected()||(0,U.isLayerLocked)(t):r={color:O.default.white,backgroundColor:(0,U.getColorCode)(t)};break;case!this.isLayerSelected()&&this.isHovered():r={color:(0,U.getColorCode)(t),backgroundColor:O.default.layerBackground};break;default:r={color:(0,U.getColorCode)(t),backgroundColor:(0,R.default)(O.default.layerBackground,.6)}}var c=(ee(e={"et-fb-layers-view--layer":!0,"et-fb-layers-view--has-no-child":!this.props.hasChildren,"et-fb-layers-view--expanded":this.isLayerExpanded(),"et-fb-layers-view--hidden":!t.isLayerVisible,"et-fb-layers-view--disabled":(0,B.is)("disabled",t),"et-fb-layers-view--filter-parent":this.isFilterResultParent(),"et-fb-layers-view--filter-result":this.isFilterResult(),"et-fb-layers-view--library-parent":(0,U.isLibraryParent)(t),"et-fb-layers-view--library-item":(0,U.isLibraryItem)(t),"et-fb-layers-view--ab":i,"et-fb-layers-view--ab-goal":l,"et-fb-locked":(0,U.isLayerLocked)(t),et_pb_section:(0,B.is)("section",t),et_pb_fullwidth_section:(0,B.is)("fullwidth",t),et_section_regular:(0,B.is)("regular",t),et_section_specialty:(0,B.is)("specialty",t),et_pb_row:(0,B.is)("row",t),et_pb_row_inner:(0,B.is)("row-inner",t),et_pb_column:(0,B.is)("column",t),et_pb_column_inner:(0,B.is)("column-inner",t)},"et_pb_column_".concat(n.type),(0,h.default)(t,"isColumnSpecialty",!1)),ee(e,"et_pb_specialty_column",(0,h.default)(t,"isColumnSpecialty",!1)),ee(e,"et_pb_column_single",(0,h.default)(t,"isColumnSingle",!1)),ee(e,"et_pb_module",(0,B.is)("module",t)),ee(e,"et_pb_parent_locked",(0,U.isLayerLocked)(t)&&!(0,U.isLockedParent)(t)),ee(e,"et_fb_global_module",(0,U.isLayerGlobal)(t)),ee(e,"et_fb_locked_module",(0,U.isLayerLocked)(t)),ee(e,"et_fb_item_selected",(0,h.default)(t,"isItemMulti",!1)),ee(e,"et_fb_uneditable_module",!this.isAllowedAction("edit_module")),ee(e,"et_fb_container_mixed",!(0,W.hasValue)(o)&&s),ee(e,"et_fb_nonexistent_module",(0,B.is)("removed",t)),e);D.default.abIsMode("off",t.themeBuilderArea)||(D.default.abIsSubject(t)&&(c=(0,g.default)(c,ee({et_pb_ab_subject:!0},"et_pb_ab_subject_id-".concat((0,h.default)(ETBuilderBackend,"currentPage.id",""),"_").concat((0,h.default)(n,"ab_subject_id","")),!0))),D.default.abIsGoal(t)&&(c=(0,g.default)(c,ee({et_pb_ab_goal:!0},"et_pb_ab_goal-".concat((0,h.default)(ETBuilderBackend,"currentPage.id","")),!0)))),i&&(c=(0,g.default)(c,ee({},"et-fb-layers-view--ab-rank-".concat(D.default.abGetSubjectRank(t,"rank")),!0)));var d={className:(0,w.default)(c),"data-address":t.address,ref:this.layerRef};(0,h.default)(n,"global_module")&&(d["data-global-module"]=n.global_module),(0,B.is)("row",t)&&(d["data-column-count"]=(0,h.default)(t,"columnCount"),d["data-column-limit"]=(0,h.default)(t,"columnLimit"));var f={className:(0,w.default)({"et-fb-layers-view--content":!0,"et-fb-layers-view--column-content-locked":(0,h.default)(t,"isColumnSingle",!1),"et-fb-layers-view--filter-parent-content":this.isFilterResultParent(),"et-fb-layers-view--hover":this.isHovered(),"et-fb-layers-view--selected":this.isLayerSelected()}),onContextMenu:this.handleLayerRightClick,onMouseEnter:this.handleLayerMouseEnter,onMouseLeave:this.handleLayerMouseLeave,style:r};return D.default.abIsMode("selecting",t.themeBuilderArea)&&(f.onClick=this.handleLayerClick),b.default.createElement(T.default,{componentName:t.type},b.default.createElement("div",d,!(0,W.hasValue)(n.specialty_columns)&&!(0,U.isLibraryParent)(t)&&b.default.createElement("div",{className:(0,w.default)({"et-fb-layers-view--header":!0,et_fb_move_module_handler:u,"ui-sortable-handle":u})},this.renderToggle(),b.default.createElement("div",K({role:"presentation"},f),this.renderLabel(),this.renderActionButtons()),this.renderAddButton()),this.props.children))}}],r&&$(n.prototype,r),l&&$(n,l),Object.defineProperty(n,"prototype",{writable:!1}),H}(b.Component);ee(ne,"propTypes",{hasChildren:_.default.bool,isFilterActive:_.default.bool,isFilterResult:_.default.bool,isFilteredLayer:_.default.bool,isLayerExpanded:_.default.bool,isLayerSelected:_.default.bool,isLayerVisible:_.default.bool,isDelayRender:_.default.bool}),ee(ne,"defaultProps",{hasChildren:!1,isFilterActive:!1,isFilterResult:!1,isFilteredLayer:!1,isLayerExpanded:!1,isLayerSelected:!1,isLayerVisible:!1,isDelayRender:!1});var re=ne;t.default=re}).call(this,n(8))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.layerPreSortableInit=t.layerDragUpdate=void 0;var r=s(n(1)),o=s(n(5)),a=s(n(11)),i=s(n(22)),l=s(n(6)),u=n(94);function s(e){return e&&e.__esModule?e:{default:e}}t.layerDragUpdate=function(t,n){var a=e(this),s=e(n.item),c=ETBuilderBackend.i18n.sortable,d=l.default.getActiveThemeBuilderArea(),f=function(){a.sortable("cancel"),n.sender&&e(n.sender).sortable("cancel");var t=a.data("dragOptions");(0,r.default)(t,"isColumn")?i.default.cancelDraggingModule(!1,!0):i.default.cancelDraggingModule()};if(!l.default.abIsMode("off",d)){if(!l.default.isAllowedAction("ab_testing"))return i.default.setAlertModal(!0,"has_no_ab_permission"),void f();var p=(0,o.default)(e(n.sender))?e(t.target):e(n.sender),h=(0,o.default)(e(n.sender))?e(t.toElement):e(t.target),m=s.hasClass("et_pb_ab_subject"),y=s.hasClass("et_pb_ab_goal"),g=s.find(".et_pb_ab_subject").length,b=s.find(".et_pb_ab_goal").length,v=p.closest(".et_pb_ab_subject").length,_=h.closest(".et_pb_ab_subject").length,w=h.closest(".et_pb_ab_goal").length;if(y&&!m&&_)return i.default.setAlertModal(!0,"cannot_move_goal_into_subject"),void f();if(b&&_)return i.default.setAlertModal(!0,"cannot_move_goal_into_subject"),void f();if(m&&!y&&w)return i.default.setAlertModal(!0,"cannot_move_subject_into_goal"),void f();if(g&&w)return i.default.setAlertModal(!0,"cannot_move_subject_into_goal"),void f();if(y&&v)return i.default.setAlertModal(!0,"cannot_move_row_goal_out_from_subject"),void f()}if(!(0,o.default)(e(n.sender))&&a.hasClass("et_pb_row")){var O=e(t.target);if(O.attr("data-column-count")>=O.attr("data-column-limit"))return alert(c.stop_dropping_3_col_row),void f()}if((0,o.default)(e(n.sender))&&a.hasClass("et_pb_row")&&!a.find(".et_pb_column, .et_pb_column_inner").length&&s.hasClass("et_pb_column"))return alert(c.onlyColumnDraggedAway),void f();if(a.hasClass("et_pb_specialty_column")){var k=s.find(".et_pb_column").length,S=s.closest(".et_pb_specialty_column").hasClass("et_pb_column_2_3");if(!S&&k>=4||S&&k>4)return alert(c.stop_dropping_3_col_row),void f()}if(s.closest(".et_pb_row.et_fb_global_module").length&&s.hasClass("et_fb_global_module"))return alert(c.global_module_alert),void f();if((s.closest(".et_pb_section.et_fb_global_module").length||s.closest(".et_pb_row.et_fb_global_module").length)&&s.hasClass("et_fb_global_module"))return alert(c.global_module_alert),void f();var C=e(n.item[0]),E=e(t.target),P=C.is(".et_fb_global_module")||C.closest(".et_fb_global_module").length>0,T=E.is(".et_fb_global_module")||E.closest(".et_fb_global_module").length>0,M=C.is(".et_fb_global_module")?C:C.closest(".et_fb_global_module"),j=E.is(".et_fb_global_module")?E:E.closest(".et_fb_global_module"),x=M.attr("data-address"),D=j.attr("data-address"),N=M.attr("data-global-module"),L=j.attr("data-global-module"),R=x!==D,A=(0,u.hasValue)(L)&&N===L;P&&T&&R&&A&&f()};t.layerPreSortableInit=function(e,t,n){if(t.isRow?(t.address=n.attr("data-address"),t.connectWith=".et-fb-layers-view--expanded.et_pb_row:not(.et_pb_parent_locked)",t.child=".et_pb_column",t.childSlug="column",t.handle="> .et_fb_move_module_handler"):t.isColumn?e.hasClass("et_pb_specialty_column")?(t.connectWith=".et-fb-layers-view--expanded.et_pb_specialty_column:not(.et_pb_parent_locked), .et-fb-layers-view--expanded.et_section_regular",t.child=".et_pb_row_inner, > .et_pb_row",t.childSlug="row-inner",t.handle="> .et_fb_move_module_handler"):(t.connectWith=".et-fb-layers-view--expanded.et_pb_column:not(.et_pb_specialty_column, .et_pb_parent_locked)",t.child=".et_pb_module",t.childSlug="module",t.handle="> .et_fb_move_module_handler"):(t.address=n.attr("data-address"),e.hasClass("et_pb_fullwidth_section")?(t.connectWith=".et-fb-layers-view--expanded.et_pb_fullwidth_section",t.child=".et_pb_module",t.childSlug="fullwidth-module",t.handle="> .et_fb_move_module_handler"):(t.connectWith=".et-fb-layers-view--expanded.et_pb_specialty_column:not(.et_pb_parent_locked), .et-fb-layers-view--expanded.et_section_regular",t.child=".et_pb_row, > .et_pb_row_inner",t.childSlug="row-inner",t.handle="> .et_fb_move_module_handler")),(0,a.default)(e.data("uiSortable"))||(e.sortable("destroy"),e.removeClass("et_fb_container_mixed")),t.isItemsMixed&&(e.addClass("et_fb_container_mixed"),t.connectWith=(0,o.default)(t.newConnectWith)?t.connectWith:t.newConnectWith,t.childSlug=(0,o.default)(t.newChildSlug)?t.childSlug:t.newChildSlug,t.isColumn?e.hasClass("et_pb_specialty_column")?(t.child=".et_pb_row_inner.et_fb_item_selected",t.handle="> .et_fb_move_module_handler"):t.child=".et_pb_module.et_fb_item_selected":e.hasClass("et_pb_fullwidth_section")?t.child=".et_pb_module.et_fb_item_selected":(t.child=".et_pb_row.et_fb_item_selected",t.handle="> .et_fb_move_module_handler")),e.is(".et_fb_global_module"))if(t.isColumn){var r=n.closest(".et_fb_global_module"),i=r.attr("data-global-module"),l=r.attr("data-address"),u=r.is(".et_pb_section")?".et_pb_section":".et_pb_row",s=t.connectWith;t.connectWith=["".concat(u,":not(.et_fb_global_module) ").concat(s),"".concat(u,'.et_fb_global_module[data-address="').concat(l,'"] ').concat(s),"".concat(u,".et_fb_global_module:not(").concat(u,'[data-global-module="').concat(i,'"][data-address!="').concat(l,'"]) ').concat(s)].join(", ")}else{var c=e.attr("data-global-module"),d=e.attr("data-address"),f=t.connectWith;t.connectWith=["".concat(f,":not(.et_fb_global_module)"),"".concat(f,'.et_fb_global_module[data-address="').concat(d,'"]'),"".concat(f,".et_fb_global_module:not(").concat(f,'[data-global-module="').concat(c,'"][data-address!="').concat(d,'"])')].join(", ")}return t}}).call(this,n(8))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=n(67),i=h(n(13)),l=h(n(3)),u=h(n(5));n(1886);var s=h(n(22)),c=(h(n(6)),h(n(63))),d=h(n(43)),f=h(n(833)),p=h(n(281));function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function b(e){var t=function(){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}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var O=ETBuilderBackend.i18n,k={className:l.default.string,currentVideo:l.default.number,currentVideoList:l.default.string,modalPosition:l.default.object,modalWidth:l.default.number,modalMoving:l.default.bool},S=function(t){!function(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&&g(e,t)}(m,t);var n,r,l,h=b(m);function m(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),(e=h.call(this)).state={videoHover:!1},e._handleVideoMouseEnter=e._handleVideoMouseEnter.bind(_(e)),e._handleVideoMouseLeave=e._handleVideoMouseLeave.bind(_(e)),e._renderUndockButton=e._renderUndockButton.bind(_(e)),e._handleAnimation=e._handleAnimation.bind(_(e)),e._handleClickItem=e._handleClickItem.bind(_(e)),e}return n=m,(r=[{key:"_handleVideoMouseEnter",value:function(){this.props.modalMoving||this.setState({videoHover:!0})}},{key:"_handleVideoMouseLeave",value:function(){this.setState({videoHover:!1})}},{key:"_handleAnimation",value:function(e,t){return this.props.animate?e:t}},{key:"_handleClickItem",value:function(t){t.preventDefault(),e(t.currentTarget).closest(".et-fb-tabs__panel--active").animate({scrollTop:0},300);var n=parseInt(t.currentTarget.getAttribute("data-index"),10);s.default.setVideo(n)}},{key:"_renderUndockButton",value:function(){var e=this.props,t=e.helpModalState,n=e.modalPosition,r=e.modalWidth,i=e.videoOverlayStatus,l=this.state.videoHover,f=(0,u.default)(t)?{width:r,position:{x:n.x,y:n.y}}:t;return o.default.createElement(a.Motion,{defaultStyle:{s:.5,o:0,x:15,y:15},style:{s:this._handleAnimation((0,a.spring)(l?1:.5,{stiffness:300,damping:20}),l?1:.5),o:this._handleAnimation((0,a.spring)(l?1:0,{stiffness:300,damping:20}),l?1:0),x:this._handleAnimation((0,a.spring)(l?15:0,{stiffness:300,damping:20}),l?15:0),y:this._handleAnimation((0,a.spring)(l?0:15,{stiffness:300,damping:20}),l?0:15)}},(function(e){return o.default.createElement(c.default,{round:!0,elevate:!0,primary:!0,small:!0,__onClick:function(){s.default.setVideoOverlay(f.width,f.position.x,f.position.y,!i)},style:{opacity:e.o,transform:"translate(".concat(e.x,"px, ").concat(e.y,"px) scale(").concat(e.s,")")}},o.default.createElement(d.default,{icon:"window-undock",color:"#FFFFFF"}))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.currentVideo,a=t.currentVideoList,l=t.modalWidth,u=t.videoOverlayStatus,s=(0,i.default)("et-fb-video-list",n);return o.default.createElement("div",{className:s},o.default.createElement("div",{className:"et-fb-video-list__container"},o.default.createElement("div",{className:"et-fb-video-list__header",onMouseEnter:this._handleVideoMouseEnter,onMouseLeave:this._handleVideoMouseLeave,style:{height:.5625*(l-60)}},o.default.createElement(p.default,null,this._renderUndockButton(),u?o.default.createElement("span",null,O.video.active):function(e,t){return navigator.onLine?o.default.createElement(f.default,{dividers:!0,style:{width:"100%",height:"100%"},videoId:O.videos[e][t].id}):o.default.createElement("span",null,O.video.offline)}(a,r))),o.default.createElement("ul",{className:"et-fb-video-list__menu"},o.default.createElement(p.default,null,Object.keys(O.videos[a]).map((function(t){return o.default.createElement("li",{className:(0,i.default)({"et-fb-video-list__item":!0,"et-fb-video-list__item--active":r===parseInt(t,10)}),key:"video-".concat(t),"data-index":t,onClick:e._handleClickItem},o.default.createElement("div",{className:"et-fb-video-list__icon"}),o.default.createElement("span",null,O.videos[a][t].name))}))))))}}])&&y(n.prototype,r),l&&y(n,l),Object.defineProperty(n,"prototype",{writable:!1}),m}(o.Component);S.propTypes=k,S.defaultProps={currentVideo:1,currentVideoList:"et_pb_default"};var C=S;t.default=C}).call(this,n(8))},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=z(n(31)),a=z(n(58)),i=z(n(85)),l=z(n(33)),u=z(n(125)),s=z(n(56)),c=z(n(40)),d=z(n(11)),f=z(n(37)),p=z(n(12)),h=z(n(42)),m=z(n(5)),y=z(n(4)),g=z(n(7)),b=z(n(34)),v=z(n(1)),_=z(n(9)),w=z(n(362)),O=z(n(10)),k=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=H(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),S=z(n(8)),C=z(n(13)),E=n(1564),P=z(n(2)),T=z(n(303)),M=z(n(1892)),j=z(n(1488)),x=z(n(816)),D=z(n(1465)),N=z(n(22)),L=z(n(825)),R=z(n(6)),A=z(n(14)),I=z(n(1566)),B=n(624),F=n(510),W=z(n(1567)),V=z(n(507)),U=n(801),G=n(93);function H(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(H=function(e){return e?n:t})(e)}function z(e){return e&&e.__esModule?e:{default:e}}function q(e){return function(e){if(Array.isArray(e))return Q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||J(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(){$=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),i=new S(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return E()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=w(i,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,i),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};u(m,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(C([])));g&&g!==t&&n.call(g,a)&&(m=g);var b=h.prototype=f.prototype=Object.create(m);function v(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(a,i,l,u){var s=c(e[a],e,i);if("throw"!==s.type){var d=s.arg,f=d.value;return f&&"object"==r(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){d.value=e,l(d)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;this._invoke=function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function C(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=h,u(b,"constructor",h),u(h,"constructor",p),p.displayName=u(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(_.prototype),u(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new _(s(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(b),u(b,l,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function Y(e,t,n,r,o,a,i){try{var l=e[a](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function X(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||J(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}function te(e){var t=function(){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}}();return function(){var n,r=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ne(this,n)}}function ne(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return re(e)}function re(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1901);var ie=ETBuilderBackend.i18n,le=function(e){!function(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&&ee(e,t)}(J,e);var t,n,r,E,H,z=te(J);function J(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,J),ae(re(t=z.call(this,e)),"state",{local_layouts:{},custom_layouts:{},account_status_error:"",account_auth_failed:!1,et_username:"",et_api_key:"",username_field_help_active:!1,api_key_field_help_active:!1,hovered_field_group:null,ajax_in_progress:!1,previewActive:!1,portabilityActive:!1,presetImportActive:!1,conversionModalActive:!1,conversionInProgress:!0,presetImportObj:{},portabilityProgressBar:!1,previewContentReady:!1,portabilityTitle:"",portabilityId:0,hideProgressBar:!1,exportFromCloud:!1,localLayoutsLoading:!1,waitingForNewItem:!1,libraryTabMounted:!1,duplicateInProgress:!1,cloudImportProgress:1,importingToCloud:!1,cloudImportError:"",currentConversion:"",bulkImportInProgress:!1,promptOptions:{importPresets:"on"}}),ae(re(t),"tabs",[{name:["library","Premade Layouts"],className:"modules_all"},{name:["library","Your Saved Layouts"],className:"modules_library"}]),ae(re(t),"loadCloudToken",(function(){var e=R.default.getCloudToken();(0,d.default)(e)||(window.ETCloudApp.setCloudToken(e),window.ETCloudApp.setSharedFolders())})),ae(re(t),"onPortabilityImportError",(function(){t.setState({cloudImportError:window.et_fb_import_layout_message})})),ae(re(t),"closeToolTip",(function(e,n){(0,t.props.closeToolTipModal)(e,n)})),ae(re(t),"_openPrompt",(function(){(0,t.props.openPrompt)()})),ae(re(t),"_hasActiveAccount",(function(){return"active"===t.account.status})),ae(re(t),"onPortabilityProgressBarChange",(function(e,n){t.setState({portabilityProgressBar:n}),n&&t.setState({cloudImportError:""})})),ae(re(t),"onBulkImportFinished",(function(e,n){var r;if("on"===(null==n||null===(r=n.data)||void 0===r?void 0:r.importToCloud)&&Array.isArray(e)){e.length;var o=e.reduce((function(e,t){var n,r,o,a,i,l;return"et_builder_layouts"!==(null==t||null===(n=t.value)||void 0===n||null===(r=n.data)||void 0===r||null===(o=r.jsonFromFile)||void 0===o?void 0:o.context)?e:e+(0,u.default)(null==t||null===(a=t.value)||void 0===a||null===(i=a.data)||void 0===i||null===(l=i.jsonFromFile)||void 0===l?void 0:l.data)}),0),a=e.every((function(e){var t,n,r;return"et_builder_layouts"!==(null===(t=e.value)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.jsonFromFile)||void 0===r?void 0:r.context)})),i=function(){t.setState({hideProgressBar:!0,waitingForNewItem:!1,localLayoutsLoading:!1,portabilityProgressBar:!1,importingToCloud:!1})};if(a)return t.setState({cloudImportError:ie.tooltips.bulkImportContextFail}),void i();t.setState({cloudImportProgress:10,importingToCloud:!0,localLayoutsLoading:!0,importError:!1}),e.map((function(e){var n,r,a,i=null!==(n=null===(r=e.value)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.jsonFromFile)&&void 0!==n?n:{};return function(){return t.bulkCloudSave(i,!1,o)}})).reduce((function(e,t){return e.then(t).catch(t)}),Promise.resolve()).then((function(){window.ETCloudApp.emitSignal({signal:"refreshCloudItems",data:{}}),setTimeout((function(){i(),t.onClosePortability()}),2e3)}))}else t.setState({waitingForNewItem:!0}),N.default.fetchLayoutsData(t.props.type)})),ae(re(t),"onBulkImportInProgress",(function(){t.setState({bulkImportInProgress:!0})})),ae(re(t),"closeExportModalAfterExport",(function(e,n){n||(t.onClosePortability(),L.default.clearTempPresets())})),ae(re(t),"setLayoutsFilter",(function(){var e=t.props.layoutFilters;if(!(0,d.default)(e)){var n=(0,y.default)(e)?e:[e];window.ETCloudApp.emitSignal({signal:"categoriesFilterChanged",data:{value:n}})}})),ae(re(t),"onFilterUpdate",(function(e,n){L.default.updateLibraryTaxonomies(n).then((function(e){t.updateFiltersLists(e)}))})),ae(re(t),"updateFiltersLists",(function(e){window.ETCloudApp.emitSignal({signal:"receiveNewFilter",data:e});var t=(0,v.default)(e,"data.localLibraryTerms",{});R.default.setLibraryTerms(t)})),ae(re(t),"exportLocalItem",(function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=t.props,a=o.type,i=o.moduleWidth;L.default.getLayout(e,"exported",a,i,r).then((function(r){if(r.page&&r.total_pages){var o={page:parseInt(r.page)+1,timestamp:r.timestamp,file:null};t.exportLocalItem(e,n,o)}else{var a=(0,v.default)(r,"exported",""),i=(0,O.default)(n,{content:a,updatedItem:e});window.ETCloudApp.emitSignal({signal:"receiveItemUpdate",data:{data:i}})}}))})),ae(re(t),"exportExistingPage",(function(e){var n=(0,v.default)(e,"clickedItem.id",""),r=(0,v.default)(e,"clickedItem.name",""),o=(0,v.default)(e,"clickedItem.type",""),a=(0,v.default)(e,"itemPayload",[]),i=(0,v.default)(a,"cloud","off");L.default.getLayout(n,"exported",o).then((function(o){var l=(0,v.default)(o,"exported",{});if("off"===i)return(0,s.default)(e,"itemPayload.itemName",r),(0,s.default)(e,"itemPayload.content",l),void t.duplicateItem(e);var u=(0,O.default)(a,{title:r,content:l,updatedItem:n});window.ETCloudApp.emitSignal({signal:"receiveItemUpdate",data:{data:u}})}))})),ae(re(t),"onItemUpdate",(function(e,n){var r=t.props,o=r.type,a=r.moduleWidth,i=(0,v.default)(n,"clickedItem.id",""),l={item_id:i,update_details:(0,v.default)(n,"itemPayload",[])},u=(0,v.default)(l,"update_details",{}),c=(0,v.default)(u,"updateType","");t.setState({hideProgressBar:!0});if((0,g.default)(["duplicate","duplicate_and_delete","split_layout","split_section","split_row"],c)&&""!==(0,v.default)(l,"update_details.content",""))t.duplicateItem(n);else{if("duplicate_premade_item"===c)return t.setState({hideProgressBar:!1}),void t.duplicateItem(n);if("save_existing_page"===c)return t.setState({hideProgressBar:!1}),void t.exportExistingPage(n);if("toggle_cloud"===c||"duplicate"===c&&"on"===(0,v.default)(l,"update_details.cloud","")||(0,g.default)(["move_to","copy_to"],c))t.exportLocalItem(i,u);else{if("toggle_fav"===c){var d=(0,v.default)(n,"clickedItem.is_favorite")?"off":"on";(0,s.default)(l,"update_details.favoriteStatus",d)}"layout"!==o&&R.default.removeLibraryModule(o,a,i),L.default.updateLibraryItem(l).then((function(e){window.ETCloudApp.emitSignal({signal:"receiveItemUpdate",data:e})}))}}})),ae(re(t),"toggleCloudStatus",(function(e,n){var r=n.id;r&&L.default.toggleLibraryItemLocation({id:r}).then((function(e){var n=(0,v.default)(e,"data.localLibraryTerms",[]);if(!(0,m.default)(n)){var r={data:{filterType:"categories",localLibraryTerms:n,newFilters:n.layout_category}};t.updateFiltersLists(r);var o={data:{filterType:"tags",localLibraryTerms:n,newFilters:n.layout_tag}};t.updateFiltersLists(o)}}))})),ae(re(t),"onCloudItemAction",(function(e,n){var r=(0,v.default)(n,"content");switch(n.action){case"edit":t.onEditLayout(n.item,r,n.userCloudId);break;case"preview":t.onPreviewLayout(n.item,r);break;case"export":t.onExportLayout(n.item,r);break;case"split_layout":case"split_section":case"split_row":t.onSplitItem(n);break;case"convert_row_to_section":case"convert_module_to_row":case"convert_module_to_section":t.onConvertRowToSection(n);break;default:console.log("Action called!"),console.log(n)}})),ae(re(t),"onAccountStatusError",(function(e,n){var r=n,o="";(0,p.default)(n)&&(r=(0,v.default)(n,"status","not_found"),o=(0,v.default)(n,"sequence","")),t.setState({account_status_error:r,hideProgressBar:!0,onAuthenticationCompleteTriggerSequence:o}),t.props.pageChanged(!0),t.account={et_username:t.state.et_username,et_api_key:t.state.et_api_key,status:r},t.state.et_username&&t.state.et_api_key&&N.default.updateETAccount(t.account)})),ae(re(t),"onAuthenticationComplete",(function(){if(t.state.account_status_error)if(t.setState({ajax_in_progress:!1}),t.state.et_username&&t.state.et_api_key){t.account={et_username:t.state.et_username,et_api_key:t.state.et_api_key,status:"active"};var e=(0,v.default)(t.state,"onAuthenticationCompleteTriggerSequence","");if(t.setState({account_status_error:""}),t.setState({onAuthenticationCompleteTriggerSequence:""}),N.default.updateETAccount(t.account),""!==e){var n={apiKey:t.state.et_username,username:t.state.et_api_key};window.ETCloudApp.emitSignal({signal:e,data:{data:n}})}else window.ETCloudApp.retryUseLayout(t.account)}else t.setState({account_auth_failed:!0})})),ae(re(t),"onChangeAccountFields",(function(e,n){n!==t.state[e]&&t.setState(ae({},e,n))})),ae(re(t),"onClickAccountSubmit",(function(){t.setState({ajax_in_progress:!0}),t.onAuthenticationComplete()})),ae(re(t),"onClickHelpButton",(function(){N.default.setVideoList("et_pb_default_layouts",1,"library")})),ae(re(t),"onDismissedAccountStatusError",(function(){return t.setState({account_status_error:""})})),ae(re(t),"onDownloadProgress",(function(e,n){t.setState({hideProgressBar:!1}),(n=Math.floor(n/2))<1&&(n=1),t.props._onChange("importProgress",n)})),ae(re(t),"onLayoutsDataFetched",(function(e,n,r){t.props.type===r&&(t.setState({local_layouts:e,custom_layouts:n},(function(){t.props.doneLoading(),t.setState({localLayoutsLoading:!1})})),("layout"!==r||t.state.waitingForNewItem)&&("modules_all"!==t.props.active_tab&&window.ETCloudApp.toggleTab({items:e,tab:t.props.active_tab,forceUpdateLocal:!0}),t.state.waitingForNewItem&&(t.onClosePortability(),t.setState({waitingForNewItem:!1}))),t.setLayoutsFilter())})),ae(re(t),"onPageChanged",(function(e,n,r){t.props.pageChanged(!n,r)})),ae(re(t),"onUseLayout",(function(e,n){var r=t.props,o=(r._onChange,r.type),a=(r.importLayout,r.moduleWidth);if(t.setState({hideProgressBar:!1}),R.default.isProductTourActive()&&(0,S.default)("body").trigger("et_fb_product_tour_element_clicked"),(0,p.default)(n))var i=n.item,l=n.replace_content;else i=n;if((0,f.default)(i)){var u=JSON.parse(i),s=!(0,m.default)(u.presets);if(t.setState({presetImportObj:{item:i,replaceLayout:l}}),s)return void t.setState({presetImportActive:!0});t.importLayoutForUse()}else N.default.reImportGlobalColors(),l="on"===l,L.default.getLayout(i,"processed",o,a).then((function(e){var n="layout"===o,r=n?e:(0,v.default)(e,["savedShortcode",0],{});if(!n&&"global"===(0,v.default)(e,"is_global")){var a=(0,v.default)(e,"ID");r=t.prepareGlobalModule(r,a)}N.default.insertSavedModule(r,n,l),N.default.cancelTooltip()}))})),ae(re(t),"prepareGlobalModule",(function(e,n,r){return n?(r?(0,s.default)(e,"attrs.global_parent",n):(0,s.default)(e,"attrs.global_module",n),!(0,m.default)(e.content)&&(0,y.default)(e.content)&&(0,_.default)(e.content,(function(e){t.prepareGlobalModule(e,n,!0)})),e):e})),ae(re(t),"onExportLayout",(function(e,n){var r=(0,l.default)((0,v.default)(e,"id",0));if(0!==r||n){var o=t.props,a=o.type,i=o.moduleWidth,u=o.importLayout,s=o._onChange,c=function(r){R.default.addTogglePortabilityProgressBarListener(t.closeExportModalAfterExport),t.setState({portabilityActive:!0,portabilityId:r,portabilityTitle:e.name,portabilityProgressBar:!1,exportFromCloud:!!n})};if(n){var d=new x.default([JSON.stringify(n)],"layout.json",{type:"application/json"});s({importFile:d,importOptions:{replaceLayout:!1},cloudOptions:{moduleType:a,returnUnprocessedData:!0,useTempPresets:!0,callback:function(t){return L.default.saveTempDraft(e.name,t,a,i,"publish",e.row_layout,e.subtype).then((function(e){s({importProgress:100}),window.ETCloudApp.emitSignal({signal:"finishDownload",data:{}}),c(e)}))}}}),u()}else c(r)}})),ae(re(t),"onEditLayout",(function(e,n,r){var o=(0,l.default)((0,v.default)(e,"id",0));if(0!==o||n){var a=t.props,i=a.type,u=a.moduleWidth,s=a.importLayout,c=a._onChange;if(n){var d=new x.default([JSON.stringify(n)],"layout.json",{type:"application/json"}),f=window.open("about:blank","_blank");f.document.body.innerHTML='<style>.et-fb-loader-wrapper {position: absolute;top: 50%;left: 50%;background: #fff;width: 100px;height: 100px;border-radius: 100px;margin: -50px auto auto -50px;animation: et-fb-loader-wrapper ease infinite 1.5s;} .et-fb-loader,.et-fb-page-preloading:before {content: \'\';position: absolute;top: 50%;left: 50%;width: 12px;height: 12px;border-radius: 12px;box-shadow: 0 -17px #7E3BD0, 17px 0 #7E3BD0, 0 17px #7E3BD0, -17px 0 #7E3BD0;margin: -6px auto auto -6px;animation: et-fb-loader ease infinite 3s;}@keyframes et-fb-loader {0% {box-shadow: 0 -17px #7E3BD0, 17px 0 #29C4A9, 0 17px #7E3BD0, -17px 0 #29C4A9;}25% {box-shadow: 17px 0 #2B87DA, 0 17px #29C4A9, -17px 0 #2B87DA, 0 -17px #29C4A9;}50% {box-shadow: 0 17px #2B87DA, -17px 0 #FF9232, 0 -17px #2B87DA, 17px 0 #FF9232;}75% {box-shadow: -17px 0 #7E3BD0, 0 -17px #FF9232, 17px 0 #7E3BD0, 0 17px #FF9232;}100% {box-shadow: 0 -17px #7E3BD0, 17px 0 #29C4A9, 0 17px #7E3BD0, -17px 0 #29C4A9;}}@keyframes et-fb-loader-wrapper {0%,100% {width: 100px;height: 100px;margin: -50px auto auto -50px;}50% {width: 70px;height: 70px;margin: -35px auto auto -35px;}}</style><div class="et-fb-loader-wrapper"><div class="et-fb-loader" /></div>',c({importFile:d,importOptions:{replaceLayout:!1},cloudOptions:{moduleType:i,returnUnprocessedData:!0,useTempPresets:!0,callback:function(t){return L.default.saveTempDraft(e.name,t,i,u).then((function(e){c({importProgress:100}),window.ETCloudApp.emitSignal({signal:"finishDownload",data:{}}),f.closed?L.default.clearTempDrafts(e):f.location.href="".concat(ETBuilderBackend.site_url,"/?post_type=et_pb_layout&p=").concat(e,"&et_fb=1&PageSpeed=off&cloudItem=").concat(o,"&userCloudId=").concat(r)}))}}}),s()}else"layout"!==i&&R.default.removeLibraryModule(i,u,o),window.open("".concat(ETBuilderBackend.site_url,"/?post_type=et_pb_layout&p=").concat(o,"&et_fb=1&PageSpeed=off"))}})),ae(re(t),"onPreviewLayout",(function(e,n){var r=(0,v.default)(e,"id"),o=t.props,a=o.type,i=o.moduleWidth,l=o.importLayout,u=o._onChange;if(r){var s=(0,v.default)(e,"name",r);t.setState({previewContentReady:!1,previewTitle:s});var c=function(e){switch(a){case"module":e="fullwidth"===i?'[et_pb_section fullwidth="on"]'.concat(e,"[/et_pb_section]"):'[et_pb_section][et_pb_row][et_pb_column type="4_4"]'.concat(e,"[/et_pb_column][/et_pb_row][/et_pb_section]");break;case"row":e="[et_pb_section]".concat(e,"[/et_pb_section]")}u({importProgress:100}),window.ETCloudApp.emitSignal({signal:"finishDownload",data:{}}),t.setState({previewActive:!0,previewContentReady:!0}),P.default.$topWindow("body").addClass("et-cloud-preview-active"),P.default.parseShortcode(e,(function(e){}),99999,P.default.$topWindow(".et_pb_library_preview .et-fb-main-settings"))};if(n){var d=new x.default([JSON.stringify(n)],"layout.json",{type:"application/json"});u({importFile:d,importOptions:{replaceLayout:!1,moduleType:a},cloudOptions:{returnUnprocessedData:!0,useTempPresets:!0,callback:c}}),l()}else L.default.getLayout(r,"raw",a).then((function(e){var t=(0,v.default)(e,"shortcode","");c(t)}))}})),ae(re(t),"onSplitItem",(function(e){var n=e.action,r=e.content,o=e.isCloudItem,a={clickedItem:e.item,isCloudItem:o,itemPayload:{content:r,updateType:n}};setTimeout((function(){t.props._onChange({importProgress:100}),window.ETCloudApp.emitSignal({signal:"finishDownload",data:{}}),window.ETCloudApp.emitSignal({signal:"updateItem",data:a})}),999)})),ae(re(t),"onConvertRowToSection",(function(e){var n=e.action,r=e.content,o=e.item;t.setState({conversionModalActive:!0,currentConversion:n}),L.default.convertLibraryItem(e).then((function(e){if(e.success){var a,i;switch(n){case"convert_row_to_section":a="row",i="section";break;case"convert_module_to_row":a="module",i="row";break;case"convert_module_to_section":a="module",i="section"}if(!r)return t.refreshByType(a),t.refreshByType(i),void setTimeout((function(){return t.setState({conversionInProgress:!1})}),1e3);t.setState({hideProgressBar:!0}),window.ETCloudApp.emitSignal({signal:"finishDownload",data:{}});var l=R.default.getCloudToken();r.data[1]=e.data;var u={title:o.name,content:JSON.stringify(r),categories:o.category_ids,tags:o.tag_ids,width:o.width,status:"publish",meta:{}};o.subtype&&(u.meta={_et_pb_module_type:o.subtype}),o.row_layout&&(u.meta._et_pb_row_layout=o.row_layout),o.is_favorite&&(u.meta["et-api-cloud-favorite"]=o.is_favorite);(0,U.saveToCloudWithToken)(l,i,u,{},(function(e){e&&(0,U.doApiRequest)({type:"delete",resource:a,resourceId:o.id,accessToken:l},{force:!0}).then((function(){t.refreshByType(a),t.refreshByType(i),t.setState({conversionInProgress:!1})}))}))}else t.onCloseConversionModal()}))})),ae(re(t),"duplicateItem",(function(e){var n=t.props,r=n.type,o=n.moduleWidth,a=n.importLayout,i=n._onChange,l=n.active_tab,u=(0,v.default)(e,"clickedItem.name",""),c=(0,v.default)(e,"itemPayload.content"),d=(0,v.default)(e,"itemPayload.updateType",""),f=(0,v.default)(e,"itemPayload.layoutType","");if(c)if(t.state.duplicateInProgress)setTimeout((function(){t.duplicateItem(e)}),1e3);else{t.setState({duplicateInProgress:!0});i({importFile:new x.default([JSON.stringify(c)],"layout.json",{type:"application/json"}),importOptions:{replaceLayout:!1,moduleType:r},cloudOptions:{returnUnprocessedData:!0,callback:function(n){if(t.mounted){var a={item_id:(0,v.default)(e,"clickedItem.id",""),update_details:(0,v.default)(e,"itemPayload",[])};a.update_details.shortcode=n,a.update_details.moduleWidth=o,a.update_details.layoutType=f||r;var i=function(){t.setState({localLayoutsLoading:!0}),B.ETCloudCache.addData([r,"modules_library","localItemsCached"],!1,!0),N.default.fetchLayoutsData(r)};"save_existing_page"===d&&t.props._onChange("importProgress",90),L.default.updateLibraryItem(a).then((function(n){t.mounted&&(t.refreshByType(d),(0,s.default)(n,"data.title",u),""!==(0,v.default)(e,"clickedItem.thumbnail","")?L.default.uploadLibraryFeaturedImage(n.data.newItem,(0,v.default)(e,"clickedItem.thumbnail","")).then((function(){"modules_all"===l&&i()})):"modules_all"===l&&i(),t.setState({duplicateInProgress:!1}),window.ETCloudApp.emitSignal({signal:"receiveItemUpdate",data:n}))}))}}}}),a()}})),ae(re(t),"onClosePreview",(function(){t.setState({previewActive:!1}),P.default.$topWindow("body").removeClass("et-cloud-preview-active"),L.default.clearTempPresets()})),ae(re(t),"onCancelPromptImport",(function(){t.onClosePresetImport(),t.setState({hideProgressBar:!0}),window.ETCloudApp.emitSignal({signal:"finishDownload",data:{}})})),ae(re(t),"onClosePresetImport",(function(){t.setState({presetImportActive:!1})})),ae(re(t),"onCloseConversionModal",(function(){t.setState({conversionModalActive:!1,conversionInProgress:!1,currentConversion:""})})),ae(re(t),"onClosePortability",(function(){var e=t.props,n=e.importItemsOpened,r=e._onChange,o=e.closeLibraryPortability;if(!t.state.importingToCloud){if(t.setState({portabilityActive:!1,portabilityProgressBar:!1,cloudImportProgress:1,cloudImportError:[],bulkImportInProgress:!1}),n)return r({importError:"",importProgress:100}),void o();if(R.default.revertExportProgressStatus(),t.state.exportFromCloud){var a={update_details:{updateType:"delete_permanently"},item_id:t.state.portabilityId};L.default.updateLibraryItem(a)}R.default.removeTogglePortabilityProgressBarListener(t.closeExportModalAfterExport)}})),ae(re(t),"onPromptImport",(function(){t.onClosePresetImport(),t.importLayoutForUse(t.state.promptOptions.importPresets)})),ae(re(t),"importLayoutForUse",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"off",n=t.props,r=n._onChange,o=n.type,a=n.importLayout,i=t.state.presetImportObj,l=i.item,u=i.replaceLayout;l=new x.default([l],"layout.json",{type:"application/json"});var s=function(){"layout"!==o&&(r({importProgress:99}),N.default.reImportGlobalColors(),setTimeout((function(){return N.default.cancelTooltip()}),1e3))};r({importFile:l,importOptions:{replaceLayout:u,includeGlobalPresets:e},cloudOptions:{moduleType:o,returnUnprocessedData:!1,callback:s}}),setTimeout(a,100)})),ae(re(t),"renderPreview",(function(){if(!t.state.previewActive)return!1;var e=P.default.$topWindow("body");return k.default.createElement(D.default,{active:!0,actionType:"custom_content",tooltipTitle:t.state.previewTitle,_closeFunction:t.onClosePreview,classNames:{et_pb_library_preview:!0},ignorePosition:!0,enableContextMenu:!0,movable:!1,tooltipModalContainer:e},k.default.createElement(T.default,{isLoading:!t.state.previewContentReady}))})),ae(re(t),"renderPortability",(function(){var e=t.state,n=e.portabilityActive,r=e.portabilityTitle,o=e.portabilityProgressBar,a=e.portabilityId,i=t.props,l=i.importItemsOpened,u=i.type;if(!n&&!l)return!1;var s="Import ".concat((0,w.default)(u)),d=l?s:"Export ".concat((0,w.default)(u)),f=P.default.$topWindow("body"),p={et_pb_library_portability:!0,"et-fb-use-native-scroll":!0,et_pb_library_portability_import:l},h=""===t.state.cloudImportError&&o,m=window.ETCloudApp.getActiveFolderName();m="My Library"===m||""===m?"My":"".concat(m,"'s");var y="Import To ".concat(m," Cloud"),g=l&&!t.state.bulkImportInProgress;return k.default.createElement(k.Fragment,null,k.default.createElement("div",{className:"et-common-prompt__overlay et-library-export-modal"}),k.default.createElement(D.default,{active:!0,actionType:"custom_content",tooltipTitle:d,_closeFunction:t.onClosePortability,classNames:p,ignorePosition:!0,enableContextMenu:!0,movable:!1,tooltipModalContainer:f},k.default.createElement(I.default,{exportOnly:!l,importOnly:l,_renderTabs:c.default,preloadingItems:!1,tabClassName:C.default,active_tab:"modules_all",maxHeight:l?300:150,exportFileName:r,hasProgressBar:h,layoutId:a,importButtonName:s,cloudImportSupport:l,cloudImoirtCheckboxLabel:y,cloudImportLock:!R.default.isLocalLibraryImportSupport(),disableCheckmark:g,cloudImportProgress:t.state.cloudImportProgress,importError:t.state.cloudImportError,importEstimation:0,bulkImport:!0,importPreferences:{importOptions:{replaceLayout:!1,moduleType:u},cloudOptions:{returnUnprocessedData:!0,importContext:"et_builder_layouts",callback:t.importItemCallback}}})))})),ae(re(t),"onPromptOptionChange",(function(e,n){var r=X(n.split("|"),1)[0];t.setState(ae({},e,{importPresets:r}))})),ae(re(t),"renderPresetImport",(function(){var e=t.state,n=e.promptOptions;if(!e.presetImportActive)return!1;var r=ie.prompts,a=(0,o.default)(n,(function(e,t){return{value:r[t],label:(0,G.decode)(r[t]),className:t}})),l=(0,i.default)(n).join("|");return k.default.createElement("div",{className:"et_pb_library_preset_import"},k.default.createElement(W.default,null,k.default.createElement(W.default.Header,{onClose:t.onCancelPromptImport},r.importWithLabel),k.default.createElement(W.default.Content,null,k.default.createElement("p",null,r.importWithContent),k.default.createElement("div",{className:"et-fb-settings-option-container"},k.default.createElement(j.default,{value:l,name:"promptOptions",options:a,_onChange:t.onPromptOptionChange}))),k.default.createElement(W.default.Actions,null,k.default.createElement(V.default,{className:"et-common-button--primary",onClick:t.onPromptImport},r.import))))})),ae(re(t),"renderConversionArea",(function(){var e=t.state,n=e.currentConversion,r=e.conversionInProgress,o=e.conversionModalActive,a=ie.prompts,i=a.close,l=a.convertRowtoSection,u=a.convertModuletoRow,s=a.convertModuletoSection,c=a.convertToRowMsg,d=a.convertToSectionMsg;if(!o||!n)return!1;var f={convert_row_to_section:{title:l,msg:d},convert_module_to_row:{title:u,msg:c},convert_module_to_section:{title:s,msg:d}};return k.default.createElement("div",{className:"et-pb-library-conversion"},k.default.createElement(W.default,null,k.default.createElement(W.default.Header,null,f[n].title),k.default.createElement(W.default.Content,null,r&&k.default.createElement(T.default,{isLoading:!0,isInline:!0,useWrapper:!0}),!r&&k.default.createElement("p",null,f[n].msg)),!r&&k.default.createElement(W.default.Actions,null,k.default.createElement(V.default,{className:"et-common-button--primary",onClick:t.onCloseConversionModal},i))))})),ae(re(t),"importItemCallback",(function(e,n,r){if((null==r||!r.isBulkImport)&&(t.setState({hideProgressBar:!0,waitingForNewItem:!0,localLayoutsLoading:!0}),N.default.fetchLayoutsData(t.props.type),"on"===(0,v.default)(r,"importToCloud","off"))){var o=(0,v.default)(n,"data.jsonFromFile",{});if("et_builder_layouts"!==o.context)return void t.setState({cloudImportError:ie.tooltips.importContextFail,hideProgressBar:!0,waitingForNewItem:!1,localLayoutsLoading:!1});((0,m.default)(o)||(0,m.default)(o.data))&&t.setState({hideProgressBar:!0,waitingForNewItem:!1,localLayoutsLoading:!1}),t.bulkCloudSave(o)}})),ae(re(t),"splitToCloud",(function(e,n){var r=n.response,o=n.updateType,a={context:"et_builder_layouts",data:r};t.bulkCloudSave(a,o)})),ae(re(t),"refreshLocalAfterSplit",(function(e,n){t.refreshAfterSplit(n.updateType)})),ae(re(t),"refreshByType",(function(e){var t;switch(e){case"split_layout":case"section":t="section";break;case"split_section":case"row":t="row";break;case"split_row":case"module":t="module"}t&&(B.ETCloudCache.addData([t,"modules_library"],{},!0),N.default.fetchLayoutsData(t))})),t.closeToolTip=t.closeToolTip.bind(re(t)),t._openPrompt=t._openPrompt.bind(re(t)),t.account=R.default.getETAccount(),L.default.addLayoutsDataFetchedListener(t.onLayoutsDataFetched),P.default.appWindow().onAccountStatusError=t.onAccountStatusError;var n=A.default.getLayoutsTabs();return(0,p.default)(n)&&!(0,m.default)(n)&&(0,_.default)(n,(function(e,n){return t.tabs.push({name:e,className:n})})),t}return t=J,n=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.active_tab,r=this.props.active_tab,o=n!==r||!this.state.libraryTabMounted&&t.libraryTabMounted,a=n===r&&"modules_all"===n,l=this.state.localLayoutsLoading&&!t.localLayoutsLoading&&"modules_all"!==r;if(!e.backToLayouts||this.state.account_status_error||o){if(o||!a||l){var u=(0,v.default)(this.state.custom_layouts,n,[]);switch(n){case"modules_all":u=[];break;case"modules_library":u=this.state.local_layouts||[]}if(u.layouts){var s=(0,p.default)(u.layouts)?(0,i.default)(u.layouts):u.layouts;u.items=s}var c="existing_pages"===n?"Page":"";(o||l)&&window.ETCloudApp&&window.ETCloudApp.toggleTab({items:u,tab:n,itemsLabel:c}),this.setLayoutsFilter()}}else window.ETCloudApp.goTo("back");return!(0,h.default)(this.props,e)||!(0,h.default)(this.state,t)}},{key:"componentDidMount",value:function(){var e=this;this.mounted=!0,"layout"===this.props.type&&P.default.enableScrollLock(),P.default.$appWindow().on("et-fb-product-tour-skip",(function(e,t){window.ETCloudApp.productTourSkipStep(t,P.default.$topDocument())})),this.loadLibrary(),"layout"!==this.props.type&&"modules_library"===this.props.active_tab&&this.setState({libraryTabMounted:!0}),(0,S.default)(window).on("et_cloud_page_changed",this.onPageChanged),(0,S.default)(window).on("et_cloud_use_item",this.onUseLayout),(0,S.default)(window).on("et_cloud_download_progress",this.onDownloadProgress),(0,S.default)(window).on("et_cloud_account_status_error",this.onAccountStatusError),(0,S.default)(window).on("et_cloud_help",this.onClickHelpButton),(0,S.default)(window).on("et_cloud_item_action",this.onCloudItemAction),(0,S.default)(window).on("et_cloud_filter_update",this.onFilterUpdate),(0,S.default)(window).on("et_cloud_update_item",this.onItemUpdate),(0,S.default)(window).on("et_cloud_item_toggle_location",this.toggleCloudStatus),(0,S.default)(window).on("et_cloud_token_ready",this.saveCloudToken),(0,S.default)(window).on("et_cloud_token_removed",this.removeCloudToken),(0,S.default)(window).on("et_cloud_app_ready",this.loadCloudToken),(0,S.default)(window).on("et_cloud_app_conclude",this.closeToolTip),(0,S.default)(window).on("et_cloud_item_in_progress",this._openPrompt),(0,S.default)(window).on("et_cloud_split_item_to_cloud",this.splitToCloud),(0,S.default)(window).on("et_cloud_library_refresh_after_split",this.refreshLocalAfterSplit),R.default.addTogglePortabilityProgressBarListener(this.onPortabilityProgressBarChange),R.default.addBulkImportFinishedListener(this.onBulkImportFinished),R.default.addBulkImportInProgressListener(this.onBulkImportInProgress),window.addEventListener("et_fb_layout_import_error",this.onPortabilityImportError),(0,m.default)(this.state.local_layouts)?(setTimeout((function(){return N.default.fetchLayoutsData(e.props.type)}),0),this.setState({localLayoutsLoading:!0})):(this.props.doneLoading(),this._setLayoutsData(),this.setLayoutsFilter())}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.props.type===e.type?(e.backToLayouts&&this.state.account_status_error&&(this.setState({account_status_error:""}),this.props.pageChanged(!0)),e.importItemsOpened&&!this.props.importItemsOpened&&this.setState({portabilityProgressBar:!1})):this.loadLibrary()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,L.default.removeLayoutsDataFetchedListener(this.onLayoutsDataFetched),R.default.removeTogglePortabilityProgressBarListener(this.onPortabilityProgressBarChange),R.default.removeTogglePortabilityProgressBarListener(this.closeExportModalAfterExport),(0,S.default)(window).off("et_cloud_page_changed",this.onPageChanged),(0,S.default)(window).off("et_cloud_use_item",this.onUseLayout),(0,S.default)(window).off("et_cloud_download_progress",this.onDownloadProgress),(0,S.default)(window).off("et_cloud_account_status_error",this.onAccountStatusError),(0,S.default)(window).off("et_cloud_help",this.onClickHelpButton),(0,S.default)(window).off("et_cloud_item_action",this.onCloudItemAction),(0,S.default)(window).off("et_cloud_filter_update",this.onFilterUpdate),(0,S.default)(window).off("et_cloud_update_item",this.onItemUpdate),(0,S.default)(window).off("et_cloud_item_toggle_location",this.toggleCloudStatus),(0,S.default)(window).off("et_cloud_token_ready",this.saveCloudToken),(0,S.default)(window).off("et_cloud_token_removed",this.removeCloudToken),(0,S.default)(window).off("et_cloud_app_ready",this.loadCloudToken),(0,S.default)(window).off("et_cloud_app_conclude",this.closeToolTip),(0,S.default)(window).off("et_cloud_item_in_progress",this._openPrompt),(0,S.default)(window).off("et_cloud_split_item_to_cloud",this.splitToCloud),(0,S.default)(window).off("et_cloud_library_refresh_after_split",this.refreshLocalAfterSplit),window.removeEventListener("et_fb_layout_import_error",this.onPortabilityImportError),R.default.removePreloaderFinishedListener(this.onBulkImportFinished),R.default.removeBulkImportInProgressListener(this.onBulkImportInProgress),this.state.duplicateInProgress&&(B.ETCloudCache.addData([this.props.type,"modules_library"],{},!0),N.default.fetchLayoutsData(this.props.type)),P.default.disableScrollLock(),this.onClosePortability(),R.default.emitPreloaderFinished(),L.default.clearTempDrafts("")}},{key:"saveCloudToken",value:function(){L.default.getCloudToken().then((function(e){var t=(0,v.default)(e,"data.accessToken","");N.default.updateETCloudToken(t),et_cloud_data.initialCloudStatus="on"}))}},{key:"removeCloudToken",value:function(){N.default.updateETCloudToken(""),et_cloud_data.initialCloudStatus="off"}},{key:"loadLibrary",value:function(){var e=this.props,t=e.type,n=e.active_tab,r=e.moduleWidth,o=e.maxColumns,a=e.isProductTour,i="layout"===t&&!this.isCurrentLayoutEmpty(),l=P.default.condition("is_rtl"),u={context:t,initialTab:n,editableTabs:["modules_library","existing_pages"],cloudTab:"modules_library",predefinedTab:"modules_all",existingPagesTab:"existing_pages",globalSupport:"layout"!==t,animation:R.default.getAppPreference("builder_animation"),isRtl:!(0,d.default)(l)&&l,isProductTour:a,showLoadOptions:i};if("module"===t&&r&&(u.permanentFilter={property:"width",value:r}),"row"===t&&o){var s=4===o?["4_4","1_2,1_2","1_3,1_3,1_3","1_4,1_4,1_4,1_4"]:["4_4","1_2,1_2","1_3,1_3,1_3"];u.permanentFilter={property:"row_layout",value:s}}(0,S.default)(window).trigger("et_cloud_container_ready",[u,P.default.topDocument()])}},{key:"_setLayoutsData",value:function(){var e=this.props.type;if((0,m.default)((0,v.default)(L.default,["layouts_data",e,"local_layouts"],{})))setTimeout((function(){return N.default.fetchLayoutsData(e)}),0),this.setState({localLayoutsLoading:!0});else{var t=(0,v.default)(L.default,["layouts_data",e,"local_layouts"],{}),n=(0,v.default)(L.default,["layouts_data",e,"custom_layouts"],{});this.setState({local_layouts:t,custom_layouts:n,localLayoutsLoading:!1})}}},{key:"UNSAFE_componentWillMount",value:function(){this._setLayoutsData()}},{key:"isCurrentLayoutEmpty",value:function(){return 0===(0,S.default)("#et_pb_root").find(".et_pb_module, .et-fb-skeleton--collapsed").length||R.default.isProductTourActive()}},{key:"bulkCloudSave",value:(E=$().mark((function e(t){var n,r,o,i,s,c,f,p,h,y,g,w,O,k,S,C,E,P,T,M=this,j=arguments;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=j.length>1&&void 0!==j[1]&&j[1],r=j.length>2?j[2]:void 0,o=R.default.getCloudToken(),i=null!=r?r:(0,u.default)(t.data),s=0<i?90/i:90,c=B.ETCloudCache.getData(["totalCloudItems"],0),f=(0,F.parseJWT)(o),p=(0,v.default)(f,"dcst",""),h=function(){M.setState({importError:!0,hideProgressBar:!0,waitingForNewItem:!1,localLayoutsLoading:!1,portabilityProgressBar:!1,importingToCloud:!1}),window.ETCloudApp.emitSignal({signal:"showLimitExceededError",data:{}})},"free"!==p){e.next=15;break}if(!(50-c<i)){e.next=15;break}return h(),this.onClosePortability(),e.abrupt("return");case 15:return y=10,g=0,!1===this.state.bulkImportInProgress&&this.setState({cloudImportProgress:y,importingToCloud:!0,localLayoutsLoading:!0,importError:!1}),w=function(e){if(y=(0,l.default)(M.state.cloudImportProgress)+s,g++,!M.state.importError){M.setState({cloudImportProgress:y});var t=e.error&&"max_free_items"===e.error;if(i===g||t){if(t&&h(),n)return window.ETCloudApp.emitSignal({signal:"receiveItemUpdate",data:{data:{updateType:n}}}),void M.refreshByType(n);!1===M.state.bulkImportInProgress&&(M.setState({hideProgressBar:!0,waitingForNewItem:!1,localLayoutsLoading:!1,portabilityProgressBar:!1,importingToCloud:!1}),window.ETCloudApp.emitSignal({signal:"refreshCloudItems",data:{}}),M.onClosePortability())}}},e.next=21,this.bulkTermsCloudSave(t.data);case 21:if(O=e.sent,k=O.tags,S=O.categories,C=[],E=0,(0,_.default)(t.data,(function(e){var n="",r=!1,o=[],i=[],l={context:"et_builder",data:{1:e.post_content},presets:t.presets,global_colors:t.global_colors,images:t.images};if((0,m.default)(e.terms)||(0,_.default)(e.terms,(function(e){switch(e.taxonomy){case"layout_type":n=e.name;break;case"layout_category":var t=(0,a.default)(S,["name",e.name]);(0,d.default)(t)||i.push(t.id);break;case"layout_tag":var l=(0,a.default)(k,["name",e.name]);(0,d.default)(l)||o.push(l.id);break;case"module_width":r="fullwidth"===e.name}})),(0,u.default)(t.data)>1){var s={};(0,m.default)(t.images)||(0,_.default)(t.images,(function(t,n){-1!==e.post_content.indexOf(n)&&(s[n]=t)})),l.images=s}var c={title:e.post_title,content:JSON.stringify(l),categories:i,tags:o,meta:{},status:"publish",width:r?"fullwidth":""};(0,b.default)(e,"post_meta._et_pb_module_type")&&(c.meta._et_pb_module_type=e.post_meta._et_pb_module_type[0]),(0,b.default)(e,"post_meta._et_pb_row_layout")&&(c.meta._et_pb_row_layout=e.post_meta._et_pb_row_layout[0]),(0,v.default)(C,E)?(0,u.default)(C[E])>5&&(E++,C[E]=[]):C[E]=[],C[E].push({itemType:n,newCloudItem:c})})),(0,m.default)(C)){e.next=32;break}return P=[],T=window.ETCloudApp.getActiveFolderEndpoint(),C.forEach((function(e){P.push((function(){var t=[];return e.forEach((function(e){var n=e.itemType,r=e.newCloudItem;t.push(new Promise((function(e){if(M.state.importError)return e();e((0,U.saveToCloudWithToken)(o,n,r,{},!1,0,T).then((function(e){w(e)})))})))})),Promise.all(t)}))})),e.abrupt("return",P.reduce((function(e,t){return e.then(t).catch((function(e){console.warn("err",e.message)}))}),Promise.resolve()));case 32:case"end":return e.stop()}}),e,this)})),H=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=E.apply(e,t);function a(e){Y(o,n,r,a,i,"next",e)}function i(e){Y(o,n,r,a,i,"throw",e)}a(void 0)}))},function(e){return H.apply(this,arguments)})},{key:"bulkTermsCloudSave",value:function(e){var t=this;return new Promise((function(n){var r={tags:[],categories:[]},o=[];(0,_.default)(e,(function(e){(0,m.default)(e.terms)&&n(r),(0,_.default)(e.terms,(function(e){var t;switch(e.taxonomy){case"layout_tag":t={taxonomy:"tags",name:e.name},(0,a.default)(o,t)||o.push(t);break;case"layout_category":t={taxonomy:"categories",name:e.name},(0,a.default)(o,t)||o.push(t)}}))})),(0,m.default)(o)&&n(r);var i=[],l=0;if((0,_.default)(o,(function(e){(0,v.default)(i,l)?(0,u.default)(i[l])>5&&(i[++l]=[]):i[l]=[],i[l].push(e)})),(0,m.default)(i))n(r);else{var s=[];(0,_.default)(i,(function(e){s.push((function(){var o=[];(0,_.default)(e,(function(e){var n=e.name,a=e.taxonomy;o.push(new Promise((function(e){if(t.state.importError)return e();e((0,U.createMissingTermPure)(n,a,R.default.getCloudToken()).then((function(e){(0,m.default)(e)||function(e){var t=e.id,n=e.name,o=e.taxonomy;r[o].push({id:t,name:n})}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({name:n},e))})))})))})),Promise.all(o).then((function(){n(r)}))}))})),s.reduce((function(e,t){return e.then(t).catch((function(e){console.warn("err",e.message)}))}),Promise.resolve())}}))}},{key:"_renderAccountStatusError",value:function(){var e=this.state,t=e.account_status_error,n=e.account_auth_failed,r=e.ajax_in_progress,o=e.et_username,a=e.et_api_key;return k.default.createElement(M.default,{status:t,authFailed:n,onClickSubmitButton:this.onClickAccountSubmit,onChangeAccountFields:this.onChangeAccountFields,ajaxInProgress:r,et_username:o,et_api_key:a})}},{key:"renderProgressBar",value:function(){var e=this.props,t=e.isLoadingLayout,n=e._renderProgressBar,r=e._onChange,o=e.importError;return!this.state.hideProgressBar&&!this.props.importItemsOpened&&(o?(setTimeout((function(){r({importError:"",importProgress:100})}),2e3),o):t&&n())}},{key:"render",value:function(){var e=this.props,t=e.modalMoving,n=e._renderTabs,r=e.active_tab,o=e.isLoading,a=e.importError,i=this.state.account_status_error,l="modules_all"!==r,u=(0,C.default)({"et-fb-main-settings":!0,"et-fb-main-settings--load_layout":!0,"et-fb-main-settings--error":i||a,"et-fb-main-settings--moving":t});return k.default.createElement("div",{className:u},n.apply(void 0,q(this.tabs)),k.default.createElement("div",{id:"et-cloud-app",className:"et-fb-library-container"}),this.renderProgressBar(),i&&this._renderAccountStatusError(),l&&k.default.createElement(T.default,{isLoading:o}),this.renderPreview(),this.renderPortability(),this.renderPresetImport(),this.renderConversionArea())}}],n&&Z(t.prototype,n),r&&Z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),J}(k.default.Component);ae(le,"displayName","ETBuilderLibraryModal");var ue=(0,E.withPortability)(le,"download");t.default=ue},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(n(0)),a=p(n(10)),i=p(n(116)),l=p(n(1)),u=p(n(42)),s=p(n(12)),c=p(n(22)),d=p(n(6)),f=p(n(1565));function p(e){return e&&e.__esModule?e:{default:e}}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return t&&b(e.prototype,t),n&&b(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(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&&w(e,t)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function O(e){var t=function(){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}}();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1891);var P=ETBuilderBackend.i18n.tooltips;var T=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"upload";return t=function(t){_(p,t);var r=O(p);function p(){var e;g(this,p);for(var t=arguments.length,a=new Array(t),u=0;u<t;u++)a[u]=arguments[u];return E(S(e=r.call.apply(r,[this].concat(a))),"state",{exportFileName:ETBuilderBackend.postTitle||"Divi Builder Layout",importOptions:y({replaceLayout:"on",importBackUp:"off",addToLibrary:"off"},d.default.isSaveGlobalPresetsAllowed()&&{includeGlobalPresets:"off"}),exportOptions:{applyGlobalPresets:"off"},cloudOptions:{returnUnprocessedData:!1,useTempPresets:!1,importContext:"",callback:!1},importToCloud:e.props.cloudImportLock?"on":"off",importFile:void 0,importLayoutName:"",importError:"",importProgress:0,importEstimation:1,importCategories:"",importNewCategory:"",layoutId:e.props.layoutId||0}),E(S(e),"_onChange",(function(t,n){if((0,s.default)(t))e.setState(t);else{var r={};r[t]=n,e.setState(r)}})),E(S(e),"exportLayout",(function(){e._onChange("exportError","");var t=(0,i.default)(e.state);t.importFile=void 0,c.default.exportLayout(t),c.default.togglePortabilityProgressBar("export",!0)})),E(S(e),"importFileName",(function(){return(0,l.default)(e.state,"importFile.name",P.noFile)})),E(S(e),"importLayout",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e._onChange("importError",""),c.default.importLayout(y(y({},e.state),t)),c.default.togglePortabilityProgressBar("import",!0)})),E(S(e),"onExportError",(function(t){return e._onChange({exportError:t})})),E(S(e),"onImportError",(function(t){return e._onChange({importError:t})})),E(S(e),"onExportProgress",(function(t,n){e._onChange({exportProgress:t,exportEstimation:n})})),E(S(e),"onImportProgress",(function(t,r){"download"===n&&(t=t/2+25),e._onChange({importProgress:t,importEstimation:r})})),E(S(e),"_renderProgressBar",(function(){return o.default.createElement(f.default,{progress:e.state.importProgress,time_remaining:e.state.importEstimation})})),e}return v(p,[{key:"componentDidMount",value:function(){d.default.addImportProgressListener(this.onImportProgress),d.default.addImportErrorListener(this.onImportError),d.default.addExportProgressListener(this.onExportProgress),d.default.addExportErrorListener(this.onExportError);var e=d.default.getDroploaderPayloadPortability();e&&this.setState({active_tab:"modules_library",importOptions:(0,a.default)(this.state.importOptions,e.details.importOptions),importFile:e.details.importFile})}},{key:"componentDidUpdate",value:function(){var e=d.default.getDroploaderPayloadPortability();e&&this.state.importFile!==e.details.importFile&&this.setState({active_tab:"modules_library",importOptions:(0,a.default)(this.state.importOptions,e.details.importOptions),importFile:e.details.importFile})}},{key:"componentWillUnmount",value:function(){d.default.removeImportProgressListener(this.onImportProgress),d.default.removeImportErrorListener(this.onImportError),d.default.removeExportProgressListener(this.onExportProgress),d.default.removeExportErrorListener(this.onExportError)}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,u.default)(this.props,e)||!(0,u.default)(this.state,t)}},{key:"render",value:function(){var t=this.state.importProgress>0&&this.state.importProgress<100;return o.default.createElement("div",{className:"et-fb-with-portability"},o.default.createElement(e,h({isLoadingLayout:t,_renderProgressBar:this._renderProgressBar,_onChange:this._onChange,exportLayout:this.exportLayout,importFileName:this.importFileName,importLayout:this.importLayout},this.state,this.props)))}}]),p}(o.default.Component),E(t,"displayName","withPortability(".concat(e.displayName,")")),t};t.default=T},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=c(n(0)),a=c(n(13)),i=c(n(43)),l=c(n(63)),u=c(n(457)),s=n(506);function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1893);var v=ETBuilderBackend.i18n,_=function(e){!function(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&&p(e,t)}(m,e);var t,n,r,c=h(m);function m(){var e;d(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(y(e=c.call.apply(c,[this].concat(n))),"state",{username_field_help_active:!1,api_key_field_help_active:!1,hovered_field_group:null}),b(y(e),"onClickAccountFieldHelp",(function(t){var n="".concat(t,"_field_help_active");e.setState(b({},n,!e.state[n]))})),b(y(e),"onMouseEnterFieldGroup",(function(t){e.setState({hovered_field_group:t})})),b(y(e),"onMouseLeaveFieldGroup",(function(t){e.state.hovered_field_group===t&&e.setState({hovered_field_group:null})})),e}return t=m,(n=[{key:"_renderSubmitButton",value:function(){var e=o.default.createElement(i.default,{icon:"loading",color:"#FFFFFF"});return o.default.createElement(l.default,{_onClick:this.props.onClickSubmitButton,inverse:!0},this.state.ajax_in_progress||v.library.Submit,this.state.ajax_in_progress&&e)}},{key:"_renderAPIKeyFormGroup",value:function(){return o.default.createElement(s.ETBuilderFormGroup,{name:"api_key",onMouseEnterGroup:this.onMouseEnterFieldGroup,onMouseLeaveGroup:this.onMouseLeaveFieldGroup},o.default.createElement(s.ETBuilderFormLabel,{name:"api_key",activeHelp:this.state.api_key_field_help_active,hoveredGroup:"api_key"===this.state.hovered_field_group,onClickHelp:this.onClickAccountFieldHelp},v.library["API Key"]),o.default.createElement(s.ETBuilderFormDescription,{active:this.state.api_key_field_help_active},v.library.$apiKeyHelp),o.default.createElement(u.default,{type:"text",value:this.props.et_api_key,name:"et_api_key",_onChange:this.props.onChangeAccountFields}))}},{key:"_renderUsernameFormGroup",value:function(){return o.default.createElement(s.ETBuilderFormGroup,{name:"username",onMouseEnterGroup:this.onMouseEnterFieldGroup,onMouseLeaveGroup:this.onMouseLeaveFieldGroup},o.default.createElement(s.ETBuilderFormLabel,{name:"username",activeHelp:this.state.username_field_help_active,hoveredGroup:"username"===this.state.hovered_field_group,onClickHelp:this.onClickAccountFieldHelp},v.library.Username),o.default.createElement(s.ETBuilderFormDescription,{active:this.state.username_field_help_active},v.library.$usernameHelp),o.default.createElement(u.default,{type:"text",value:this.props.et_username,name:"et_username",_onChange:this.props.onChangeAccountFields}))}},{key:"_renderExpiredAccountError",value:function(){return o.default.createElement("div",{className:"et-fb-account-status-error__content"},o.default.createElement("p",{dangerouslySetInnerHTML:{__html:v.library.$expiredAccount}}))}},{key:"_renderNoAccountError",value:function(){return o.default.createElement("div",{className:"et-fb-account-status-error__content"},o.default.createElement("p",null,v.library.$noAccount),this._renderUsernameFormGroup(),this._renderAPIKeyFormGroup(),o.default.createElement("div",null,this._renderSubmitButton()))}},{key:"render",value:function(){var e="expired"===this.props.status,t=e?v.library["Uh Oh!"]:v.library["Authentication Required"],n={"et-fb-account-status-error":!0,"et-fb-account-status-error--auth-failed":this.props.authFailed};return o.default.createElement("div",{className:(0,a.default)(n)},o.default.createElement("h2",null,t),e&&this._renderExpiredAccountError(),e||this._renderNoAccountError())}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),m}(o.default.Component),w=_;t.default=w},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";var r=n(1896),o=r.default,a=r.DraggableCore;e.exports=o,e.exports.default=o,e.exports.DraggableCore=a},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=h(n(3)),i=h(n(27)),l=h(n(1897)),u=n(1513),s=n(1568),c=n(1499),d=h(n(1899)),f=h(n(1569)),p=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function g(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},k(e,t)}function S(e){var t=function(){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}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M=function(e){!function(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&&k(e,t)}(c,e);var t,n,r,a=S(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),T(E(t=a.call(this,e)),"onDragStart",(function(e,n){if((0,f.default)("Draggable: onDragStart: %j",n),!1===t.props.onStart(e,(0,s.createDraggableData)(E(t),n)))return!1;t.setState({dragging:!0,dragged:!0})})),T(E(t),"onDrag",(function(e,n){if(!t.state.dragging)return!1;(0,f.default)("Draggable: onDrag: %j",n);var r=(0,s.createDraggableData)(E(t),n),o={x:r.x,y:r.y};if(t.props.bounds){var a=o.x,i=o.y;o.x+=t.state.slackX,o.y+=t.state.slackY;var l=_((0,s.getBoundPosition)(E(t),o.x,o.y),2),u=l[0],c=l[1];o.x=u,o.y=c,o.slackX=t.state.slackX+(a-o.x),o.slackY=t.state.slackY+(i-o.y),r.x=o.x,r.y=o.y,r.deltaX=o.x-t.state.x,r.deltaY=o.y-t.state.y}if(!1===t.props.onDrag(e,r))return!1;t.setState(o)})),T(E(t),"onDragStop",(function(e,n){if(!t.state.dragging)return!1;if(!1===t.props.onStop(e,(0,s.createDraggableData)(E(t),n)))return!1;(0,f.default)("Draggable: onDragStop: %j",n);var r={dragging:!1,slackX:0,slackY:0};if(Boolean(t.props.position)){var o=t.props.position,a=o.x,i=o.y;r.x=a,r.y=i}t.setState(r)})),t.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:v({},e.position),slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return t=c,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,f.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:v({},n)})}}],(n=[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:i.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),r=t.defaultPosition,a=t.defaultClassName,i=t.defaultClassNameDragging,c=t.defaultClassNameDragged,f=t.position,h=t.positionOffset,m=(t.scale,g(t,p)),b={},_=null,w=!Boolean(f)||this.state.dragging,O=f||r,k={x:(0,s.canDragX)(this)&&w?this.state.x:O.x,y:(0,s.canDragY)(this)&&w?this.state.y:O.y};this.state.isElementSVG?_=(0,u.createSVGTransform)(k,h):b=(0,u.createCSSTransform)(k,h);var S=(0,l.default)(n.props.className||"",a,(T(e={},i,this.state.dragging),T(e,c,this.state.dragged),e));return o.createElement(d.default,y({},m,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.cloneElement(o.Children.only(n),{className:S,style:v(v({},n.props.style),b),transform:_}))}}])&&O(t.prototype,n),r&&O(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Component);t.default=M,T(M,"displayName","Draggable"),T(M,"propTypes",v(v({},d.default.propTypes),{},{axis:a.default.oneOf(["both","x","y","none"]),bounds:a.default.oneOfType([a.default.shape({left:a.default.number,right:a.default.number,top:a.default.number,bottom:a.default.number}),a.default.string,a.default.oneOf([!1])]),defaultClassName:a.default.string,defaultClassNameDragging:a.default.string,defaultClassNameDragged:a.default.string,defaultPosition:a.default.shape({x:a.default.number,y:a.default.number}),positionOffset:a.default.shape({x:a.default.oneOfType([a.default.number,a.default.string]),y:a.default.oneOfType([a.default.number,a.default.string])}),position:a.default.shape({x:a.default.number,y:a.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe})),T(M,"defaultProps",v(v({},d.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}n.r(t),t.default=function(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserPrefixToKey=a,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0,t.getPrefix=o;var r=["Moz","Webkit","O","ms"];function o(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";var o=null===(e=window.document)||void 0===e||null===(t=e.documentElement)||void 0===t?void 0:t.style;if(!o)return"";if(n in o)return"";for(var i=0;i<r.length;i++)if(a(n,r[i])in o)return r[i];return""}function a(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}var i=o();t.default=i},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=d(n(3)),i=d(n(27)),l=n(1513),u=n(1568),s=n(1499),c=d(n(1569));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function b(e){var t=function(){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}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k={start:"touchstart",move:"touchmove",stop:"touchend"},S={start:"mousedown",move:"mousemove",stop:"mouseup"},C=S,E=function(e){!function(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&&g(e,t)}(s,e);var t,n,r,a=b(s);function s(){var e;m(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return O(_(e=a.call.apply(a,[this].concat(n))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),O(_(e),"mounted",!1),O(_(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,l.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,l.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var o=(0,l.getTouchIdentifier)(t);e.setState({touchIdentifier:o});var a=(0,u.getControlPosition)(t,o,_(e));if(null!=a){var i=a.x,s=a.y,d=(0,u.createCoreData)(_(e),i,s);(0,c.default)("DraggableCore: handleDragStart: %j",d),(0,c.default)("calling",e.props.onStart),!1!==e.props.onStart(t,d)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,l.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:i,lastY:s}),(0,l.addEvent)(r,C.move,e.handleDrag),(0,l.addEvent)(r,C.stop,e.handleDragStop))}}})),O(_(e),"handleDrag",(function(t){var n=(0,u.getControlPosition)(t,e.state.touchIdentifier,_(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var a=r-e.state.lastX,i=o-e.state.lastY,l=p((0,u.snapToGrid)(e.props.grid,a,i),2);if(a=l[0],i=l[1],!a&&!i)return;r=e.state.lastX+a,o=e.state.lastY+i}var s=(0,u.createCoreData)(_(e),r,o);if((0,c.default)("DraggableCore: handleDrag: %j",s),!1!==e.props.onDrag(t,s)&&!1!==e.mounted)e.setState({lastX:r,lastY:o});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(t){var d=document.createEvent("MouseEvents");d.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(d)}}})),O(_(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,u.getControlPosition)(t,e.state.touchIdentifier,_(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var a=r-e.state.lastX||0,i=o-e.state.lastY||0,s=p((0,u.snapToGrid)(e.props.grid,a,i),2);a=s[0],i=s[1],r=e.state.lastX+a,o=e.state.lastY+i}var d=(0,u.createCoreData)(_(e),r,o);if(!1===e.props.onStop(t,d)||!1===e.mounted)return!1;var f=e.findDOMNode();f&&e.props.enableUserSelectHack&&(0,l.removeUserSelectStyles)(f.ownerDocument),(0,c.default)("DraggableCore: handleDragStop: %j",d),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),f&&((0,c.default)("DraggableCore: Removing handlers"),(0,l.removeEvent)(f.ownerDocument,C.move,e.handleDrag),(0,l.removeEvent)(f.ownerDocument,C.stop,e.handleDragStop))}}})),O(_(e),"onMouseDown",(function(t){return C=S,e.handleDragStart(t)})),O(_(e),"onMouseUp",(function(t){return C=S,e.handleDragStop(t)})),O(_(e),"onTouchStart",(function(t){return C=k,e.handleDragStart(t)})),O(_(e),"onTouchEnd",(function(t){return C=k,e.handleDragStop(t)})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,l.addEvent)(e,k.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,l.removeEvent)(t,S.move,this.handleDrag),(0,l.removeEvent)(t,k.move,this.handleDrag),(0,l.removeEvent)(t,S.stop,this.handleDragStop),(0,l.removeEvent)(t,k.stop,this.handleDragStop),(0,l.removeEvent)(e,k.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,l.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current:i.default.findDOMNode(this)}},{key:"render",value:function(){return o.cloneElement(o.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);t.default=E,O(E,"displayName","DraggableCore"),O(E,"propTypes",{allowAnyClick:a.default.bool,disabled:a.default.bool,enableUserSelectHack:a.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:a.default.arrayOf(a.default.number),handle:a.default.string,cancel:a.default.string,nodeRef:a.default.object,onStart:a.default.func,onDrag:a.default.func,onStop:a.default.func,onMouseDown:a.default.func,scale:a.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),O(E,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=v(n(214)),a=v(n(11)),i=v(n(35)),l=v(n(5)),u=v(n(7)),s=v(n(1)),c=v(n(10)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),f=v(n(13)),p=n(93),h=v(n(22)),m=v(n(6)),y=v(n(43)),g=v(n(2));function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function v(e){return e&&e.__esModule?e:{default:e}}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function k(e){var t=function(){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}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C(e)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=function(e){!function(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&&O(e,t)}(v,e);var t,n,r,b=k(v);function v(){var e;w(this,v);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return P(C(e=b.call.apply(b,[this].concat(n))),"_onClick",(function(){var t=e.props,n=t.label,r=t.onClickAction;(m.default.abIsMode("off")||"layout"!==n)&&((0,i.default)(r)?r(e.props):e.performModuleAdding())})),P(C(e),"_onMouseEnter",(function(){var t=e.props,n=t.onMouseEnter,r=t.itemIndex;(0,a.default)(n)||n(r)})),P(C(e),"performModuleAdding",(function(){var t=e.props,n=t.specialtyLayout,r=t.label,o=t.fbSupport,a=(0,l.default)(n)?r:"et_pb_specialty_layout_"+n.layoutFormat,i=(0,l.default)(n)?"":n.layoutType;h.default.insertNewModule(a,"",i,o),"et_fb_specialty"!==r&&h.default.cancelTooltip()})),P(C(e),"renderSpecialty",(function(){var t=e.props,n=t.label,r=t.specialtyLayout;if((0,l.default)(r))return!1;var o=r.layoutType.split(","),a=r.specialtyColumns;return r.columns.map((function(e,t){var r,i,l=t+e,s=P({et_pb_layout_column:!0},"et_pb_column_layout_".concat(e),!0);return"1"===o[t]?(s.et_pb_variations=!0,s["et_pb_".concat(a,"_variations")]=!0,r=d.default.createElement(d.Fragment,null,d.default.createElement("div",{className:"et_pb_variation et_pb_variation_full"}),d.default.createElement("div",{className:"et_pb_variation_row"},d.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_2"}),d.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_2"}))),3===a&&(i=(0,u.default)(["2_3,1_3","1_3,2_3"],n)?d.default.createElement("div",{className:"et_pb_variation_row"},d.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_4"}),d.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_4"}),d.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_4"}),d.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_4"})):d.default.createElement("div",{className:"et_pb_variation_row"},d.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_3"}),d.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_3"}),d.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_3"})))):s.et_pb_specialty_column=!0,d.default.createElement("div",{className:(0,f.default)(s),key:l},r,i)}))})),P(C(e),"render",(function(){var t,n=e.props,r=n.specialtyLayout,a=n.label,i=n.itemIndex,u=n.selectedItemIndex,h=n.icon,b=n.iconSvg,v=n.classnames;if(!m.default.isAllowedAction(a))return!1;var _=!(0,l.default)(r),w=(0,s.default)(r,"layoutFormat",""),O=(0,s.default)(r,"layoutType","").split(","),k=(0,s.default)(r,"specialtyColumns",""),S=(0,o.default)(a,"et_pb_","et_fb_"),E=g.default.hasValue(b)?d.default.createElement(y.default,{iconSvg:b}):"",T=(0,c.default)((P(t={},"".concat(S),!0),P(t,"et-fb-selected-item",i===u),P(t,"et-fb-has-icon",g.default.hasValue(h)),P(t,"et-fb-has-svg-icon",g.default.hasValue(b)),P(t,"et_fb_specialty_layout_item",_),t),v),M=_?e.renderSpecialty():d.default.createElement("span",{className:"et_module_title"},(0,p.decode)((0,s.default)(C(e),"props.title","")));return d.default.createElement("li",{className:(0,f.default)(T),onClick:e._onClick,"data-layout":w,"data-specialty":O,"data-specialty_columns":k,onMouseEnter:e._onMouseEnter,"data-icon":h},E,M)})),e}return t=v,n&&_(t.prototype,n),r&&_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(d.default.Component);P(T,"displayName","ETBuilderModuleItem");var M=T;t.default=M},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=Y(n(12)),a=Y(n(126)),i=Y(n(392)),l=Y(n(33)),u=Y(n(136)),s=Y(n(394)),c=Y(n(359)),d=Y(n(31)),f=Y(n(17)),p=Y(n(11)),h=Y(n(5)),m=Y(n(7)),y=Y(n(34)),g=Y(n(1)),b=Y(n(9)),v=Y(n(65)),_=Y(n(58)),w=Y(n(146)),O=Y(n(10)),k=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=$(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),S=Y(n(27)),C=Y(n(13)),E=n(282),P=Y(n(8)),T=Y(n(22)),M=Y(n(6)),j=Y(n(14)),x=Y(n(1488)),D=Y(n(784)),N=Y(n(507)),L=Y(n(1904)),R=Y(n(620)),A=Y(n(1912)),I=Y(n(1914)),B=Y(n(1916)),F=Y(n(1515)),W=Y(n(1917)),V=n(801),U=n(510),G=n(624),H=Y(n(820)),z=n(2),q=n(1570),K=n(57);function $(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return($=function(e){return e?n:t})(e)}function Y(e){return e&&e.__esModule?e:{default:e}}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}function te(e){var t=function(){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}}();return function(){var n,r=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ne(this,n)}}function ne(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return re(e)}function re(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1919);var ie=ETBuilderBackend.i18n.library,le=ETBuilderBackend.i18n.saveModuleLibraryAttrs,ue=ETBuilderBackend.i18n.themeBuilder,se=function(t){!function(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&&ee(e,t)}(X,t);var n,r,$,Y=te(X);function X(){var t;Z(this,X);for(var n=arguments.length,r=new Array(n),$=0;$<n;$++)r[$]=arguments[$];return ae(re(t=Y.call.apply(Y,[this].concat(r))),"state",{template_name:"",selected_cats:"",selected_tags:[],selected_children:"",make_global:"off",cloud:"save_to_cloud"===t.props.action?"on":"off",new_category_name:"",new_tag_name:"",name_error:"",sync_error:"",cloudStatus:{},cloudId:(0,E.v4)(),cloudTerms:{},sharedClouds:[],selectedCloud:0}),ae(re(t),"componentDidMount",(function(){M.default.addCloudStatusListener(t.onCloudUpdate),"save_to_cloud"===t.props.action&&t.maybeRetrieveCloudTerms()})),ae(re(t),"componentWillUnmount",(function(){M.default.removeCloudStatusListener(t.onCloudUpdate)})),ae(re(t),"onCloudUpdate",(function(e){"done"===(0,g.default)(e,"result","")&&"on"===t.state.cloud?setTimeout(T.default.cancelTooltip,100):t.setState({cloudStatus:e})})),ae(re(t),"setFieldClass",(function(e){var n={},r=""!==t.state.name_error;return n["et-fb-settings-option-container"]=!0,"template_name"===e&&r&&(n["et-fb-settings-option-container-input-error"]=!0),(0,C.default)(n)})),ae(re(t),"isGlobalOptionSupported",(function(){var e=M.default.getModuleLibrarySave();if("root"===e||M.default.isGlobalLibraryPage())return!1;var t=(0,g.default)(e,"props.attrs");return!!t&&(!t.global_module&&!t.global_parent)})),ae(re(t),"getCategoriesNamesArray",(function(){var e=M.default.getLibraryTerms(),n=[],r=[];if("on"===t.state.cloud&&!(0,h.default)((0,g.default)(t.state,"cloudTerms.categories",{}))){var o=(0,c.default)(t.state.cloudTerms.categories,["name"]);(0,b.default)(o,(function(e){n.push((0,i.default)(e.name)),r.push((0,i.default)(e.name))}))}return(0,h.default)(e)||(0,b.default)(e,(function(e){n.push((0,i.default)(e.name))})),{categoriesList:(0,a.default)(n),cloudCategoryNames:r}})),ae(re(t),"_renderCloudUpsell",(function(){var e=t.state,n=e.make_global,r=e.cloud;if("on"===n)return null;var o=M.default.getCloudToken(),a="on"===r?(0,U.parseJWT)(o).dcst:"default";return k.default.createElement(W.default,{context:"save-modal",colorScheme:a})})),ae(re(t),"_renderCategories",(function(){var e=t.getCategoriesNamesArray(),n=k.default.createElement(R.default,{icon:"cloud",color:"#0088E1",className:"et-cloud-category-mark",elementType:"span"}),r=j.default.currentUserCan("manageCategories")||"on"===t.state.cloud,o=k.default.createElement(k.Fragment,null,e.categoriesList.length>0&&k.default.createElement("div",{className:"et-fb-settings-option-container"},k.default.createElement(x.default,{value:t.state.selected_cats,name:"selected_cats",options:e.categoriesList,shortcut_index:"library-categories",_onChange:t._onInput,markedCategories:e.cloudCategoryNames,categoryMark:n})),r&&t.renderInputField("new_category_name"));return t.state.updatingCloudCategories&&(o=k.default.createElement("div",{className:"et-fb-settings-option",style:{height:"50px"}},k.default.createElement(H.default,null))),k.default.createElement("div",{className:"et-fb-settings-option"},k.default.createElement("label",null,le.addToCatText),o)})),ae(re(t),"getTags",(function(){var e=M.default.getLibraryTerms("layout_tag"),n=[],r=[],o={},a=0;return(0,h.default)(e)||(0,b.default)(e,(function(e,t){var n=(0,i.default)(e.name);r.push(n),o[a=t]=n})),"on"!==t.state.cloud||(0,h.default)((0,g.default)(t.state,"cloudTerms.tags",{}))||(0,b.default)((0,g.default)(t.state,"cloudTerms.tags",{}),(function(e,t){var l=(0,i.default)(e.name);(0,m.default)(r,l)||(a++,o[a]=l),n.push(l)})),{tagsList:o,cloudTagNames:n}})),ae(re(t),"renderInputField",(function(e){var n=M.default.getModuleLibrarySave(),r=(0,q.getSaveModalItemLabel)(n,e),o=(0,g.default)(t.state,e,"off"),a="";return(0,m.default)(["new_category_name","new_tag_name"],e)&&(a="new_category_name"===e?le.createCatText:le.createTagText),k.default.createElement("div",{className:"et-fb-settings-option"},r&&k.default.createElement("label",null,r),k.default.createElement("div",{className:t.setFieldClass(e)},k.default.createElement(A.default,{value:o,onChange:function(n){return t._onInput(e,n.target.value)},className:"et-fb-settings-option-input",placeholder:a})))})),ae(re(t),"_renderTags",(function(){var e=t.getTags(),n=k.default.createElement(R.default,{icon:"cloud",color:"#ffffff",className:"et-cloud-tag-mark",elementType:"span"}),r=j.default.currentUserCan("manageCategories")||"on"===t.state.cloud,o=k.default.createElement("div",{className:"et-fb-settings-option-container"},!(0,h.default)(e.tagsList)&&k.default.createElement(L.default,{name:"selected_tags",allTags:e.tagsList,selectedTags:t.state.selected_tags,onTagsChange:t._onTagsChange,markedTags:e.cloudTagNames,tagMark:n}),r&&t.renderInputField("new_tag_name"));return t.state.updatingCloudTags&&(o=k.default.createElement("div",{className:"et-fb-settings-option",style:{height:"60px"}},k.default.createElement(H.default,null))),k.default.createElement("div",{className:"et-fb-settings-option"},k.default.createElement("label",null,le.addToTagText),o)})),ae(re(t),"_renderIndividualSave",(function(){var e,n,r=M.default.getModuleLibrarySave();if((0,o.default)(r)&&"et_pb_column"===r.props.parent_slug)return null;if("root"===r){n=M.default.getSections();var a=(0,K.getShortcodeChildrenCount)(n),i=a.sections,l=a.rows,u=a.modules;e=[le.saveSectionsIndividual.replace("%s",i),le.saveRowsIndividual.replace("%s",l),le.saveModulesIndividual.replace("%s",u)]}else{n=M.default.getComponentAtAddress(r.props.address);var s=(0,K.getShortcodeChildrenCount)(n.content),c=s.rows,d=s.modules;switch((0,K.getType)(r)){case"et_pb_section":e=[le.saveRowsIndividual.replace("%s",c),le.saveModulesIndividual.replace("%s",d)];break;case"et_pb_row":e=[le.saveModulesIndividual.replace("%s",d)]}}return k.default.createElement("div",{className:"et-fb-settings-option"},k.default.createElement("label",null,le.saveIndividual),k.default.createElement("div",{className:"et-fb-settings-option-container"},k.default.createElement(x.default,{value:t.state.selected_children,name:"selected_children",options:e,shortcut_index:"library-individual",_onChange:t._onInput})))})),ae(re(t),"renderToggle",(function(e){var n="make_global"===e?le.globalTitle:ie["Save To Divi Cloud"],r=(0,g.default)(t.state,e,"off");return k.default.createElement("div",{className:"et-fb-settings-option"},k.default.createElement("label",null,n),k.default.createElement("div",{className:"et-fb-settings-option-container"},k.default.createElement(I.default,{name:e,value:r,onChange:t._onInput})))})),ae(re(t),"renderCloudFolders",(function(){var e=t.state,n=e.selectedCloud,r=e.sharedClouds;if(e.updatingSharedClouds)return k.default.createElement("div",{className:"et-fb-settings-option",style:{height:"60px"}},k.default.createElement(H.default,null));var o=(0,v.default)(r,(function(e){return!0===(0,g.default)(e,"permissions.add")})),a=(0,u.default)(o,["name"]);if((0,h.default)(a))return null;var i=(0,d.default)(a,(function(e){var t="".concat((0,g.default)(e,"name",""),"'s Cloud");return J(J({},e),{},{name:t})}));return i.unshift({id:0,name:ue["My Cloud"]}),k.default.createElement("div",{className:"et-fb-settings-option-container"},k.default.createElement("div",{className:"et-fb-settings-option"},k.default.createElement("label",null,ue["Choose Library"]),k.default.createElement(F.default,{name:"Choose Library",options:i,_onChange:t.onCloudFolderChange,value:n})))})),ae(re(t),"openCloudCheckout",(function(){T.default.updateCloudStatus({error:999})})),ae(re(t),"getCheckoutUrl",(function(){var e=P.default.param({type:"divi-cloud",is_popup:1});return"https://www.elegantthemes.com/members-area/checkout/?".concat(e)})),ae(re(t),"onCheckoutComplete",(function(e){"true"===(0,g.default)(e,"product_purchased")&&(T.default.updateCloudStatus({}),T.default.performLibraryModuleSaving(t.state))})),ae(re(t),"renderModalContent",(function(){var e=(0,g.default)(t.state,"cloudStatus.error");if(e){if("max_free_items"===e){var n=(0,g.default)(t.state,"cloudStatus.data.max_free_items",20),r=ie.$cloudUpgradeMessage.replace("%s",n);return k.default.createElement("div",null,k.default.createElement("h3",null,ie["Free Divi Cloud Limit Reached"]),k.default.createElement("p",null,r),k.default.createElement(N.default,{className:"et-common-button--primary et-fb-cloud-checkout-button",onClick:t.openCloudCheckout},ie["Get Unlimited Divi Cloud Storage"]))}return 999===e?k.default.createElement("div",null,k.default.createElement("div",{className:"et-cloud-login-notification"},k.default.createElement("h3",null,ie["Upgrade Your Divi Cloud"]),k.default.createElement("p",null,ie.$cloudBuyNotification)),k.default.createElement(B.default,{api:ETBuilderBackend.ajaxUrl,setDomainTokenNonce:ETBuilderBackend.nonces.saveDomainToken,domain:ETBuilderBackend.site_domain,frameUrl:t.getCheckoutUrl(),domainToken:ETBuilderBackend.domainToken,frameWidth:400,frameHeight:600,sendMessage:t.onCheckoutComplete,onFrameClose:function(){return T.default.updateCloudStatus({})},isCloud:!0})):k.default.createElement("div",null,k.default.createElement("div",{className:"et-cloud-login-notification"},k.default.createElement("h3",null,ie["Log In To Divi Cloud"]),k.default.createElement("p",null,ie.$cloudLoginNotification)),k.default.createElement(B.default,{api:ETBuilderBackend.ajaxUrl,setDomainTokenNonce:ETBuilderBackend.nonces.saveDomainToken,domain:ETBuilderBackend.site_domain,frameWidth:400,frameHeight:600,sendMessage:t.onDomainTokenGenerated,queryParams:{cloud_id:t.state.cloudId},onFrameClose:function(){return T.default.updateCloudStatus({})},isCloud:!0}))}var o,a,i=M.default.getModuleLibrarySave(),l="root"!==i?i.props:i,u="",s="",c=t.state.cloud;if("root"===l)o=le.descriptionTextLayout;else{var d=M.default.getModuleLibrarySave();o=(0,q.getSaveModalDescription)(d)}return t.isGlobalOptionSupported()&&"off"===c&&(u=t.renderToggle("make_global")),"off"===t.state.make_global&&(s=t.renderToggle("cloud")),"on"===c&&(a=t.renderCloudFolders()),k.default.createElement(k.Fragment,null,k.default.createElement("p",{className:"et-fb-description-text"},o),t.renderInputField("template_name"),s,t._renderCloudUpsell(),t._renderIndividualSave(),a,u,t._renderCategories(),t._renderTags())})),ae(re(t),"renderModalButton",(function(){if((0,g.default)(t.state,"cloudStatus.error"))return k.default.createElement("a",{href:"#",className:"et-fb-save-library-button et-fb-save-library-button--cancel",onClick:t._cancelCloud},le.cancel);var e="on"===t.state.cloud&&"off"===t.state.make_global?ie["Save To Divi Cloud"]:le.saveText;return k.default.createElement("a",{href:"#",className:"et-fb-save-library-button",onClick:t._onSave},e)})),ae(re(t),"render",(function(){var e=!(0,p.default)(t.props.maxHeight)&&t.props.maxHeight>0?{maxHeight:t.props.maxHeight}:"",n=(0,g.default)(t.state,"cloudStatus.error");return k.default.createElement("div",{className:"et-fb-settings-options-wrap",style:e},k.default.createElement("div",{className:"et-fb-settings-options"},t.renderModalContent(),!n&&k.default.createElement("div",{className:"et-fb-settings-option"},k.default.createElement(D.default,{videoListId:"et_pb_save_to_library",trigger:"tooltip"})),t.renderModalButton()))})),ae(re(t),"onDomainTokenGenerated",(function(e){if((0,y.default)(e,"divi_cloud_token")){var n=(0,U.decryptToken)((0,g.default)(e,"divi_cloud_token"),t.state.cloudId),r=1===(0,g.default)(e,"save_session_on_this_website",0);T.default.updateCloudStatus({}),(0,V.activateCloudPure)(n,r).then((function(e){e.error?T.default.updateCloudStatus(e):t.maybeRetrieveCloudTerms()}))}})),ae(re(t),"_onTagsChange",(function(e,n,r){var o=t.getTags(),a=t.state.selected_tags;if("add"===n){if(!(0,m.default)((0,f.default)(o.tagsList),e.id))return;a.push((0,l.default)(e.id))}else(0,s.default)(a,(function(t,n){return n===e}));t.setState(ae({},r,a))})),ae(re(t),"onCloudFolderChange",(function(e,n){t.setState({cloudTerms:{},selectedCloud:n},(function(){t.maybeRetrieveCloudTerms()}))})),ae(re(t),"_onInput",(function(e,n){switch(e){case"template_name":t.setState({name_error:""===n?"on":""});break;case"cloud":if("on"===n)t.maybeRetrieveCloudTerms();else t.setState({updatingCloudCategories:!1,updatingCloudTags:!1,selected_tags:[],selected_cats:""}),j.default.currentUserCan("manageCategories")||t.setState({new_category_name:"",new_tag_name:""})}t.setState(ae({},e,n))})),ae(re(t),"maybeRetrieveCloudTerms",(function(){var e=t.state,n=e.sharedClouds,r=e.selectedCloud;(0,h.default)(t.state.cloudTerms)&&(t.setState({updatingCloudCategories:!0,updatingCloudTags:!0,updatingSharedClouds:(0,h.default)(n),cloud:"on"}),(0,V.updateTokens)().then((function(e){var o=(0,g.default)(e,"accessToken",""),a=(0,g.default)(e,"sharedFolders",[]),i=0===r?{}:(0,_.default)(a,{id:r});if(""===o)T.default.updateCloudStatus({error:"auth_error"}),t.setState({updatingCloudCategories:!1,updatingCloudTags:!1,updatingSharedClouds:!1,cloud:"off"});else{G.ETCloudCache.setOfflineCache("sharedFolders",a),T.default.updateETCloudToken(o);var l=(0,h.default)(i)?"":"".concat(i.endpoint,"/cloud/v1");(0,V.retrieveCloudData)({type:"categoriesList",perPage:100,pageNo:1,isUserItems:!0,token:o,providedBaseUrl:l}).then((function(e){e.error?T.default.updateCloudStatus(e):t.setState({cloudTerms:J(J({},t.state.cloudTerms),{},{categories:e.data})}),t.setState({updatingCloudCategories:!1})})),(0,V.retrieveCloudData)({type:"tagsList",perPage:100,pageNo:1,isUserItems:!0,token:o,providedBaseUrl:l}).then((function(e){e.error?T.default.updateCloudStatus(e):t.setState({cloudTerms:J(J({},t.state.cloudTerms),{},{tags:e.data})}),t.setState({updatingCloudTags:!1})})),(0,h.default)(n)&&t.setState({sharedClouds:a}),t.setState({updatingSharedClouds:!1})}})))})),ae(re(t),"_getSelectedChindrenToSave",(function(){var e,n,r,o=t.state.selected_children.split("|");switch(o.length){case 1:r=(0,z.isOn)((0,g.default)(o,0,"off"));break;case 2:n=(0,z.isOn)((0,g.default)(o,0,"off")),r=(0,z.isOn)((0,g.default)(o,1,"off"));break;case 3:e=(0,z.isOn)((0,g.default)(o,0,"off")),n=(0,z.isOn)((0,g.default)(o,1,"off")),r=(0,z.isOn)((0,g.default)(o,2,"off"))}return{isSaveSections:e,isSaveRows:n,isSaveModules:r}})),ae(re(t),"_onSave",(function(n){var r=t.state,o=r.sharedClouds,a=r.selectedCloud;if(n.preventDefault(),""===r.template_name){var i=e(S.default.findDOMNode(re(t)));t.setState({name_error:"on"}),i.animate({scrollTop:0},1e3,"swing"),i.find("#et-fb-template_name").trigger("focus")}else{var l={};if("on"===t.state.cloud){var u=0===a?{}:(0,_.default)(o,{id:a}),s=(0,h.default)(u)?"":"".concat(u.endpoint,"/cloud/v1");l={selected_cats:"",selected_tags:[],new_category_name:(0,w.default)(t.getSelectedTermNames("categories"),r.new_category_name.split(",")).join(","),new_tag_name:(0,w.default)(t.getSelectedTermNames("tags"),r.new_tag_name.split(",")).join(","),providedBaseUrl:s}}T.default.performLibraryModuleSaving((0,O.default)({},r,l,t._getSelectedChindrenToSave())),"on"!==t.state.cloud&&T.default.cancelTooltip()}})),ae(re(t),"getSelectedTermNames",(function(e){var n="tags"===e?t.getTags().tagsList:t.getCategoriesNamesArray().categoriesList,r="tags"===e?t.state.selected_tags:t.state.selected_cats.split("|"),o=[];return(0,b.default)(r,(function(t,r){if("categories"!==e||"on"===t){var a="tags"===e?n[t]:n[r],i=(0,g.default)(a,"name",a);o.push(i)}})),o})),ae(re(t),"_cancelCloud",(function(){t.setState({cloud:"off"}),T.default.updateCloudStatus({})})),t}return n=X,r&&Q(n.prototype,r),$&&Q(n,$),Object.defineProperty(n,"prototype",{writable:!1}),n}(k.default.Component),ce=se;t.default=ce}).call(this,n(8))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=g(n(28)),a=g(n(395)),i=g(n(33)),l=g(n(31)),u=g(n(5)),s=g(n(7)),c=g(n(1)),d=g(n(65)),f=g(n(162)),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),h=g(n(3)),m=n(1905);function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function g(e){return e&&e.__esModule?e:{default:e}}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function w(e){var t=function(){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}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function O(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1911);var E=188,P=13,T=function(e){!function(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&&_(e,t)}(y,e);var t,n,r,h=w(y);function y(){var e;v(this,y);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return C(k(e=h.call.apply(h,[this].concat(n))),"getSuggestions",(function(){var t=e.props,n=t.selectedTags,r=t.allTags;if((0,u.default)(r))return[];var o=(0,l.default)(r,(function(e,t){if(!(0,s.default)(n,(0,i.default)(t)))return{id:t,text:e}}));return(0,f.default)(o)})),C(k(e),"getSelectedTags",(function(){var t=e.props,n=t.selectedTags,r=t.allTags,a=t.markedTags;return(0,u.default)(n)?[]:(0,l.default)(n,(function(e){var t=""!==(0,c.default)(r,[e])?(0,c.default)(r,[e]):e,n=!1;(0,u.default)(a)||(n=(0,s.default)(a,t));var i=n?"et-common-selected-tag-marked":"";return{id:(0,o.default)(e),text:t,className:i}}))})),C(k(e),"suggestionsFilter",(function(e,t){var n=(0,a.default)(e);return(0,d.default)(t,(function(e){return(0,s.default)((0,a.default)(e.text),n)}))})),C(k(e),"onDeleteTag",(function(t){e.props.onTagsChange(t,"remove",e.props.name)})),C(k(e),"onAddTag",(function(t){e.props.onTagsChange(t,"add",e.props.name)})),C(k(e),"renderSuggestion",(function(t,n){var r=e.props.markedTags,o=!1;(0,u.default)(r)||(o=(0,s.default)(r,t.text));var a=o?"et-common-tag-suggestion et-common-tag-marked":"et-common-tag-suggestion";return p.default.createElement("span",{className:a},t.text)})),C(k(e),"render",(function(){return p.default.createElement(m.WithContext,{tags:e.getSelectedTags(),suggestions:e.getSuggestions(),renderSuggestion:e.renderSuggestion,handleFilterSuggestions:e.suggestionsFilter,minQueryLength:0,handleDelete:e.onDeleteTag,handleAddition:e.onAddTag,autocomplete:!0,delimiters:e.props.delimiters,allowDragDrop:!1,autofocus:e.props.autofocus,placeholder:""})})),e}return t=y,n&&b(t.prototype,n),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(p.Component);C(T,"propTypes",{delimiters:h.default.array,name:h.default.string,allTags:h.default.oneOfType([h.default.object,h.default.array]),selectedTags:h.default.array,onTagsChange:h.default.oneOfType([h.default.bool,h.default.func]),autofocus:h.default.bool,markedTags:h.default.array}),C(T,"defaultProps",{delimiters:[E,P],name:"TagsInput",allTags:{},selectedTags:[],onTagsChange:!1,autofocus:!1,markedTags:[],tagMark:""});var M=T;t.default=M},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),i=b(a),l=n(1490),u=b(n(1522)),s=b(n(42)),c=b(n(40)),d=b(n(126)),f=b(n(1906)),p=b(n(3)),h=b(n(13)),m=b(n(1907)),y=n(1514),g=n(1910);function b(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));w.call(n),e.inline||console.warn("[Deprecation] The inline attribute is deprecated and will be removed in v7.x.x, please use inputFieldPosition instead.");var r=e.suggestions;return n.state={suggestions:r,query:"",isFocused:!1,selectedIndex:-1,selectionMode:!1},n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleChange=n.handleChange.bind(n),n.moveTag=n.moveTag.bind(n),n.handlePaste=n.handlePaste.bind(n),n.resetAndFocusInput=n.resetAndFocusInput.bind(n),n.handleSuggestionHover=n.handleSuggestionHover.bind(n),n.handleSuggestionClick=n.handleSuggestionClick.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.autofocus,n=e.readOnly;t&&!n&&this.resetAndFocusInput()}},{key:"componentDidUpdate",value:function(e){(0,s.default)(e.suggestions,this.props.suggestions)||this.updateSuggestions()}},{key:"filteredSuggestions",value:function(e,t){var n=this;if(this.props.handleFilterSuggestions)return this.props.handleFilterSuggestions(e,t);var r=t.filter((function(t){return 0===n.getQueryIndex(e,t)})),o=t.filter((function(t){return n.getQueryIndex(e,t)>0}));return r.concat(o)}},{key:"resetAndFocusInput",value:function(){this.setState({query:""}),this.textInput&&(this.textInput.value="",this.textInput.focus())}},{key:"handleDelete",value:function(e,t){this.props.handleDelete(e,t),this.props.resetInputOnDelete?this.resetAndFocusInput():this.textInput&&this.textInput.focus(),t.stopPropagation()}},{key:"handleTagClick",value:function(e,t){this.props.handleTagClick&&this.props.handleTagClick(e,t),this.props.resetInputOnDelete?this.resetAndFocusInput():this.textInput&&this.textInput.focus()}},{key:"handleChange",value:function(e){this.props.handleInputChange&&this.props.handleInputChange(e.target.value);var t=e.target.value.trim();this.setState({query:t},this.updateSuggestions)}},{key:"handleFocus",value:function(e){var t=e.target.value;this.props.handleInputFocus&&this.props.handleInputFocus(t),this.setState({isFocused:!0})}},{key:"handleBlur",value:function(e){var t=e.target.value;this.props.handleInputBlur&&(this.props.handleInputBlur(t),this.textInput&&(this.textInput.value="")),this.setState({isFocused:!1})}},{key:"handleKeyDown",value:function(e){var t=this.state,n=t.query,r=t.selectedIndex,o=t.suggestions,a=t.selectionMode;if(e.keyCode===g.KEYS.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.setState({selectedIndex:-1,selectionMode:!1,suggestions:[]})),-1!==this.props.delimiters.indexOf(e.keyCode)&&!e.shiftKey){e.keyCode===g.KEYS.TAB&&""===n||e.preventDefault();var i=a&&-1!==r?o[r]:v({id:n},this.props.labelField,n);""!==i&&this.addTag(i)}e.keyCode===g.KEYS.BACKSPACE&&""===n&&this.props.allowDeleteFromEmptyInput&&this.handleDelete(this.props.tags.length-1,e),e.keyCode===g.KEYS.UP_ARROW&&(e.preventDefault(),this.setState({selectedIndex:r<=0?o.length-1:r-1,selectionMode:!0})),e.keyCode===g.KEYS.DOWN_ARROW&&(e.preventDefault(),this.setState({selectedIndex:0===o.length?-1:(r+1)%o.length,selectionMode:!0}))}},{key:"handlePaste",value:function(e){var t=this;if(this.props.allowAdditionFromPaste){e.preventDefault();var n=e.clipboardData||window.clipboardData,r=n.getData("text"),o=this.props.maxLength,a=void 0===o?r.length:o,i=Math.min(a,r.length),l=n.getData("text").substr(0,i),u=(0,y.buildRegExpFromDelimiters)(this.props.delimiters),s=l.split(u);(0,d.default)(s).forEach((function(e){return t.addTag(v({id:e},t.props.labelField,e))}))}}},{key:"handleSuggestionClick",value:function(e){this.addTag(this.state.suggestions[e])}},{key:"handleSuggestionHover",value:function(e){this.setState({selectedIndex:e,selectionMode:!0})}},{key:"moveTag",value:function(e,t){var n=this.props.tags[e];this.props.handleDrag(n,e,t)}},{key:"render",value:function(){var e=this,t=this.getTagItems(),n=r({},g.DEFAULT_CLASSNAMES,this.props.classNames),o=this.state.query.trim(),a=this.state.selectedIndex,l=this.state.suggestions,u=this.props,s=u.placeholder,c=u.name,d=u.id,p=u.maxLength,m=u.inline,y=u.inputFieldPosition,b=m?y:g.INPUT_FIELD_POSITIONS.BOTTOM,v=this.props.readOnly?null:i.default.createElement("div",{className:n.tagInput},i.default.createElement("input",{ref:function(t){e.textInput=t},className:n.tagInputField,type:"text",placeholder:s,"aria-label":s,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste,name:c,id:d,maxLength:p,value:this.props.inputValue}),i.default.createElement(f.default,{query:o,suggestions:l,labelField:this.props.labelField,selectedIndex:a,handleClick:this.handleSuggestionClick,handleHover:this.handleSuggestionHover,minQueryLength:this.props.minQueryLength,shouldRenderSuggestions:this.props.shouldRenderSuggestions,isFocused:this.state.isFocused,classNames:n,renderSuggestion:this.props.renderSuggestion}));return i.default.createElement("div",{className:(0,h.default)(n.tags,"react-tags-wrapper")},b===g.INPUT_FIELD_POSITIONS.TOP&&v,i.default.createElement("div",{className:n.selected},t,b===g.INPUT_FIELD_POSITIONS.INLINE&&v),b===g.INPUT_FIELD_POSITIONS.BOTTOM&&v)}}]),t}(a.Component);_.propTypes={placeholder:p.default.string,labelField:p.default.string,suggestions:p.default.arrayOf(p.default.shape({id:p.default.string.isRequired})),delimiters:p.default.arrayOf(p.default.number),autofocus:p.default.bool,inline:p.default.bool,inputFieldPosition:p.default.oneOf([g.INPUT_FIELD_POSITIONS.INLINE,g.INPUT_FIELD_POSITIONS.TOP,g.INPUT_FIELD_POSITIONS.BOTTOM]),handleDelete:p.default.func,handleAddition:p.default.func,handleDrag:p.default.func,handleFilterSuggestions:p.default.func,handleTagClick:p.default.func,allowDeleteFromEmptyInput:p.default.bool,allowAdditionFromPaste:p.default.bool,allowDragDrop:p.default.bool,resetInputOnDelete:p.default.bool,handleInputChange:p.default.func,handleInputFocus:p.default.func,handleInputBlur:p.default.func,minQueryLength:p.default.number,shouldRenderSuggestions:p.default.func,removeComponent:p.default.func,autocomplete:p.default.oneOfType([p.default.bool,p.default.number]),readOnly:p.default.bool,classNames:p.default.object,name:p.default.string,id:p.default.string,maxLength:p.default.number,inputValue:p.default.string,tags:p.default.arrayOf(p.default.shape({id:p.default.string.isRequired,className:p.default.string})),allowUnique:p.default.bool,renderSuggestion:p.default.func},_.defaultProps={placeholder:g.DEFAULT_PLACEHOLDER,labelField:g.DEFAULT_LABEL_FIELD,suggestions:[],delimiters:[g.KEYS.ENTER,g.KEYS.TAB],autofocus:!0,inline:!0,inputFieldPosition:g.INPUT_FIELD_POSITIONS.INLINE,handleDelete:c.default,handleAddition:c.default,allowDeleteFromEmptyInput:!0,allowAdditionFromPaste:!0,resetInputOnDelete:!0,autocomplete:!1,readOnly:!1,allowUnique:!0,allowDragDrop:!0,tags:[]};var w=function(){var e=this;this.getQueryIndex=function(t,n){return n[e.props.labelField].toLowerCase().indexOf(t.toLowerCase())},this.updateSuggestions=function(){var t=e.state,n=t.query,r=t.selectedIndex,o=e.filteredSuggestions(n,e.props.suggestions);e.setState({suggestions:o,selectedIndex:r>=o.length?o.length-1:r})},this.addTag=function(t){var n=e.props,r=n.tags,o=n.labelField,a=n.allowUnique;if(t.id&&t[o]){var i=r.map((function(e){return e.id.toLowerCase()}));if(!(a&&i.indexOf(t.id.toLowerCase())>=0)){if(e.props.autocomplete){var l=e.filteredSuggestions(t[o],e.props.suggestions);(1===e.props.autocomplete&&1===l.length||!0===e.props.autocomplete&&l.length)&&(t=l[0])}e.props.handleAddition(t),e.setState({query:"",selectionMode:!1,selectedIndex:-1}),e.resetAndFocusInput()}}},this.getTagItems=function(){var t=e.props,n=t.classNames,o=t.tags,a=t.labelField,l=t.removeComponent,u=t.readOnly,s=t.allowDragDrop,c=s?e.moveTag:null;return o.map((function(t,o){return i.default.createElement(m.default,{key:t.id+"-"+o,index:o,tag:t,labelField:a,onDelete:e.handleDelete.bind(e,o),moveTag:c,removeComponent:l,onTagClicked:e.handleTagClick.bind(e,o),readOnly:u,classNames:r({},g.DEFAULT_CLASSNAMES,n),allowDragDrop:s})}))}};e.exports={WithContext:(0,l.DragDropContext)(u.default)(_),WithOutContext:_,KEYS:g.KEYS}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),a=s(o),i=s(n(3)),l=s(n(42)),u=s(n(525));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){var e,n,r;c(this,t);for(var o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return n=r=d(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.markIt=function(e,t){var n=t.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&");return{__html:e[r.props.labelField].replace(RegExp(n,"gi"),(function(e){return"<mark>"+(0,u.default)(e)+"</mark>"}))}},r.shouldRenderSuggestions=function(e){var t=r.props,n=t.minQueryLength,o=t.isFocused;return e.length>=n&&o},r.renderSuggestion=function(e,t){var n=r.props.renderSuggestion;return"function"==typeof n?n(e,t):a.default.createElement("span",{dangerouslySetInnerHTML:r.markIt(e,t)})},d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.shouldRenderSuggestions||this.shouldRenderSuggestions;return t.isFocused!==e.isFocused||!(0,l.default)(t.suggestions,e.suggestions)||n(e.query)||n(e.query)!==n(t.query)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,l=i.selectedIndex,u=i.classNames;if(this.suggestionsContainer&&e.selectedIndex!==l){var s=this.suggestionsContainer.querySelector(u.activeSuggestion);s&&(t=s,n=this.suggestionsContainer,r=n.offsetHeight,o=t.offsetHeight,(a=t.offsetTop-n.scrollTop)+o>=r?n.scrollTop+=a-r+o:a<0&&(n.scrollTop+=a))}}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions.map(function(e,n){return a.default.createElement("li",{key:n,onMouseDown:t.handleClick.bind(null,n),onTouchStart:t.handleClick.bind(null,n),onMouseOver:t.handleHover.bind(null,n),className:n===t.selectedIndex?t.classNames.activeSuggestion:""},this.renderSuggestion(e,t.query))}.bind(this)),r=t.shouldRenderSuggestions||this.shouldRenderSuggestions;return 0!==n.length&&r(t.query)?a.default.createElement("div",{ref:function(t){e.suggestionsContainer=t},className:this.props.classNames.suggestions},a.default.createElement("ul",null," ",n," ")):null}}]),t}(o.Component);f.propTypes={query:i.default.string.isRequired,selectedIndex:i.default.number.isRequired,suggestions:i.default.array.isRequired,handleClick:i.default.func.isRequired,handleHover:i.default.func.isRequired,minQueryLength:i.default.number,shouldRenderSuggestions:i.default.func,isFocused:i.default.bool.isRequired,classNames:i.default.object,labelField:i.default.string.isRequired,renderSuggestion:i.default.func},f.defaultProps={minQueryLength:2},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),a=p(o),i=n(1490),l=p(n(3)),u=p(n(627)),s=p(n(13)),c=n(1908),d=n(1514),f=p(n(1909));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var y="tag",g=function(e){function t(){return h(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.tag[e.labelField],n=e.connectDragSource,r=e.isDragging,o=e.connectDropTarget,i=e.readOnly,l=e.tag,u=e.classNames,c=l.className,p=void 0===c?"":c;return n(o(a.default.createElement("span",{className:(0,s.default)("tag-wrapper",u.tag,p),style:{opacity:r?0:1,cursor:(0,d.canDrag)(e)?"move":"auto"},onClick:e.onTagClicked,onKeyDown:e.onTagClicked,onTouchStart:e.onTagClicked},t,a.default.createElement(f.default,{tag:e.tag,className:u.remove,removeComponent:e.removeComponent,onClick:e.onDelete,readOnly:i}))))}}]),t}(o.Component);g.propTypes={labelField:l.default.string,onDelete:l.default.func.isRequired,tag:l.default.shape({id:l.default.string.isRequired,className:l.default.string}),moveTag:l.default.func,removeComponent:l.default.func,onTagClicked:l.default.func,classNames:l.default.object,readOnly:l.default.bool,connectDragSource:l.default.func.isRequired,isDragging:l.default.bool.isRequired,connectDropTarget:l.default.func.isRequired},g.defaultProps={labelField:"text",readOnly:!1},t.default=(0,u.default)((0,i.DragSource)(y,c.tagSource,c.dragSource),(0,i.DropTarget)(y,c.tagTarget,c.dropCollect))(g)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dropCollect=t.dragSource=t.tagTarget=t.tagSource=void 0;var r=n(27),o=n(1514),a={beginDrag:function(e){return{id:e.tag.index,index:e.index}},canDrag:function(e){return(0,o.canDrag)(e)}},i={hover:function(e,t,n){var o=t.getItem().index,a=e.index;if(o!==a){var i=(0,r.findDOMNode)(n).getBoundingClientRect(),l=(i.right-i.left)/2,u=t.getClientOffset().x-i.left;o<a&&u<l||o>a&&u>l||(e.moveTag(o,a),t.getItem().index=a)}},canDrop:function(e){return(0,o.canDrop)(e)}};t.tagSource=a,t.tagTarget=i,t.dragSource=function(e,t){return{connectDragSource:e.dragSource(),isDragging:t.isDragging()}},t.dropCollect=function(e){return{connectDropTarget:e.dropTarget()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(0)),o=a(n(3));function a(e){return e&&e.__esModule?e:{default:e}}var i=String.fromCharCode(215),l=function(e){var t=e.readOnly,n=e.removeComponent,o=e.onClick,a=e.className;if(t)return r.default.createElement("span",null);if(n){var l=n;return r.default.createElement(l,e)}return r.default.createElement("a",{onClick:o,className:a,onKeyDown:o},i)};l.propTypes={className:o.default.string,onClick:o.default.func.isRequired,readOnly:o.default.bool,removeComponent:o.default.func},t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.KEYS={ENTER:13,TAB:9,BACKSPACE:8,UP_ARROW:38,DOWN_ARROW:40,ESCAPE:27},t.DEFAULT_PLACEHOLDER="Add new tag",t.DEFAULT_LABEL_FIELD="text",t.DEFAULT_CLASSNAMES={tags:"ReactTags__tags",tagInput:"ReactTags__tagInput",tagInputField:"ReactTags__tagInputField",selected:"ReactTags__selected",tag:"ReactTags__tag",remove:"ReactTags__remove",suggestions:"ReactTags__suggestions",activeSuggestion:"ReactTags__activeSuggestion"},t.INPUT_FIELD_POSITIONS={INLINE:"inline",TOP:"top",BOTTOM:"bottom"}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=(o=n(3))&&o.__esModule?o:{default:o};n(1913);var l=["className","type"];function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){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}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){!function(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&&p(e,t)}(i,e);var t,n,r,o=h(i);function i(){return d(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){var e=this.props,t=e.className,n=e.type,r=c(e,l);return a.default.createElement("input",s({type:n,className:"et-common-input-text ".concat(t)},r))}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.PureComponent);g(b,"propTypes",{className:i.default.string,type:i.default.string}),g(b,"defaultProps",{className:"",type:"text"});var v=b;t.default=v},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=d(n(40)),a=d(n(1)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),l=d(n(3)),u=d(n(13));n(1915);var s=["className","value","options"];function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e){var t=function(){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}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(e){!function(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&&y(e,t)}(l,e);var t,n,r,o=g(l);function l(){var e;h(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(v(e=o.call.apply(o,[this].concat(n))),"onClick",(function(){var t=e.props,n=t.name,r=t.value;(0,t.onChange)(n,"on"===r?"off":"on")})),e}return t=l,n=[{key:"render",value:function(){var e=this.props,t=e.className,n=e.value,r=e.options,o=p(e,s),l="equal"===(0,a.default)(r,"type"),c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:(0,u.default)({"et-common-toggle":!0,"et-common-toggle--equal":l,"et-common-toggle--on":"on"===n,"et-common-toggle--off":"on"!==n},t),onClick:this.onClick},o);return i.default.createElement("div",c,i.default.createElement("div",{className:"et-common-toggle__label et-common-toggle__label--on"},i.default.createElement("div",{className:"et-common-toggle__text"},r.on),i.default.createElement("div",{className:"et-common-toggle__handle"})),i.default.createElement("div",{className:"et-common-toggle__label et-common-toggle__label--off"},i.default.createElement("div",{className:"et-common-toggle__text"},r.off),i.default.createElement("div",{className:"et-common-toggle__handle"})))}}],n&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.PureComponent);w(O,"propTypes",{name:l.default.string,value:l.default.string,onChange:l.default.func,options:l.default.object}),w(O,"defaultProps",{value:"off",onChange:o.default,options:{on:"on",off:"off",type:"default"}});var k=O;t.default=k},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=f(n(8)),i=f(n(37)),l=f(n(5)),u=f(n(11)),s=f(n(34)),c=f(n(1)),d=f(n(10));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e){var t=function(){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}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w="https://www.elegantthemes.com",O=null,k=function(e){!function(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&&m(e,t)}(f,e);var t,n,r,o=y(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),_(b(t=o.call(this,e)),"componentDidMount",(function(){t.serverFramePopUp=t.loadServerFrame(),window.addEventListener("message",t.sendMessage),O=setInterval((function(){(0,c.default)(b(t),"serverFramePopUp.closed")&&(clearInterval(O),t.props.onFrameClose&&t.props.onFrameClose())}),1e3)})),_(b(t),"componentWillUnmount",(function(){window.removeEventListener("message",t.sendMessage),clearInterval(O),O=null,t.serverFramePopUp&&t.serverFramePopUp.close()})),_(b(t),"loadServerFrame",(function(){var e=t.props,n=e.frameWidth,r=e.frameHeight,o=t.getFrameUrl(),a=window.top.outerWidth/2+window.top.screenX-n/2,i=window.top.outerHeight/2+window.top.screenY-r/2;return(0,u.default)(window.etServerFrameWindow)?window.open(o,"Elegantthemes","popup, width=".concat(n,", height=").concat(r,", left=").concat(a,", top=").concat(i,", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no")):(window.etServerFrameWindow.location.href=o,window.etServerFrameWindow)})),_(b(t),"getGenerateDomainTokenUrl",(function(){var e=t.props,n=e.isCloud,r=e.domain,o=e.queryParams,i={domain:r,is_divi_cloud:n?1:0};return o&&(i=(0,d.default)(i,o)),i=a.default.param(i),"".concat(w,"/members-area/divi-cloud/token/?is_popup=1&").concat(i)})),_(b(t),"getFrameUrl",(function(){var e=t.props,n=e.domainToken,r=e.frameUrl;return!(0,i.default)(n)||(0,l.default)(n)?t.getGenerateDomainTokenUrl():r})),_(b(t),"onDomainTokenReceived",(function(e){if((0,i.default)(e)&&!(0,l.default)(e)){var n=t.props,r=n.api,o=n.setDomainTokenNonce;a.default.ajax({type:"POST",url:r,data:{action:"et_builder_ajax_save_domain_token",domain_token:e,nonce:o}})}})),_(b(t),"sendMessage",(function(e){if(w===(0,c.default)(e,"origin","")){var n=(0,c.default)(e,"data",{});if((0,s.default)(n,"domain_token_generated")){var r=(0,c.default)(n,"domain_token_generated");t.onDomainTokenReceived(r)}t.props.sendMessage(n)}})),_(b(t),"render",(function(){return null})),t}return t=f,n&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(o.PureComponent);t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(13)),a=i(n(625));function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(1918);var u=function(e){var t,n=e.link,i=e.title,u=e.context,s=e.colorScheme,c=e.description,d=e.buttonText;if("save-modal"===u&&"paid"===s)return null;n||d||c||(n="divi-cloud/?utm_source=Divi+Cloud&utm_medium=Divi+Library&utm_campaign=Native",d=(0,a.default)("library","nonLoggedIn$upsellCTAButtonText"),c=(0,a.default)("library","nonLoggedIn$upsellCTADescription"),"free"===s&&(n="members-area/checkout/?type=divi-cloud&utm_source=Divi+Cloud&utm_medium=Divi+Library&utm_campaign=Native",d=(0,a.default)("library","loggedIn$upsellCTAButtonText"),c=(0,a.default)("library","loggedIn$upsellCTADescription")));var f=(0,o.default)((l(t={"et-cloud-app__upsell":!0},"card-".concat(u),!0),l(t,"card-".concat(null!=s?s:"default"),!0),t));return r.default.createElement("div",{className:f},i&&r.default.createElement("h2",{className:"et-cloud-app__upsell-title"},i),r.default.createElement("p",{className:"et-cloud-app__upsell-description"},c),r.default.createElement("a",{href:"https://www.elegantthemes.com/"+n,target:"_blank"},d))};t.default=u},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(0)),o=f(n(270)),a=(f(n(27)),f(n(13))),i=f(n(16));n(1921);f(n(64));var l=f(n(11)),u=f(n(31)),s=f(n(9)),c=f(n(335)),d=f(n(22));function f(e){return e&&e.__esModule?e:{default:e}}var p=(0,o.default)({displayName:"ETBuilderSettingsColumn",mixin:[i.default],render:function(){var e=this,t=this.props.row,n=t.props.section_parent,o=ETBuilderBackend.columnLayouts,i=(0,l.default)(o[n])?[]:o[n],d="specialty"===n?"":(0,u.default)(t.props.children,(function(e){return e.attrs.type})).join(",");if("specialty"===n){var f=[],p=i[t.props.specialty_layout].columns;(0,s.default)((0,c.default)(p),(function(e){var t=[];e+=1;(0,s.default)((0,c.default)(e),(function(n){var r=1===e?"4_4":"1_".concat(e);t.push(r)})),f.push(t.join(","))})),i=f}this.props.setMaxItemIndex(i.length,"modules_all");var h=i.map((function(t,o){var i=t,l=(0,u.default)(i.split(","),(function(e){return e.split("_")})),s={};i===d&&(s["et-fb-column-layout--selected"]=!0),e.props.selectedItemIndex===o+1&&(s["et-fb-selected-item"]=!0),s["et-fb-product-tour-element"]="selectRow"===e.props.currentTourElement&&"1_3,1_3,1_3"===i;var c=l.map((function(e,t){var a=parseInt(e[0])/parseInt(e[1])*100,l={width:"".concat(a,"%")};return r.default.createElement("span",{key:"blocks-".concat(o,"-").concat(t),"data-layout":i,className:"column-block-wrap",style:l},r.default.createElement("span",{className:"column-block","data-layout":i,"data-section":n},e[0],"/",e[1]))}));return r.default.createElement("li",{className:(0,a.default)(s),"data-layout":i,onClick:e._onClickAction,onMouseUp:e._onMouseUp,key:"column-".concat(o)},c)}));return r.default.createElement("ul",{className:"et-fb-columns-layout"},h)},_onMouseUp:function(e){this._onClickAction(e),d.default.cancelTooltip()},_onClickAction:function(e){var t=e.target.getAttribute("data-layout"),n="specialty"===this.props.row.props.section_parent?"et_pb_row_inner":"et_pb_row";(0,l.default)(this.props._onClick)?this._changeStructure(e,t):this.props._onClick(t,n)},_changeStructure:function(e,t){e.target.getAttribute("data-layout");d.default.rowColumnChange(this.props.row,t)}});t.default=p},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n(0)),a=u(n(43)),i=u(n(1541));n(1924);var l=u(n(63));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){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}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var m=function(e){!function(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&&d(e,t)}(p,e);var t,n,r,u=f(p);function p(){return s(this,p),u.apply(this,arguments)}return t=p,(n=[{key:"render",value:function(){var e=this.props.modalHeight-135,t={overflowY:"scroll",overflowX:"hidden",maxHeight:e,height:e,position:"relative"};return o.default.createElement("div",{className:"et-fb-expanded-icon-picker-modal-body"},o.default.createElement(i.default,{iconValue:this.props.selectedIcon,handleChangeIcon:this.props.handleChangeIcon,listStyle:t,dropDownClassName:"expanded-icon-options-filter",name:"exp_icon_picker"}),o.default.createElement(l.default,{className:"et-fb-exp-icon-picker-confirm-btn",_onClick:this.props.closeModal,success:!0},o.default.createElement(a.default,{size:"14",icon:"check",color:"#FFFFFF"})))}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.default.Component),y=m;t.default=y},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(0),a=l(n(1567)),i=l(n(507));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function d(e){var t=function(){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}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(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&&c(e,t)}(l,e);var t,n,r,o=d(l);function l(){var e;u(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(p(e=o.call.apply(o,[this].concat(n))),"close",(function(){(0,e.props.closePrompt)()})),m(p(e),"closeLibraryModal",(function(){e.props.closeLibraryModal()})),e}return t=l,(n=[{key:"render",value:function(){return React.createElement(a.default,null,React.createElement(a.default.Header,null,ETBuilderBackend.i18n.tooltips.closeWindow),React.createElement(a.default.Content,null,React.createElement("p",null,ETBuilderBackend.i18n.tooltips.closelibraryConfirmation)),React.createElement(a.default.Actions,null,React.createElement(i.default,{className:"et-common-button--secondary",onClick:this.close},React.createElement("span",null,ETBuilderBackend.i18n.tooltips.no)),React.createElement(i.default,{className:"et-common-button--primary",onClick:this.closeLibraryModal},ETBuilderBackend.i18n.tooltips.yes)))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.PureComponent);t.default=y},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)}])]);
//# sourceMappingURL=bundle.modals.3cca01cb.js.map