(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:n+""}function n(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,e(o.key),o)}}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}const i=gutenverseCoreFrontend;function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}var c=function(e){function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),e=this,o=arguments,n=r(n=c),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(e,u()?Reflect.construct(n,o||[],r(e).constructor):n.apply(e,o));var e,n,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(c,e),f=c,(a=[{key:"init",value:function(){var t=this;this.choiceInstance=null,this._elements.map(function(e){t._selectItems(e)})}},{key:"_selectItems",value:function(t){var e=this;(0,i.u)(t).find(".gutenverse-input-select").map(function(t){e.choiceInstance=new i.Choices(t,{removeItemButton:!0,shouldSort:!1})})}},{key:"destroy",value:function(){this.choiceInstance.destroy()}}])&&n(f.prototype,a),Object.defineProperty(f,"prototype",{writable:!1}),f;var f,a}(i.Default);if(!window.GutenverseData.activePlugins.includes("gutenverse-form/gutenverse-form.php")){var f=(0,i.u)(".guten-form-input-select");f&&new c(f)}})();