!function(){"use strict";var t=function(t){return"data-".concat(t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase())},e="triggerApi",n=["clearCart","updateCart","trackEvent","setIsOperatedByGlobalE"],r=n.map((function(e){return t(e)})),o=function(n,o,u){return new Promise((function(c){var a=new MutationObserver((function(e){e.forEach((function(e){if(e.attributeName===t(o)){var n=e.target.getAttribute(t(o));a.disconnect(),c(n)}}))}));a.observe(n,{attributeFilter:r,attributes:!0}),i(n,e,o,u)}))},i=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:{args:r,action:n}}))};function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)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}(t)}function f(t){var e="function"==typeof Map?new Map:void 0;return f=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return l(t,arguments,y(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,t)},f(t)}function l(t,e,n){return l=p()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&s(o,n.prototype),o},l.apply(null,arguments)}function p(){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(t){return!1}}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var b=function(t){!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&&s(t,e)}(v,t);var e,i,u,f,l,b=(e=v,i=p(),function(){var t,n=y(e);if(i){var r=y(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return a(this,t)});function v(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v),b.call(this)}return u=v,f=[{key:"attributeChangedCallback",value:function(t,e,n){}},{key:"connectedCallback",value:function(){var t,e=this,r=(t=this,n.reduce((function(e,n){return e[n]=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o(t,n,r)},e}),{})),i=setInterval((function(){window.MyAppApi&&(window.MyAppApi.initWidget(e,r),clearInterval(i))}),200)}},{key:"render",value:function(){this.innerHTML=""}}],l=[{key:"observedAttributes",get:function(){return r}}],f&&c(u.prototype,f),l&&c(u,l),Object.defineProperty(u,"prototype",{writable:!1}),v}(f(HTMLElement));customElements.define("global-e-ce-switcher",b)}(); //# sourceMappingURL=https://bundler.wix-code.com/7b1f1e0e-288a-4aa3-b41a-eee3c9b80fed/undefined/50337b17-37e1-4045-bd5a-b86c30d224c5/custom-elements/global-e-ce.js.map