upsell.conversionbear.com Open in urlscan Pro
2606:4700::6812:1883  Public Scan

URL: https://upsell.conversionbear.com/script?app=upsell&shop=the-salty-savage.myshopify.com
Submission: On April 16 via api from LU — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

var conversionBearUpsell =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// install a JSONP callback for chunk loading
/******/ 	function webpackJsonpCallback(data) {
/******/ 		var chunkIds = data[0];
/******/ 		var moreModules = data[1];
/******/
/******/
/******/ 		// add "moreModules" to the modules object,
/******/ 		// then flag all "chunkIds" as loaded and fire callback
/******/ 		var moduleId, chunkId, i = 0, resolves = [];
/******/ 		for(;i < chunkIds.length; i++) {
/******/ 			chunkId = chunkIds[i];
/******/ 			if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ 				resolves.push(installedChunks[chunkId][0]);
/******/ 			}
/******/ 			installedChunks[chunkId] = 0;
/******/ 		}
/******/ 		for(moduleId in moreModules) {
/******/ 			if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ 				modules[moduleId] = moreModules[moduleId];
/******/ 			}
/******/ 		}
/******/ 		if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ 		while(resolves.length) {
/******/ 			resolves.shift()();
/******/ 		}
/******/
/******/ 	};
/******/
/******/
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// object to store loaded and loading chunks
/******/ 	// undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ 	// Promise = chunk loading, 0 = chunk loaded
/******/ 	var installedChunks = {
/******/ 		16: 0
/******/ 	};
/******/
/******/
/******/
/******/ 	// script path function
/******/ 	function jsonpScriptSrc(chunkId) {
/******/ 		return __webpack_require__.p + "" + ({"2":"reactPlayerDailyMotion","3":"reactPlayerFacebook","4":"reactPlayerFilePlayer","5":"reactPlayerKaltura","6":"reactPlayerMixcloud","7":"reactPlayerMux","8":"reactPlayerPreview","9":"reactPlayerSoundCloud","10":"reactPlayerStreamable","11":"reactPlayerTwitch","12":"reactPlayerVidyard","13":"reactPlayerVimeo","14":"reactPlayerWistia","15":"reactPlayerYouTube"}[chunkId]||chunkId) + ".js"
/******/ 	}
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/ 	// This file contains only the entry chunk.
/******/ 	// The chunk loading function for additional chunks
/******/ 	__webpack_require__.e = function requireEnsure(chunkId) {
/******/ 		var promises = [];
/******/
/******/
/******/ 		// JSONP chunk loading for javascript
/******/
/******/ 		var installedChunkData = installedChunks[chunkId];
/******/ 		if(installedChunkData !== 0) { // 0 means "already installed".
/******/
/******/ 			// a Promise means "currently loading".
/******/ 			if(installedChunkData) {
/******/ 				promises.push(installedChunkData[2]);
/******/ 			} else {
/******/ 				// setup Promise in chunk cache
/******/ 				var promise = new Promise(function(resolve, reject) {
/******/ 					installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ 				});
/******/ 				promises.push(installedChunkData[2] = promise);
/******/
/******/ 				// start chunk loading
/******/ 				var script = document.createElement('script');
/******/ 				var onScriptComplete;
/******/
/******/ 				script.charset = 'utf-8';
/******/ 				script.timeout = 120;
/******/ 				if (__webpack_require__.nc) {
/******/ 					script.setAttribute("nonce", __webpack_require__.nc);
/******/ 				}
/******/ 				script.src = jsonpScriptSrc(chunkId);
/******/
/******/ 				// create error before stack unwound to get useful stacktrace later
/******/ 				var error = new Error();
/******/ 				onScriptComplete = function (event) {
/******/ 					// avoid mem leaks in IE.
/******/ 					script.onerror = script.onload = null;
/******/ 					clearTimeout(timeout);
/******/ 					var chunk = installedChunks[chunkId];
/******/ 					if(chunk !== 0) {
/******/ 						if(chunk) {
/******/ 							var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ 							var realSrc = event && event.target && event.target.src;
/******/ 							error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
/******/ 							error.name = 'ChunkLoadError';
/******/ 							error.type = errorType;
/******/ 							error.request = realSrc;
/******/ 							chunk[1](error);
/******/ 						}
/******/ 						installedChunks[chunkId] = undefined;
/******/ 					}
/******/ 				};
/******/ 				var timeout = setTimeout(function(){
/******/ 					onScriptComplete({ type: 'timeout', target: script });
/******/ 				}, 120000);
/******/ 				script.onerror = script.onload = onScriptComplete;
/******/ 				document.head.appendChild(script);
/******/ 			}
/******/ 		}
/******/ 		return Promise.all(promises);
/******/ 	};
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "https://upsell.conversionbear.com/static/";
/******/
/******/ 	// on error function for async loading
/******/ 	__webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ 	var jsonpArray = window["webpackJsonpconversionBearUpsell"] = window["webpackJsonpconversionBearUpsell"] || [];
/******/ 	var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ 	jsonpArray.push = webpackJsonpCallback;
/******/ 	jsonpArray = jsonpArray.slice();
/******/ 	for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ 	var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 115);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Children", function() { return A; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PureComponent", function() { return E; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StrictMode", function() { return mn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Suspense", function() { return L; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspenseList", function() { return M; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", function() { return on; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneElement", function() { return sn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFactory", function() { return cn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPortal", function() { return j; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return wn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findDOMNode", function() { return vn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flushSync", function() { return pn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forwardRef", function() { return N; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hydrate", function() { return G; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElement", function() { return gn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFragment", function() { return an; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidElement", function() { return fn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lazy", function() { return D; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "memo", function() { return w; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return q; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startTransition", function() { return yn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unmountComponentAtNode", function() { return hn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unstable_batchedUpdates", function() { return dn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useDeferredValue", function() { return _n; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useInsertionEffect", function() { return Sn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useSyncExternalStore", function() { return Cn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useTransition", function() { return bn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return ln; });
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return preact__WEBPACK_IMPORTED_MODULE_1__["Component"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Fragment", function() { return preact__WEBPACK_IMPORTED_MODULE_1__["Fragment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createContext", function() { return preact__WEBPACK_IMPORTED_MODULE_1__["createContext"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return preact__WEBPACK_IMPORTED_MODULE_1__["createElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createRef", function() { return preact__WEBPACK_IMPORTED_MODULE_1__["createRef"]; });

/* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useCallback", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useCallback"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useContext", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useContext"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useDebugValue", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useDebugValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useEffect", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useEffect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useErrorBoundary", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useErrorBoundary"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useId", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useId"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useImperativeHandle", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useLayoutEffect", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useMemo", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useMemo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useReducer", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useReducer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useRef", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useRef"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useState", function() { return preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useState"]; });






function g(n, t) {
  for (var e in t) {
    n[e] = t[e];
  }
  return n;
}
function C(n, t) {
  for (var e in n) {
    if ("__source" !== e && !(e in t)) return !0;
  }
  for (var r in t) {
    if ("__source" !== r && n[r] !== t[r]) return !0;
  }
  return !1;
}
function E(n, t) {
  this.props = n, this.context = t;
}
function w(n, e) {
  function r(n) {
    var t = this.props.ref,
      r = t == n.ref;
    return !r && t && (t.call ? t(null) : t.current = null), e ? !e(this.props, n) || !r : C(this.props, n);
  }
  function u(e) {
    return this.shouldComponentUpdate = r, Object(preact__WEBPACK_IMPORTED_MODULE_1__["createElement"])(n, e);
  }
  return u.displayName = "Memo(" + (n.displayName || n.name) + ")", u.prototype.isReactComponent = !0, u.__f = !0, u;
}
(E.prototype = new preact__WEBPACK_IMPORTED_MODULE_1__["Component"]()).isPureReactComponent = !0, E.prototype.shouldComponentUpdate = function (n, t) {
  return C(this.props, n) || C(this.state, t);
};
var x = preact__WEBPACK_IMPORTED_MODULE_1__["options"].__b;
preact__WEBPACK_IMPORTED_MODULE_1__["options"].__b = function (n) {
  n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), x && x(n);
};
var R = "undefined" != typeof Symbol && Symbol["for"] && Symbol["for"]("react.forward_ref") || 3911;
function N(n) {
  function t(t) {
    var e = g({}, t);
    return delete e.ref, n(e, t.ref || null);
  }
  return t.$$typeof = R, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", t;
}
var k = function k(n, t) {
    return null == n ? null : Object(preact__WEBPACK_IMPORTED_MODULE_1__["toChildArray"])(Object(preact__WEBPACK_IMPORTED_MODULE_1__["toChildArray"])(n).map(t));
  },
  A = {
    map: k,
    forEach: k,
    count: function count(n) {
      return n ? Object(preact__WEBPACK_IMPORTED_MODULE_1__["toChildArray"])(n).length : 0;
    },
    only: function only(n) {
      var t = Object(preact__WEBPACK_IMPORTED_MODULE_1__["toChildArray"])(n);
      if (1 !== t.length) throw "Children.only";
      return t[0];
    },
    toArray: preact__WEBPACK_IMPORTED_MODULE_1__["toChildArray"]
  },
  O = preact__WEBPACK_IMPORTED_MODULE_1__["options"].__e;
preact__WEBPACK_IMPORTED_MODULE_1__["options"].__e = function (n, t, e, r) {
  if (n.then) for (var u, o = t; o = o.__;) {
    if ((u = o.__c) && u.__c) return null == t.__e && (t.__e = e.__e, t.__k = e.__k), u.__c(n, t);
  }
  O(n, t, e, r);
};
var T = preact__WEBPACK_IMPORTED_MODULE_1__["options"].unmount;
function F(n, t, e) {
  return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function (n) {
    "function" == typeof n.__c && n.__c();
  }), n.__c.__H = null), null != (n = g({}, n)).__c && (n.__c.__P === e && (n.__c.__P = t), n.__c = null), n.__k = n.__k && n.__k.map(function (n) {
    return F(n, t, e);
  })), n;
}
function I(n, t, e) {
  return n && e && (n.__v = null, n.__k = n.__k && n.__k.map(function (n) {
    return I(n, t, e);
  }), n.__c && n.__c.__P === t && (n.__e && e.appendChild(n.__e), n.__c.__e = !0, n.__c.__P = e)), n;
}
function L() {
  this.__u = 0, this.t = null, this.__b = null;
}
function U(n) {
  var t = n.__.__c;
  return t && t.__a && t.__a(n);
}
function D(n) {
  var e, r, u;
  function o(o) {
    if (e || (e = n()).then(function (n) {
      r = n["default"] || n;
    }, function (n) {
      u = n;
    }), u) throw u;
    if (!r) throw e;
    return Object(preact__WEBPACK_IMPORTED_MODULE_1__["createElement"])(r, o);
  }
  return o.displayName = "Lazy", o.__f = !0, o;
}
function M() {
  this.u = null, this.o = null;
}
preact__WEBPACK_IMPORTED_MODULE_1__["options"].unmount = function (n) {
  var t = n.__c;
  t && t.__R && t.__R(), t && 32 & n.__u && (n.type = null), T && T(n);
}, (L.prototype = new preact__WEBPACK_IMPORTED_MODULE_1__["Component"]()).__c = function (n, t) {
  var e = t.__c,
    r = this;
  null == r.t && (r.t = []), r.t.push(e);
  var u = U(r.__v),
    o = !1,
    i = function i() {
      o || (o = !0, e.__R = null, u ? u(l) : l());
    };
  e.__R = i;
  var l = function l() {
    if (! --r.__u) {
      if (r.state.__a) {
        var n = r.state.__a;
        r.__v.__k[0] = I(n, n.__c.__P, n.__c.__O);
      }
      var t;
      for (r.setState({
        __a: r.__b = null
      }); t = r.t.pop();) {
        t.forceUpdate();
      }
    }
  };
  r.__u++ || 32 & t.__u || r.setState({
    __a: r.__b = r.__v.__k[0]
  }), n.then(i, i);
}, L.prototype.componentWillUnmount = function () {
  this.t = [];
}, L.prototype.render = function (n, e) {
  if (this.__b) {
    if (this.__v.__k) {
      var r = document.createElement("div"),
        o = this.__v.__k[0].__c;
      this.__v.__k[0] = F(this.__b, r, o.__O = o.__P);
    }
    this.__b = null;
  }
  var i = e.__a && Object(preact__WEBPACK_IMPORTED_MODULE_1__["createElement"])(preact__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, n.fallback);
  return i && (i.__u &= -33), [Object(preact__WEBPACK_IMPORTED_MODULE_1__["createElement"])(preact__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, e.__a ? null : n.children), i];
};
var V = function V(n, t, e) {
  if (++e[1] === e[0] && n.o["delete"](t), n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.o.size)) for (e = n.u; e;) {
    for (; e.length > 3;) {
      e.pop()();
    }
    if (e[1] < e[0]) break;
    n.u = e = e[2];
  }
};
function W(n) {
  return this.getChildContext = function () {
    return n.context;
  }, n.children;
}
function P(n) {
  var e = this,
    r = n.i;
  e.componentWillUnmount = function () {
    Object(preact__WEBPACK_IMPORTED_MODULE_1__["render"])(null, e.l), e.l = null, e.i = null;
  }, e.i && e.i !== r && e.componentWillUnmount(), e.l || (e.i = r, e.l = {
    nodeType: 1,
    parentNode: r,
    childNodes: [],
    appendChild: function appendChild(n) {
      this.childNodes.push(n), e.i.appendChild(n);
    },
    insertBefore: function insertBefore(n, t) {
      this.childNodes.push(n), e.i.appendChild(n);
    },
    removeChild: function removeChild(n) {
      this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), e.i.removeChild(n);
    }
  }), Object(preact__WEBPACK_IMPORTED_MODULE_1__["render"])(Object(preact__WEBPACK_IMPORTED_MODULE_1__["createElement"])(W, {
    context: e.context
  }, n.__v), e.l);
}
function j(n, e) {
  var r = Object(preact__WEBPACK_IMPORTED_MODULE_1__["createElement"])(P, {
    __v: n,
    i: e
  });
  return r.containerInfo = e, r;
}
(M.prototype = new preact__WEBPACK_IMPORTED_MODULE_1__["Component"]()).__a = function (n) {
  var t = this,
    e = U(t.__v),
    r = t.o.get(n);
  return r[0]++, function (u) {
    var o = function o() {
      t.props.revealOrder ? (r.push(u), V(t, n, r)) : u();
    };
    e ? e(o) : o();
  };
}, M.prototype.render = function (n) {
  this.u = null, this.o = new Map();
  var t = Object(preact__WEBPACK_IMPORTED_MODULE_1__["toChildArray"])(n.children);
  n.revealOrder && "b" === n.revealOrder[0] && t.reverse();
  for (var e = t.length; e--;) {
    this.o.set(t[e], this.u = [1, 0, this.u]);
  }
  return n.children;
}, M.prototype.componentDidUpdate = M.prototype.componentDidMount = function () {
  var n = this;
  this.o.forEach(function (t, e) {
    V(n, e, t);
  });
};
var z = "undefined" != typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103,
  B = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,
  H = /^on(Ani|Tra|Tou|BeforeInp|Compo)/,
  Z = /[A-Z0-9]/g,
  Y = "undefined" != typeof document,
  $ = function $(n) {
    return ("undefined" != typeof Symbol && "symbol" == Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Symbol()) ? /fil|che|rad/ : /fil|che|ra/).test(n);
  };
function q(n, t, e) {
  return null == t.__k && (t.textContent = ""), Object(preact__WEBPACK_IMPORTED_MODULE_1__["render"])(n, t), "function" == typeof e && e(), n ? n.__c : null;
}
function G(n, t, e) {
  return Object(preact__WEBPACK_IMPORTED_MODULE_1__["hydrate"])(n, t), "function" == typeof e && e(), n ? n.__c : null;
}
preact__WEBPACK_IMPORTED_MODULE_1__["Component"].prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function (t) {
  Object.defineProperty(preact__WEBPACK_IMPORTED_MODULE_1__["Component"].prototype, t, {
    configurable: !0,
    get: function get() {
      return this["UNSAFE_" + t];
    },
    set: function set(n) {
      Object.defineProperty(this, t, {
        configurable: !0,
        writable: !0,
        value: n
      });
    }
  });
});
var J = preact__WEBPACK_IMPORTED_MODULE_1__["options"].event;
function K() {}
function Q() {
  return this.cancelBubble;
}
function X() {
  return this.defaultPrevented;
}
preact__WEBPACK_IMPORTED_MODULE_1__["options"].event = function (n) {
  return J && (n = J(n)), n.persist = K, n.isPropagationStopped = Q, n.isDefaultPrevented = X, n.nativeEvent = n;
};
var nn,
  tn = {
    enumerable: !1,
    configurable: !0,
    get: function get() {
      return this["class"];
    }
  },
  en = preact__WEBPACK_IMPORTED_MODULE_1__["options"].vnode;
preact__WEBPACK_IMPORTED_MODULE_1__["options"].vnode = function (n) {
  "string" == typeof n.type && function (n) {
    var t = n.props,
      e = n.type,
      u = {};
    for (var o in t) {
      var i = t[o];
      if (!("value" === o && "defaultValue" in t && null == i || Y && "children" === o && "noscript" === e || "class" === o || "className" === o)) {
        var l = o.toLowerCase();
        "defaultValue" === o && "value" in t && null == t.value ? o = "value" : "download" === o && !0 === i ? i = "" : "translate" === l && "no" === i ? i = !1 : "ondoubleclick" === l ? o = "ondblclick" : "onchange" !== l || "input" !== e && "textarea" !== e || $(t.type) ? "onfocus" === l ? o = "onfocusin" : "onblur" === l ? o = "onfocusout" : H.test(o) ? o = l : -1 === e.indexOf("-") && B.test(o) ? o = o.replace(Z, "-$&").toLowerCase() : null === i && (i = void 0) : l = o = "oninput", "oninput" === l && u[o = l] && (o = "oninputCapture"), u[o] = i;
      }
    }
    "select" == e && u.multiple && Array.isArray(u.value) && (u.value = Object(preact__WEBPACK_IMPORTED_MODULE_1__["toChildArray"])(t.children).forEach(function (n) {
      n.props.selected = -1 != u.value.indexOf(n.props.value);
    })), "select" == e && null != u.defaultValue && (u.value = Object(preact__WEBPACK_IMPORTED_MODULE_1__["toChildArray"])(t.children).forEach(function (n) {
      n.props.selected = u.multiple ? -1 != u.defaultValue.indexOf(n.props.value) : u.defaultValue == n.props.value;
    })), t["class"] && !t.className ? (u["class"] = t["class"], Object.defineProperty(u, "className", tn)) : (t.className && !t["class"] || t["class"] && t.className) && (u["class"] = u.className = t.className), n.props = u;
  }(n), n.$$typeof = z, en && en(n);
};
var rn = preact__WEBPACK_IMPORTED_MODULE_1__["options"].__r;
preact__WEBPACK_IMPORTED_MODULE_1__["options"].__r = function (n) {
  rn && rn(n), nn = n.__c;
};
var un = preact__WEBPACK_IMPORTED_MODULE_1__["options"].diffed;
preact__WEBPACK_IMPORTED_MODULE_1__["options"].diffed = function (n) {
  un && un(n);
  var t = n.props,
    e = n.__e;
  null != e && "textarea" === n.type && "value" in t && t.value !== e.value && (e.value = null == t.value ? "" : t.value), nn = null;
};
var on = {
    ReactCurrentDispatcher: {
      current: {
        readContext: function readContext(n) {
          return nn.__n[n.__c].props.value;
        }
      }
    }
  },
  ln = "17.0.2";
function cn(n) {
  return preact__WEBPACK_IMPORTED_MODULE_1__["createElement"].bind(null, n);
}
function fn(n) {
  return !!n && n.$$typeof === z;
}
function an(n) {
  return fn(n) && n.type === preact__WEBPACK_IMPORTED_MODULE_1__["Fragment"];
}
function sn(n) {
  return fn(n) ? preact__WEBPACK_IMPORTED_MODULE_1__["cloneElement"].apply(null, arguments) : n;
}
function hn(n) {
  return !!n.__k && (Object(preact__WEBPACK_IMPORTED_MODULE_1__["render"])(null, n), !0);
}
function vn(n) {
  return n && (n.base || 1 === n.nodeType && n) || null;
}
var dn = function dn(n, t) {
    return n(t);
  },
  pn = function pn(n, t) {
    return n(t);
  },
  mn = preact__WEBPACK_IMPORTED_MODULE_1__["Fragment"];
function yn(n) {
  n();
}
function _n(n) {
  return n;
}
function bn() {
  return [!1, yn];
}
var Sn = preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"],
  gn = fn;
function Cn(n, t) {
  var e = t(),
    r = Object(preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useState"])({
      h: {
        __: e,
        v: t
      }
    }),
    u = r[0].h,
    o = r[1];
  return Object(preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"])(function () {
    u.__ = e, u.v = t, En(u) && o({
      h: u
    });
  }, [n, e, t]), Object(preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useEffect"])(function () {
    return En(u) && o({
      h: u
    }), n(function () {
      En(u) && o({
        h: u
      });
    });
  }, [n]), e;
}
function En(n) {
  var t,
    e,
    r = n.v,
    u = n.__;
  try {
    var o = r();
    return !((t = u) === (e = o) && (0 !== t || 1 / t == 1 / e) || t != t && e != e);
  } catch (n) {
    return !0;
  }
}
var wn = {
  useState: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useState"],
  useId: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useId"],
  useReducer: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useReducer"],
  useEffect: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useEffect"],
  useLayoutEffect: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"],
  useInsertionEffect: Sn,
  useTransition: bn,
  useDeferredValue: _n,
  useSyncExternalStore: Cn,
  startTransition: yn,
  useRef: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useRef"],
  useImperativeHandle: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"],
  useMemo: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useMemo"],
  useCallback: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useCallback"],
  useContext: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useContext"],
  useDebugValue: preact_hooks__WEBPACK_IMPORTED_MODULE_2__["useDebugValue"],
  version: "17.0.2",
  Children: A,
  render: q,
  hydrate: G,
  unmountComponentAtNode: hn,
  createPortal: j,
  createElement: preact__WEBPACK_IMPORTED_MODULE_1__["createElement"],
  createContext: preact__WEBPACK_IMPORTED_MODULE_1__["createContext"],
  createFactory: cn,
  cloneElement: sn,
  createRef: preact__WEBPACK_IMPORTED_MODULE_1__["createRef"],
  Fragment: preact__WEBPACK_IMPORTED_MODULE_1__["Fragment"],
  isValidElement: fn,
  isElement: gn,
  isFragment: an,
  findDOMNode: vn,
  Component: preact__WEBPACK_IMPORTED_MODULE_1__["Component"],
  PureComponent: E,
  memo: w,
  forwardRef: N,
  flushSync: pn,
  unstable_batchedUpdates: dn,
  StrictMode: mn,
  Suspense: L,
  SuspenseList: M,
  lazy: D,
  __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: on
};


/***/ }),
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return b; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fragment", function() { return g; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneElement", function() { return F; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createContext", function() { return G; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return y; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRef", function() { return _; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return y; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hydrate", function() { return E; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidElement", function() { return t; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "options", function() { return l; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return B; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toChildArray", function() { return H; });
var n,
  l,
  u,
  t,
  i,
  o,
  r,
  f,
  e,
  c = {},
  s = [],
  a = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,
  h = Array.isArray;
function v(n, l) {
  for (var u in l) {
    n[u] = l[u];
  }
  return n;
}
function p(n) {
  var l = n.parentNode;
  l && l.removeChild(n);
}
function y(l, u, t) {
  var i,
    o,
    r,
    f = {};
  for (r in u) {
    "key" == r ? i = u[r] : "ref" == r ? o = u[r] : f[r] = u[r];
  }
  if (arguments.length > 2 && (f.children = arguments.length > 3 ? n.call(arguments, 2) : t), "function" == typeof l && null != l.defaultProps) for (r in l.defaultProps) {
    void 0 === f[r] && (f[r] = l.defaultProps[r]);
  }
  return d(l, f, i, o, null);
}
function d(n, t, i, o, r) {
  var f = {
    type: n,
    props: t,
    key: i,
    ref: o,
    __k: null,
    __: null,
    __b: 0,
    __e: null,
    __d: void 0,
    __c: null,
    constructor: void 0,
    __v: null == r ? ++u : r,
    __i: -1,
    __u: 0
  };
  return null == r && null != l.vnode && l.vnode(f), f;
}
function _() {
  return {
    current: null
  };
}
function g(n) {
  return n.children;
}
function b(n, l) {
  this.props = n, this.context = l;
}
function m(n, l) {
  if (null == l) return n.__ ? m(n.__, n.__i + 1) : null;
  for (var u; l < n.__k.length; l++) {
    if (null != (u = n.__k[l]) && null != u.__e) return u.__e;
  }
  return "function" == typeof n.type ? m(n) : null;
}
function w(n, u, t) {
  var i,
    o = n.__v,
    r = o.__e,
    f = n.__P;
  if (f) return (i = v({}, o)).__v = o.__v + 1, l.vnode && l.vnode(i), M(f, i, o, n.__n, void 0 !== f.ownerSVGElement, 32 & o.__u ? [r] : null, u, null == r ? m(o) : r, !!(32 & o.__u), t), i.__v = o.__v, i.__.__k[i.__i] = i, i.__d = void 0, i.__e != r && k(i), i;
}
function k(n) {
  var l, u;
  if (null != (n = n.__) && null != n.__c) {
    for (n.__e = n.__c.base = null, l = 0; l < n.__k.length; l++) {
      if (null != (u = n.__k[l]) && null != u.__e) {
        n.__e = n.__c.base = u.__e;
        break;
      }
    }
    return k(n);
  }
}
function x(n) {
  (!n.__d && (n.__d = !0) && i.push(n) && !C.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || r)(C);
}
function C() {
  var n,
    u,
    t,
    o = [],
    r = [];
  for (i.sort(f); n = i.shift();) {
    n.__d && (t = i.length, u = w(n, o, r) || u, 0 === t || i.length > t ? (j(o, u, r), r.length = o.length = 0, u = void 0, i.sort(f)) : u && l.__c && l.__c(u, s));
  }
  u && j(o, u, r), C.__r = 0;
}
function P(n, l, u, t, i, o, r, f, e, a, h) {
  var v,
    p,
    y,
    d,
    _,
    g = t && t.__k || s,
    b = l.length;
  for (u.__d = e, S(u, l, g), e = u.__d, v = 0; v < b; v++) {
    null != (y = u.__k[v]) && "boolean" != typeof y && "function" != typeof y && (p = -1 === y.__i ? c : g[y.__i] || c, y.__i = v, M(n, y, p, i, o, r, f, e, a, h), d = y.__e, y.ref && p.ref != y.ref && (p.ref && N(p.ref, null, y), h.push(y.ref, y.__c || d, y)), null == _ && null != d && (_ = d), 65536 & y.__u || p.__k === y.__k ? e = $(y, e, n) : "function" == typeof y.type && void 0 !== y.__d ? e = y.__d : d && (e = d.nextSibling), y.__d = void 0, y.__u &= -196609);
  }
  u.__d = e, u.__e = _;
}
function S(n, l, u) {
  var t,
    i,
    o,
    r,
    f,
    e = l.length,
    c = u.length,
    s = c,
    a = 0;
  for (n.__k = [], t = 0; t < e; t++) {
    r = t + a, null != (i = n.__k[t] = null == (i = l[t]) || "boolean" == typeof i || "function" == typeof i ? null : "string" == typeof i || "number" == typeof i || "bigint" == typeof i || i.constructor == String ? d(null, i, null, null, null) : h(i) ? d(g, {
      children: i
    }, null, null, null) : void 0 === i.constructor && i.__b > 0 ? d(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i) ? (i.__ = n, i.__b = n.__b + 1, f = I(i, u, r, s), i.__i = f, o = null, -1 !== f && (s--, (o = u[f]) && (o.__u |= 131072)), null == o || null === o.__v ? (-1 == f && a--, "function" != typeof i.type && (i.__u |= 65536)) : f !== r && (f === r + 1 ? a++ : f > r ? s > e - r ? a += f - r : a-- : f < r ? f == r - 1 && (a = f - r) : a = 0, f !== t + a && (i.__u |= 65536))) : (o = u[r]) && null == o.key && o.__e && 0 == (131072 & o.__u) && (o.__e == n.__d && (n.__d = m(o)), O(o, o, !1), u[r] = null, s--);
  }
  if (s) for (t = 0; t < c; t++) {
    null != (o = u[t]) && 0 == (131072 & o.__u) && (o.__e == n.__d && (n.__d = m(o)), O(o, o));
  }
}
function $(n, l, u) {
  var t, i;
  if ("function" == typeof n.type) {
    for (t = n.__k, i = 0; t && i < t.length; i++) {
      t[i] && (t[i].__ = n, l = $(t[i], l, u));
    }
    return l;
  }
  n.__e != l && (u.insertBefore(n.__e, l || null), l = n.__e);
  do {
    l = l && l.nextSibling;
  } while (null != l && 8 === l.nodeType);
  return l;
}
function H(n, l) {
  return l = l || [], null == n || "boolean" == typeof n || (h(n) ? n.some(function (n) {
    H(n, l);
  }) : l.push(n)), l;
}
function I(n, l, u, t) {
  var i = n.key,
    o = n.type,
    r = u - 1,
    f = u + 1,
    e = l[u];
  if (null === e || e && i == e.key && o === e.type && 0 == (131072 & e.__u)) return u;
  if (t > (null != e && 0 == (131072 & e.__u) ? 1 : 0)) for (; r >= 0 || f < l.length;) {
    if (r >= 0) {
      if ((e = l[r]) && 0 == (131072 & e.__u) && i == e.key && o === e.type) return r;
      r--;
    }
    if (f < l.length) {
      if ((e = l[f]) && 0 == (131072 & e.__u) && i == e.key && o === e.type) return f;
      f++;
    }
  }
  return -1;
}
function T(n, l, u) {
  "-" === l[0] ? n.setProperty(l, null == u ? "" : u) : n[l] = null == u ? "" : "number" != typeof u || a.test(l) ? u : u + "px";
}
function A(n, l, u, t, i) {
  var o;
  n: if ("style" === l) {
    if ("string" == typeof u) n.style.cssText = u;else {
      if ("string" == typeof t && (n.style.cssText = t = ""), t) for (l in t) {
        u && l in u || T(n.style, l, "");
      }
      if (u) for (l in u) {
        t && u[l] === t[l] || T(n.style, l, u[l]);
      }
    }
  } else if ("o" === l[0] && "n" === l[1]) o = l !== (l = l.replace(/(PointerCapture)$|Capture$/i, "$1")), l = l.toLowerCase() in n ? l.toLowerCase().slice(2) : l.slice(2), n.l || (n.l = {}), n.l[l + o] = u, u ? t ? u.u = t.u : (u.u = Date.now(), n.addEventListener(l, o ? L : D, o)) : n.removeEventListener(l, o ? L : D, o);else {
    if (i) l = l.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");else if ("width" !== l && "height" !== l && "href" !== l && "list" !== l && "form" !== l && "tabIndex" !== l && "download" !== l && "rowSpan" !== l && "colSpan" !== l && "role" !== l && l in n) try {
      n[l] = null == u ? "" : u;
      break n;
    } catch (n) {}
    "function" == typeof u || (null == u || !1 === u && "-" !== l[4] ? n.removeAttribute(l) : n.setAttribute(l, u));
  }
}
function D(n) {
  if (this.l) {
    var u = this.l[n.type + !1];
    if (n.t) {
      if (n.t <= u.u) return;
    } else n.t = Date.now();
    return u(l.event ? l.event(n) : n);
  }
}
function L(n) {
  if (this.l) return this.l[n.type + !0](l.event ? l.event(n) : n);
}
function M(n, u, t, i, o, r, f, e, c, s) {
  var a,
    p,
    y,
    d,
    _,
    m,
    w,
    k,
    x,
    C,
    S,
    $,
    H,
    I,
    T,
    A = u.type;
  if (void 0 !== u.constructor) return null;
  128 & t.__u && (c = !!(32 & t.__u), r = [e = u.__e = t.__e]), (a = l.__b) && a(u);
  n: if ("function" == typeof A) try {
    if (k = u.props, x = (a = A.contextType) && i[a.__c], C = a ? x ? x.props.value : a.__ : i, t.__c ? w = (p = u.__c = t.__c).__ = p.__E : ("prototype" in A && A.prototype.render ? u.__c = p = new A(k, C) : (u.__c = p = new b(k, C), p.constructor = A, p.render = q), x && x.sub(p), p.props = k, p.state || (p.state = {}), p.context = C, p.__n = i, y = p.__d = !0, p.__h = [], p._sb = []), null == p.__s && (p.__s = p.state), null != A.getDerivedStateFromProps && (p.__s == p.state && (p.__s = v({}, p.__s)), v(p.__s, A.getDerivedStateFromProps(k, p.__s))), d = p.props, _ = p.state, p.__v = u, y) null == A.getDerivedStateFromProps && null != p.componentWillMount && p.componentWillMount(), null != p.componentDidMount && p.__h.push(p.componentDidMount);else {
      if (null == A.getDerivedStateFromProps && k !== d && null != p.componentWillReceiveProps && p.componentWillReceiveProps(k, C), !p.__e && (null != p.shouldComponentUpdate && !1 === p.shouldComponentUpdate(k, p.__s, C) || u.__v === t.__v)) {
        for (u.__v !== t.__v && (p.props = k, p.state = p.__s, p.__d = !1), u.__e = t.__e, u.__k = t.__k, u.__k.forEach(function (n) {
          n && (n.__ = u);
        }), S = 0; S < p._sb.length; S++) {
          p.__h.push(p._sb[S]);
        }
        p._sb = [], p.__h.length && f.push(p);
        break n;
      }
      null != p.componentWillUpdate && p.componentWillUpdate(k, p.__s, C), null != p.componentDidUpdate && p.__h.push(function () {
        p.componentDidUpdate(d, _, m);
      });
    }
    if (p.context = C, p.props = k, p.__P = n, p.__e = !1, $ = l.__r, H = 0, "prototype" in A && A.prototype.render) {
      for (p.state = p.__s, p.__d = !1, $ && $(u), a = p.render(p.props, p.state, p.context), I = 0; I < p._sb.length; I++) {
        p.__h.push(p._sb[I]);
      }
      p._sb = [];
    } else do {
      p.__d = !1, $ && $(u), a = p.render(p.props, p.state, p.context), p.state = p.__s;
    } while (p.__d && ++H < 25);
    p.state = p.__s, null != p.getChildContext && (i = v(v({}, i), p.getChildContext())), y || null == p.getSnapshotBeforeUpdate || (m = p.getSnapshotBeforeUpdate(d, _)), P(n, h(T = null != a && a.type === g && null == a.key ? a.props.children : a) ? T : [T], u, t, i, o, r, f, e, c, s), p.base = u.__e, u.__u &= -161, p.__h.length && f.push(p), w && (p.__E = p.__ = null);
  } catch (n) {
    u.__v = null, c || null != r ? (u.__e = e, u.__u |= c ? 160 : 32, r[r.indexOf(e)] = null) : (u.__e = t.__e, u.__k = t.__k), l.__e(n, u, t);
  } else null == r && u.__v === t.__v ? (u.__k = t.__k, u.__e = t.__e) : u.__e = z(t.__e, u, t, i, o, r, f, c, s);
  (a = l.diffed) && a(u);
}
function j(n, u, t) {
  for (var i = 0; i < t.length; i++) {
    N(t[i], t[++i], t[++i]);
  }
  l.__c && l.__c(u, n), n.some(function (u) {
    try {
      n = u.__h, u.__h = [], n.some(function (n) {
        n.call(u);
      });
    } catch (n) {
      l.__e(n, u.__v);
    }
  });
}
function z(l, u, t, i, o, r, f, e, s) {
  var a,
    v,
    y,
    d,
    _,
    g,
    b,
    w = t.props,
    k = u.props,
    x = u.type;
  if ("svg" === x && (o = !0), null != r) for (a = 0; a < r.length; a++) {
    if ((_ = r[a]) && "setAttribute" in _ == !!x && (x ? _.localName === x : 3 === _.nodeType)) {
      l = _, r[a] = null;
      break;
    }
  }
  if (null == l) {
    if (null === x) return document.createTextNode(k);
    l = o ? document.createElementNS("http://www.w3.org/2000/svg", x) : document.createElement(x, k.is && k), r = null, e = !1;
  }
  if (null === x) w === k || e && l.data === k || (l.data = k);else {
    if (r = r && n.call(l.childNodes), w = t.props || c, !e && null != r) for (w = {}, a = 0; a < l.attributes.length; a++) {
      w[(_ = l.attributes[a]).name] = _.value;
    }
    for (a in w) {
      _ = w[a], "children" == a || ("dangerouslySetInnerHTML" == a ? y = _ : "key" === a || a in k || A(l, a, null, _, o));
    }
    for (a in k) {
      _ = k[a], "children" == a ? d = _ : "dangerouslySetInnerHTML" == a ? v = _ : "value" == a ? g = _ : "checked" == a ? b = _ : "key" === a || e && "function" != typeof _ || w[a] === _ || A(l, a, _, w[a], o);
    }
    if (v) e || y && (v.__html === y.__html || v.__html === l.innerHTML) || (l.innerHTML = v.__html), u.__k = [];else if (y && (l.innerHTML = ""), P(l, h(d) ? d : [d], u, t, i, o && "foreignObject" !== x, r, f, r ? r[0] : t.__k && m(t, 0), e, s), null != r) for (a = r.length; a--;) {
      null != r[a] && p(r[a]);
    }
    e || (a = "value", void 0 !== g && (g !== l[a] || "progress" === x && !g || "option" === x && g !== w[a]) && A(l, a, g, w[a], !1), a = "checked", void 0 !== b && b !== l[a] && A(l, a, b, w[a], !1));
  }
  return l;
}
function N(n, u, t) {
  try {
    "function" == typeof n ? n(u) : n.current = u;
  } catch (n) {
    l.__e(n, t);
  }
}
function O(n, u, t) {
  var i, o;
  if (l.unmount && l.unmount(n), (i = n.ref) && (i.current && i.current !== n.__e || N(i, null, u)), null != (i = n.__c)) {
    if (i.componentWillUnmount) try {
      i.componentWillUnmount();
    } catch (n) {
      l.__e(n, u);
    }
    i.base = i.__P = null, n.__c = void 0;
  }
  if (i = n.__k) for (o = 0; o < i.length; o++) {
    i[o] && O(i[o], u, t || "function" != typeof n.type);
  }
  t || null == n.__e || p(n.__e), n.__ = n.__e = n.__d = void 0;
}
function q(n, l, u) {
  return this.constructor(n, u);
}
function B(u, t, i) {
  var o, r, f, e;
  l.__ && l.__(u, t), r = (o = "function" == typeof i) ? null : i && i.__k || t.__k, f = [], e = [], M(t, u = (!o && i || t).__k = y(g, null, [u]), r || c, c, void 0 !== t.ownerSVGElement, !o && i ? [i] : r ? null : t.firstChild ? n.call(t.childNodes) : null, f, !o && i ? i : r ? r.__e : t.firstChild, o, e), u.__d = void 0, j(f, u, e);
}
function E(n, l) {
  B(n, l, E);
}
function F(l, u, t) {
  var i,
    o,
    r,
    f,
    e = v({}, l.props);
  for (r in l.type && l.type.defaultProps && (f = l.type.defaultProps), u) {
    "key" == r ? i = u[r] : "ref" == r ? o = u[r] : e[r] = void 0 === u[r] && void 0 !== f ? f[r] : u[r];
  }
  return arguments.length > 2 && (e.children = arguments.length > 3 ? n.call(arguments, 2) : t), d(l.type, e, i || l.key, o || l.ref, null);
}
function G(n, l) {
  var u = {
    __c: l = "__cC" + e++,
    __: n,
    Consumer: function Consumer(n, l) {
      return n.children(l);
    },
    Provider: function Provider(n) {
      var u, t;
      return this.getChildContext || (u = [], (t = {})[l] = this, this.getChildContext = function () {
        return t;
      }, this.shouldComponentUpdate = function (n) {
        this.props.value !== n.value && u.some(function (n) {
          n.__e = !0, x(n);
        });
      }, this.sub = function (n) {
        u.push(n);
        var l = n.componentWillUnmount;
        n.componentWillUnmount = function () {
          u.splice(u.indexOf(n), 1), l && l.call(n);
        };
      }), n.children;
    }
  };
  return u.Provider.__ = u.Consumer.contextType = u;
}
n = s.slice, l = {
  __e: function __e(n, l, u, t) {
    for (var i, o, r; l = l.__;) {
      if ((i = l.__c) && !i.__) try {
        if ((o = i.constructor) && null != o.getDerivedStateFromError && (i.setState(o.getDerivedStateFromError(n)), r = i.__d), null != i.componentDidCatch && (i.componentDidCatch(n, t || {}), r = i.__d), r) return i.__E = i;
      } catch (l) {
        n = l;
      }
    }
    throw n;
  }
}, u = 0, t = function t(n) {
  return null != n && null == n.constructor;
}, b.prototype.setState = function (n, l) {
  var u;
  u = null != this.__s && this.__s !== this.state ? this.__s : this.__s = v({}, this.state), "function" == typeof n && (n = n(v({}, u), this.props)), n && v(u, n), null != n && this.__v && (l && this._sb.push(l), x(this));
}, b.prototype.forceUpdate = function (n) {
  this.__v && (this.__e = !0, n && this.__h.push(n), x(this));
}, b.prototype.render = g, i = [], r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f = function f(n, l) {
  return n.__v.__b - l.__v.__b;
}, C.__r = 0, e = 0;


/***/ }),
/* 2 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createGlobalStyle; });
/* unused harmony export css */
/* unused harmony export isStyledComponent */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return keyframes; });
/* unused harmony export ServerStyleSheet */
/* unused harmony export StyleSheetConsumer */
/* unused harmony export StyleSheetContext */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StyleSheetManager; });
/* unused harmony export ThemeConsumer */
/* unused harmony export ThemeContext */
/* unused harmony export ThemeProvider */
/* unused harmony export withTheme */
/* unused harmony export __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS */
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31);
/* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43);
/* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
/* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(44);
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(32);
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(26);
/* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45);
/* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46);










// 

var interleave = function interleave(strings, interpolations) {
  var result = [strings[0]];
  for (var i = 0, len = interpolations.length; i < len; i += 1) {
    result.push(interpolations[i], strings[i + 1]);
  }
  return result;
};
var _typeof = typeof Symbol === "function" && Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Symbol.iterator) === "symbol" ? function (obj) {
  return Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(obj);
} : function (obj) {
  return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(obj);
};
var classCallCheck = function classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
};
var createClass = function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
  }
  return function (Constructor, protoProps, staticProps) {
    if (protoProps) defineProperties(Constructor.prototype, protoProps);
    if (staticProps) defineProperties(Constructor, staticProps);
    return Constructor;
  };
}();
var _extends = Object.assign || function (target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i];
    for (var key in source) {
      if (Object.prototype.hasOwnProperty.call(source, key)) {
        target[key] = source[key];
      }
    }
  }
  return target;
};
var inherits = function inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function, not " + Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(superClass));
  }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      enumerable: false,
      writable: true,
      configurable: true
    }
  });
  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var objectWithoutProperties = function objectWithoutProperties(obj, keys) {
  var target = {};
  for (var i in obj) {
    if (keys.indexOf(i) >= 0) continue;
    if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
    target[i] = obj[i];
  }
  return target;
};
var possibleConstructorReturn = function possibleConstructorReturn(self, call) {
  if (!self) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }
  return call && (Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function") ? call : self;
};

// 
var isPlainObject = function isPlainObject(x) {
  return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
};

// 
var EMPTY_ARRAY = Object.freeze([]);
var EMPTY_OBJECT = Object.freeze({});

// 
function isFunction(test) {
  return typeof test === 'function';
}

// 

function getComponentName(target) {
  return ( false) || target.displayName || target.name || 'Component';
}

// 
function isStatelessFunction(test) {
  return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
}

// 
function isStyledComponent(target) {
  return target && typeof target.styledComponentId === 'string';
}

// 

var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
var SC_VERSION_ATTR = 'data-styled-version';
var SC_STREAM_ATTR = 'data-styled-streamed';
var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
var DISABLE_SPEEDY = typeof SC_DISABLE_SPEEDY === 'boolean' && SC_DISABLE_SPEEDY || typeof process !== 'undefined' && (process.env.REACT_APP_SC_DISABLE_SPEEDY || process.env.SC_DISABLE_SPEEDY) || "production" !== 'production';

// Shared empty execution context when generating static styles
var STATIC_EXECUTION_CONTEXT = {};

// 

/**
 * Parse errors.md and turn it into a simple hash of code: message
 */
var ERRORS =  false ? undefined : {};

/**
 * super basic version of sprintf
 */
function format() {
  var a = arguments.length <= 0 ? undefined : arguments[0];
  var b = [];
  for (var c = 1, len = arguments.length; c < len; c += 1) {
    b.push(arguments.length <= c ? undefined : arguments[c]);
  }
  b.forEach(function (d) {
    a = a.replace(/%[a-z]/, d);
  });
  return a;
}

/**
 * Create an error file out of errors.md for development and a simple web link to the full errors
 * in production mode.
 */

var StyledComponentsError = function (_Error) {
  inherits(StyledComponentsError, _Error);
  function StyledComponentsError(code) {
    classCallCheck(this, StyledComponentsError);
    for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      interpolations[_key - 1] = arguments[_key];
    }
    if (true) {
      var _this = possibleConstructorReturn(this, _Error.call(this, 'An error occurred. See https://github.com/styled-components/styled-components/blob/master/packages/styled-components/src/utils/errors.md#' + code + ' for more information.' + (interpolations.length > 0 ? ' Additional arguments: ' + interpolations.join(', ') : '')));
    } else { var _this; }
    return possibleConstructorReturn(_this);
  }
  return StyledComponentsError;
}(Error);

// 
var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
var extractComps = function extractComps(maybeCSS) {
  var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
  var existingComponents = [];
  css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
    existingComponents.push({
      componentId: componentId,
      matchIndex: matchIndex
    });
    return match;
  });
  return existingComponents.map(function (_ref, i) {
    var componentId = _ref.componentId,
      matchIndex = _ref.matchIndex;
    var nextComp = existingComponents[i + 1];
    var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
    return {
      componentId: componentId,
      cssFromDOM: cssFromDOM
    };
  });
};

// 

var COMMENT_REGEX = /^\s*\/\/.*$/gm;

// NOTE: This stylis instance is only used to split rules from SSR'd style tags
var stylisSplitter = new stylis_stylis_min__WEBPACK_IMPORTED_MODULE_1___default.a({
  global: false,
  cascade: true,
  keyframe: false,
  prefix: false,
  compress: false,
  semicolon: true
});
var stylis = new stylis_stylis_min__WEBPACK_IMPORTED_MODULE_1___default.a({
  global: false,
  cascade: true,
  keyframe: false,
  prefix: true,
  compress: false,
  semicolon: false // NOTE: This means "autocomplete missing semicolons"
});

// Wrap `insertRulePlugin to build a list of rules,
// and then make our own plugin to return the rules. This
// makes it easier to hook into the existing SSR architecture

var parsingRules = [];

// eslint-disable-next-line consistent-return
var returnRulesPlugin = function returnRulesPlugin(context) {
  if (context === -2) {
    var parsedRules = parsingRules;
    parsingRules = [];
    return parsedRules;
  }
};
var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_2___default()(function (rule) {
  parsingRules.push(rule);
});
var _componentId = void 0;
var _selector = void 0;
var _selectorRegexp = void 0;
var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
  if (
  // the first self-ref is always untouched
  offset > 0 &&
  // there should be at least two self-refs to do a replacement (.b > .b)
  string.slice(0, offset).indexOf(_selector) !== -1 &&
  // no consecutive self refs (.b.b); that is a precedence boost and treated differently
  string.slice(offset - _selector.length, offset) !== _selector) {
    return '.' + _componentId;
  }
  return match;
};

/**
 * When writing a style like
 *
 * & + & {
 *   color: red;
 * }
 *
 * The second ampersand should be a reference to the static component class. stylis
 * has no knowledge of static class so we have to intelligently replace the base selector.
 */
var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
  if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
    // eslint-disable-next-line no-param-reassign
    selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
  }
};
stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
var splitByRules = function splitByRules(css) {
  return stylisSplitter('', css);
};
function stringifyRules(rules, selector, prefix) {
  var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
  var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments

  var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;

  // stylis has no concept of state to be passed to plugins
  // but since JS is single=threaded, we can rely on that to ensure
  // these properties stay in sync with the current stylis run
  _componentId = componentId;
  _selector = selector;
  _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
  return stylis(prefix || !selector ? '' : selector, cssStr);
}

// 
/* eslint-disable camelcase, no-undef */

var getNonce = function getNonce() {
  return  true ? __webpack_require__.nc : undefined;
};

// 
/* These are helpers for the StyleTags to keep track of the injected
 * rule names for each (component) ID that they're keeping track of.
 * They're crucial for detecting whether a name has already been
 * injected.
 * (This excludes rehydrated names) */

/* adds a new ID:name pairing to a names dictionary */
var addNameForId = function addNameForId(names, id, name) {
  if (name) {
    // eslint-disable-next-line no-param-reassign
    var namesForId = names[id] || (names[id] = Object.create(null));
    namesForId[name] = true;
  }
};

/* resets an ID entirely by overwriting it in the dictionary */
var resetIdNames = function resetIdNames(names, id) {
  // eslint-disable-next-line no-param-reassign
  names[id] = Object.create(null);
};

/* factory for a names dictionary checking the existance of an ID:name pairing */
var hasNameForId = function hasNameForId(names) {
  return function (id, name) {
    return names[id] !== undefined && names[id][name];
  };
};

/* stringifies names for the html/element output */
var stringifyNames = function stringifyNames(names) {
  var str = '';
  // eslint-disable-next-line guard-for-in
  for (var id in names) {
    str += Object.keys(names[id]).join(' ') + ' ';
  }
  return str.trim();
};

/* clones the nested names dictionary */
var cloneNames = function cloneNames(names) {
  var clone = Object.create(null);
  // eslint-disable-next-line guard-for-in
  for (var id in names) {
    clone[id] = _extends({}, names[id]);
  }
  return clone;
};

// 

/* These are helpers that deal with the insertRule (aka speedy) API
 * They are used in the StyleTags and specifically the speedy tag
 */

/* retrieve a sheet for a given style tag */
var sheetForTag = function sheetForTag(tag) {
  // $FlowFixMe
  if (tag.sheet) return tag.sheet;

  /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
  var size = tag.ownerDocument.styleSheets.length;
  for (var i = 0; i < size; i += 1) {
    var sheet = tag.ownerDocument.styleSheets[i];
    // $FlowFixMe
    if (sheet.ownerNode === tag) return sheet;
  }

  /* we should always be able to find a tag */
  throw new StyledComponentsError(10);
};

/* insert a rule safely and return whether it was actually injected */
var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
  /* abort early if cssRule string is falsy */
  if (!cssRule) return false;
  var maxIndex = sheet.cssRules.length;
  try {
    /* use insertRule and cap passed index with maxIndex (no of cssRules) */
    sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
  } catch (err) {
    /* any error indicates an invalid rule */
    return false;
  }
  return true;
};

/* deletes `size` rules starting from `removalIndex` */
var deleteRules = function deleteRules(sheet, removalIndex, size) {
  var lowerBound = removalIndex - size;
  for (var i = removalIndex; i > lowerBound; i -= 1) {
    sheet.deleteRule(i);
  }
};

// 

/* this marker separates component styles and is important for rehydration */
var makeTextMarker = function makeTextMarker(id) {
  return '\n/* sc-component-id: ' + id + ' */\n';
};

/* add up all numbers in array up until and including the index */
var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
  var totalUpToIndex = 0;
  for (var i = 0; i <= index; i += 1) {
    totalUpToIndex += sizes[i];
  }
  return totalUpToIndex;
};

/* create a new style tag after lastEl */
var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
  var targetDocument = document;
  if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
  var el = targetDocument.createElement('style');
  el.setAttribute(SC_ATTR, '');
  el.setAttribute(SC_VERSION_ATTR, "4.4.1");
  var nonce = getNonce();
  if (nonce) {
    el.setAttribute('nonce', nonce);
  }

  /* Work around insertRule quirk in EdgeHTML */
  el.appendChild(targetDocument.createTextNode(''));
  if (target && !tagEl) {
    /* Append to target when no previous element was passed */
    target.appendChild(el);
  } else {
    if (!tagEl || !target || !tagEl.parentNode) {
      throw new StyledComponentsError(6);
    }

    /* Insert new style tag after the previous one */
    tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
  }
  return el;
};

/* takes a css factory function and outputs an html styled tag factory */
var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
  return function (additionalAttrs) {
    var nonce = getNonce();
    var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
    var htmlAttr = attrs.filter(Boolean).join(' ');
    return '<style ' + htmlAttr + '>' + css() + '</style>';
  };
};

/* takes a css factory function and outputs an element factory */
var wrapAsElement = function wrapAsElement(css, names) {
  return function () {
    var _props;
    var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
    var nonce = getNonce();
    if (nonce) {
      // $FlowFixMe
      props.nonce = nonce;
    }

    // eslint-disable-next-line react/no-danger
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement('style', _extends({}, props, {
      dangerouslySetInnerHTML: {
        __html: css()
      }
    }));
  };
};
var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
  return function () {
    return Object.keys(markers);
  };
};

/* speedy tags utilise insertRule */
var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
  var names = Object.create(null);
  var markers = Object.create(null);
  var sizes = [];
  var extractImport = getImportRuleTag !== undefined;
  /* indicates whether getImportRuleTag was called */
  var usedImportRuleTag = false;
  var insertMarker = function insertMarker(id) {
    var prev = markers[id];
    if (prev !== undefined) {
      return prev;
    }
    markers[id] = sizes.length;
    sizes.push(0);
    resetIdNames(names, id);
    return markers[id];
  };
  var insertRules = function insertRules(id, cssRules, name) {
    var marker = insertMarker(id);
    var sheet = sheetForTag(el);
    var insertIndex = addUpUntilIndex(sizes, marker);
    var injectedRules = 0;
    var importRules = [];
    var cssRulesSize = cssRules.length;
    for (var i = 0; i < cssRulesSize; i += 1) {
      var cssRule = cssRules[i];
      var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
      if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
        importRules.push(cssRule);
      } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
        mayHaveImport = false;
        injectedRules += 1;
      }
    }
    if (extractImport && importRules.length > 0) {
      usedImportRuleTag = true;
      // $FlowFixMe
      getImportRuleTag().insertRules(id + '-import', importRules);
    }
    sizes[marker] += injectedRules; /* add up no of injected rules */
    addNameForId(names, id, name);
  };
  var removeRules = function removeRules(id) {
    var marker = markers[id];
    if (marker === undefined) return;
    // $FlowFixMe
    if (el.isConnected === false) return;
    var size = sizes[marker];
    var sheet = sheetForTag(el);
    var removalIndex = addUpUntilIndex(sizes, marker) - 1;
    deleteRules(sheet, removalIndex, size);
    sizes[marker] = 0;
    resetIdNames(names, id);
    if (extractImport && usedImportRuleTag) {
      // $FlowFixMe
      getImportRuleTag().removeRules(id + '-import');
    }
  };
  var css = function css() {
    var _sheetForTag = sheetForTag(el),
      cssRules = _sheetForTag.cssRules;
    var str = '';

    // eslint-disable-next-line guard-for-in
    for (var id in markers) {
      str += makeTextMarker(id);
      var marker = markers[id];
      var end = addUpUntilIndex(sizes, marker);
      var size = sizes[marker];
      for (var i = end - size; i < end; i += 1) {
        var rule = cssRules[i];
        if (rule !== undefined) {
          str += rule.cssText;
        }
      }
    }
    return str;
  };
  return {
    clone: function clone() {
      throw new StyledComponentsError(5);
    },
    css: css,
    getIds: getIdsFromMarkersFactory(markers),
    hasNameForId: hasNameForId(names),
    insertMarker: insertMarker,
    insertRules: insertRules,
    removeRules: removeRules,
    sealed: false,
    styleTag: el,
    toElement: wrapAsElement(css, names),
    toHTML: wrapAsHtmlTag(css, names)
  };
};
var makeTextNode = function makeTextNode(targetDocument, id) {
  return targetDocument.createTextNode(makeTextMarker(id));
};
var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
  var names = Object.create(null);
  var markers = Object.create(null);
  var extractImport = getImportRuleTag !== undefined;

  /* indicates whether getImportRuleTag was called */
  var usedImportRuleTag = false;
  var insertMarker = function insertMarker(id) {
    var prev = markers[id];
    if (prev !== undefined) {
      return prev;
    }
    markers[id] = makeTextNode(el.ownerDocument, id);
    el.appendChild(markers[id]);
    names[id] = Object.create(null);
    return markers[id];
  };
  var insertRules = function insertRules(id, cssRules, name) {
    var marker = insertMarker(id);
    var importRules = [];
    var cssRulesSize = cssRules.length;
    for (var i = 0; i < cssRulesSize; i += 1) {
      var rule = cssRules[i];
      var mayHaveImport = extractImport;
      if (mayHaveImport && rule.indexOf('@import') !== -1) {
        importRules.push(rule);
      } else {
        mayHaveImport = false;
        var separator = i === cssRulesSize - 1 ? '' : ' ';
        marker.appendData('' + rule + separator);
      }
    }
    addNameForId(names, id, name);
    if (extractImport && importRules.length > 0) {
      usedImportRuleTag = true;
      // $FlowFixMe
      getImportRuleTag().insertRules(id + '-import', importRules);
    }
  };
  var removeRules = function removeRules(id) {
    var marker = markers[id];
    if (marker === undefined) return;

    /* create new empty text node and replace the current one */
    var newMarker = makeTextNode(el.ownerDocument, id);
    el.replaceChild(newMarker, marker);
    markers[id] = newMarker;
    resetIdNames(names, id);
    if (extractImport && usedImportRuleTag) {
      // $FlowFixMe
      getImportRuleTag().removeRules(id + '-import');
    }
  };
  var css = function css() {
    var str = '';

    // eslint-disable-next-line guard-for-in
    for (var id in markers) {
      str += markers[id].data;
    }
    return str;
  };
  return {
    clone: function clone() {
      throw new StyledComponentsError(5);
    },
    css: css,
    getIds: getIdsFromMarkersFactory(markers),
    hasNameForId: hasNameForId(names),
    insertMarker: insertMarker,
    insertRules: insertRules,
    removeRules: removeRules,
    sealed: false,
    styleTag: el,
    toElement: wrapAsElement(css, names),
    toHTML: wrapAsHtmlTag(css, names)
  };
};
var makeServerTag = function makeServerTag(namesArg, markersArg) {
  var names = namesArg === undefined ? Object.create(null) : namesArg;
  var markers = markersArg === undefined ? Object.create(null) : markersArg;
  var insertMarker = function insertMarker(id) {
    var prev = markers[id];
    if (prev !== undefined) {
      return prev;
    }
    return markers[id] = [''];
  };
  var insertRules = function insertRules(id, cssRules, name) {
    var marker = insertMarker(id);
    marker[0] += cssRules.join(' ');
    addNameForId(names, id, name);
  };
  var removeRules = function removeRules(id) {
    var marker = markers[id];
    if (marker === undefined) return;
    marker[0] = '';
    resetIdNames(names, id);
  };
  var css = function css() {
    var str = '';
    // eslint-disable-next-line guard-for-in
    for (var id in markers) {
      var cssForId = markers[id][0];
      if (cssForId) {
        str += makeTextMarker(id) + cssForId;
      }
    }
    return str;
  };
  var clone = function clone() {
    var namesClone = cloneNames(names);
    var markersClone = Object.create(null);

    // eslint-disable-next-line guard-for-in
    for (var id in markers) {
      markersClone[id] = [markers[id][0]];
    }
    return makeServerTag(namesClone, markersClone);
  };
  var tag = {
    clone: clone,
    css: css,
    getIds: getIdsFromMarkersFactory(markers),
    hasNameForId: hasNameForId(names),
    insertMarker: insertMarker,
    insertRules: insertRules,
    removeRules: removeRules,
    sealed: false,
    styleTag: null,
    toElement: wrapAsElement(css, names),
    toHTML: wrapAsHtmlTag(css, names)
  };
  return tag;
};
var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
  if (IS_BROWSER && !forceServer) {
    var el = makeStyleTag(target, tagEl, insertBefore);
    if (DISABLE_SPEEDY) {
      return makeBrowserTag(el, getImportRuleTag);
    } else {
      return makeSpeedyTag(el, getImportRuleTag);
    }
  }
  return makeServerTag();
};
var rehydrate = function rehydrate(tag, els, extracted) {
  /* add all extracted components to the new tag */
  for (var i = 0, len = extracted.length; i < len; i += 1) {
    var _extracted$i = extracted[i],
      componentId = _extracted$i.componentId,
      cssFromDOM = _extracted$i.cssFromDOM;
    var cssRules = splitByRules(cssFromDOM);
    tag.insertRules(componentId, cssRules);
  }

  /* remove old HTMLStyleElements, since they have been rehydrated */
  for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
    var el = els[_i];
    if (el.parentNode) {
      el.parentNode.removeChild(el);
    }
  }
};

// 

var SPLIT_REGEX = /\s+/;

/* determine the maximum number of components before tags are sharded */
var MAX_SIZE = void 0;
if (IS_BROWSER) {
  /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
  MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
} else {
  /* for servers we do not need to shard at all */
  MAX_SIZE = -1;
}
var sheetRunningId = 0;
var master = void 0;
var StyleSheet = function () {
  /* a map from ids to tags */

  /* deferred rules for a given id */

  /* this is used for not reinjecting rules via hasNameForId() */

  /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */

  /* a list of tags belonging to this StyleSheet */

  /* a tag for import rules */

  /* current capacity until a new tag must be created */

  /* children (aka clones) of this StyleSheet inheriting all and future injections */

  function StyleSheet() {
    var _this = this;
    var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
    var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
    classCallCheck(this, StyleSheet);
    this.getImportRuleTag = function () {
      var importRuleTag = _this.importRuleTag;
      if (importRuleTag !== undefined) {
        return importRuleTag;
      }
      var firstTag = _this.tags[0];
      var insertBefore = true;
      return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
    };
    sheetRunningId += 1;
    this.id = sheetRunningId;
    this.forceServer = forceServer;
    this.target = forceServer ? null : target;
    this.tagMap = {};
    this.deferred = {};
    this.rehydratedNames = {};
    this.ignoreRehydratedNames = {};
    this.tags = [];
    this.capacity = 1;
    this.clones = [];
  }

  /* rehydrate all SSR'd style tags */

  StyleSheet.prototype.rehydrate = function rehydrate$$1() {
    if (!IS_BROWSER || this.forceServer) return this;
    var els = [];
    var extracted = [];
    var isStreamed = false;

    /* retrieve all of our SSR style elements from the DOM */
    var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
    var nodesSize = nodes.length;

    /* abort rehydration if no previous style tags were found */
    if (!nodesSize) return this;
    for (var i = 0; i < nodesSize; i += 1) {
      var el = nodes[i];

      /* check if style tag is a streamed tag */
      if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);

      /* retrieve all component names */
      var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
      var elNamesSize = elNames.length;
      for (var j = 0, name; j < elNamesSize; j += 1) {
        name = elNames[j];
        /* add rehydrated name to sheet to avoid re-adding styles */
        this.rehydratedNames[name] = true;
      }

      /* extract all components and their CSS */
      extracted.push.apply(extracted, extractComps(el.textContent));

      /* store original HTMLStyleElement */
      els.push(el);
    }

    /* abort rehydration if nothing was extracted */
    var extractedSize = extracted.length;
    if (!extractedSize) return this;

    /* create a tag to be used for rehydration */
    var tag = this.makeTag(null);
    rehydrate(tag, els, extracted);

    /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
    this.capacity = Math.max(1, MAX_SIZE - extractedSize);
    this.tags.push(tag);

    /* retrieve all component ids */
    for (var _j = 0; _j < extractedSize; _j += 1) {
      this.tagMap[extracted[_j].componentId] = tag;
    }
    return this;
  };

  /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
   * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
    * StyleSheetManager's context */

  /* reset the internal "master" instance */
  StyleSheet.reset = function reset() {
    var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
    master = new StyleSheet(undefined, forceServer).rehydrate();
  };

  /* adds "children" to the StyleSheet that inherit all of the parents' rules
   * while their own rules do not affect the parent */

  StyleSheet.prototype.clone = function clone() {
    var sheet = new StyleSheet(this.target, this.forceServer);

    /* add to clone array */
    this.clones.push(sheet);

    /* clone all tags */
    sheet.tags = this.tags.map(function (tag) {
      var ids = tag.getIds();
      var newTag = tag.clone();

      /* reconstruct tagMap */
      for (var i = 0; i < ids.length; i += 1) {
        sheet.tagMap[ids[i]] = newTag;
      }
      return newTag;
    });

    /* clone other maps */
    sheet.rehydratedNames = _extends({}, this.rehydratedNames);
    sheet.deferred = _extends({}, this.deferred);
    return sheet;
  };

  /* force StyleSheet to create a new tag on the next injection */

  StyleSheet.prototype.sealAllTags = function sealAllTags() {
    this.capacity = 1;
    this.tags.forEach(function (tag) {
      // eslint-disable-next-line no-param-reassign
      tag.sealed = true;
    });
  };
  StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
    var lastEl = tag ? tag.styleTag : null;
    var insertBefore = false;
    return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
  };

  /* get a tag for a given componentId, assign the componentId to one, or shard */
  StyleSheet.prototype.getTagForId = function getTagForId(id) {
    /* simply return a tag, when the componentId was already assigned one */
    var prev = this.tagMap[id];
    if (prev !== undefined && !prev.sealed) {
      return prev;
    }
    var tag = this.tags[this.tags.length - 1];

    /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
    this.capacity -= 1;
    if (this.capacity === 0) {
      this.capacity = MAX_SIZE;
      tag = this.makeTag(tag);
      this.tags.push(tag);
    }
    return this.tagMap[id] = tag;
  };

  /* mainly for createGlobalStyle to check for its id */

  StyleSheet.prototype.hasId = function hasId(id) {
    return this.tagMap[id] !== undefined;
  };

  /* caching layer checking id+name to already have a corresponding tag and injected rules */

  StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
    /* exception for rehydrated names which are checked separately */
    if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
      return true;
    }
    var tag = this.tagMap[id];
    return tag !== undefined && tag.hasNameForId(id, name);
  };

  /* registers a componentId and registers it on its tag */

  StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
    /* don't inject when the id is already registered */
    if (this.tagMap[id] !== undefined) return;
    var clones = this.clones;
    for (var i = 0; i < clones.length; i += 1) {
      clones[i].deferredInject(id, cssRules);
    }
    this.getTagForId(id).insertMarker(id);
    this.deferred[id] = cssRules;
  };

  /* injects rules for a given id with a name that will need to be cached */

  StyleSheet.prototype.inject = function inject(id, cssRules, name) {
    var clones = this.clones;
    for (var i = 0; i < clones.length; i += 1) {
      clones[i].inject(id, cssRules, name);
    }
    var tag = this.getTagForId(id);

    /* add deferred rules for component */
    if (this.deferred[id] !== undefined) {
      // Combine passed cssRules with previously deferred CSS rules
      // NOTE: We cannot mutate the deferred array itself as all clones
      // do the same (see clones[i].inject)
      var rules = this.deferred[id].concat(cssRules);
      tag.insertRules(id, rules, name);
      this.deferred[id] = undefined;
    } else {
      tag.insertRules(id, cssRules, name);
    }
  };

  /* removes all rules for a given id, which doesn't remove its marker but resets it */

  StyleSheet.prototype.remove = function remove(id) {
    var tag = this.tagMap[id];
    if (tag === undefined) return;
    var clones = this.clones;
    for (var i = 0; i < clones.length; i += 1) {
      clones[i].remove(id);
    }

    /* remove all rules from the tag */
    tag.removeRules(id);

    /* ignore possible rehydrated names */
    this.ignoreRehydratedNames[id] = true;

    /* delete possible deferred rules */
    this.deferred[id] = undefined;
  };
  StyleSheet.prototype.toHTML = function toHTML() {
    return this.tags.map(function (tag) {
      return tag.toHTML();
    }).join('');
  };
  StyleSheet.prototype.toReactElements = function toReactElements() {
    var id = this.id;
    return this.tags.map(function (tag, i) {
      var key = 'sc-' + id + '-' + i;
      return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(tag.toElement(), {
        key: key
      });
    });
  };
  createClass(StyleSheet, null, [{
    key: 'master',
    get: function get$$1() {
      return master || (master = new StyleSheet().rehydrate());
    }

    /* NOTE: This is just for backwards-compatibility with jest-styled-components */
  }, {
    key: 'instance',
    get: function get$$1() {
      return StyleSheet.master;
    }
  }]);
  return StyleSheet;
}();

// 

var Keyframes = function () {
  function Keyframes(name, rules) {
    var _this = this;
    classCallCheck(this, Keyframes);
    this.inject = function (styleSheet) {
      if (!styleSheet.hasNameForId(_this.id, _this.name)) {
        styleSheet.inject(_this.id, _this.rules, _this.name);
      }
    };
    this.toString = function () {
      throw new StyledComponentsError(12, String(_this.name));
    };
    this.name = name;
    this.rules = rules;
    this.id = 'sc-keyframes-' + name;
  }
  Keyframes.prototype.getName = function getName() {
    return this.name;
  };
  return Keyframes;
}();

// 

/**
 * inlined version of
 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
 */

var uppercasePattern = /([A-Z])/g;
var msPattern = /^ms-/;

/**
 * Hyphenates a camelcased CSS property name, for example:
 *
 *   > hyphenateStyleName('backgroundColor')
 *   < "background-color"
 *   > hyphenateStyleName('MozTransition')
 *   < "-moz-transition"
 *   > hyphenateStyleName('msTransition')
 *   < "-ms-transition"
 *
 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
 * is converted to `-ms-`.
 *
 * @param {string} string
 * @return {string}
 */
function hyphenateStyleName(string) {
  return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
}

// 

// Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
function addUnitIfNeeded(name, value) {
  // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
  // $FlowFixMe
  if (value == null || typeof value === 'boolean' || value === '') {
    return '';
  }
  if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])) {
    return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
  }
  return String(value).trim();
}

// 

/**
 * It's falsish not falsy because 0 is allowed.
 */
var isFalsish = function isFalsish(chunk) {
  return chunk === undefined || chunk === null || chunk === false || chunk === '';
};
var objToCssArray = function objToCssArray(obj, prevKey) {
  var rules = [];
  var keys = Object.keys(obj);
  keys.forEach(function (key) {
    if (!isFalsish(obj[key])) {
      if (isPlainObject(obj[key])) {
        rules.push.apply(rules, objToCssArray(obj[key], key));
        return rules;
      } else if (isFunction(obj[key])) {
        rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
        return rules;
      }
      rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
    }
    return rules;
  });
  return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
};
function flatten(chunk, executionContext, styleSheet) {
  if (Array.isArray(chunk)) {
    var ruleSet = [];
    for (var i = 0, len = chunk.length, result; i < len; i += 1) {
      result = flatten(chunk[i], executionContext, styleSheet);
      if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
    }
    return ruleSet;
  }
  if (isFalsish(chunk)) {
    return null;
  }

  /* Handle other components */
  if (isStyledComponent(chunk)) {
    return '.' + chunk.styledComponentId;
  }

  /* Either execute or defer the function */
  if (isFunction(chunk)) {
    if (isStatelessFunction(chunk) && executionContext) {
      var _result = chunk(executionContext);
      if (false) {}
      return flatten(_result, executionContext, styleSheet);
    } else return chunk;
  }
  if (chunk instanceof Keyframes) {
    if (styleSheet) {
      chunk.inject(styleSheet);
      return chunk.getName();
    } else return chunk;
  }

  /* Handle objects */
  return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
}

// 

function css(styles) {
  for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    interpolations[_key - 1] = arguments[_key];
  }
  if (isFunction(styles) || isPlainObject(styles)) {
    // $FlowFixMe
    return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
  }

  // $FlowFixMe
  return flatten(interleave(styles, interpolations));
}

// 

function constructWithOptions(componentConstructor, tag) {
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
  if (!Object(react_is__WEBPACK_IMPORTED_MODULE_5__["isValidElementType"])(tag)) {
    throw new StyledComponentsError(1, String(tag));
  }

  /* This is callable directly as a template function */
  // $FlowFixMe: Not typed to avoid destructuring arguments
  var templateFunction = function templateFunction() {
    return componentConstructor(tag, options, css.apply(undefined, arguments));
  };

  /* If config methods are called, wrap up a new template function and merge options */
  templateFunction.withConfig = function (config) {
    return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
  };

  /* Modify/inject new props at runtime */
  templateFunction.attrs = function (attrs) {
    return constructWithOptions(componentConstructor, tag, _extends({}, options, {
      attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
    }));
  };
  return templateFunction;
}

// 
// Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
function murmurhash(c) {
  for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
    b = c.charCodeAt(d) & 255 | (c.charCodeAt(++d) & 255) << 8 | (c.charCodeAt(++d) & 255) << 16 | (c.charCodeAt(++d) & 255) << 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), b ^= b >>> 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16) ^ b, e -= 4, ++d;
  }
  switch (e) {
    case 3:
      a ^= (c.charCodeAt(d + 2) & 255) << 16;
    case 2:
      a ^= (c.charCodeAt(d + 1) & 255) << 8;
    case 1:
      a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
  }
  a ^= a >>> 13;
  a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
  return (a ^ a >>> 15) >>> 0;
}

// 
/* eslint-disable no-bitwise */

/* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
 * counterparts */
var charsLength = 52;

/* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
var getAlphabeticChar = function getAlphabeticChar(code) {
  return String.fromCharCode(code + (code > 25 ? 39 : 97));
};

/* input a number, usually a hash and convert it to base-52 */
function generateAlphabeticName(code) {
  var name = '';
  var x = void 0;

  /* get a char and divide by alphabet-length */
  for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
    name = getAlphabeticChar(x % charsLength) + name;
  }
  return getAlphabeticChar(x % charsLength) + name;
}

// 

function hasFunctionObjectKey(obj) {
  // eslint-disable-next-line guard-for-in, no-restricted-syntax
  for (var key in obj) {
    if (isFunction(obj[key])) {
      return true;
    }
  }
  return false;
}
function isStaticRules(rules, attrs) {
  for (var i = 0; i < rules.length; i += 1) {
    var rule = rules[i];

    // recursive case
    if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
      return false;
    } else if (isFunction(rule) && !isStyledComponent(rule)) {
      // functions are allowed to be static if they're just being
      // used to get the classname of a nested styled component
      return false;
    }
  }
  if (attrs.some(function (x) {
    return isFunction(x) || hasFunctionObjectKey(x);
  })) return false;
  return true;
}

// 

/* combines hashStr (murmurhash) and nameGenerator for convenience */
var hasher = function hasher(str) {
  return generateAlphabeticName(murmurhash(str));
};

/*
 ComponentStyle is all the CSS-specific stuff, not
 the React-specific stuff.
 */

var ComponentStyle = function () {
  function ComponentStyle(rules, attrs, componentId) {
    classCallCheck(this, ComponentStyle);
    this.rules = rules;
    this.isStatic =  true && isStaticRules(rules, attrs);
    this.componentId = componentId;
    if (!StyleSheet.master.hasId(componentId)) {
      StyleSheet.master.deferredInject(componentId, []);
    }
  }

  /*
   * Flattens a rule set into valid CSS
   * Hashes it, wraps the whole chunk in a .hash1234 {}
   * Returns the hash to be injected on render()
   * */

  ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
    var isStatic = this.isStatic,
      componentId = this.componentId,
      lastClassName = this.lastClassName;
    if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
      return lastClassName;
    }
    var flatCSS = flatten(this.rules, executionContext, styleSheet);
    var name = hasher(this.componentId + flatCSS.join(''));
    if (!styleSheet.hasNameForId(componentId, name)) {
      styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
    }
    this.lastClassName = name;
    return name;
  };
  ComponentStyle.generateName = function generateName(str) {
    return hasher(str);
  };
  return ComponentStyle;
}();

// 

var LIMIT = 200;
var createWarnTooManyClasses = function createWarnTooManyClasses(displayName) {
  var generatedClasses = {};
  var warningSeen = false;
  return function (className) {
    if (!warningSeen) {
      generatedClasses[className] = true;
      if (Object.keys(generatedClasses).length >= LIMIT) {
        // Unable to find latestRule in test environment.
        /* eslint-disable no-console, prefer-template */
        console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + '  const Component = styled.div.attrs(props => ({\n' + '    style: {\n' + '      background: props.background,\n' + '    },\n' + '  }))`width: 100%;`\n\n' + '  <Component />');
        warningSeen = true;
        generatedClasses = {};
      }
    }
  };
};

// 

var determineTheme = function determineTheme(props, fallbackTheme) {
  var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;

  // Props should take precedence over ThemeProvider, which should take precedence over
  // defaultProps, but React automatically puts defaultProps on props.

  /* eslint-disable react/prop-types, flowtype-errors/show-errors */
  var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
  var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
  /* eslint-enable */

  return theme;
};

// 
var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
var dashesAtEnds = /(^-|-$)/g;

/**
 * TODO: Explore using CSS.escape when it becomes more available
 * in evergreen browsers.
 */
function escape(str) {
  return str
  // Replace all possible CSS selectors
  .replace(escapeRegex, '-')

  // Remove extraneous hyphens at the start and end
  .replace(dashesAtEnds, '');
}

// 

function isTag(target) {
  return typeof target === 'string' && ( false ? undefined : true);
}

// 

function generateDisplayName(target) {
  // $FlowFixMe
  return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
}
var _TYPE_STATICS;
var REACT_STATICS = {
  childContextTypes: true,
  contextTypes: true,
  defaultProps: true,
  displayName: true,
  getDerivedStateFromProps: true,
  propTypes: true,
  type: true
};
var KNOWN_STATICS = {
  name: true,
  length: true,
  prototype: true,
  caller: true,
  callee: true,
  arguments: true,
  arity: true
};
var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_5__["ForwardRef"]] = {
  $$typeof: true,
  render: true
}, _TYPE_STATICS);
var defineProperty$1 = Object.defineProperty,
  getOwnPropertyNames = Object.getOwnPropertyNames,
  _Object$getOwnPropert = Object.getOwnPropertySymbols,
  getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
    return [];
  } : _Object$getOwnPropert,
  getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
  getPrototypeOf = Object.getPrototypeOf,
  objectPrototype = Object.prototype;
var arrayPrototype = Array.prototype;
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
  if (typeof sourceComponent !== 'string') {
    // don't hoist over string (html) components

    var inheritedComponent = getPrototypeOf(sourceComponent);
    if (inheritedComponent && inheritedComponent !== objectPrototype) {
      hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
    }
    var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
    // $FlowFixMe
    getOwnPropertySymbols(sourceComponent));
    var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
    var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
    var i = keys.length;
    var descriptor = void 0;
    var key = void 0;

    // eslint-disable-next-line no-plusplus
    while (i--) {
      key = keys[i];
      if (
      // $FlowFixMe
      !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
      // $FlowFixMe
      !(targetStatics && targetStatics[key])) {
        descriptor = getOwnPropertyDescriptor(sourceComponent, key);
        if (descriptor) {
          try {
            // Avoid failures from read-only properties
            defineProperty$1(targetComponent, key, descriptor);
          } catch (e) {
            /* fail silently */
          }
        }
      }
    }
    return targetComponent;
  }
  return targetComponent;
}

// 
function isDerivedReactComponent(fn) {
  return !!(fn && fn.prototype && fn.prototype.isReactComponent);
}

// 
// Helper to call a given function, only once
var once = function once(cb) {
  var called = false;
  return function () {
    if (!called) {
      called = true;
      cb.apply(undefined, arguments);
    }
  };
};

// 

var ThemeContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_3__["createContext"])();
var ThemeConsumer = ThemeContext.Consumer;

/**
 * Provide a theme to an entire react component tree via context
 */

var ThemeProvider = function (_Component) {
  inherits(ThemeProvider, _Component);
  function ThemeProvider(props) {
    classCallCheck(this, ThemeProvider);
    var _this = possibleConstructorReturn(this, _Component.call(this, props));
    _this.getContext = Object(memoize_one__WEBPACK_IMPORTED_MODULE_6__["default"])(_this.getContext.bind(_this));
    _this.renderInner = _this.renderInner.bind(_this);
    return _this;
  }
  ThemeProvider.prototype.render = function render() {
    if (!this.props.children) return null;
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(ThemeContext.Consumer, null, this.renderInner);
  };
  ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
    var context = this.getContext(this.props.theme, outerTheme);
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(ThemeContext.Provider, {
      value: context
    }, this.props.children);
  };

  /**
   * Get the theme from the props, supporting both (outerTheme) => {}
   * as well as object notation
   */

  ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
    if (isFunction(theme)) {
      var mergedTheme = theme(outerTheme);
      if (false) {}
      return mergedTheme;
    }
    if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
      throw new StyledComponentsError(8);
    }
    return _extends({}, outerTheme, theme);
  };
  ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
    return this.getTheme(theme, outerTheme);
  };
  return ThemeProvider;
}(react__WEBPACK_IMPORTED_MODULE_3__["Component"]);

// 

var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
var ServerStyleSheet = function () {
  function ServerStyleSheet() {
    classCallCheck(this, ServerStyleSheet);

    /* The master sheet might be reset, so keep a reference here */
    this.masterSheet = StyleSheet.master;
    this.instance = this.masterSheet.clone();
    this.sealed = false;
  }

  /**
   * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
   * StyleSheet singleton.
   */

  ServerStyleSheet.prototype.seal = function seal() {
    if (!this.sealed) {
      /* Remove sealed StyleSheets from the master sheet */
      var index = this.masterSheet.clones.indexOf(this.instance);
      this.masterSheet.clones.splice(index, 1);
      this.sealed = true;
    }
  };
  ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
    if (this.sealed) {
      throw new StyledComponentsError(2);
    }
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(StyleSheetManager, {
      sheet: this.instance
    }, children);
  };
  ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
    this.seal();
    return this.instance.toHTML();
  };
  ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
    this.seal();
    return this.instance.toReactElements();
  };
  ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
    var _this = this;
    {
      throw new StyledComponentsError(3);
    }

    /* the tag index keeps track of which tags have already been emitted */
    var instance = this.instance;
    var instanceTagIndex = 0;
    var streamAttr = SC_STREAM_ATTR + '="true"';
    var transformer = new stream.Transform({
      transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
        var tags = instance.tags;
        var html = '';

        /* retrieve html for each new style tag */
        for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
          var tag = tags[instanceTagIndex];
          html += tag.toHTML(streamAttr);
        }

        /* force our StyleSheets to emit entirely new tags */
        instance.sealAllTags();
        var renderedHtml = chunk.toString();

        /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
        if (CLOSING_TAG_R.test(renderedHtml)) {
          var endOfClosingTag = renderedHtml.indexOf('>');
          this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
        } else this.push(html + renderedHtml);
        callback();
      }
    });
    readableStream.on('end', function () {
      return _this.seal();
    });
    readableStream.on('error', function (err) {
      _this.seal();

      // forward the error to the transform stream
      transformer.emit('error', err);
    });
    return readableStream.pipe(transformer);
  };
  return ServerStyleSheet;
}();

// 

var StyleSheetContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_3__["createContext"])();
var StyleSheetConsumer = StyleSheetContext.Consumer;
var StyleSheetManager = function (_Component) {
  inherits(StyleSheetManager, _Component);
  function StyleSheetManager(props) {
    classCallCheck(this, StyleSheetManager);
    var _this = possibleConstructorReturn(this, _Component.call(this, props));
    _this.getContext = Object(memoize_one__WEBPACK_IMPORTED_MODULE_6__["default"])(_this.getContext);
    return _this;
  }
  StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
    if (sheet) {
      return sheet;
    } else if (target) {
      return new StyleSheet(target);
    } else {
      throw new StyledComponentsError(4);
    }
  };
  StyleSheetManager.prototype.render = function render() {
    var _props = this.props,
      children = _props.children,
      sheet = _props.sheet,
      target = _props.target;
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(StyleSheetContext.Provider, {
      value: this.getContext(sheet, target)
    },  false ? undefined : children);
  };
  return StyleSheetManager;
}(react__WEBPACK_IMPORTED_MODULE_3__["Component"]);
 false ? undefined : void 0;

// 

var identifiers = {};

/* We depend on components having unique IDs */
function generateId(_ComponentStyle, _displayName, parentComponentId) {
  var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);

  /**
   * This ensures uniqueness if two components happen to share
   * the same displayName.
   */
  var nr = (identifiers[displayName] || 0) + 1;
  identifiers[displayName] = nr;
  var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
  return parentComponentId ? parentComponentId + '-' + componentId : componentId;
}

// $FlowFixMe

var StyledComponent = function (_Component) {
  inherits(StyledComponent, _Component);
  function StyledComponent() {
    classCallCheck(this, StyledComponent);
    var _this = possibleConstructorReturn(this, _Component.call(this));
    _this.attrs = {};
    _this.renderOuter = _this.renderOuter.bind(_this);
    _this.renderInner = _this.renderInner.bind(_this);
    if (false) {}
    return _this;
  }
  StyledComponent.prototype.render = function render() {
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(StyleSheetConsumer, null, this.renderOuter);
  };
  StyledComponent.prototype.renderOuter = function renderOuter() {
    var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
    this.styleSheet = styleSheet;

    // No need to subscribe a static component to theme changes, it won't change anything
    if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(ThemeConsumer, null, this.renderInner);
  };
  StyledComponent.prototype.renderInner = function renderInner(theme) {
    var _props$forwardedCompo = this.props.forwardedComponent,
      componentStyle = _props$forwardedCompo.componentStyle,
      defaultProps = _props$forwardedCompo.defaultProps,
      displayName = _props$forwardedCompo.displayName,
      foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
      styledComponentId = _props$forwardedCompo.styledComponentId,
      target = _props$forwardedCompo.target;
    var generatedClassName = void 0;
    if (componentStyle.isStatic) {
      generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
    } else {
      generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
    }
    var elementToBeCreated = this.props.as || this.attrs.as || target;
    var isTargetTag = isTag(elementToBeCreated);
    var propsForElement = {};
    var computedProps = _extends({}, this.props, this.attrs);
    var key = void 0;
    // eslint-disable-next-line guard-for-in
    for (key in computedProps) {
      if (false) {}
      if (key === 'forwardedComponent' || key === 'as') {
        continue;
      } else if (key === 'forwardedRef') propsForElement.ref = computedProps[key];else if (key === 'forwardedAs') propsForElement.as = computedProps[key];else if (!isTargetTag || Object(_emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(key)) {
        // Don't pass through non HTML tags through to HTML elements
        propsForElement[key] = computedProps[key];
      }
    }
    if (this.props.style && this.attrs.style) {
      propsForElement.style = _extends({}, this.attrs.style, this.props.style);
    }
    propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
    return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_3__["createElement"])(elementToBeCreated, propsForElement);
  };
  StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
    var _this2 = this;
    var context = _extends({}, props, {
      theme: theme
    });
    if (!attrs.length) return context;
    this.attrs = {};
    attrs.forEach(function (attrDef) {
      var resolvedAttrDef = attrDef;
      var attrDefWasFn = false;
      var attr = void 0;
      var key = void 0;
      if (isFunction(resolvedAttrDef)) {
        // $FlowFixMe
        resolvedAttrDef = resolvedAttrDef(context);
        attrDefWasFn = true;
      }

      /* eslint-disable guard-for-in */
      // $FlowFixMe
      for (key in resolvedAttrDef) {
        attr = resolvedAttrDef[key];
        if (!attrDefWasFn) {
          if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
            if (false) {}
            attr = attr(context);
            if (false) {}
          }
        }
        _this2.attrs[key] = attr;
        context[key] = attr;
      }
      /* eslint-enable */
    });
    return context;
  };
  StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
    var _props$forwardedCompo2 = props.forwardedComponent,
      attrs = _props$forwardedCompo2.attrs,
      componentStyle = _props$forwardedCompo2.componentStyle,
      warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;

    // statically styled-components don't need to build an execution context object,
    // and shouldn't be increasing the number of class names

    if (componentStyle.isStatic && !attrs.length) {
      return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
    }
    var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
    if (false) {}
    return className;
  };
  return StyledComponent;
}(react__WEBPACK_IMPORTED_MODULE_3__["Component"]);
function createStyledComponent(target, options, rules) {
  var isTargetStyledComp = isStyledComponent(target);
  var isClass = !isTag(target);
  var _options$displayName = options.displayName,
    displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
    _options$componentId = options.componentId,
    componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
    _options$ParentCompon = options.ParentComponent,
    ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
    _options$attrs = options.attrs,
    attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
  var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;

  // fold the underlying StyledComponent attrs up (implicit extend)
  var finalAttrs =
  // $FlowFixMe
  isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
  var componentStyle = new ComponentStyle(isTargetStyledComp ?
  // fold the underlying StyledComponent rules up (implicit extend)
  // $FlowFixMe
  target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);

  /**
   * forwardRef creates a new interim component, which we'll take advantage of
   * instead of extending ParentComponent to create _another_ interim class
   */
  var WrappedStyledComponent = void 0;
  var forwardRef = function forwardRef(props, ref) {
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(ParentComponent, _extends({}, props, {
      forwardedComponent: WrappedStyledComponent,
      forwardedRef: ref
    }));
  };
  forwardRef.displayName = displayName;
  WrappedStyledComponent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].forwardRef(forwardRef);
  WrappedStyledComponent.displayName = displayName;

  // $FlowFixMe
  WrappedStyledComponent.attrs = finalAttrs;
  // $FlowFixMe
  WrappedStyledComponent.componentStyle = componentStyle;

  // $FlowFixMe
  WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ?
  // $FlowFixMe
  Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;

  // $FlowFixMe
  WrappedStyledComponent.styledComponentId = styledComponentId;

  // fold the underlying StyledComponent target up since we folded the styles
  // $FlowFixMe
  WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;

  // $FlowFixMe
  WrappedStyledComponent.withComponent = function withComponent(tag) {
    var previousComponentId = options.componentId,
      optionsToCopy = objectWithoutProperties(options, ['componentId']);
    var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
    var newOptions = _extends({}, optionsToCopy, {
      attrs: finalAttrs,
      componentId: newComponentId,
      ParentComponent: ParentComponent
    });
    return createStyledComponent(tag, newOptions, rules);
  };

  // $FlowFixMe
  Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
    get: function get$$1() {
      return this._foldedDefaultProps;
    },
    set: function set$$1(obj) {
      // $FlowFixMe
      this._foldedDefaultProps = isTargetStyledComp ? Object(merge_anything__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(target.defaultProps, obj) : obj;
    }
  });
  if (false) {}

  // $FlowFixMe
  WrappedStyledComponent.toString = function () {
    return '.' + WrappedStyledComponent.styledComponentId;
  };
  if (isClass) {
    hoistNonReactStatics(WrappedStyledComponent, target, {
      // all SC-specific things should not be hoisted
      attrs: true,
      componentStyle: true,
      displayName: true,
      foldedComponentIds: true,
      styledComponentId: true,
      target: true,
      withComponent: true
    });
  }
  return WrappedStyledComponent;
}

// 
// Thanks to ReactDOMFactories for this handy list!

var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr',
// SVG
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];

// 

var styled = function styled(tag) {
  return constructWithOptions(createStyledComponent, tag);
};

// Shorthands for all valid HTML Elements
domElements.forEach(function (domElement) {
  styled[domElement] = styled(domElement);
});

// 

var GlobalStyle = function () {
  function GlobalStyle(rules, componentId) {
    classCallCheck(this, GlobalStyle);
    this.rules = rules;
    this.componentId = componentId;
    this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
    if (!StyleSheet.master.hasId(componentId)) {
      StyleSheet.master.deferredInject(componentId, []);
    }
  }
  GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
    var flatCSS = flatten(this.rules, executionContext, styleSheet);
    var css = stringifyRules(flatCSS, '');
    styleSheet.inject(this.componentId, css);
  };
  GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
    var componentId = this.componentId;
    if (styleSheet.hasId(componentId)) {
      styleSheet.remove(componentId);
    }
  };

  // TODO: overwrite in-place instead of remove+create?

  GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
    this.removeStyles(styleSheet);
    this.createStyles(executionContext, styleSheet);
  };
  return GlobalStyle;
}();

// 

// place our cache into shared context so it'll persist between HMRs
if (IS_BROWSER) {
  window.scCGSHMRCache = {};
}
function createGlobalStyle(strings) {
  for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    interpolations[_key - 1] = arguments[_key];
  }
  var rules = css.apply(undefined, [strings].concat(interpolations));
  var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
  var style = new GlobalStyle(rules, id);
  var GlobalStyleComponent = function (_React$Component) {
    inherits(GlobalStyleComponent, _React$Component);
    function GlobalStyleComponent(props) {
      classCallCheck(this, GlobalStyleComponent);
      var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
      var _this$constructor = _this.constructor,
        globalStyle = _this$constructor.globalStyle,
        styledComponentId = _this$constructor.styledComponentId;
      if (IS_BROWSER) {
        window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
      }

      /**
       * This fixes HMR compatibility. Don't ask me why, but this combination of
       * caching the closure variables via statics and then persisting the statics in
       * state works across HMR where no other combination did. ¯\_(ツ)_/¯
       */
      _this.state = {
        globalStyle: globalStyle,
        styledComponentId: styledComponentId
      };
      return _this;
    }
    GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
      if (window.scCGSHMRCache[this.state.styledComponentId]) {
        window.scCGSHMRCache[this.state.styledComponentId] -= 1;
      }
      /**
       * Depending on the order "render" is called this can cause the styles to be lost
       * until the next render pass of the remaining instance, which may
       * not be immediate.
       */
      if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
        this.state.globalStyle.removeStyles(this.styleSheet);
      }
    };
    GlobalStyleComponent.prototype.render = function render() {
      var _this2 = this;
      if (false) {}
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(StyleSheetConsumer, null, function (styleSheet) {
        _this2.styleSheet = styleSheet || StyleSheet.master;
        var globalStyle = _this2.state.globalStyle;
        if (globalStyle.isStatic) {
          globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
          return null;
        } else {
          return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(ThemeConsumer, null, function (theme) {
            // $FlowFixMe
            var defaultProps = _this2.constructor.defaultProps;
            var context = _extends({}, _this2.props);
            if (typeof theme !== 'undefined') {
              context.theme = determineTheme(_this2.props, theme, defaultProps);
            }
            globalStyle.renderStyles(context, _this2.styleSheet);
            return null;
          });
        }
      });
    };
    return GlobalStyleComponent;
  }(react__WEBPACK_IMPORTED_MODULE_3__["default"].Component);
  GlobalStyleComponent.globalStyle = style;
  GlobalStyleComponent.styledComponentId = id;
  return GlobalStyleComponent;
}

// 

var replaceWhitespace = function replaceWhitespace(str) {
  return str.replace(/\s|\\n/g, '');
};
function keyframes(strings) {
  /* Warning if you've used keyframes on React Native */
  if (false) {}
  for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    interpolations[_key - 1] = arguments[_key];
  }
  var rules = css.apply(undefined, [strings].concat(interpolations));
  var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
  return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
}

// 

var withTheme = function withTheme(Component$$1) {
  var WithTheme = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].forwardRef(function (props, ref) {
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(ThemeConsumer, null, function (theme) {
      // $FlowFixMe
      var defaultProps = Component$$1.defaultProps;
      var themeProp = determineTheme(props, theme, defaultProps);
      if (false) {}
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["default"].createElement(Component$$1, _extends({}, props, {
        theme: themeProp,
        ref: ref
      }));
    });
  });
  hoistNonReactStatics(WithTheme, Component$$1);
  WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
  return WithTheme;
};

// 

/* eslint-disable */
var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
  StyleSheet: StyleSheet
};

// 

/* Warning if you've imported this file on React Native */
if (false) {}

/* Warning if there are several instances of styled-components */
if (false) {}

//

/* harmony default export */ __webpack_exports__["c"] = (styled);

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(57)))

/***/ }),
/* 3 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}

/***/ }),
/* 4 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
function _typeof(obj) {
  "@babel/helpers - typeof";

  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
    _typeof = function _typeof(obj) {
      return typeof obj;
    };
  } else {
    _typeof = function _typeof(obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };
  }
  return _typeof(obj);
}

/***/ }),
/* 5 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
function _assertThisInitialized(self) {
  if (self === void 0) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }
  return self;
}

/***/ }),
/* 6 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useCallback", function() { return x; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useContext", function() { return P; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useDebugValue", function() { return V; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useEffect", function() { return _; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useErrorBoundary", function() { return b; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useId", function() { return g; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useImperativeHandle", function() { return T; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useLayoutEffect", function() { return A; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useMemo", function() { return q; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useReducer", function() { return y; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useRef", function() { return F; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useState", function() { return p; });
/* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);

var t,
  r,
  u,
  i,
  o = 0,
  f = [],
  c = [],
  e = preact__WEBPACK_IMPORTED_MODULE_0__["options"],
  a = e.__b,
  v = e.__r,
  l = e.diffed,
  m = e.__c,
  s = e.unmount,
  d = e.__;
function h(n, t) {
  e.__h && e.__h(r, n, o || t), o = 0;
  var u = r.__H || (r.__H = {
    __: [],
    __h: []
  });
  return n >= u.__.length && u.__.push({
    __V: c
  }), u.__[n];
}
function p(n) {
  return o = 1, y(D, n);
}
function y(n, u, i) {
  var o = h(t++, 2);
  if (o.t = n, !o.__c && (o.__ = [i ? i(u) : D(void 0, u), function (n) {
    var t = o.__N ? o.__N[0] : o.__[0],
      r = o.t(t, n);
    t !== r && (o.__N = [r, o.__[1]], o.__c.setState({}));
  }], o.__c = r, !r.u)) {
    var f = function f(n, t, r) {
      if (!o.__c.__H) return !0;
      var u = o.__c.__H.__.filter(function (n) {
        return !!n.__c;
      });
      if (u.every(function (n) {
        return !n.__N;
      })) return !c || c.call(this, n, t, r);
      var i = !1;
      return u.forEach(function (n) {
        if (n.__N) {
          var t = n.__[0];
          n.__ = n.__N, n.__N = void 0, t !== n.__[0] && (i = !0);
        }
      }), !(!i && o.__c.props === n) && (!c || c.call(this, n, t, r));
    };
    r.u = !0;
    var c = r.shouldComponentUpdate,
      e = r.componentWillUpdate;
    r.componentWillUpdate = function (n, t, r) {
      if (this.__e) {
        var u = c;
        c = void 0, f(n, t, r), c = u;
      }
      e && e.call(this, n, t, r);
    }, r.shouldComponentUpdate = f;
  }
  return o.__N || o.__;
}
function _(n, u) {
  var i = h(t++, 3);
  !e.__s && C(i.__H, u) && (i.__ = n, i.i = u, r.__H.__h.push(i));
}
function A(n, u) {
  var i = h(t++, 4);
  !e.__s && C(i.__H, u) && (i.__ = n, i.i = u, r.__h.push(i));
}
function F(n) {
  return o = 5, q(function () {
    return {
      current: n
    };
  }, []);
}
function T(n, t, r) {
  o = 6, A(function () {
    return "function" == typeof n ? (n(t()), function () {
      return n(null);
    }) : n ? (n.current = t(), function () {
      return n.current = null;
    }) : void 0;
  }, null == r ? r : r.concat(n));
}
function q(n, r) {
  var u = h(t++, 7);
  return C(u.__H, r) ? (u.__V = n(), u.i = r, u.__h = n, u.__V) : u.__;
}
function x(n, t) {
  return o = 8, q(function () {
    return n;
  }, t);
}
function P(n) {
  var u = r.context[n.__c],
    i = h(t++, 9);
  return i.c = n, u ? (null == i.__ && (i.__ = !0, u.sub(r)), u.props.value) : n.__;
}
function V(n, t) {
  e.useDebugValue && e.useDebugValue(t ? t(n) : n);
}
function b(n) {
  var u = h(t++, 10),
    i = p();
  return u.__ = n, r.componentDidCatch || (r.componentDidCatch = function (n, t) {
    u.__ && u.__(n, t), i[1](n);
  }), [i[0], function () {
    i[1](void 0);
  }];
}
function g() {
  var n = h(t++, 11);
  if (!n.__) {
    for (var u = r.__v; null !== u && !u.__m && null !== u.__;) {
      u = u.__;
    }
    var i = u.__m || (u.__m = [0, 0]);
    n.__ = "P" + i[0] + "-" + i[1]++;
  }
  return n.__;
}
function j() {
  for (var n; n = f.shift();) {
    if (n.__P && n.__H) try {
      n.__H.__h.forEach(z), n.__H.__h.forEach(B), n.__H.__h = [];
    } catch (t) {
      n.__H.__h = [], e.__e(t, n.__v);
    }
  }
}
e.__b = function (n) {
  r = null, a && a(n);
}, e.__ = function (n, t) {
  n && t.__k && t.__k.__m && (n.__m = t.__k.__m), d && d(n, t);
}, e.__r = function (n) {
  v && v(n), t = 0;
  var i = (r = n.__c).__H;
  i && (u === r ? (i.__h = [], r.__h = [], i.__.forEach(function (n) {
    n.__N && (n.__ = n.__N), n.__V = c, n.__N = n.i = void 0;
  })) : (i.__h.forEach(z), i.__h.forEach(B), i.__h = [], t = 0)), u = r;
}, e.diffed = function (n) {
  l && l(n);
  var t = n.__c;
  t && t.__H && (t.__H.__h.length && (1 !== f.push(t) && i === e.requestAnimationFrame || ((i = e.requestAnimationFrame) || w)(j)), t.__H.__.forEach(function (n) {
    n.i && (n.__H = n.i), n.__V !== c && (n.__ = n.__V), n.i = void 0, n.__V = c;
  })), u = r = null;
}, e.__c = function (n, t) {
  t.some(function (n) {
    try {
      n.__h.forEach(z), n.__h = n.__h.filter(function (n) {
        return !n.__ || B(n);
      });
    } catch (r) {
      t.some(function (n) {
        n.__h && (n.__h = []);
      }), t = [], e.__e(r, n.__v);
    }
  }), m && m(n, t);
}, e.unmount = function (n) {
  s && s(n);
  var t,
    r = n.__c;
  r && r.__H && (r.__H.__.forEach(function (n) {
    try {
      z(n);
    } catch (n) {
      t = n;
    }
  }), r.__H = void 0, t && e.__e(t, r.__v));
};
var k = "function" == typeof requestAnimationFrame;
function w(n) {
  var t,
    r = function r() {
      clearTimeout(u), k && cancelAnimationFrame(t), setTimeout(n);
    },
    u = setTimeout(r, 100);
  k && (t = requestAnimationFrame(r));
}
function z(n) {
  var t = r,
    u = n.__c;
  "function" == typeof u && (n.__c = void 0, u()), r = t;
}
function B(n) {
  var t = r;
  n.__c = n.__(), r = t;
}
function C(n, t) {
  return !n || n.length !== t.length || t.some(function (t, r) {
    return t !== n[r];
  });
}
function D(n, t) {
  return "function" == typeof t ? t(n) : t;
}


/***/ }),
/* 7 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
function _getPrototypeOf(o) {
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  };
  return _getPrototypeOf(o);
}

/***/ }),
/* 8 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });

// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
function _arrayWithHoles(arr) {
  if (Array.isArray(arr)) return arr;
}
// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit(arr, i) {
  if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
  var _arr = [];
  var _n = true;
  var _d = false;
  var _e = undefined;
  try {
    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
      _arr.push(_s.value);
      if (i && _arr.length === i) break;
    }
  } catch (err) {
    _d = true;
    _e = err;
  } finally {
    try {
      if (!_n && _i["return"] != null) _i["return"]();
    } finally {
      if (_d) throw _e;
    }
  }
  return _arr;
}
// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__(24);

// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/slicedToArray.js




function _slicedToArray(arr, i) {
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || _nonIterableRest();
}

/***/ }),
/* 9 */
/***/ (function(module, exports) {

function _typeof(obj) {
  "@babel/helpers - typeof";

  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
    module.exports = _typeof = function _typeof(obj) {
      return typeof obj;
    };
  } else {
    module.exports = _typeof = function _typeof(obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };
  }
  return _typeof(obj);
}
module.exports = _typeof;

/***/ }),
/* 10 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = __webpack_require__(22);

// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js

function _arrayWithoutHoles(arr) {
  if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
}
// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/iterableToArray.js
function _iterableToArray(iter) {
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__(24);

// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js




function _toConsumableArray(arr) {
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
}

/***/ }),
/* 11 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  try {
    var info = gen[key](arg);
    var value = info.value;
  } catch (error) {
    reject(error);
    return;
  }
  if (info.done) {
    resolve(value);
  } else {
    Promise.resolve(value).then(_next, _throw);
  }
}
function _asyncToGenerator(fn) {
  return function () {
    var self = this,
      args = arguments;
    return new Promise(function (resolve, reject) {
      var gen = fn.apply(self, args);
      function _next(value) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
      }
      function _throw(err) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
      }
      _next(undefined);
    });
  };
}

/***/ }),
/* 12 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
function _extends() {
  _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  return _extends.apply(this, arguments);
}

/***/ }),
/* 13 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    var descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}
function _createClass(Constructor, protoProps, staticProps) {
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  if (staticProps) _defineProperties(Constructor, staticProps);
  return Constructor;
}

/***/ }),
/* 14 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}

/***/ }),
/* 15 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);


function _possibleConstructorReturn(self, call) {
  if (call && (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
    return call;
  }
  return Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
}

/***/ }),
/* 16 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
/* harmony import */ var _babel_runtime_helpers_esm_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);

function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function");
  }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      writable: true,
      configurable: true
    }
  });
  if (superClass) Object(_babel_runtime_helpers_esm_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(subClass, superClass);
}

/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {

/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

if (false) { var throwOnDirectAccess, ReactIs; } else {
  // By explicitly using `prop-types` you are opting into new production behavior.
  // http://fb.me/prop-types-in-prod
  module.exports = __webpack_require__(53)();
}

/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global, module) {var _typeof = __webpack_require__(9);
/**
 * lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;

/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';

/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';

/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
  PARTIAL_COMPARE_FLAG = 2;

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
  MAX_SAFE_INTEGER = 9007199254740991,
  MAX_INTEGER = 1.7976931348623157e+308,
  NAN = 0 / 0;

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
  arrayTag = '[object Array]',
  boolTag = '[object Boolean]',
  dateTag = '[object Date]',
  errorTag = '[object Error]',
  funcTag = '[object Function]',
  genTag = '[object GeneratorFunction]',
  mapTag = '[object Map]',
  numberTag = '[object Number]',
  objectTag = '[object Object]',
  promiseTag = '[object Promise]',
  regexpTag = '[object RegExp]',
  setTag = '[object Set]',
  stringTag = '[object String]',
  symbolTag = '[object Symbol]',
  weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
  dataViewTag = '[object DataView]',
  float32Tag = '[object Float32Array]',
  float64Tag = '[object Float64Array]',
  int8Tag = '[object Int8Array]',
  int16Tag = '[object Int16Array]',
  int32Tag = '[object Int32Array]',
  uint8Tag = '[object Uint8Array]',
  uint8ClampedTag = '[object Uint8ClampedArray]',
  uint16Tag = '[object Uint16Array]',
  uint32Tag = '[object Uint32Array]';

/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  reIsPlainProp = /^\w*$/,
  reLeadingDot = /^\./,
  rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;

/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;

/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;

/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;

/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;

/** Detect free variable `global` from Node.js. */
var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Detect free variable `exports`. */
var freeExports = ( false ? undefined : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && ( false ? undefined : _typeof(module)) == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = function () {
  try {
    return freeProcess && freeProcess.binding('util');
  } catch (e) {}
}();

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * A specialized version of `_.some` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} predicate The function invoked per iteration.
 * @returns {boolean} Returns `true` if any element passes the predicate check,
 *  else `false`.
 */
function arraySome(array, predicate) {
  var index = -1,
    length = array ? array.length : 0;
  while (++index < length) {
    if (predicate(array[index], index, array)) {
      return true;
    }
  }
  return false;
}

/**
 * The base implementation of `_.findIndex` and `_.findLastIndex` without
 * support for iteratee shorthands.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {Function} predicate The function invoked per iteration.
 * @param {number} fromIndex The index to search from.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseFindIndex(array, predicate, fromIndex, fromRight) {
  var length = array.length,
    index = fromIndex + (fromRight ? 1 : -1);
  while (fromRight ? index-- : ++index < length) {
    if (predicate(array[index], index, array)) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.property` without support for deep paths.
 *
 * @private
 * @param {string} key The key of the property to get.
 * @returns {Function} Returns the new accessor function.
 */
function baseProperty(key) {
  return function (object) {
    return object == null ? undefined : object[key];
  };
}

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
    result = Array(n);
  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function (value) {
    return func(value);
  };
}

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

/**
 * Checks if `value` is a host object in IE < 9.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
 */
function isHostObject(value) {
  // Many host objects are `Object` objects that can coerce to strings
  // despite having improperly defined `toString` methods.
  var result = false;
  if (value != null && typeof value.toString != 'function') {
    try {
      result = !!(value + '');
    } catch (e) {}
  }
  return result;
}

/**
 * Converts `map` to its key-value pairs.
 *
 * @private
 * @param {Object} map The map to convert.
 * @returns {Array} Returns the key-value pairs.
 */
function mapToArray(map) {
  var index = -1,
    result = Array(map.size);
  map.forEach(function (value, key) {
    result[++index] = [key, value];
  });
  return result;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function (arg) {
    return func(transform(arg));
  };
}

/**
 * Converts `set` to an array of its values.
 *
 * @private
 * @param {Object} set The set to convert.
 * @returns {Array} Returns the values.
 */
function setToArray(set) {
  var index = -1,
    result = Array(set.size);
  set.forEach(function (value) {
    result[++index] = value;
  });
  return result;
}

/** Used for built-in method references. */
var arrayProto = Array.prototype,
  funcProto = Function.prototype,
  objectProto = Object.prototype;

/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];

/** Used to detect methods masquerading as native. */
var maskSrcKey = function () {
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  return uid ? 'Symbol(src)_1.' + uid : '';
}();

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var objectToString = objectProto.toString;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');

/** Built-in value references. */
var _Symbol = root.Symbol,
  Uint8Array = root.Uint8Array,
  propertyIsEnumerable = objectProto.propertyIsEnumerable,
  splice = arrayProto.splice;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object),
  nativeMax = Math.max;

/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView'),
  Map = getNative(root, 'Map'),
  Promise = getNative(root, 'Promise'),
  Set = getNative(root, 'Set'),
  WeakMap = getNative(root, 'WeakMap'),
  nativeCreate = getNative(Object, 'create');

/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
  mapCtorString = toSource(Map),
  promiseCtorString = toSource(Promise),
  setCtorString = toSource(Set),
  weakMapCtorString = toSource(WeakMap);

/** Used to convert symbols to primitives and strings. */
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
  symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  symbolToString = symbolProto ? symbolProto.toString : undefined;

/**
 * Creates a hash object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Hash(entries) {
  var index = -1,
    length = entries ? entries.length : 0;
  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the hash.
 *
 * @private
 * @name clear
 * @memberOf Hash
 */
function hashClear() {
  this.__data__ = nativeCreate ? nativeCreate(null) : {};
}

/**
 * Removes `key` and its value from the hash.
 *
 * @private
 * @name delete
 * @memberOf Hash
 * @param {Object} hash The hash to modify.
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function hashDelete(key) {
  return this.has(key) && delete this.__data__[key];
}

/**
 * Gets the hash value for `key`.
 *
 * @private
 * @name get
 * @memberOf Hash
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function hashGet(key) {
  var data = this.__data__;
  if (nativeCreate) {
    var result = data[key];
    return result === HASH_UNDEFINED ? undefined : result;
  }
  return hasOwnProperty.call(data, key) ? data[key] : undefined;
}

/**
 * Checks if a hash value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Hash
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function hashHas(key) {
  var data = this.__data__;
  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}

/**
 * Sets the hash `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Hash
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the hash instance.
 */
function hashSet(key, value) {
  var data = this.__data__;
  data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
  return this;
}

// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;

/**
 * Creates an list cache object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function ListCache(entries) {
  var index = -1,
    length = entries ? entries.length : 0;
  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the list cache.
 *
 * @private
 * @name clear
 * @memberOf ListCache
 */
function listCacheClear() {
  this.__data__ = [];
}

/**
 * Removes `key` and its value from the list cache.
 *
 * @private
 * @name delete
 * @memberOf ListCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function listCacheDelete(key) {
  var data = this.__data__,
    index = assocIndexOf(data, key);
  if (index < 0) {
    return false;
  }
  var lastIndex = data.length - 1;
  if (index == lastIndex) {
    data.pop();
  } else {
    splice.call(data, index, 1);
  }
  return true;
}

/**
 * Gets the list cache value for `key`.
 *
 * @private
 * @name get
 * @memberOf ListCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function listCacheGet(key) {
  var data = this.__data__,
    index = assocIndexOf(data, key);
  return index < 0 ? undefined : data[index][1];
}

/**
 * Checks if a list cache value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf ListCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function listCacheHas(key) {
  return assocIndexOf(this.__data__, key) > -1;
}

/**
 * Sets the list cache `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf ListCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the list cache instance.
 */
function listCacheSet(key, value) {
  var data = this.__data__,
    index = assocIndexOf(data, key);
  if (index < 0) {
    data.push([key, value]);
  } else {
    data[index][1] = value;
  }
  return this;
}

// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;

/**
 * Creates a map cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function MapCache(entries) {
  var index = -1,
    length = entries ? entries.length : 0;
  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the map.
 *
 * @private
 * @name clear
 * @memberOf MapCache
 */
function mapCacheClear() {
  this.__data__ = {
    'hash': new Hash(),
    'map': new (Map || ListCache)(),
    'string': new Hash()
  };
}

/**
 * Removes `key` and its value from the map.
 *
 * @private
 * @name delete
 * @memberOf MapCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function mapCacheDelete(key) {
  return getMapData(this, key)['delete'](key);
}

/**
 * Gets the map value for `key`.
 *
 * @private
 * @name get
 * @memberOf MapCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function mapCacheGet(key) {
  return getMapData(this, key).get(key);
}

/**
 * Checks if a map value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf MapCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function mapCacheHas(key) {
  return getMapData(this, key).has(key);
}

/**
 * Sets the map `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf MapCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the map cache instance.
 */
function mapCacheSet(key, value) {
  getMapData(this, key).set(key, value);
  return this;
}

// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;

/**
 *
 * Creates an array cache object to store unique values.
 *
 * @private
 * @constructor
 * @param {Array} [values] The values to cache.
 */
function SetCache(values) {
  var index = -1,
    length = values ? values.length : 0;
  this.__data__ = new MapCache();
  while (++index < length) {
    this.add(values[index]);
  }
}

/**
 * Adds `value` to the array cache.
 *
 * @private
 * @name add
 * @memberOf SetCache
 * @alias push
 * @param {*} value The value to cache.
 * @returns {Object} Returns the cache instance.
 */
function setCacheAdd(value) {
  this.__data__.set(value, HASH_UNDEFINED);
  return this;
}

/**
 * Checks if `value` is in the array cache.
 *
 * @private
 * @name has
 * @memberOf SetCache
 * @param {*} value The value to search for.
 * @returns {number} Returns `true` if `value` is found, else `false`.
 */
function setCacheHas(value) {
  return this.__data__.has(value);
}

// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;

/**
 * Creates a stack cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Stack(entries) {
  this.__data__ = new ListCache(entries);
}

/**
 * Removes all key-value entries from the stack.
 *
 * @private
 * @name clear
 * @memberOf Stack
 */
function stackClear() {
  this.__data__ = new ListCache();
}

/**
 * Removes `key` and its value from the stack.
 *
 * @private
 * @name delete
 * @memberOf Stack
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function stackDelete(key) {
  return this.__data__['delete'](key);
}

/**
 * Gets the stack value for `key`.
 *
 * @private
 * @name get
 * @memberOf Stack
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function stackGet(key) {
  return this.__data__.get(key);
}

/**
 * Checks if a stack value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Stack
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function stackHas(key) {
  return this.__data__.has(key);
}

/**
 * Sets the stack `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Stack
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the stack cache instance.
 */
function stackSet(key, value) {
  var cache = this.__data__;
  if (cache instanceof ListCache) {
    var pairs = cache.__data__;
    if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
      pairs.push([key, value]);
      return this;
    }
    cache = this.__data__ = new MapCache(pairs);
  }
  cache.set(key, value);
  return this;
}

// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  // Safari 9 makes `arguments.length` enumerable in strict mode.
  var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
  var length = result.length,
    skipIndexes = !!length;
  for (var key in value) {
    if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
      result.push(key);
    }
  }
  return result;
}

/**
 * Gets the index at which the `key` is found in `array` of key-value pairs.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} key The key to search for.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function assocIndexOf(array, key) {
  var length = array.length;
  while (length--) {
    if (eq(array[length][0], key)) {
      return length;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.get` without support for default values.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {Array|string} path The path of the property to get.
 * @returns {*} Returns the resolved value.
 */
function baseGet(object, path) {
  path = isKey(path, object) ? [path] : castPath(path);
  var index = 0,
    length = path.length;
  while (object != null && index < length) {
    object = object[toKey(path[index++])];
  }
  return index && index == length ? object : undefined;
}

/**
 * The base implementation of `getTag`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  return objectToString.call(value);
}

/**
 * The base implementation of `_.hasIn` without support for deep paths.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {Array|string} key The key to check.
 * @returns {boolean} Returns `true` if `key` exists, else `false`.
 */
function baseHasIn(object, key) {
  return object != null && key in Object(object);
}

/**
 * The base implementation of `_.isEqual` which supports partial comparisons
 * and tracks traversed objects.
 *
 * @private
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @param {Function} [customizer] The function to customize comparisons.
 * @param {boolean} [bitmask] The bitmask of comparison flags.
 *  The bitmask may be composed of the following flags:
 *     1 - Unordered comparison
 *     2 - Partial comparison
 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 */
function baseIsEqual(value, other, customizer, bitmask, stack) {
  if (value === other) {
    return true;
  }
  if (value == null || other == null || !isObject(value) && !isObjectLike(other)) {
    return value !== value && other !== other;
  }
  return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
}

/**
 * A specialized version of `baseIsEqual` for arrays and objects which performs
 * deep comparisons and tracks traversed objects enabling objects with circular
 * references to be compared.
 *
 * @private
 * @param {Object} object The object to compare.
 * @param {Object} other The other object to compare.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Function} [customizer] The function to customize comparisons.
 * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
 *  for more details.
 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
 */
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
  var objIsArr = isArray(object),
    othIsArr = isArray(other),
    objTag = arrayTag,
    othTag = arrayTag;
  if (!objIsArr) {
    objTag = getTag(object);
    objTag = objTag == argsTag ? objectTag : objTag;
  }
  if (!othIsArr) {
    othTag = getTag(other);
    othTag = othTag == argsTag ? objectTag : othTag;
  }
  var objIsObj = objTag == objectTag && !isHostObject(object),
    othIsObj = othTag == objectTag && !isHostObject(other),
    isSameTag = objTag == othTag;
  if (isSameTag && !objIsObj) {
    stack || (stack = new Stack());
    return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
  }
  if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
      othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
    if (objIsWrapped || othIsWrapped) {
      var objUnwrapped = objIsWrapped ? object.value() : object,
        othUnwrapped = othIsWrapped ? other.value() : other;
      stack || (stack = new Stack());
      return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
    }
  }
  if (!isSameTag) {
    return false;
  }
  stack || (stack = new Stack());
  return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
}

/**
 * The base implementation of `_.isMatch` without support for iteratee shorthands.
 *
 * @private
 * @param {Object} object The object to inspect.
 * @param {Object} source The object of property values to match.
 * @param {Array} matchData The property names, values, and compare flags to match.
 * @param {Function} [customizer] The function to customize comparisons.
 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
 */
function baseIsMatch(object, source, matchData, customizer) {
  var index = matchData.length,
    length = index,
    noCustomizer = !customizer;
  if (object == null) {
    return !length;
  }
  object = Object(object);
  while (index--) {
    var data = matchData[index];
    if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
      return false;
    }
  }
  while (++index < length) {
    data = matchData[index];
    var key = data[0],
      objValue = object[key],
      srcValue = data[1];
    if (noCustomizer && data[2]) {
      if (objValue === undefined && !(key in object)) {
        return false;
      }
    } else {
      var stack = new Stack();
      if (customizer) {
        var result = customizer(objValue, srcValue, key, object, source, stack);
      }
      if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) {
        return false;
      }
    }
  }
  return true;
}

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject(value) || isMasked(value)) {
    return false;
  }
  var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
  return pattern.test(toSource(value));
}

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
}

/**
 * The base implementation of `_.iteratee`.
 *
 * @private
 * @param {*} [value=_.identity] The value to convert to an iteratee.
 * @returns {Function} Returns the iteratee.
 */
function baseIteratee(value) {
  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  if (typeof value == 'function') {
    return value;
  }
  if (value == null) {
    return identity;
  }
  if (_typeof(value) == 'object') {
    return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
  }
  return property(value);
}

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * The base implementation of `_.matches` which doesn't clone `source`.
 *
 * @private
 * @param {Object} source The object of property values to match.
 * @returns {Function} Returns the new spec function.
 */
function baseMatches(source) {
  var matchData = getMatchData(source);
  if (matchData.length == 1 && matchData[0][2]) {
    return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  }
  return function (object) {
    return object === source || baseIsMatch(object, source, matchData);
  };
}

/**
 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
 *
 * @private
 * @param {string} path The path of the property to get.
 * @param {*} srcValue The value to match.
 * @returns {Function} Returns the new spec function.
 */
function baseMatchesProperty(path, srcValue) {
  if (isKey(path) && isStrictComparable(srcValue)) {
    return matchesStrictComparable(toKey(path), srcValue);
  }
  return function (object) {
    var objValue = get(object, path);
    return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
  };
}

/**
 * A specialized version of `baseProperty` which supports deep paths.
 *
 * @private
 * @param {Array|string} path The path of the property to get.
 * @returns {Function} Returns the new accessor function.
 */
function basePropertyDeep(path) {
  return function (object) {
    return baseGet(object, path);
  };
}

/**
 * The base implementation of `_.toString` which doesn't convert nullish
 * values to empty strings.
 *
 * @private
 * @param {*} value The value to process.
 * @returns {string} Returns the string.
 */
function baseToString(value) {
  // Exit early for strings to avoid a performance hit in some environments.
  if (typeof value == 'string') {
    return value;
  }
  if (isSymbol(value)) {
    return symbolToString ? symbolToString.call(value) : '';
  }
  var result = value + '';
  return result == '0' && 1 / value == -INFINITY ? '-0' : result;
}

/**
 * Casts `value` to a path array if it's not one.
 *
 * @private
 * @param {*} value The value to inspect.
 * @returns {Array} Returns the cast property path array.
 */
function castPath(value) {
  return isArray(value) ? value : stringToPath(value);
}

/**
 * A specialized version of `baseIsEqualDeep` for arrays with support for
 * partial deep comparisons.
 *
 * @private
 * @param {Array} array The array to compare.
 * @param {Array} other The other array to compare.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Function} customizer The function to customize comparisons.
 * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
 *  for more details.
 * @param {Object} stack Tracks traversed `array` and `other` objects.
 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
 */
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
  var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
    arrLength = array.length,
    othLength = other.length;
  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
    return false;
  }
  // Assume cyclic values are equal.
  var stacked = stack.get(array);
  if (stacked && stack.get(other)) {
    return stacked == other;
  }
  var index = -1,
    result = true,
    seen = bitmask & UNORDERED_COMPARE_FLAG ? new SetCache() : undefined;
  stack.set(array, other);
  stack.set(other, array);

  // Ignore non-index properties.
  while (++index < arrLength) {
    var arrValue = array[index],
      othValue = other[index];
    if (customizer) {
      var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
    }
    if (compared !== undefined) {
      if (compared) {
        continue;
      }
      result = false;
      break;
    }
    // Recursively compare arrays (susceptible to call stack limits).
    if (seen) {
      if (!arraySome(other, function (othValue, othIndex) {
        if (!seen.has(othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
          return seen.add(othIndex);
        }
      })) {
        result = false;
        break;
      }
    } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
      result = false;
      break;
    }
  }
  stack['delete'](array);
  stack['delete'](other);
  return result;
}

/**
 * A specialized version of `baseIsEqualDeep` for comparing objects of
 * the same `toStringTag`.
 *
 * **Note:** This function only supports comparing values with tags of
 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
 *
 * @private
 * @param {Object} object The object to compare.
 * @param {Object} other The other object to compare.
 * @param {string} tag The `toStringTag` of the objects to compare.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Function} customizer The function to customize comparisons.
 * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
 *  for more details.
 * @param {Object} stack Tracks traversed `object` and `other` objects.
 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
 */
function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
  switch (tag) {
    case dataViewTag:
      if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
        return false;
      }
      object = object.buffer;
      other = other.buffer;
    case arrayBufferTag:
      if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
        return false;
      }
      return true;
    case boolTag:
    case dateTag:
    case numberTag:
      // Coerce booleans to `1` or `0` and dates to milliseconds.
      // Invalid dates are coerced to `NaN`.
      return eq(+object, +other);
    case errorTag:
      return object.name == other.name && object.message == other.message;
    case regexpTag:
    case stringTag:
      // Coerce regexes to strings and treat strings, primitives and objects,
      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
      // for more details.
      return object == other + '';
    case mapTag:
      var convert = mapToArray;
    case setTag:
      var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
      convert || (convert = setToArray);
      if (object.size != other.size && !isPartial) {
        return false;
      }
      // Assume cyclic values are equal.
      var stacked = stack.get(object);
      if (stacked) {
        return stacked == other;
      }
      bitmask |= UNORDERED_COMPARE_FLAG;

      // Recursively compare objects (susceptible to call stack limits).
      stack.set(object, other);
      var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
      stack['delete'](object);
      return result;
    case symbolTag:
      if (symbolValueOf) {
        return symbolValueOf.call(object) == symbolValueOf.call(other);
      }
  }
  return false;
}

/**
 * A specialized version of `baseIsEqualDeep` for objects with support for
 * partial deep comparisons.
 *
 * @private
 * @param {Object} object The object to compare.
 * @param {Object} other The other object to compare.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Function} customizer The function to customize comparisons.
 * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
 *  for more details.
 * @param {Object} stack Tracks traversed `object` and `other` objects.
 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
 */
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
  var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
    objProps = keys(object),
    objLength = objProps.length,
    othProps = keys(other),
    othLength = othProps.length;
  if (objLength != othLength && !isPartial) {
    return false;
  }
  var index = objLength;
  while (index--) {
    var key = objProps[index];
    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
      return false;
    }
  }
  // Assume cyclic values are equal.
  var stacked = stack.get(object);
  if (stacked && stack.get(other)) {
    return stacked == other;
  }
  var result = true;
  stack.set(object, other);
  stack.set(other, object);
  var skipCtor = isPartial;
  while (++index < objLength) {
    key = objProps[index];
    var objValue = object[key],
      othValue = other[key];
    if (customizer) {
      var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
    }
    // Recursively compare objects (susceptible to call stack limits).
    if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) {
      result = false;
      break;
    }
    skipCtor || (skipCtor = key == 'constructor');
  }
  if (result && !skipCtor) {
    var objCtor = object.constructor,
      othCtor = other.constructor;

    // Non `Object` object instances with different constructors are not equal.
    if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
      result = false;
    }
  }
  stack['delete'](object);
  stack['delete'](other);
  return result;
}

/**
 * Gets the data for `map`.
 *
 * @private
 * @param {Object} map The map to query.
 * @param {string} key The reference key.
 * @returns {*} Returns the map data.
 */
function getMapData(map, key) {
  var data = map.__data__;
  return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
}

/**
 * Gets the property names, values, and compare flags of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the match data of `object`.
 */
function getMatchData(object) {
  var result = keys(object),
    length = result.length;
  while (length--) {
    var key = result[length],
      value = object[key];
    result[length] = [key, value, isStrictComparable(value)];
  }
  return result;
}

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
  var value = getValue(object, key);
  return baseIsNative(value) ? value : undefined;
}

/**
 * Gets the `toStringTag` of `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
var getTag = baseGetTag;

// Fallback for data views, maps, sets, and weak maps in IE 11,
// for data views in Edge < 14, and promises in Node.js.
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
  getTag = function getTag(value) {
    var result = objectToString.call(value),
      Ctor = result == objectTag ? value.constructor : undefined,
      ctorString = Ctor ? toSource(Ctor) : undefined;
    if (ctorString) {
      switch (ctorString) {
        case dataViewCtorString:
          return dataViewTag;
        case mapCtorString:
          return mapTag;
        case promiseCtorString:
          return promiseTag;
        case setCtorString:
          return setTag;
        case weakMapCtorString:
          return weakMapTag;
      }
    }
    return result;
  };
}

/**
 * Checks if `path` exists on `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {Array|string} path The path to check.
 * @param {Function} hasFunc The function to check properties.
 * @returns {boolean} Returns `true` if `path` exists, else `false`.
 */
function hasPath(object, path, hasFunc) {
  path = isKey(path, object) ? [path] : castPath(path);
  var result,
    index = -1,
    length = path.length;
  while (++index < length) {
    var key = toKey(path[index]);
    if (!(result = object != null && hasFunc(object, key))) {
      break;
    }
    object = object[key];
  }
  if (result) {
    return result;
  }
  var length = object ? object.length : 0;
  return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
}

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  length = length == null ? MAX_SAFE_INTEGER : length;
  return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}

/**
 * Checks if `value` is a property name and not a property path.
 *
 * @private
 * @param {*} value The value to check.
 * @param {Object} [object] The object to query keys on.
 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
 */
function isKey(value, object) {
  if (isArray(value)) {
    return false;
  }
  var type = _typeof(value);
  if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
    return true;
  }
  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}

/**
 * Checks if `value` is suitable for use as unique object key.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
 */
function isKeyable(value) {
  var type = _typeof(value);
  return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
}

/**
 * Checks if `func` has its source masked.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
 */
function isMasked(func) {
  return !!maskSrcKey && maskSrcKey in func;
}

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
    proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
  return value === proto;
}

/**
 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` if suitable for strict
 *  equality comparisons, else `false`.
 */
function isStrictComparable(value) {
  return value === value && !isObject(value);
}

/**
 * A specialized version of `matchesProperty` for source values suitable
 * for strict equality comparisons, i.e. `===`.
 *
 * @private
 * @param {string} key The key of the property to get.
 * @param {*} srcValue The value to match.
 * @returns {Function} Returns the new spec function.
 */
function matchesStrictComparable(key, srcValue) {
  return function (object) {
    if (object == null) {
      return false;
    }
    return object[key] === srcValue && (srcValue !== undefined || key in Object(object));
  };
}

/**
 * Converts `string` to a property path array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the property path array.
 */
var stringToPath = memoize(function (string) {
  string = toString(string);
  var result = [];
  if (reLeadingDot.test(string)) {
    result.push('');
  }
  string.replace(rePropName, function (match, number, quote, string) {
    result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
  });
  return result;
});

/**
 * Converts `value` to a string key if it's not a string or symbol.
 *
 * @private
 * @param {*} value The value to inspect.
 * @returns {string|symbol} Returns the key.
 */
function toKey(value) {
  if (typeof value == 'string' || isSymbol(value)) {
    return value;
  }
  var result = value + '';
  return result == '0' && 1 / value == -INFINITY ? '-0' : result;
}

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to process.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {}
    try {
      return func + '';
    } catch (e) {}
  }
  return '';
}

/**
 * This method is like `_.find` except that it returns the index of the first
 * element `predicate` returns truthy for instead of the element itself.
 *
 * @static
 * @memberOf _
 * @since 1.1.0
 * @category Array
 * @param {Array} array The array to inspect.
 * @param {Function} [predicate=_.identity]
 *  The function invoked per iteration.
 * @param {number} [fromIndex=0] The index to search from.
 * @returns {number} Returns the index of the found element, else `-1`.
 * @example
 *
 * var users = [
 *   { 'user': 'barney',  'active': false },
 *   { 'user': 'fred',    'active': false },
 *   { 'user': 'pebbles', 'active': true }
 * ];
 *
 * _.findIndex(users, function(o) { return o.user == 'barney'; });
 * // => 0
 *
 * // The `_.matches` iteratee shorthand.
 * _.findIndex(users, { 'user': 'fred', 'active': false });
 * // => 1
 *
 * // The `_.matchesProperty` iteratee shorthand.
 * _.findIndex(users, ['active', false]);
 * // => 0
 *
 * // The `_.property` iteratee shorthand.
 * _.findIndex(users, 'active');
 * // => 2
 */
function findIndex(array, predicate, fromIndex) {
  var length = array ? array.length : 0;
  if (!length) {
    return -1;
  }
  var index = fromIndex == null ? 0 : toInteger(fromIndex);
  if (index < 0) {
    index = nativeMax(length + index, 0);
  }
  return baseFindIndex(array, baseIteratee(predicate, 3), index);
}

/**
 * Creates a function that memoizes the result of `func`. If `resolver` is
 * provided, it determines the cache key for storing the result based on the
 * arguments provided to the memoized function. By default, the first argument
 * provided to the memoized function is used as the map cache key. The `func`
 * is invoked with the `this` binding of the memoized function.
 *
 * **Note:** The cache is exposed as the `cache` property on the memoized
 * function. Its creation may be customized by replacing the `_.memoize.Cache`
 * constructor with one whose instances implement the
 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
 * method interface of `delete`, `get`, `has`, and `set`.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Function
 * @param {Function} func The function to have its output memoized.
 * @param {Function} [resolver] The function to resolve the cache key.
 * @returns {Function} Returns the new memoized function.
 * @example
 *
 * var object = { 'a': 1, 'b': 2 };
 * var other = { 'c': 3, 'd': 4 };
 *
 * var values = _.memoize(_.values);
 * values(object);
 * // => [1, 2]
 *
 * values(other);
 * // => [3, 4]
 *
 * object.a = 2;
 * values(object);
 * // => [1, 2]
 *
 * // Modify the result cache.
 * values.cache.set(object, ['a', 'b']);
 * values(object);
 * // => ['a', 'b']
 *
 * // Replace `_.memoize.Cache`.
 * _.memoize.Cache = WeakMap;
 */
function memoize(func, resolver) {
  if (typeof func != 'function' || resolver && typeof resolver != 'function') {
    throw new TypeError(FUNC_ERROR_TEXT);
  }
  var memoized = function memoized() {
    var args = arguments,
      key = resolver ? resolver.apply(this, args) : args[0],
      cache = memoized.cache;
    if (cache.has(key)) {
      return cache.get(key);
    }
    var result = func.apply(this, args);
    memoized.cache = cache.set(key, result);
    return result;
  };
  memoized.cache = new (memoize.Cache || MapCache)();
  return memoized;
}

// Assign cache to `_.memoize`.
memoize.Cache = MapCache;

/**
 * Performs a
 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * comparison between two values to determine if they are equivalent.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.eq(object, object);
 * // => true
 *
 * _.eq(object, other);
 * // => false
 *
 * _.eq('a', 'a');
 * // => true
 *
 * _.eq('a', Object('a'));
 * // => false
 *
 * _.eq(NaN, NaN);
 * // => true
 */
function eq(value, other) {
  return value === other || value !== value && other !== other;
}

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
function isArguments(value) {
  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

/**
 * This method is like `_.isArrayLike` except that it also checks if `value`
 * is an object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array-like object,
 *  else `false`.
 * @example
 *
 * _.isArrayLikeObject([1, 2, 3]);
 * // => true
 *
 * _.isArrayLikeObject(document.body.children);
 * // => true
 *
 * _.isArrayLikeObject('abc');
 * // => false
 *
 * _.isArrayLikeObject(_.noop);
 * // => false
 */
function isArrayLikeObject(value) {
  return isObjectLike(value) && isArrayLike(value);
}

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 8-9 which returns 'object' for typed array and other constructors.
  var tag = isObject(value) ? objectToString.call(value) : '';
  return tag == funcTag || tag == genTag;
}

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = _typeof(value);
  return !!value && (type == 'object' || type == 'function');
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return !!value && _typeof(value) == 'object';
}

/**
 * Checks if `value` is classified as a `Symbol` primitive or object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
 * @example
 *
 * _.isSymbol(Symbol.iterator);
 * // => true
 *
 * _.isSymbol('abc');
 * // => false
 */
function isSymbol(value) {
  return _typeof(value) == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
}

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

/**
 * Converts `value` to a finite number.
 *
 * @static
 * @memberOf _
 * @since 4.12.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {number} Returns the converted number.
 * @example
 *
 * _.toFinite(3.2);
 * // => 3.2
 *
 * _.toFinite(Number.MIN_VALUE);
 * // => 5e-324
 *
 * _.toFinite(Infinity);
 * // => 1.7976931348623157e+308
 *
 * _.toFinite('3.2');
 * // => 3.2
 */
function toFinite(value) {
  if (!value) {
    return value === 0 ? value : 0;
  }
  value = toNumber(value);
  if (value === INFINITY || value === -INFINITY) {
    var sign = value < 0 ? -1 : 1;
    return sign * MAX_INTEGER;
  }
  return value === value ? value : 0;
}

/**
 * Converts `value` to an integer.
 *
 * **Note:** This method is loosely based on
 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {number} Returns the converted integer.
 * @example
 *
 * _.toInteger(3.2);
 * // => 3
 *
 * _.toInteger(Number.MIN_VALUE);
 * // => 0
 *
 * _.toInteger(Infinity);
 * // => 1.7976931348623157e+308
 *
 * _.toInteger('3.2');
 * // => 3
 */
function toInteger(value) {
  var result = toFinite(value),
    remainder = result % 1;
  return result === result ? remainder ? result - remainder : result : 0;
}

/**
 * Converts `value` to a number.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to process.
 * @returns {number} Returns the number.
 * @example
 *
 * _.toNumber(3.2);
 * // => 3.2
 *
 * _.toNumber(Number.MIN_VALUE);
 * // => 5e-324
 *
 * _.toNumber(Infinity);
 * // => Infinity
 *
 * _.toNumber('3.2');
 * // => 3.2
 */
function toNumber(value) {
  if (typeof value == 'number') {
    return value;
  }
  if (isSymbol(value)) {
    return NAN;
  }
  if (isObject(value)) {
    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
    value = isObject(other) ? other + '' : other;
  }
  if (typeof value != 'string') {
    return value === 0 ? value : +value;
  }
  value = value.replace(reTrim, '');
  var isBinary = reIsBinary.test(value);
  return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
}

/**
 * Converts `value` to a string. An empty string is returned for `null`
 * and `undefined` values. The sign of `-0` is preserved.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to process.
 * @returns {string} Returns the string.
 * @example
 *
 * _.toString(null);
 * // => ''
 *
 * _.toString(-0);
 * // => '-0'
 *
 * _.toString([1, 2, 3]);
 * // => '1,2,3'
 */
function toString(value) {
  return value == null ? '' : baseToString(value);
}

/**
 * Gets the value at `path` of `object`. If the resolved value is
 * `undefined`, the `defaultValue` is returned in its place.
 *
 * @static
 * @memberOf _
 * @since 3.7.0
 * @category Object
 * @param {Object} object The object to query.
 * @param {Array|string} path The path of the property to get.
 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
 * @returns {*} Returns the resolved value.
 * @example
 *
 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
 *
 * _.get(object, 'a[0].b.c');
 * // => 3
 *
 * _.get(object, ['a', '0', 'b', 'c']);
 * // => 3
 *
 * _.get(object, 'a.b.c', 'default');
 * // => 'default'
 */
function get(object, path, defaultValue) {
  var result = object == null ? undefined : baseGet(object, path);
  return result === undefined ? defaultValue : result;
}

/**
 * Checks if `path` is a direct or inherited property of `object`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Object
 * @param {Object} object The object to query.
 * @param {Array|string} path The path to check.
 * @returns {boolean} Returns `true` if `path` exists, else `false`.
 * @example
 *
 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
 *
 * _.hasIn(object, 'a');
 * // => true
 *
 * _.hasIn(object, 'a.b');
 * // => true
 *
 * _.hasIn(object, ['a', 'b']);
 * // => true
 *
 * _.hasIn(object, 'b');
 * // => false
 */
function hasIn(object, path) {
  return object != null && hasPath(object, path, baseHasIn);
}

/**
 * Creates an array of the own enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects. See the
 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * for more details.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keys(new Foo);
 * // => ['a', 'b'] (iteration order is not guaranteed)
 *
 * _.keys('hi');
 * // => ['0', '1']
 */
function keys(object) {
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}

/**
 * This method returns the first argument it receives.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Util
 * @param {*} value Any value.
 * @returns {*} Returns `value`.
 * @example
 *
 * var object = { 'a': 1 };
 *
 * console.log(_.identity(object) === object);
 * // => true
 */
function identity(value) {
  return value;
}

/**
 * Creates a function that returns the value at `path` of a given object.
 *
 * @static
 * @memberOf _
 * @since 2.4.0
 * @category Util
 * @param {Array|string} path The path of the property to get.
 * @returns {Function} Returns the new accessor function.
 * @example
 *
 * var objects = [
 *   { 'a': { 'b': 2 } },
 *   { 'a': { 'b': 1 } }
 * ];
 *
 * _.map(objects, _.property('a.b'));
 * // => [2, 1]
 *
 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
 * // => [1, 2]
 */
function property(path) {
  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
module.exports = findIndex;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(39), __webpack_require__(28)(module)))

/***/ }),
/* 19 */,
/* 20 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
var isOutOfStock = function isOutOfStock(variant) {
  var desiredQty = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  if (!variant) {
    return false;
  }
  var isOutStock = false;
  if (variant.inventory_management === null) {
    isOutStock = false;
  } else if (variant.fulfillment_service === "oberlo" && variant.inventory_policy !== "continue") {
    if (variant.inventory_quantity < desiredQty) {
      isOutStock = true;
    }
  } else if (variant.inventory_policy === "deny" && variant.inventory_quantity < desiredQty) {
    isOutStock = true;
  }
  return isOutStock;
};
/* harmony default export */ __webpack_exports__["a"] = (isOutOfStock);

/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global, module) {var _typeof = __webpack_require__(9);
/**
 * lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;

/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
  arrayTag = '[object Array]',
  boolTag = '[object Boolean]',
  dateTag = '[object Date]',
  errorTag = '[object Error]',
  funcTag = '[object Function]',
  genTag = '[object GeneratorFunction]',
  mapTag = '[object Map]',
  numberTag = '[object Number]',
  objectTag = '[object Object]',
  promiseTag = '[object Promise]',
  regexpTag = '[object RegExp]',
  setTag = '[object Set]',
  stringTag = '[object String]',
  symbolTag = '[object Symbol]',
  weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
  dataViewTag = '[object DataView]',
  float32Tag = '[object Float32Array]',
  float64Tag = '[object Float64Array]',
  int8Tag = '[object Int8Array]',
  int16Tag = '[object Int16Array]',
  int32Tag = '[object Int32Array]',
  uint8Tag = '[object Uint8Array]',
  uint8ClampedTag = '[object Uint8ClampedArray]',
  uint16Tag = '[object Uint16Array]',
  uint32Tag = '[object Uint32Array]';

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;

/** Detect free variable `global` from Node.js. */
var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Detect free variable `exports`. */
var freeExports = ( false ? undefined : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && ( false ? undefined : _typeof(module)) == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/**
 * Adds the key-value `pair` to `map`.
 *
 * @private
 * @param {Object} map The map to modify.
 * @param {Array} pair The key-value pair to add.
 * @returns {Object} Returns `map`.
 */
function addMapEntry(map, pair) {
  // Don't return `map.set` because it's not chainable in IE 11.
  map.set(pair[0], pair[1]);
  return map;
}

/**
 * Adds `value` to `set`.
 *
 * @private
 * @param {Object} set The set to modify.
 * @param {*} value The value to add.
 * @returns {Object} Returns `set`.
 */
function addSetEntry(set, value) {
  // Don't return `set.add` because it's not chainable in IE 11.
  set.add(value);
  return set;
}

/**
 * A specialized version of `_.forEach` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns `array`.
 */
function arrayEach(array, iteratee) {
  var index = -1,
    length = array ? array.length : 0;
  while (++index < length) {
    if (iteratee(array[index], index, array) === false) {
      break;
    }
  }
  return array;
}

/**
 * Appends the elements of `values` to `array`.
 *
 * @private
 * @param {Array} array The array to modify.
 * @param {Array} values The values to append.
 * @returns {Array} Returns `array`.
 */
function arrayPush(array, values) {
  var index = -1,
    length = values.length,
    offset = array.length;
  while (++index < length) {
    array[offset + index] = values[index];
  }
  return array;
}

/**
 * A specialized version of `_.reduce` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {*} [accumulator] The initial value.
 * @param {boolean} [initAccum] Specify using the first element of `array` as
 *  the initial value.
 * @returns {*} Returns the accumulated value.
 */
function arrayReduce(array, iteratee, accumulator, initAccum) {
  var index = -1,
    length = array ? array.length : 0;
  if (initAccum && length) {
    accumulator = array[++index];
  }
  while (++index < length) {
    accumulator = iteratee(accumulator, array[index], index, array);
  }
  return accumulator;
}

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
    result = Array(n);
  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

/**
 * Checks if `value` is a host object in IE < 9.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
 */
function isHostObject(value) {
  // Many host objects are `Object` objects that can coerce to strings
  // despite having improperly defined `toString` methods.
  var result = false;
  if (value != null && typeof value.toString != 'function') {
    try {
      result = !!(value + '');
    } catch (e) {}
  }
  return result;
}

/**
 * Converts `map` to its key-value pairs.
 *
 * @private
 * @param {Object} map The map to convert.
 * @returns {Array} Returns the key-value pairs.
 */
function mapToArray(map) {
  var index = -1,
    result = Array(map.size);
  map.forEach(function (value, key) {
    result[++index] = [key, value];
  });
  return result;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function (arg) {
    return func(transform(arg));
  };
}

/**
 * Converts `set` to an array of its values.
 *
 * @private
 * @param {Object} set The set to convert.
 * @returns {Array} Returns the values.
 */
function setToArray(set) {
  var index = -1,
    result = Array(set.size);
  set.forEach(function (value) {
    result[++index] = value;
  });
  return result;
}

/** Used for built-in method references. */
var arrayProto = Array.prototype,
  funcProto = Function.prototype,
  objectProto = Object.prototype;

/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];

/** Used to detect methods masquerading as native. */
var maskSrcKey = function () {
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  return uid ? 'Symbol(src)_1.' + uid : '';
}();

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var objectToString = objectProto.toString;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined,
  _Symbol = root.Symbol,
  Uint8Array = root.Uint8Array,
  getPrototype = overArg(Object.getPrototypeOf, Object),
  objectCreate = Object.create,
  propertyIsEnumerable = objectProto.propertyIsEnumerable,
  splice = arrayProto.splice;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols,
  nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  nativeKeys = overArg(Object.keys, Object);

/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView'),
  Map = getNative(root, 'Map'),
  Promise = getNative(root, 'Promise'),
  Set = getNative(root, 'Set'),
  WeakMap = getNative(root, 'WeakMap'),
  nativeCreate = getNative(Object, 'create');

/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
  mapCtorString = toSource(Map),
  promiseCtorString = toSource(Promise),
  setCtorString = toSource(Set),
  weakMapCtorString = toSource(WeakMap);

/** Used to convert symbols to primitives and strings. */
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
  symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;

/**
 * Creates a hash object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Hash(entries) {
  var index = -1,
    length = entries ? entries.length : 0;
  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the hash.
 *
 * @private
 * @name clear
 * @memberOf Hash
 */
function hashClear() {
  this.__data__ = nativeCreate ? nativeCreate(null) : {};
}

/**
 * Removes `key` and its value from the hash.
 *
 * @private
 * @name delete
 * @memberOf Hash
 * @param {Object} hash The hash to modify.
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function hashDelete(key) {
  return this.has(key) && delete this.__data__[key];
}

/**
 * Gets the hash value for `key`.
 *
 * @private
 * @name get
 * @memberOf Hash
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function hashGet(key) {
  var data = this.__data__;
  if (nativeCreate) {
    var result = data[key];
    return result === HASH_UNDEFINED ? undefined : result;
  }
  return hasOwnProperty.call(data, key) ? data[key] : undefined;
}

/**
 * Checks if a hash value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Hash
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function hashHas(key) {
  var data = this.__data__;
  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}

/**
 * Sets the hash `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Hash
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the hash instance.
 */
function hashSet(key, value) {
  var data = this.__data__;
  data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
  return this;
}

// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;

/**
 * Creates an list cache object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function ListCache(entries) {
  var index = -1,
    length = entries ? entries.length : 0;
  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the list cache.
 *
 * @private
 * @name clear
 * @memberOf ListCache
 */
function listCacheClear() {
  this.__data__ = [];
}

/**
 * Removes `key` and its value from the list cache.
 *
 * @private
 * @name delete
 * @memberOf ListCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function listCacheDelete(key) {
  var data = this.__data__,
    index = assocIndexOf(data, key);
  if (index < 0) {
    return false;
  }
  var lastIndex = data.length - 1;
  if (index == lastIndex) {
    data.pop();
  } else {
    splice.call(data, index, 1);
  }
  return true;
}

/**
 * Gets the list cache value for `key`.
 *
 * @private
 * @name get
 * @memberOf ListCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function listCacheGet(key) {
  var data = this.__data__,
    index = assocIndexOf(data, key);
  return index < 0 ? undefined : data[index][1];
}

/**
 * Checks if a list cache value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf ListCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function listCacheHas(key) {
  return assocIndexOf(this.__data__, key) > -1;
}

/**
 * Sets the list cache `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf ListCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the list cache instance.
 */
function listCacheSet(key, value) {
  var data = this.__data__,
    index = assocIndexOf(data, key);
  if (index < 0) {
    data.push([key, value]);
  } else {
    data[index][1] = value;
  }
  return this;
}

// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;

/**
 * Creates a map cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function MapCache(entries) {
  var index = -1,
    length = entries ? entries.length : 0;
  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the map.
 *
 * @private
 * @name clear
 * @memberOf MapCache
 */
function mapCacheClear() {
  this.__data__ = {
    'hash': new Hash(),
    'map': new (Map || ListCache)(),
    'string': new Hash()
  };
}

/**
 * Removes `key` and its value from the map.
 *
 * @private
 * @name delete
 * @memberOf MapCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function mapCacheDelete(key) {
  return getMapData(this, key)['delete'](key);
}

/**
 * Gets the map value for `key`.
 *
 * @private
 * @name get
 * @memberOf MapCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function mapCacheGet(key) {
  return getMapData(this, key).get(key);
}

/**
 * Checks if a map value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf MapCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function mapCacheHas(key) {
  return getMapData(this, key).has(key);
}

/**
 * Sets the map `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf MapCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the map cache instance.
 */
function mapCacheSet(key, value) {
  getMapData(this, key).set(key, value);
  return this;
}

// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;

/**
 * Creates a stack cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Stack(entries) {
  this.__data__ = new ListCache(entries);
}

/**
 * Removes all key-value entries from the stack.
 *
 * @private
 * @name clear
 * @memberOf Stack
 */
function stackClear() {
  this.__data__ = new ListCache();
}

/**
 * Removes `key` and its value from the stack.
 *
 * @private
 * @name delete
 * @memberOf Stack
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function stackDelete(key) {
  return this.__data__['delete'](key);
}

/**
 * Gets the stack value for `key`.
 *
 * @private
 * @name get
 * @memberOf Stack
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function stackGet(key) {
  return this.__data__.get(key);
}

/**
 * Checks if a stack value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Stack
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function stackHas(key) {
  return this.__data__.has(key);
}

/**
 * Sets the stack `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Stack
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the stack cache instance.
 */
function stackSet(key, value) {
  var cache = this.__data__;
  if (cache instanceof ListCache) {
    var pairs = cache.__data__;
    if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
      pairs.push([key, value]);
      return this;
    }
    cache = this.__data__ = new MapCache(pairs);
  }
  cache.set(key, value);
  return this;
}

// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  // Safari 9 makes `arguments.length` enumerable in strict mode.
  var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
  var length = result.length,
    skipIndexes = !!length;
  for (var key in value) {
    if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
      result.push(key);
    }
  }
  return result;
}

/**
 * Assigns `value` to `key` of `object` if the existing value is not equivalent
 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * for equality comparisons.
 *
 * @private
 * @param {Object} object The object to modify.
 * @param {string} key The key of the property to assign.
 * @param {*} value The value to assign.
 */
function assignValue(object, key, value) {
  var objValue = object[key];
  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
    object[key] = value;
  }
}

/**
 * Gets the index at which the `key` is found in `array` of key-value pairs.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} key The key to search for.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function assocIndexOf(array, key) {
  var length = array.length;
  while (length--) {
    if (eq(array[length][0], key)) {
      return length;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.assign` without support for multiple sources
 * or `customizer` functions.
 *
 * @private
 * @param {Object} object The destination object.
 * @param {Object} source The source object.
 * @returns {Object} Returns `object`.
 */
function baseAssign(object, source) {
  return object && copyObject(source, keys(source), object);
}

/**
 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
 * traversed objects.
 *
 * @private
 * @param {*} value The value to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @param {boolean} [isFull] Specify a clone including symbols.
 * @param {Function} [customizer] The function to customize cloning.
 * @param {string} [key] The key of `value`.
 * @param {Object} [object] The parent object of `value`.
 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
 * @returns {*} Returns the cloned value.
 */
function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
  var result;
  if (customizer) {
    result = object ? customizer(value, key, object, stack) : customizer(value);
  }
  if (result !== undefined) {
    return result;
  }
  if (!isObject(value)) {
    return value;
  }
  var isArr = isArray(value);
  if (isArr) {
    result = initCloneArray(value);
    if (!isDeep) {
      return copyArray(value, result);
    }
  } else {
    var tag = getTag(value),
      isFunc = tag == funcTag || tag == genTag;
    if (isBuffer(value)) {
      return cloneBuffer(value, isDeep);
    }
    if (tag == objectTag || tag == argsTag || isFunc && !object) {
      if (isHostObject(value)) {
        return object ? value : {};
      }
      result = initCloneObject(isFunc ? {} : value);
      if (!isDeep) {
        return copySymbols(value, baseAssign(result, value));
      }
    } else {
      if (!cloneableTags[tag]) {
        return object ? value : {};
      }
      result = initCloneByTag(value, tag, baseClone, isDeep);
    }
  }
  // Check for circular references and return its corresponding clone.
  stack || (stack = new Stack());
  var stacked = stack.get(value);
  if (stacked) {
    return stacked;
  }
  stack.set(value, result);
  if (!isArr) {
    var props = isFull ? getAllKeys(value) : keys(value);
  }
  arrayEach(props || value, function (subValue, key) {
    if (props) {
      key = subValue;
      subValue = value[key];
    }
    // Recursively populate clone (susceptible to call stack limits).
    assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
  });
  return result;
}

/**
 * The base implementation of `_.create` without support for assigning
 * properties to the created object.
 *
 * @private
 * @param {Object} prototype The object to inherit from.
 * @returns {Object} Returns the new object.
 */
function baseCreate(proto) {
  return isObject(proto) ? objectCreate(proto) : {};
}

/**
 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
 * symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {Function} keysFunc The function to get the keys of `object`.
 * @param {Function} symbolsFunc The function to get the symbols of `object`.
 * @returns {Array} Returns the array of property names and symbols.
 */
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  var result = keysFunc(object);
  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}

/**
 * The base implementation of `getTag`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  return objectToString.call(value);
}

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject(value) || isMasked(value)) {
    return false;
  }
  var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
  return pattern.test(toSource(value));
}

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * Creates a clone of  `buffer`.
 *
 * @private
 * @param {Buffer} buffer The buffer to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Buffer} Returns the cloned buffer.
 */
function cloneBuffer(buffer, isDeep) {
  if (isDeep) {
    return buffer.slice();
  }
  var result = new buffer.constructor(buffer.length);
  buffer.copy(result);
  return result;
}

/**
 * Creates a clone of `arrayBuffer`.
 *
 * @private
 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
 * @returns {ArrayBuffer} Returns the cloned array buffer.
 */
function cloneArrayBuffer(arrayBuffer) {
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  return result;
}

/**
 * Creates a clone of `dataView`.
 *
 * @private
 * @param {Object} dataView The data view to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the cloned data view.
 */
function cloneDataView(dataView, isDeep) {
  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}

/**
 * Creates a clone of `map`.
 *
 * @private
 * @param {Object} map The map to clone.
 * @param {Function} cloneFunc The function to clone values.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the cloned map.
 */
function cloneMap(map, isDeep, cloneFunc) {
  var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
  return arrayReduce(array, addMapEntry, new map.constructor());
}

/**
 * Creates a clone of `regexp`.
 *
 * @private
 * @param {Object} regexp The regexp to clone.
 * @returns {Object} Returns the cloned regexp.
 */
function cloneRegExp(regexp) {
  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  result.lastIndex = regexp.lastIndex;
  return result;
}

/**
 * Creates a clone of `set`.
 *
 * @private
 * @param {Object} set The set to clone.
 * @param {Function} cloneFunc The function to clone values.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the cloned set.
 */
function cloneSet(set, isDeep, cloneFunc) {
  var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
  return arrayReduce(array, addSetEntry, new set.constructor());
}

/**
 * Creates a clone of the `symbol` object.
 *
 * @private
 * @param {Object} symbol The symbol object to clone.
 * @returns {Object} Returns the cloned symbol object.
 */
function cloneSymbol(symbol) {
  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}

/**
 * Creates a clone of `typedArray`.
 *
 * @private
 * @param {Object} typedArray The typed array to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the cloned typed array.
 */
function cloneTypedArray(typedArray, isDeep) {
  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}

/**
 * Copies the values of `source` to `array`.
 *
 * @private
 * @param {Array} source The array to copy values from.
 * @param {Array} [array=[]] The array to copy values to.
 * @returns {Array} Returns `array`.
 */
function copyArray(source, array) {
  var index = -1,
    length = source.length;
  array || (array = Array(length));
  while (++index < length) {
    array[index] = source[index];
  }
  return array;
}

/**
 * Copies properties of `source` to `object`.
 *
 * @private
 * @param {Object} source The object to copy properties from.
 * @param {Array} props The property identifiers to copy.
 * @param {Object} [object={}] The object to copy properties to.
 * @param {Function} [customizer] The function to customize copied values.
 * @returns {Object} Returns `object`.
 */
function copyObject(source, props, object, customizer) {
  object || (object = {});
  var index = -1,
    length = props.length;
  while (++index < length) {
    var key = props[index];
    var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
    assignValue(object, key, newValue === undefined ? source[key] : newValue);
  }
  return object;
}

/**
 * Copies own symbol properties of `source` to `object`.
 *
 * @private
 * @param {Object} source The object to copy symbols from.
 * @param {Object} [object={}] The object to copy symbols to.
 * @returns {Object} Returns `object`.
 */
function copySymbols(source, object) {
  return copyObject(source, getSymbols(source), object);
}

/**
 * Creates an array of own enumerable property names and symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names and symbols.
 */
function getAllKeys(object) {
  return baseGetAllKeys(object, keys, getSymbols);
}

/**
 * Gets the data for `map`.
 *
 * @private
 * @param {Object} map The map to query.
 * @param {string} key The reference key.
 * @returns {*} Returns the map data.
 */
function getMapData(map, key) {
  var data = map.__data__;
  return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
}

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
  var value = getValue(object, key);
  return baseIsNative(value) ? value : undefined;
}

/**
 * Creates an array of the own enumerable symbol properties of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of symbols.
 */
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;

/**
 * Gets the `toStringTag` of `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
var getTag = baseGetTag;

// Fallback for data views, maps, sets, and weak maps in IE 11,
// for data views in Edge < 14, and promises in Node.js.
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
  getTag = function getTag(value) {
    var result = objectToString.call(value),
      Ctor = result == objectTag ? value.constructor : undefined,
      ctorString = Ctor ? toSource(Ctor) : undefined;
    if (ctorString) {
      switch (ctorString) {
        case dataViewCtorString:
          return dataViewTag;
        case mapCtorString:
          return mapTag;
        case promiseCtorString:
          return promiseTag;
        case setCtorString:
          return setTag;
        case weakMapCtorString:
          return weakMapTag;
      }
    }
    return result;
  };
}

/**
 * Initializes an array clone.
 *
 * @private
 * @param {Array} array The array to clone.
 * @returns {Array} Returns the initialized clone.
 */
function initCloneArray(array) {
  var length = array.length,
    result = array.constructor(length);

  // Add properties assigned by `RegExp#exec`.
  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
    result.index = array.index;
    result.input = array.input;
  }
  return result;
}

/**
 * Initializes an object clone.
 *
 * @private
 * @param {Object} object The object to clone.
 * @returns {Object} Returns the initialized clone.
 */
function initCloneObject(object) {
  return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
}

/**
 * Initializes an object clone based on its `toStringTag`.
 *
 * **Note:** This function only supports cloning values with tags of
 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
 *
 * @private
 * @param {Object} object The object to clone.
 * @param {string} tag The `toStringTag` of the object to clone.
 * @param {Function} cloneFunc The function to clone values.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the initialized clone.
 */
function initCloneByTag(object, tag, cloneFunc, isDeep) {
  var Ctor = object.constructor;
  switch (tag) {
    case arrayBufferTag:
      return cloneArrayBuffer(object);
    case boolTag:
    case dateTag:
      return new Ctor(+object);
    case dataViewTag:
      return cloneDataView(object, isDeep);
    case float32Tag:
    case float64Tag:
    case int8Tag:
    case int16Tag:
    case int32Tag:
    case uint8Tag:
    case uint8ClampedTag:
    case uint16Tag:
    case uint32Tag:
      return cloneTypedArray(object, isDeep);
    case mapTag:
      return cloneMap(object, isDeep, cloneFunc);
    case numberTag:
    case stringTag:
      return new Ctor(object);
    case regexpTag:
      return cloneRegExp(object);
    case setTag:
      return cloneSet(object, isDeep, cloneFunc);
    case symbolTag:
      return cloneSymbol(object);
  }
}

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  length = length == null ? MAX_SAFE_INTEGER : length;
  return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}

/**
 * Checks if `value` is suitable for use as unique object key.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
 */
function isKeyable(value) {
  var type = _typeof(value);
  return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
}

/**
 * Checks if `func` has its source masked.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
 */
function isMasked(func) {
  return !!maskSrcKey && maskSrcKey in func;
}

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
    proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
  return value === proto;
}

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to process.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {}
    try {
      return func + '';
    } catch (e) {}
  }
  return '';
}

/**
 * This method is like `_.clone` except that it recursively clones `value`.
 *
 * @static
 * @memberOf _
 * @since 1.0.0
 * @category Lang
 * @param {*} value The value to recursively clone.
 * @returns {*} Returns the deep cloned value.
 * @see _.clone
 * @example
 *
 * var objects = [{ 'a': 1 }, { 'b': 2 }];
 *
 * var deep = _.cloneDeep(objects);
 * console.log(deep[0] === objects[0]);
 * // => false
 */
function cloneDeep(value) {
  return baseClone(value, true, true);
}

/**
 * Performs a
 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * comparison between two values to determine if they are equivalent.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.eq(object, object);
 * // => true
 *
 * _.eq(object, other);
 * // => false
 *
 * _.eq('a', 'a');
 * // => true
 *
 * _.eq('a', Object('a'));
 * // => false
 *
 * _.eq(NaN, NaN);
 * // => true
 */
function eq(value, other) {
  return value === other || value !== value && other !== other;
}

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
function isArguments(value) {
  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

/**
 * This method is like `_.isArrayLike` except that it also checks if `value`
 * is an object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array-like object,
 *  else `false`.
 * @example
 *
 * _.isArrayLikeObject([1, 2, 3]);
 * // => true
 *
 * _.isArrayLikeObject(document.body.children);
 * // => true
 *
 * _.isArrayLikeObject('abc');
 * // => false
 *
 * _.isArrayLikeObject(_.noop);
 * // => false
 */
function isArrayLikeObject(value) {
  return isObjectLike(value) && isArrayLike(value);
}

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 8-9 which returns 'object' for typed array and other constructors.
  var tag = isObject(value) ? objectToString.call(value) : '';
  return tag == funcTag || tag == genTag;
}

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = _typeof(value);
  return !!value && (type == 'object' || type == 'function');
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return !!value && _typeof(value) == 'object';
}

/**
 * Creates an array of the own enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects. See the
 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * for more details.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keys(new Foo);
 * // => ['a', 'b'] (iteration order is not guaranteed)
 *
 * _.keys('hi');
 * // => ['0', '1']
 */
function keys(object) {
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}

/**
 * This method returns a new empty array.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {Array} Returns the new empty array.
 * @example
 *
 * var arrays = _.times(2, _.stubArray);
 *
 * console.log(arrays);
 * // => [[], []]
 *
 * console.log(arrays[0] === arrays[1]);
 * // => false
 */
function stubArray() {
  return [];
}

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}
module.exports = cloneDeep;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(39), __webpack_require__(28)(module)))

/***/ }),
/* 22 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;
  for (var i = 0, arr2 = new Array(len); i < len; i++) {
    arr2[i] = arr[i];
  }
  return arr2;
}

/***/ }),
/* 23 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return parsePrice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return formatPrice; });
var parsePrice = function parsePrice(price) {
  return Number.isNaN(parseFloat(price)) ? 0 : parseFloat(price);
};
function formatPrice(_ref) {
  var priceAmount = _ref.priceAmount,
    _ref$currencyFormat = _ref.currencyFormat,
    currencyFormat = _ref$currencyFormat === void 0 ? "{{amount}}" : _ref$currencyFormat;
  var formattedPrice = priceAmount;
  if (currencyFormat.indexOf("{{amount}}") > -1) {
    formattedPrice = numberWithCommas(formattedPrice);
  }
  if (currencyFormat.indexOf("{{amount_with_comma_separator}}") > -1) {
    formattedPrice = numberWithDots("".concat(formattedPrice).replace(".", ","));
  }
  if (currencyFormat.indexOf("{{amount_no_decimals}}") > -1) {
    formattedPrice = numberWithCommas(Math.floor(formattedPrice));
  }
  if (currencyFormat.indexOf("{{amount_no_decimals_with_comma_separator}}") > -1) {
    formattedPrice = numberWithDots("".concat(Math.floor(formattedPrice)));
  }
  return currencyFormat.replace(/\{\{.*?\}\}/, formattedPrice).replace(/<[^>]*>/g, "");
}
function numberWithDots(x) {
  var parts = x.toString().split(".");
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ".");
  return parts.join(".");
}
function numberWithCommas(x) {
  var parts = x.toString().split(".");
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return parts.join(".");
}

/***/ }),
/* 24 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
/* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22);

function _unsupportedIterableToArray(o, minLen) {
  if (!o) return;
  if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
  var n = Object.prototype.toString.call(o).slice(8, -1);
  if (n === "Object" && o.constructor) n = o.constructor.name;
  if (n === "Map" || n === "Set") return Array.from(o);
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
}

/***/ }),
/* 25 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ WidgetParamsContext; });
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ useSettings; });
__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ useTheme; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ useIsDesktopView; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ useCurrencyFormat; });

// UNUSED EXPORTS: useWidgetParams, useIsPreview

// EXTERNAL MODULE: ./node_modules/preact/compat/dist/compat.module.js
var compat_module = __webpack_require__(0);

// EXTERNAL MODULE: ./node_modules/preact/compat/dist/compat.js
var compat = __webpack_require__(35);

// CONCATENATED MODULE: ./node_modules/@shopify/checkout-ui-extensions-react/build/esm/errors.mjs
class CheckoutUIExtensionError extends Error {
  constructor(...args) {
    super(...args);
    this.name = 'CheckoutUIExtensionError';
  }
}
class ScopeNotGrantedError extends Error {
  constructor(...args) {
    super(...args);
    this.name = 'ScopeNotGrantedError';
  }
}



// CONCATENATED MODULE: ./node_modules/@shopify/checkout-ui-extensions-react/build/esm/context.mjs


const ExtensionApiContext = /*#__PURE__*/Object(compat["createContext"])(null);



// CONCATENATED MODULE: ./node_modules/@shopify/checkout-ui-extensions-react/build/esm/hooks/api.mjs




/**
 * Returns the full API object that was passed in to your
 * extension when it was created.
 */
function useExtensionApi() {
  const api = Object(compat["useContext"])(ExtensionApiContext);
  if (api == null) {
    throw new CheckoutUIExtensionError('You can only call this hook when running as a UI extension.');
  }
  return api;
}



// CONCATENATED MODULE: ./components/WidgetComponent/components/WidgetParams.js


var WidgetParamsContext = /*#__PURE__*/compat_module["default"].createContext(null);
var WidgetParams_useWidgetParams = function useWidgetParams() {
  return compat_module["default"].useContext(WidgetParamsContext);
};
var useSettings = function useSettings() {
  return WidgetParams_useWidgetParams().settings;
};
var useTheme = function useTheme() {
  return WidgetParams_useWidgetParams().theme;
};
var useIsDesktopView = function useIsDesktopView() {
  return WidgetParams_useWidgetParams().isDesktopView;
};
var WidgetParams_useIsPreview = function useIsPreview() {
  var _useExtensionApi;
  return (_useExtensionApi = useExtensionApi()) === null || _useExtensionApi === void 0 || (_useExtensionApi = _useExtensionApi.extension) === null || _useExtensionApi === void 0 ? void 0 : _useExtensionApi.editor;
};
var useCurrencyFormat = function useCurrencyFormat() {
  return WidgetParams_useWidgetParams().currencyFormat;
};

/***/ }),
/* 26 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
var safeIsNaN = Number.isNaN || function ponyfill(value) {
  return typeof value === 'number' && value !== value;
};
function isEqual(first, second) {
  if (first === second) {
    return true;
  }
  if (safeIsNaN(first) && safeIsNaN(second)) {
    return true;
  }
  return false;
}
function areInputsEqual(newInputs, lastInputs) {
  if (newInputs.length !== lastInputs.length) {
    return false;
  }
  for (var i = 0; i < newInputs.length; i++) {
    if (!isEqual(newInputs[i], lastInputs[i])) {
      return false;
    }
  }
  return true;
}
function memoizeOne(resultFn, isEqual) {
  if (isEqual === void 0) {
    isEqual = areInputsEqual;
  }
  var lastThis;
  var lastArgs = [];
  var lastResult;
  var calledOnce = false;
  function memoized() {
    var newArgs = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      newArgs[_i] = arguments[_i];
    }
    if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
      return lastResult;
    }
    lastResult = resultFn.apply(this, newArgs);
    calledOnce = true;
    lastThis = this;
    lastArgs = newArgs;
    return lastResult;
  }
  return memoized;
}
/* harmony default export */ __webpack_exports__["default"] = (memoizeOne);

/***/ }),
/* 27 */
/***/ (function(module, exports) {

var promisifiedTimeout = function promisifiedTimeout(time, promise) {
  return new Promise(function (resolve, reject) {
    setTimeout(function () {
      reject(new Error('Request timed out.'));
    }, time);
    promise.then(resolve, reject);
  });
};
var getCookie = function getCookie(name) {
  var value = "; ".concat(document.cookie);
  var parts = value.split("; ".concat(name, "="));
  if (parts.length == 2) {
    return parts.pop().split(";").shift();
  }
  return "";
};
var sleep = function sleep(seconds) {
  return new Promise(function (resolve) {
    return setTimeout(resolve, seconds);
  });
};
var preventBfCache = function preventBfCache() {
  window.addEventListener("pageshow", function (event) {
    if (event.persisted) {
      window.location.reload();
    }
  });
};
var getCheckoutQueryParams = function getCheckoutQueryParams(locale) {
  try {
    var _urlSearchParams = new URLSearchParams(window.location.search);
    _urlSearchParams.forEach(function (value, key) {
      if (!key.includes('utm')) {
        _urlSearchParams["delete"](key);
      }
    });
    if (locale) {
      _urlSearchParams.append('locale', locale);
    }
    if (localStorage.getItem("cbUpsellAdditonalDiscountCode")) {
      _urlSearchParams.append('discount', localStorage.getItem("cbUpsellAdditonalDiscountCode"));
    }
    return _urlSearchParams ? "?".concat(_urlSearchParams.toString()) : "";
  } catch (e) {
    console.log("🚀 ~ file: utils.js ~ line 40 ~ getCheckoutQueryParams ~ e", e);
    return "";
  }
};
var getDefaultCheckoutUrl = function getDefaultCheckoutUrl(locale) {
  return "/checkout".concat(getCheckoutQueryParams(locale));
};
var assertIsMobile = function assertIsMobile() {
  return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0, 4));
};
module.exports = {
  promisifiedTimeout: promisifiedTimeout,
  getCookie: getCookie,
  sleep: sleep,
  preventBfCache: preventBfCache,
  getCheckoutQueryParams: getCheckoutQueryParams,
  getDefaultCheckoutUrl: getDefaultCheckoutUrl,
  assertIsMobile: assertIsMobile
};

/***/ }),
/* 28 */
/***/ (function(module, exports) {

module.exports = function (module) {
  if (!module.webpackPolyfill) {
    module.deprecate = function () {};
    module.paths = [];
    // module.parent = undefined by default
    if (!module.children) module.children = [];
    Object.defineProperty(module, "loaded", {
      enumerable: true,
      get: function get() {
        return module.l;
      }
    });
    Object.defineProperty(module, "id", {
      enumerable: true,
      get: function get() {
        return module.i;
      }
    });
    module.webpackPolyfill = 1;
  }
  return module;
};

/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var _Frame = __webpack_require__(55);
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_Frame)["default"];
  }
});
var _Context = __webpack_require__(40);
Object.defineProperty(exports, 'FrameContext', {
  enumerable: true,
  get: function get() {
    return _Context.FrameContext;
  }
});
Object.defineProperty(exports, 'FrameContextConsumer', {
  enumerable: true,
  get: function get() {
    return _Context.FrameContextConsumer;
  }
});
Object.defineProperty(exports, 'useFrame', {
  enumerable: true,
  get: function get() {
    return _Context.useFrame;
  }
});
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}

/***/ }),
/* 30 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);


function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var getUpsellCartSum = function getUpsellCartSum(offers, campaign, active_offer, cart) {
  if (campaign.offer_type !== 'upsell') {
    return 0;
  }
  var sum = 0;
  var upsellQuantity = offers[active_offer].quantity || 1;
  var filteredCart = cart.items.reduce(function (acc, item) {
    if (campaign.upsell_offer_type === 'variant') {
      if ((campaign.offers[campaign.offerIndex].variant_trigger.includes(String(item.variant_id)) || campaign.offers[campaign.offerIndex].variant_trigger.includes(item.variant_id)) && upsellQuantity > 0) {
        var _quantity = item.quantity - upsellQuantity;
        upsellQuantity -= item.quantity;
        if (Math.sign(_quantity) === -1 ? 0 : _quantity) {
          return [].concat(Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(acc), [_objectSpread(_objectSpread({}, item), {}, {
            quantity: Math.sign(_quantity) === -1 ? 0 : _quantity
          })]);
        }
        return acc;
      }
    } else if (campaign.trigger_products[0].id === item.product_id && upsellQuantity > 0) {
      var _quantity2 = item.quantity - upsellQuantity;
      upsellQuantity -= item.quantity;
      if (Math.sign(_quantity2) === -1 ? 0 : _quantity2) {
        return [].concat(Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(acc), [_objectSpread(_objectSpread({}, item), {}, {
          quantity: Math.sign(_quantity2) === -1 ? 0 : _quantity2
        })]);
      }
      return acc;
    }
    return [].concat(Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(acc), [item]);
  }, []);
  filteredCart.forEach(function (item) {
    sum += item.price * item.quantity;
  });
  return sum;
};
/* harmony default export */ __webpack_exports__["a"] = (getUpsellCartSum);

/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(9);
!function (e) {
  "object" == ( false ? undefined : _typeof(exports)) && "undefined" != typeof module ? module.exports = e(null) :  true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (e(null)),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
				__WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
}(function e(a) {
  "use strict";

  var r = /^\0+/g,
    c = /[\0\r\f]/g,
    s = /: */g,
    t = /zoo|gra/,
    i = /([,: ])(transform)/g,
    f = /,+\s*(?![^(]*[)])/g,
    n = / +\s*(?![^(]*[)])/g,
    l = / *[\0] */g,
    o = /,\r+?/g,
    h = /([\t\r\n ])*\f?&/g,
    u = /:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,
    d = /\W+/g,
    b = /@(k\w+)\s*(\S*)\s*/,
    p = /::(place)/g,
    k = /:(read-only)/g,
    g = /\s+(?=[{\];=:>])/g,
    A = /([[}=:>])\s+/g,
    C = /(\{[^{]+?);(?=\})/g,
    w = /\s{2,}/g,
    v = /([^\(])(:+) */g,
    m = /[svh]\w+-[tblr]{2}/,
    x = /\(\s*(.*)\s*\)/g,
    $ = /([\s\S]*?);/g,
    y = /-self|flex-/g,
    O = /[^]*?(:[rp][el]a[\w-]+)[^]*/,
    j = /stretch|:\s*\w+\-(?:conte|avail)/,
    z = /([^-])(image-set\()/,
    N = "-webkit-",
    S = "-moz-",
    F = "-ms-",
    W = 59,
    q = 125,
    B = 123,
    D = 40,
    E = 41,
    G = 91,
    H = 93,
    I = 10,
    J = 13,
    K = 9,
    L = 64,
    M = 32,
    P = 38,
    Q = 45,
    R = 95,
    T = 42,
    U = 44,
    V = 58,
    X = 39,
    Y = 34,
    Z = 47,
    _ = 62,
    ee = 43,
    ae = 126,
    re = 0,
    ce = 12,
    se = 11,
    te = 107,
    ie = 109,
    fe = 115,
    ne = 112,
    le = 111,
    oe = 105,
    he = 99,
    ue = 100,
    de = 112,
    be = 1,
    pe = 1,
    ke = 0,
    ge = 1,
    Ae = 1,
    Ce = 1,
    we = 0,
    ve = 0,
    me = 0,
    xe = [],
    $e = [],
    ye = 0,
    Oe = null,
    je = -2,
    ze = -1,
    Ne = 0,
    Se = 1,
    Fe = 2,
    We = 3,
    qe = 0,
    Be = 1,
    De = "",
    Ee = "",
    Ge = "";
  function He(e, a, s, t, i) {
    for (var f, n, o = 0, h = 0, u = 0, d = 0, g = 0, A = 0, C = 0, w = 0, m = 0, $ = 0, y = 0, O = 0, j = 0, z = 0, R = 0, we = 0, $e = 0, Oe = 0, je = 0, ze = s.length, Je = ze - 1, Re = "", Te = "", Ue = "", Ve = "", Xe = "", Ye = ""; R < ze;) {
      if (C = s.charCodeAt(R), R === Je) if (h + d + u + o !== 0) {
        if (0 !== h) C = h === Z ? I : Z;
        d = u = o = 0, ze++, Je++;
      }
      if (h + d + u + o === 0) {
        if (R === Je) {
          if (we > 0) Te = Te.replace(c, "");
          if (Te.trim().length > 0) {
            switch (C) {
              case M:
              case K:
              case W:
              case J:
              case I:
                break;
              default:
                Te += s.charAt(R);
            }
            C = W;
          }
        }
        if (1 === $e) switch (C) {
          case B:
          case q:
          case W:
          case Y:
          case X:
          case D:
          case E:
          case U:
            $e = 0;
          case K:
          case J:
          case I:
          case M:
            break;
          default:
            for ($e = 0, je = R, g = C, R--, C = W; je < ze;) {
              switch (s.charCodeAt(je++)) {
                case I:
                case J:
                case W:
                  ++R, C = g, je = ze;
                  break;
                case V:
                  if (we > 0) ++R, C = g;
                case B:
                  je = ze;
              }
            }
        }
        switch (C) {
          case B:
            for (g = (Te = Te.trim()).charCodeAt(0), y = 1, je = ++R; R < ze;) {
              switch (C = s.charCodeAt(R)) {
                case B:
                  y++;
                  break;
                case q:
                  y--;
                  break;
                case Z:
                  switch (A = s.charCodeAt(R + 1)) {
                    case T:
                    case Z:
                      R = Qe(A, R, Je, s);
                  }
                  break;
                case G:
                  C++;
                case D:
                  C++;
                case Y:
                case X:
                  for (; R++ < Je && s.charCodeAt(R) !== C;) {
                    ;
                  }
              }
              if (0 === y) break;
              R++;
            }
            if (Ue = s.substring(je, R), g === re) g = (Te = Te.replace(r, "").trim()).charCodeAt(0);
            switch (g) {
              case L:
                if (we > 0) Te = Te.replace(c, "");
                switch (A = Te.charCodeAt(1)) {
                  case ue:
                  case ie:
                  case fe:
                  case Q:
                    f = a;
                    break;
                  default:
                    f = xe;
                }
                if (je = (Ue = He(a, f, Ue, A, i + 1)).length, me > 0 && 0 === je) je = Te.length;
                if (ye > 0) if (f = Ie(xe, Te, Oe), n = Pe(We, Ue, f, a, pe, be, je, A, i, t), Te = f.join(""), void 0 !== n) if (0 === (je = (Ue = n.trim()).length)) A = 0, Ue = "";
                if (je > 0) switch (A) {
                  case fe:
                    Te = Te.replace(x, Me);
                  case ue:
                  case ie:
                  case Q:
                    Ue = Te + "{" + Ue + "}";
                    break;
                  case te:
                    if (Ue = (Te = Te.replace(b, "$1 $2" + (Be > 0 ? De : ""))) + "{" + Ue + "}", 1 === Ae || 2 === Ae && Le("@" + Ue, 3)) Ue = "@" + N + Ue + "@" + Ue;else Ue = "@" + Ue;
                    break;
                  default:
                    if (Ue = Te + Ue, t === de) Ve += Ue, Ue = "";
                } else Ue = "";
                break;
              default:
                Ue = He(a, Ie(a, Te, Oe), Ue, t, i + 1);
            }
            Xe += Ue, O = 0, $e = 0, z = 0, we = 0, Oe = 0, j = 0, Te = "", Ue = "", C = s.charCodeAt(++R);
            break;
          case q:
          case W:
            if ((je = (Te = (we > 0 ? Te.replace(c, "") : Te).trim()).length) > 1) {
              if (0 === z) if ((g = Te.charCodeAt(0)) === Q || g > 96 && g < 123) je = (Te = Te.replace(" ", ":")).length;
              if (ye > 0) if (void 0 !== (n = Pe(Se, Te, a, e, pe, be, Ve.length, t, i, t))) if (0 === (je = (Te = n.trim()).length)) Te = "\0\0";
              switch (g = Te.charCodeAt(0), A = Te.charCodeAt(1), g) {
                case re:
                  break;
                case L:
                  if (A === oe || A === he) {
                    Ye += Te + s.charAt(R);
                    break;
                  }
                default:
                  if (Te.charCodeAt(je - 1) === V) break;
                  Ve += Ke(Te, g, A, Te.charCodeAt(2));
              }
            }
            O = 0, $e = 0, z = 0, we = 0, Oe = 0, Te = "", C = s.charCodeAt(++R);
        }
      }
      switch (C) {
        case J:
        case I:
          if (h + d + u + o + ve === 0) switch ($) {
            case E:
            case X:
            case Y:
            case L:
            case ae:
            case _:
            case T:
            case ee:
            case Z:
            case Q:
            case V:
            case U:
            case W:
            case B:
            case q:
              break;
            default:
              if (z > 0) $e = 1;
          }
          if (h === Z) h = 0;else if (ge + O === 0 && t !== te && Te.length > 0) we = 1, Te += "\0";
          if (ye * qe > 0) Pe(Ne, Te, a, e, pe, be, Ve.length, t, i, t);
          be = 1, pe++;
          break;
        case W:
        case q:
          if (h + d + u + o === 0) {
            be++;
            break;
          }
        default:
          switch (be++, Re = s.charAt(R), C) {
            case K:
            case M:
              if (d + o + h === 0) switch (w) {
                case U:
                case V:
                case K:
                case M:
                  Re = "";
                  break;
                default:
                  if (C !== M) Re = " ";
              }
              break;
            case re:
              Re = "\\0";
              break;
            case ce:
              Re = "\\f";
              break;
            case se:
              Re = "\\v";
              break;
            case P:
              if (d + h + o === 0 && ge > 0) Oe = 1, we = 1, Re = "\f" + Re;
              break;
            case 108:
              if (d + h + o + ke === 0 && z > 0) switch (R - z) {
                case 2:
                  if (w === ne && s.charCodeAt(R - 3) === V) ke = w;
                case 8:
                  if (m === le) ke = m;
              }
              break;
            case V:
              if (d + h + o === 0) z = R;
              break;
            case U:
              if (h + u + d + o === 0) we = 1, Re += "\r";
              break;
            case Y:
            case X:
              if (0 === h) d = d === C ? 0 : 0 === d ? C : d;
              break;
            case G:
              if (d + h + u === 0) o++;
              break;
            case H:
              if (d + h + u === 0) o--;
              break;
            case E:
              if (d + h + o === 0) u--;
              break;
            case D:
              if (d + h + o === 0) {
                if (0 === O) switch (2 * w + 3 * m) {
                  case 533:
                    break;
                  default:
                    y = 0, O = 1;
                }
                u++;
              }
              break;
            case L:
              if (h + u + d + o + z + j === 0) j = 1;
              break;
            case T:
            case Z:
              if (d + o + u > 0) break;
              switch (h) {
                case 0:
                  switch (2 * C + 3 * s.charCodeAt(R + 1)) {
                    case 235:
                      h = Z;
                      break;
                    case 220:
                      je = R, h = T;
                  }
                  break;
                case T:
                  if (C === Z && w === T && je + 2 !== R) {
                    if (33 === s.charCodeAt(je + 2)) Ve += s.substring(je, R + 1);
                    Re = "", h = 0;
                  }
              }
          }
          if (0 === h) {
            if (ge + d + o + j === 0 && t !== te && C !== W) switch (C) {
              case U:
              case ae:
              case _:
              case ee:
              case E:
              case D:
                if (0 === O) {
                  switch (w) {
                    case K:
                    case M:
                    case I:
                    case J:
                      Re += "\0";
                      break;
                    default:
                      Re = "\0" + Re + (C === U ? "" : "\0");
                  }
                  we = 1;
                } else switch (C) {
                  case D:
                    if (z + 7 === R && 108 === w) z = 0;
                    O = ++y;
                    break;
                  case E:
                    if (0 == (O = --y)) we = 1, Re += "\0";
                }
                break;
              case K:
              case M:
                switch (w) {
                  case re:
                  case B:
                  case q:
                  case W:
                  case U:
                  case ce:
                  case K:
                  case M:
                  case I:
                  case J:
                    break;
                  default:
                    if (0 === O) we = 1, Re += "\0";
                }
            }
            if (Te += Re, C !== M && C !== K) $ = C;
          }
      }
      m = w, w = C, R++;
    }
    if (je = Ve.length, me > 0) if (0 === je && 0 === Xe.length && 0 === a[0].length == false) if (t !== ie || 1 === a.length && (ge > 0 ? Ee : Ge) === a[0]) je = a.join(",").length + 2;
    if (je > 0) {
      if (f = 0 === ge && t !== te ? function (e) {
        for (var a, r, s = 0, t = e.length, i = Array(t); s < t; ++s) {
          for (var f = e[s].split(l), n = "", o = 0, h = 0, u = 0, d = 0, b = f.length; o < b; ++o) {
            if (0 === (h = (r = f[o]).length) && b > 1) continue;
            if (u = n.charCodeAt(n.length - 1), d = r.charCodeAt(0), a = "", 0 !== o) switch (u) {
              case T:
              case ae:
              case _:
              case ee:
              case M:
              case D:
                break;
              default:
                a = " ";
            }
            switch (d) {
              case P:
                r = a + Ee;
              case ae:
              case _:
              case ee:
              case M:
              case E:
              case D:
                break;
              case G:
                r = a + r + Ee;
                break;
              case V:
                switch (2 * r.charCodeAt(1) + 3 * r.charCodeAt(2)) {
                  case 530:
                    if (Ce > 0) {
                      r = a + r.substring(8, h - 1);
                      break;
                    }
                  default:
                    if (o < 1 || f[o - 1].length < 1) r = a + Ee + r;
                }
                break;
              case U:
                a = "";
              default:
                if (h > 1 && r.indexOf(":") > 0) r = a + r.replace(v, "$1" + Ee + "$2");else r = a + r + Ee;
            }
            n += r;
          }
          i[s] = n.replace(c, "").trim();
        }
        return i;
      }(a) : a, ye > 0) if (void 0 !== (n = Pe(Fe, Ve, f, e, pe, be, je, t, i, t)) && 0 === (Ve = n).length) return Ye + Ve + Xe;
      if (Ve = f.join(",") + "{" + Ve + "}", Ae * ke != 0) {
        if (2 === Ae && !Le(Ve, 2)) ke = 0;
        switch (ke) {
          case le:
            Ve = Ve.replace(k, ":" + S + "$1") + Ve;
            break;
          case ne:
            Ve = Ve.replace(p, "::" + N + "input-$1") + Ve.replace(p, "::" + S + "$1") + Ve.replace(p, ":" + F + "input-$1") + Ve;
        }
        ke = 0;
      }
    }
    return Ye + Ve + Xe;
  }
  function Ie(e, a, r) {
    var c = a.trim().split(o),
      s = c,
      t = c.length,
      i = e.length;
    switch (i) {
      case 0:
      case 1:
        for (var f = 0, n = 0 === i ? "" : e[0] + " "; f < t; ++f) {
          s[f] = Je(n, s[f], r, i).trim();
        }
        break;
      default:
        f = 0;
        var l = 0;
        for (s = []; f < t; ++f) {
          for (var h = 0; h < i; ++h) {
            s[l++] = Je(e[h] + " ", c[f], r, i).trim();
          }
        }
    }
    return s;
  }
  function Je(e, a, r, c) {
    var s = a,
      t = s.charCodeAt(0);
    if (t < 33) t = (s = s.trim()).charCodeAt(0);
    switch (t) {
      case P:
        switch (ge + c) {
          case 0:
          case 1:
            if (0 === e.trim().length) break;
          default:
            return s.replace(h, "$1" + e.trim());
        }
        break;
      case V:
        switch (s.charCodeAt(1)) {
          case 103:
            if (Ce > 0 && ge > 0) return s.replace(u, "$1").replace(h, "$1" + Ge);
            break;
          default:
            return e.trim() + s.replace(h, "$1" + e.trim());
        }
      default:
        if (r * ge > 0 && s.indexOf("\f") > 0) return s.replace(h, (e.charCodeAt(0) === V ? "" : "$1") + e.trim());
    }
    return e + s;
  }
  function Ke(e, a, r, c) {
    var l,
      o = 0,
      h = e + ";",
      u = 2 * a + 3 * r + 4 * c;
    if (944 === u) return function (e) {
      var a = e.length,
        r = e.indexOf(":", 9) + 1,
        c = e.substring(0, r).trim(),
        s = e.substring(r, a - 1).trim();
      switch (e.charCodeAt(9) * Be) {
        case 0:
          break;
        case Q:
          if (110 !== e.charCodeAt(10)) break;
        default:
          for (var t = s.split((s = "", f)), i = 0, r = 0, a = t.length; i < a; r = 0, ++i) {
            for (var l = t[i], o = l.split(n); l = o[r];) {
              var h = l.charCodeAt(0);
              if (1 === Be && (h > L && h < 90 || h > 96 && h < 123 || h === R || h === Q && l.charCodeAt(1) !== Q)) switch (isNaN(parseFloat(l)) + (-1 !== l.indexOf("("))) {
                case 1:
                  switch (l) {
                    case "infinite":
                    case "alternate":
                    case "backwards":
                    case "running":
                    case "normal":
                    case "forwards":
                    case "both":
                    case "none":
                    case "linear":
                    case "ease":
                    case "ease-in":
                    case "ease-out":
                    case "ease-in-out":
                    case "paused":
                    case "reverse":
                    case "alternate-reverse":
                    case "inherit":
                    case "initial":
                    case "unset":
                    case "step-start":
                    case "step-end":
                      break;
                    default:
                      l += De;
                  }
              }
              o[r++] = l;
            }
            s += (0 === i ? "" : ",") + o.join(" ");
          }
      }
      if (s = c + s + ";", 1 === Ae || 2 === Ae && Le(s, 1)) return N + s + s;
      return s;
    }(h);else if (0 === Ae || 2 === Ae && !Le(h, 1)) return h;
    switch (u) {
      case 1015:
        return 97 === h.charCodeAt(10) ? N + h + h : h;
      case 951:
        return 116 === h.charCodeAt(3) ? N + h + h : h;
      case 963:
        return 110 === h.charCodeAt(5) ? N + h + h : h;
      case 1009:
        if (100 !== h.charCodeAt(4)) break;
      case 969:
      case 942:
        return N + h + h;
      case 978:
        return N + h + S + h + h;
      case 1019:
      case 983:
        return N + h + S + h + F + h + h;
      case 883:
        if (h.charCodeAt(8) === Q) return N + h + h;
        if (h.indexOf("image-set(", 11) > 0) return h.replace(z, "$1" + N + "$2") + h;
        return h;
      case 932:
        if (h.charCodeAt(4) === Q) switch (h.charCodeAt(5)) {
          case 103:
            return N + "box-" + h.replace("-grow", "") + N + h + F + h.replace("grow", "positive") + h;
          case 115:
            return N + h + F + h.replace("shrink", "negative") + h;
          case 98:
            return N + h + F + h.replace("basis", "preferred-size") + h;
        }
        return N + h + F + h + h;
      case 964:
        return N + h + F + "flex-" + h + h;
      case 1023:
        if (99 !== h.charCodeAt(8)) break;
        return l = h.substring(h.indexOf(":", 15)).replace("flex-", "").replace("space-between", "justify"), N + "box-pack" + l + N + h + F + "flex-pack" + l + h;
      case 1005:
        return t.test(h) ? h.replace(s, ":" + N) + h.replace(s, ":" + S) + h : h;
      case 1e3:
        switch (o = (l = h.substring(13).trim()).indexOf("-") + 1, l.charCodeAt(0) + l.charCodeAt(o)) {
          case 226:
            l = h.replace(m, "tb");
            break;
          case 232:
            l = h.replace(m, "tb-rl");
            break;
          case 220:
            l = h.replace(m, "lr");
            break;
          default:
            return h;
        }
        return N + h + F + l + h;
      case 1017:
        if (-1 === h.indexOf("sticky", 9)) return h;
      case 975:
        switch (o = (h = e).length - 10, u = (l = (33 === h.charCodeAt(o) ? h.substring(0, o) : h).substring(e.indexOf(":", 7) + 1).trim()).charCodeAt(0) + (0 | l.charCodeAt(7))) {
          case 203:
            if (l.charCodeAt(8) < 111) break;
          case 115:
            h = h.replace(l, N + l) + ";" + h;
            break;
          case 207:
          case 102:
            h = h.replace(l, N + (u > 102 ? "inline-" : "") + "box") + ";" + h.replace(l, N + l) + ";" + h.replace(l, F + l + "box") + ";" + h;
        }
        return h + ";";
      case 938:
        if (h.charCodeAt(5) === Q) switch (h.charCodeAt(6)) {
          case 105:
            return l = h.replace("-items", ""), N + h + N + "box-" + l + F + "flex-" + l + h;
          case 115:
            return N + h + F + "flex-item-" + h.replace(y, "") + h;
          default:
            return N + h + F + "flex-line-pack" + h.replace("align-content", "").replace(y, "") + h;
        }
        break;
      case 973:
      case 989:
        if (h.charCodeAt(3) !== Q || 122 === h.charCodeAt(4)) break;
      case 931:
      case 953:
        if (true === j.test(e)) if (115 === (l = e.substring(e.indexOf(":") + 1)).charCodeAt(0)) return Ke(e.replace("stretch", "fill-available"), a, r, c).replace(":fill-available", ":stretch");else return h.replace(l, N + l) + h.replace(l, S + l.replace("fill-", "")) + h;
        break;
      case 962:
        if (h = N + h + (102 === h.charCodeAt(5) ? F + h : "") + h, r + c === 211 && 105 === h.charCodeAt(13) && h.indexOf("transform", 10) > 0) return h.substring(0, h.indexOf(";", 27) + 1).replace(i, "$1" + N + "$2") + h;
    }
    return h;
  }
  function Le(e, a) {
    var r = e.indexOf(1 === a ? ":" : "{"),
      c = e.substring(0, 3 !== a ? r : 10),
      s = e.substring(r + 1, e.length - 1);
    return Oe(2 !== a ? c : c.replace(O, "$1"), s, a);
  }
  function Me(e, a) {
    var r = Ke(a, a.charCodeAt(0), a.charCodeAt(1), a.charCodeAt(2));
    return r !== a + ";" ? r.replace($, " or ($1)").substring(4) : "(" + a + ")";
  }
  function Pe(e, a, r, c, s, t, i, f, n, l) {
    for (var o, h = 0, u = a; h < ye; ++h) {
      switch (o = $e[h].call(Te, e, u, r, c, s, t, i, f, n, l)) {
        case void 0:
        case false:
        case true:
        case null:
          break;
        default:
          u = o;
      }
    }
    if (u !== a) return u;
  }
  function Qe(e, a, r, c) {
    for (var s = a + 1; s < r; ++s) {
      switch (c.charCodeAt(s)) {
        case Z:
          if (e === T) if (c.charCodeAt(s - 1) === T && a + 2 !== s) return s + 1;
          break;
        case I:
          if (e === Z) return s + 1;
      }
    }
    return s;
  }
  function Re(e) {
    for (var a in e) {
      var r = e[a];
      switch (a) {
        case "keyframe":
          Be = 0 | r;
          break;
        case "global":
          Ce = 0 | r;
          break;
        case "cascade":
          ge = 0 | r;
          break;
        case "compress":
          we = 0 | r;
          break;
        case "semicolon":
          ve = 0 | r;
          break;
        case "preserve":
          me = 0 | r;
          break;
        case "prefix":
          if (Oe = null, !r) Ae = 0;else if ("function" != typeof r) Ae = 1;else Ae = 2, Oe = r;
      }
    }
    return Re;
  }
  function Te(a, r) {
    if (void 0 !== this && this.constructor === Te) return e(a);
    var s = a,
      t = s.charCodeAt(0);
    if (t < 33) t = (s = s.trim()).charCodeAt(0);
    if (Be > 0) De = s.replace(d, t === G ? "" : "-");
    if (t = 1, 1 === ge) Ge = s;else Ee = s;
    var i,
      f = [Ge];
    if (ye > 0) if (void 0 !== (i = Pe(ze, r, f, f, pe, be, 0, 0, 0, 0)) && "string" == typeof i) r = i;
    var n = He(xe, f, r, 0, 0);
    if (ye > 0) if (void 0 !== (i = Pe(je, n, f, f, pe, be, n.length, 0, 0, 0)) && "string" != typeof (n = i)) t = 0;
    return De = "", Ge = "", Ee = "", ke = 0, pe = 1, be = 1, we * t == 0 ? n : n.replace(c, "").replace(g, "").replace(A, "$1").replace(C, "$1").replace(w, " ");
  }
  if (Te.use = function e(a) {
    switch (a) {
      case void 0:
      case null:
        ye = $e.length = 0;
        break;
      default:
        if ("function" == typeof a) $e[ye++] = a;else if ("object" == _typeof(a)) for (var r = 0, c = a.length; r < c; ++r) {
          e(a[r]);
        } else qe = 0 | !!a;
    }
    return e;
  }, Te.set = Re, void 0 !== a) Re(a);
  return Te;
});

/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


if (true) {
  module.exports = __webpack_require__(58);
} else {}

/***/ }),
/* 33 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
var currencies = {
  USD: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} USD',
    money_name: 'US Dollar'
  },
  EUR: {
    money_format: '€{{amount}}',
    money_with_currency_format: '€{{amount}} EUR',
    money_name: 'Euro'
  },
  GBP: {
    money_format: '£{{amount}}',
    money_with_currency_format: '£{{amount}} GBP',
    money_name: 'British Pound Sterling'
  },
  CAD: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} CAD',
    money_name: 'Canadian Dollar'
  },
  ALL: {
    money_format: 'Lek {{amount}}',
    money_with_currency_format: 'Lek {{amount}} ALL',
    money_name: 'Albanian Lek'
  },
  DZD: {
    money_format: 'DA {{amount}}',
    money_with_currency_format: 'DA {{amount}} DZD',
    money_name: 'Algerian Dinar'
  },
  AOA: {
    money_format: 'Kz{{amount}}',
    money_with_currency_format: 'Kz{{amount}} AOA',
    money_name: 'Angolan Kwanza'
  },
  ARS: {
    money_format: '${{amount_with_comma_separator}}',
    money_with_currency_format: '${{amount_with_comma_separator}} ARS',
    money_name: 'Argentine Peso'
  },
  AMD: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} AMD',
    money_name: 'Armenian Dram'
  },
  AWG: {
    money_format: 'Afl{{amount}}',
    money_with_currency_format: 'Afl{{amount}} AWG',
    money_name: 'Aruban Florin'
  },
  AUD: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} AUD',
    money_name: 'Australian Dollar'
  },
  BBD: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} Bds',
    money_name: 'Barbadian Dollar'
  },
  AZN: {
    money_format: '₼{{amount}}',
    money_with_currency_format: '₼{{amount}} AZN',
    money_name: 'Azerbaijani Manat'
  },
  BDT: {
    money_format: 'Tk {{amount}}',
    money_with_currency_format: 'Tk {{amount}} BDT',
    money_name: 'Bangladeshi Taka'
  },
  BSD: {
    money_format: 'BS${{amount}}',
    money_with_currency_format: 'BS${{amount}} BSD',
    money_name: 'Bahamian Dollar'
  },
  BHD: {
    money_format: '{{amount}} BD',
    money_with_currency_format: '{{amount}} BHD',
    money_name: 'Bahraini Dinar'
  },
  BYN: {
    money_format: 'Br {{amount}}',
    money_with_currency_format: 'Br {{amount}} BYN',
    money_name: 'Belarusian Ruble'
  },
  BZD: {
    money_format: 'BZ${{amount}}',
    money_with_currency_format: 'BZ${{amount}} BZD',
    money_name: 'Belize Dollar'
  },
  BTN: {
    money_format: 'Nu {{amount}}',
    money_with_currency_format: 'Nu {{amount}} BTN',
    money_name: 'Bhutanese Ngultrum'
  },
  BAM: {
    money_format: 'KM {{amount_with_comma_separator}}',
    money_with_currency_format: 'KM {{amount_with_comma_separator}} BAM',
    money_name: 'Bosnia-Herzegovina Convertible Mark'
  },
  BRL: {
    money_format: 'R$ {{amount_with_comma_separator}}',
    money_with_currency_format: 'R$ {{amount_with_comma_separator}} BRL',
    money_name: 'Brazilian Real'
  },
  BOB: {
    money_format: 'Bs{{amount_with_comma_separator}}',
    money_with_currency_format: 'Bs{{amount_with_comma_separator}} BOB',
    money_name: 'Bolivian Boliviano'
  },
  BWP: {
    money_format: 'P{{amount}}',
    money_with_currency_format: 'P{{amount}} BWP',
    money_name: 'Botswanan Pula'
  },
  BND: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} BND',
    money_name: 'Brunei Dollar'
  },
  BGN: {
    money_format: '{{amount}} лв',
    money_with_currency_format: '{{amount}} лв BGN',
    money_name: 'Bulgarian Lev'
  },
  MMK: {
    money_format: 'K{{amount}}',
    money_with_currency_format: 'K{{amount}} MMK',
    money_name: 'Myanmar Kyat'
  },
  KHR: {
    money_format: 'KHR{{amount}}',
    money_with_currency_format: 'KHR{{amount}}',
    money_name: 'Cambodian Riel'
  },
  KYD: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} KYD',
    money_name: 'Cayman Islands Dollar'
  },
  XAF: {
    money_format: 'FCFA{{amount}}',
    money_with_currency_format: 'FCFA{{amount}} XAF',
    money_name: 'Central African CFA Franc'
  },
  CLP: {
    money_format: '${{amount_no_decimals}}',
    money_with_currency_format: '${{amount_no_decimals}} CLP',
    money_name: 'Chilean Peso'
  },
  CNY: {
    money_format: '¥{{amount}}',
    money_with_currency_format: '¥{{amount}} CNY',
    money_name: 'Chinese Yuan'
  },
  COP: {
    money_format: '${{amount_with_comma_separator}}',
    money_with_currency_format: '${{amount_with_comma_separator}} COP',
    money_name: 'Colombian Peso'
  },
  CRC: {
    money_format: '₡ {{amount_with_comma_separator}}',
    money_with_currency_format: '₡ {{amount_with_comma_separator}} CRC',
    money_name: 'Costa Rican Colon'
  },
  HRK: {
    money_format: '{{amount_with_comma_separator}} kn',
    money_with_currency_format: '{{amount_with_comma_separator}} kn HRK',
    money_name: 'Croatian Kuna'
  },
  CZK: {
    money_format: '{{amount_with_comma_separator}} Kč',
    money_with_currency_format: '{{amount_with_comma_separator}} Kč',
    money_name: 'Czech Republic Koruna'
  },
  DKK: {
    money_format: 'kr {{amount_with_comma_separator}}',
    money_with_currency_format: 'kr {{amount_with_comma_separator}} DKK',
    money_name: 'Danish Krone'
  },
  DOP: {
    money_format: 'RD$ {{amount}}',
    money_with_currency_format: 'RD$ {{amount}}',
    money_name: 'Dominican Peso'
  },
  XCD: {
    money_format: '${{amount}}',
    money_with_currency_format: 'EC${{amount}}',
    money_name: 'East Caribbean Dollar'
  },
  EGP: {
    money_format: 'LE {{amount}}',
    money_with_currency_format: 'LE {{amount}} EGP',
    money_name: 'Egyptian Pound'
  },
  ETB: {
    money_format: 'Br{{amount}}',
    money_with_currency_format: 'Br{{amount}} ETB',
    money_name: 'Ethiopian Birr'
  },
  XPF: {
    money_format: '{{amount_no_decimals_with_comma_separator}} XPF',
    money_with_currency_format: '{{amount_no_decimals_with_comma_separator}} XPF',
    money_name: 'CFP Franc'
  },
  FJD: {
    money_format: '${{amount}}',
    money_with_currency_format: 'FJ${{amount}}',
    money_name: 'Fijian Dollar'
  },
  GMD: {
    money_format: 'D {{amount}}',
    money_with_currency_format: 'D {{amount}} GMD',
    money_name: 'Gambian Dalasi'
  },
  GHS: {
    money_format: 'GHS{{amount}}',
    money_with_currency_format: 'GHS{{amount}}',
    money_name: 'Ghanaian Cedi'
  },
  GTQ: {
    money_format: 'Q{{amount}}',
    money_with_currency_format: '{{amount}} GTQ',
    money_name: 'Guatemalan Quetzal'
  },
  GYD: {
    money_format: 'G${{amount}}',
    money_with_currency_format: '${{amount}} GYD',
    money_name: 'Guyanaese Dollar'
  },
  GEL: {
    money_format: '{{amount}} GEL',
    money_with_currency_format: '{{amount}} GEL',
    money_name: 'Georgian Lari'
  },
  HNL: {
    money_format: 'L {{amount}}',
    money_with_currency_format: 'L {{amount}} HNL',
    money_name: 'Honduran Lempira'
  },
  HKD: {
    money_format: 'HK${{amount}}',
    money_with_currency_format: 'HK${{amount}} HKD',
    money_name: 'Hong Kong Dollar'
  },
  HUF: {
    money_format: '{{amount_no_decimals_with_comma_separator}}',
    money_with_currency_format: '{{amount_no_decimals_with_comma_separator}} Ft',
    money_name: 'Hungarian Forint'
  },
  ISK: {
    money_format: '{{amount_no_decimals}} kr',
    money_with_currency_format: '{{amount_no_decimals}} kr ISK',
    money_name: 'Icelandic Krona'
  },
  INR: {
    money_format: '₹ {{amount}}',
    money_with_currency_format: '₹ {{amount}} INR',
    money_name: 'Indian Rupee'
  },
  IDR: {
    money_format: '{{amount_with_comma_separator}} IDR',
    money_with_currency_format: 'Rp {{amount_with_comma_separator}} IDR',
    money_name: 'Indonesian Rupiah'
  },
  ILS: {
    money_format: '₪{{amount}}',
    money_with_currency_format: '₪{{amount}} NIS',
    money_name: 'Israeli New Shekel'
  },
  JMD: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} JMD',
    money_name: 'Jamaican Dollar'
  },
  JPY: {
    money_format: '¥{{amount_no_decimals}}',
    money_with_currency_format: '¥{{amount_no_decimals}} JPY',
    money_name: 'Japanese Yen'
  },
  JEP: {
    money_format: '£{{amount}}',
    money_with_currency_format: '£{{amount}} JEP',
    money_name: 'Jersey Pound'
  },
  JOD: {
    money_format: '{{amount}} JD',
    money_with_currency_format: '{{amount}} JOD',
    money_name: 'Jordanian Dinar'
  },
  KZT: {
    money_format: '{{amount}} KZT',
    money_with_currency_format: '{{amount}} KZT',
    money_name: 'Kazakhstani Tenge'
  },
  KES: {
    money_format: 'KSh{{amount}}',
    money_with_currency_format: 'KSh{{amount}}',
    money_name: 'Kenyan Shilling'
  },
  KWD: {
    money_format: '{{amount}} KD',
    money_with_currency_format: '{{amount}} KWD',
    money_name: 'Kuwaiti Dinar'
  },
  KGS: {
    money_format: 'лв{{amount}}',
    money_with_currency_format: 'лв{{amount}}',
    money_name: 'Kyrgystani Som'
  },
  LVL: {
    money_format: 'Ls {{amount}}',
    money_with_currency_format: 'Ls {{amount}} LVL',
    money_name: 'Latvian Lats'
  },
  LBP: {
    money_format: 'L.L.{{amount}}',
    money_with_currency_format: 'L.L.{{amount}} LBP',
    money_name: 'Lebanese Pound'
  },
  LTL: {
    money_format: '{{amount}} Lt',
    money_with_currency_format: '{{amount}} Lt',
    money_name: 'Lithuanian Litas'
  },
  MGA: {
    money_format: 'Ar {{amount}}',
    money_with_currency_format: 'Ar {{amount}} MGA',
    money_name: 'Malagasy Ariary'
  },
  MKD: {
    money_format: 'ден {{amount}}',
    money_with_currency_format: 'ден {{amount}} MKD',
    money_name: 'Macedonian Denar'
  },
  MOP: {
    money_format: 'MOP${{amount}}',
    money_with_currency_format: 'MOP${{amount}}',
    money_name: 'Macanese Pataca'
  },
  MVR: {
    money_format: 'Rf{{amount}}',
    money_with_currency_format: 'Rf{{amount}} MVR',
    money_name: 'Maldivian Rufiyaa'
  },
  MXN: {
    money_format: '$ {{amount}}',
    money_with_currency_format: '$ {{amount}} MXN',
    money_name: 'Mexican Peso'
  },
  MYR: {
    money_format: 'RM{{amount}}',
    money_with_currency_format: 'RM{{amount}} MYR',
    money_name: 'Malaysian Ringgit'
  },
  MUR: {
    money_format: 'Rs {{amount}}',
    money_with_currency_format: 'Rs {{amount}} MUR',
    money_name: 'Mauritian Rupee'
  },
  MDL: {
    money_format: '{{amount}} MDL',
    money_with_currency_format: '{{amount}} MDL',
    money_name: 'Moldovan Leu'
  },
  MAD: {
    money_format: '{{amount}} dh',
    money_with_currency_format: 'Dh {{amount}} MAD',
    money_name: 'Moroccan Dirham'
  },
  MNT: {
    money_format: '{{amount_no_decimals}} ₮',
    money_with_currency_format: '{{amount_no_decimals}} MNT',
    money_name: 'Mongolian Tugrik'
  },
  MZN: {
    money_format: '{{amount}} Mt',
    money_with_currency_format: 'Mt {{amount}} MZN',
    money_name: 'Mozambican Metical'
  },
  NAD: {
    money_format: 'N${{amount}}',
    money_with_currency_format: 'N${{amount}} NAD',
    money_name: 'Namibian Dollar'
  },
  NPR: {
    money_format: 'Rs{{amount}}',
    money_with_currency_format: 'Rs{{amount}} NPR',
    money_name: 'Nepalese Rupee'
  },
  ANG: {
    money_format: 'ƒ {{amount}}',
    money_with_currency_format: '{{amount}} ƒ',
    money_name: 'Netherlands Antillean Guilder'
  },
  NZD: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} NZD',
    money_name: 'New Zealand Dollar'
  },
  NIO: {
    money_format: 'C${{amount}}',
    money_with_currency_format: 'C${{amount}} NIO',
    money_name: 'Nicaraguan Cordoba'
  },
  NGN: {
    money_format: '₦{{amount}}',
    money_with_currency_format: '₦{{amount}} NGN',
    money_name: 'Nigerian Naira'
  },
  NOK: {
    money_format: 'kr {{amount_with_comma_separator}}',
    money_with_currency_format: 'kr {{amount_with_comma_separator}} NOK',
    money_name: 'Norwegian Krone'
  },
  OMR: {
    money_format: '{{amount_with_comma_separator}} OMR',
    money_with_currency_format: '{{amount_with_comma_separator}} OMR',
    money_name: 'Omani Rial'
  },
  PKR: {
    money_format: 'Rs.{{amount}}',
    money_with_currency_format: 'Rs.{{amount}} PKR',
    money_name: 'Pakistani Rupee'
  },
  PGK: {
    money_format: 'K {{amount}}',
    money_with_currency_format: 'K {{amount}} PGK',
    money_name: 'Papua New Guinean Kina'
  },
  PYG: {
    money_format: 'Gs. {{amount_no_decimals_with_comma_separator}}',
    money_with_currency_format: 'Gs. {{amount_no_decimals_with_comma_separator}} PYG',
    money_name: 'Paraguayan Guarani'
  },
  PEN: {
    money_format: 'S/. {{amount}}',
    money_with_currency_format: 'S/. {{amount}} PEN',
    money_name: 'Peruvian Nuevo Sol'
  },
  PHP: {
    money_format: '₱{{amount}}',
    money_with_currency_format: '₱{{amount}} PHP',
    money_name: 'Philippine Peso'
  },
  PLN: {
    money_format: '{{amount_with_comma_separator}} zl',
    money_with_currency_format: '{{amount_with_comma_separator}} zl PLN',
    money_name: 'Polish Zloty'
  },
  QAR: {
    money_format: 'QAR {{amount_with_comma_separator}}',
    money_with_currency_format: 'QAR {{amount_with_comma_separator}}',
    money_name: 'Qatari Rial'
  },
  RON: {
    money_format: '{{amount_with_comma_separator}} lei',
    money_with_currency_format: '{{amount_with_comma_separator}} lei RON',
    money_name: 'Romanian Leu'
  },
  RUB: {
    money_format: '₽ {{amount_with_comma_separator}}',
    money_with_currency_format: '₽ {{amount_with_comma_separator}} RUB',
    money_name: 'Russian Ruble'
  },
  RWF: {
    money_format: '{{amount_no_decimals}} RF',
    money_with_currency_format: '{{amount_no_decimals}} RWF',
    money_name: 'Rwandan Franc'
  },
  WST: {
    money_format: 'WS$ {{amount}}',
    money_with_currency_format: 'WS$ {{amount}} WST',
    money_name: 'Samoan Tala'
  },
  SAR: {
    money_format: '{{amount}} SR',
    money_with_currency_format: '{{amount}} SAR',
    money_name: 'Saudi Riyal'
  },
  STD: {
    money_format: 'Db {{amount}}',
    money_with_currency_format: 'Db {{amount}} STD',
    money_name: 'Sao Tome and Principe Dobra'
  },
  RSD: {
    money_format: '{{amount}} RSD',
    money_with_currency_format: '{{amount}} RSD',
    money_name: 'Serbian Dinar'
  },
  SCR: {
    money_format: 'Rs {{amount}}',
    money_with_currency_format: 'Rs {{amount}} SCR',
    money_name: 'Seychellois Rupee'
  },
  SGD: {
    money_format: 'S${{amount}}',
    money_with_currency_format: 'S${{amount}} SGD',
    money_name: 'Singapore Dollar'
  },
  SYP: {
    money_format: 'S£{{amount}}',
    money_with_currency_format: 'S£{{amount}} SYP',
    money_name: 'Syrian Pound'
  },
  ZAR: {
    money_format: 'R {{amount}}',
    money_with_currency_format: 'R {{amount}} ZAR',
    money_name: 'South African Rand'
  },
  KRW: {
    money_format: '₩{{amount_no_decimals}}',
    money_with_currency_format: '₩{{amount_no_decimals}} KRW',
    money_name: 'South Korean Won'
  },
  LKR: {
    money_format: 'Rs {{amount}}',
    money_with_currency_format: 'Rs {{amount}} LKR',
    money_name: 'Sri Lankan Rupee'
  },
  SEK: {
    money_format: 'kr {{amount_with_comma_separator}}',
    money_with_currency_format: 'kr {{amount_with_comma_separator}} SEK',
    money_name: 'Swedish Krona'
  },
  CHF: {
    money_format: 'SFr. {{amount}}',
    money_with_currency_format: 'SFr. {{amount}} CHF',
    money_name: 'Swiss Franc'
  },
  TWD: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} TWD',
    money_name: 'New Taiwan Dollar'
  },
  THB: {
    money_format: '{{amount}} THB',
    money_with_currency_format: '{{amount}} &#xe3f; THB',
    money_name: 'Thai Baht'
  },
  TZS: {
    money_format: '{{amount}} TZS',
    money_with_currency_format: '{{amount}} TZS',
    money_name: 'Tanzanian Shilling'
  },
  TTD: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}} TTD',
    money_name: 'Trinidad and Tobago Dollar'
  },
  TND: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} DT',
    money_name: 'Tunisian Dinar'
  },
  TRY: {
    money_format: '{{amount}} TL',
    money_with_currency_format: '{{amount}} TL',
    money_name: 'Turkish Lira'
  },
  UGX: {
    money_format: 'Ush {{amount_no_decimals}}',
    money_with_currency_format: 'Ush {{amount_no_decimals}} UGX',
    money_name: 'Ugandan Shilling'
  },
  UAH: {
    money_format: '₴{{amount}}',
    money_with_currency_format: '₴{{amount}} UAH',
    money_name: 'Ukrainian Hryvnia'
  },
  AED: {
    money_format: '{{amount}} AED',
    money_with_currency_format: '{{amount}} AED',
    money_name: 'United Arab Emirates Dirham'
  },
  UYU: {
    money_format: '${{amount_with_comma_separator}}',
    money_with_currency_format: '${{amount_with_comma_separator}} UYU',
    money_name: 'Uruguayan Peso'
  },
  VUV: {
    money_format: '${{amount}}',
    money_with_currency_format: '${{amount}}VT',
    money_name: 'Vanuatu Vatu'
  },
  VEF: {
    money_format: 'Bs. {{amount_with_comma_separator}}',
    money_with_currency_format: 'Bs. {{amount_with_comma_separator}} VEF',
    money_name: 'Venezuelan Bolivar'
  },
  VND: {
    money_format: '{{amount_no_decimals_with_comma_separator}}₫',
    money_with_currency_format: '{{amount_no_decimals_with_comma_separator}} VND',
    money_name: 'Vietnamese Dong'
  },
  BTC: {
    money_format: '{{amount_no_decimals}} BTC',
    money_with_currency_format: '{{amount_no_decimals}} BTC',
    money_name: 'Bitcoin'
  },
  XOF: {
    money_format: 'CFA{{amount}}',
    money_with_currency_format: 'CFA{{amount}} XOF',
    money_name: 'CFA Franc BCEAO'
  },
  ZMW: {
    money_format: 'K{{amount_no_decimals_with_comma_separator}}',
    money_with_currency_format: 'ZMW{{amount_no_decimals_with_comma_separator}}',
    money_name: 'Zambian Kwacha'
  },
  AFN: {
    money_format: 'Af {{amount}}',
    money_with_currency_format: 'Af {{amount}} AFN',
    money_name: 'Afghan Afghani'
  },
  BMD: {
    money_format: '$ {{amount}}',
    money_with_currency_format: '$ {{amount}} BMD',
    money_name: 'Bermudan Dollar'
  },
  BIF: {
    money_format: 'BIF {{amount}}',
    money_with_currency_format: 'BIF {{amount}} BIF',
    money_name: 'Burundian Franc'
  },
  CVE: {
    money_format: '$ {{amount}}',
    money_with_currency_format: '$ {{amount}} CVE',
    money_name: 'Cape Verdean Escudo'
  },
  KMF: {
    money_format: 'CF {{amount}}',
    money_with_currency_format: 'CF {{amount}} KMF',
    money_name: 'Comorian Franc'
  },
  CDF: {
    money_format: 'FC {{amount}}',
    money_with_currency_format: 'FC {{amount}} CDF',
    money_name: 'Congolese Franc'
  },
  CUC: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} CUC',
    money_name: 'Cuban Convertible Peso'
  },
  CUP: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} CUP',
    money_name: 'Cuban Peso'
  },
  DJF: {
    money_format: 'DJF {{amount}}',
    money_with_currency_format: 'DJF {{amount}} DJF',
    money_name: 'Djiboutian Franc'
  },
  ERN: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} ERN',
    money_name: 'Eritrean Nakfa'
  },
  EEK: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} EEK',
    money_name: 'Estonian Kroon'
  },
  FKP: {
    money_format: '£ {{amount}}',
    money_with_currency_format: '£ {{amount}} FKP',
    money_name: 'Falkland Islands Pound'
  },
  GIP: {
    money_format: '£ {{amount}}',
    money_with_currency_format: '£ {{amount}} GIP',
    money_name: 'Gibraltar Pound'
  },
  XAU: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} XAU',
    money_name: 'Gold Ounce'
  },
  GGP: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} GGP',
    money_name: 'Guernsey Pound'
  },
  GNF: {
    money_format: 'FG {{amount}}',
    money_with_currency_format: 'FG {{amount}} GNF',
    money_name: 'Guinean Franc'
  },
  HTG: {
    money_format: 'G {{amount}}',
    money_with_currency_format: 'G {{amount}} HTG',
    money_name: 'Haitian Gourde'
  },
  XDR: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} XDR',
    money_name: 'IMF Special Drawing Rights'
  },
  IRR: {
    money_format: '﷼ {{amount}}',
    money_with_currency_format: '﷼ {{amount}} IRR',
    money_name: 'Iranian Rial'
  },
  IQD: {
    money_format: 'ع.د {{amount}}',
    money_with_currency_format: 'ع.د {{amount}} IQD',
    money_name: 'Iraqi Dinar'
  },
  IMP: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} IMP',
    money_name: 'Isle of Man Pound'
  },
  LAK: {
    money_format: '₭ {{amount}}',
    money_with_currency_format: '₭ {{amount}} LAK',
    money_name: 'Laotian Kip'
  },
  LSL: {
    money_format: 'L {{amount}}',
    money_with_currency_format: 'L {{amount}} LSL',
    money_name: 'Lesotho Loti'
  },
  LRD: {
    money_format: '$ {{amount}}',
    money_with_currency_format: '$ {{amount}} LRD',
    money_name: 'Liberian Dollar'
  },
  LYD: {
    money_format: 'ل.د {{amount}}',
    money_with_currency_format: 'ل.د {{amount}} LYD',
    money_name: 'Libyan Dinar'
  },
  MWK: {
    money_format: 'MK {{amount}}',
    money_with_currency_format: 'MK {{amount}} MWK',
    money_name: 'Malawian Kwacha'
  },
  MRO: {
    money_format: 'UM {{amount}}',
    money_with_currency_format: 'UM {{amount}} MRO',
    money_name: 'Mauritanian Ouguiya'
  },
  KPW: {
    money_format: '₩ {{amount}}',
    money_with_currency_format: '₩ {{amount}} KPW',
    money_name: 'North Korean Won'
  },
  XPD: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} XPD',
    money_name: 'Palladium Ounce'
  },
  PAB: {
    money_format: 'PAB {{amount}}',
    money_with_currency_format: 'PAB {{amount}} PAB',
    money_name: 'Panamanian Balboa'
  },
  XPT: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} XPT',
    money_name: 'Platinum Ounce'
  },
  SHP: {
    money_format: '£ {{amount}}',
    money_with_currency_format: '£ {{amount}} SHP',
    money_name: 'Saint Helena Pound'
  },
  SVC: {
    money_format: '$ {{amount}}',
    money_with_currency_format: '$ {{amount}} SVC',
    money_name: 'Salvadoran Colon'
  },
  SPL: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} SPL',
    money_name: 'Seborgan Luigino'
  },
  SLL: {
    money_format: 'Le {{amount}}',
    money_with_currency_format: 'Le {{amount}} SLL',
    money_name: 'Sierra Leonean Leone'
  },
  XAG: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} XAG',
    money_name: 'Silver Ounce'
  },
  SKK: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} SKK',
    money_name: 'Slovak Koruna'
  },
  SBD: {
    money_format: '$ {{amount}}',
    money_with_currency_format: '$ {{amount}} SBD',
    money_name: 'Solomon Islands Dollar'
  },
  SOS: {
    money_format: 'S {{amount}}',
    money_with_currency_format: 'S {{amount}} SOS',
    money_name: 'Somali Shilling'
  },
  SDG: {
    money_format: '£ {{amount}}',
    money_with_currency_format: '£ {{amount}} SDG',
    money_name: 'Sudanese Pound'
  },
  SRD: {
    money_format: '$ {{amount}}',
    money_with_currency_format: '$ {{amount}} SRD',
    money_name: 'Surinamese Dollar'
  },
  SZL: {
    money_format: 'L {{amount}}',
    money_with_currency_format: 'L {{amount}} SZL',
    money_name: 'Swazi Lilangeni'
  },
  TJS: {
    money_format: 'TJS {{amount}}',
    money_with_currency_format: 'TJS {{amount}} TJS',
    money_name: 'Tajikistani Somoni'
  },
  TOP: {
    money_format: 'T$ {{amount}}',
    money_with_currency_format: 'T$ {{amount}} TOP',
    money_name: 'Tongan Paʻanga'
  },
  TMT: {
    money_format: 'm {{amount}}',
    money_with_currency_format: 'm {{amount}} TMT',
    money_name: 'Turkmenistani Manat'
  },
  TVD: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} TVD',
    money_name: 'Tuvaluan Dollar'
  },
  UZS: {
    money_format: 'лв {{amount}}',
    money_with_currency_format: 'лв {{amount}} UZS',
    money_name: 'Uzbekistan Som'
  },
  YER: {
    money_format: '﷼ {{amount}}',
    money_with_currency_format: '﷼ {{amount}} YER',
    money_name: 'Yemeni Rial'
  },
  ZWD: {
    money_format: '{{amount}}',
    money_with_currency_format: '{{amount}} ZWD',
    money_name: 'Zimbabwean Dollar'
  }
};
/* harmony default export */ __webpack_exports__["a"] = (currencies);

/***/ }),
/* 34 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _objectWithoutProperties; });

// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
function _objectWithoutPropertiesLoose(source, excluded) {
  if (source == null) return {};
  var target = {};
  var sourceKeys = Object.keys(source);
  var key, i;
  for (i = 0; i < sourceKeys.length; i++) {
    key = sourceKeys[i];
    if (excluded.indexOf(key) >= 0) continue;
    target[key] = source[key];
  }
  return target;
}
// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js

function _objectWithoutProperties(source, excluded) {
  if (source == null) return {};
  var target = _objectWithoutPropertiesLoose(source, excluded);
  var key, i;
  if (Object.getOwnPropertySymbols) {
    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
    for (i = 0; i < sourceSymbolKeys.length; i++) {
      key = sourceSymbolKeys[i];
      if (excluded.indexOf(key) >= 0) continue;
      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
      target[key] = source[key];
    }
  }
  return target;
}

/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {

var _typeof = __webpack_require__(9);
var n = __webpack_require__(1),
  t = __webpack_require__(6);
function e(n, t) {
  for (var e in t) {
    n[e] = t[e];
  }
  return n;
}
function r(n, t) {
  for (var e in n) {
    if ("__source" !== e && !(e in t)) return !0;
  }
  for (var r in t) {
    if ("__source" !== r && n[r] !== t[r]) return !0;
  }
  return !1;
}
function u(n, t) {
  this.props = n, this.context = t;
}
function o(t, e) {
  function u(n) {
    var t = this.props.ref,
      u = t == n.ref;
    return !u && t && (t.call ? t(null) : t.current = null), e ? !e(this.props, n) || !u : r(this.props, n);
  }
  function o(e) {
    return this.shouldComponentUpdate = u, n.createElement(t, e);
  }
  return o.displayName = "Memo(" + (t.displayName || t.name) + ")", o.prototype.isReactComponent = !0, o.__f = !0, o;
}
(u.prototype = new n.Component()).isPureReactComponent = !0, u.prototype.shouldComponentUpdate = function (n, t) {
  return r(this.props, n) || r(this.state, t);
};
var i = n.options.__b;
n.options.__b = function (n) {
  n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), i && i(n);
};
var c = "undefined" != typeof Symbol && Symbol["for"] && Symbol["for"]("react.forward_ref") || 3911;
function l(n) {
  function t(t) {
    var r = e({}, t);
    return delete r.ref, n(r, t.ref || null);
  }
  return t.$$typeof = c, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", t;
}
var f = function f(t, e) {
    return null == t ? null : n.toChildArray(n.toChildArray(t).map(e));
  },
  a = {
    map: f,
    forEach: f,
    count: function count(t) {
      return t ? n.toChildArray(t).length : 0;
    },
    only: function only(t) {
      var e = n.toChildArray(t);
      if (1 !== e.length) throw "Children.only";
      return e[0];
    },
    toArray: n.toChildArray
  },
  s = n.options.__e;
n.options.__e = function (n, t, e, r) {
  if (n.then) for (var u, o = t; o = o.__;) {
    if ((u = o.__c) && u.__c) return null == t.__e && (t.__e = e.__e, t.__k = e.__k), u.__c(n, t);
  }
  s(n, t, e, r);
};
var p = n.options.unmount;
function h(n, t, r) {
  return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function (n) {
    "function" == typeof n.__c && n.__c();
  }), n.__c.__H = null), null != (n = e({}, n)).__c && (n.__c.__P === r && (n.__c.__P = t), n.__c = null), n.__k = n.__k && n.__k.map(function (n) {
    return h(n, t, r);
  })), n;
}
function v(n, t, e) {
  return n && e && (n.__v = null, n.__k = n.__k && n.__k.map(function (n) {
    return v(n, t, e);
  }), n.__c && n.__c.__P === t && (n.__e && e.appendChild(n.__e), n.__c.__e = !0, n.__c.__P = e)), n;
}
function d() {
  this.__u = 0, this.t = null, this.__b = null;
}
function m(n) {
  var t = n.__.__c;
  return t && t.__a && t.__a(n);
}
function x(t) {
  var e, r, u;
  function o(o) {
    if (e || (e = t()).then(function (n) {
      r = n["default"] || n;
    }, function (n) {
      u = n;
    }), u) throw u;
    if (!r) throw e;
    return n.createElement(r, o);
  }
  return o.displayName = "Lazy", o.__f = !0, o;
}
function b() {
  this.u = null, this.o = null;
}
n.options.unmount = function (n) {
  var t = n.__c;
  t && t.__R && t.__R(), t && 32 & n.__u && (n.type = null), p && p(n);
}, (d.prototype = new n.Component()).__c = function (n, t) {
  var e = t.__c,
    r = this;
  null == r.t && (r.t = []), r.t.push(e);
  var u = m(r.__v),
    o = !1,
    i = function i() {
      o || (o = !0, e.__R = null, u ? u(c) : c());
    };
  e.__R = i;
  var c = function c() {
    if (! --r.__u) {
      if (r.state.__a) {
        var n = r.state.__a;
        r.__v.__k[0] = v(n, n.__c.__P, n.__c.__O);
      }
      var t;
      for (r.setState({
        __a: r.__b = null
      }); t = r.t.pop();) {
        t.forceUpdate();
      }
    }
  };
  r.__u++ || 32 & t.__u || r.setState({
    __a: r.__b = r.__v.__k[0]
  }), n.then(i, i);
}, d.prototype.componentWillUnmount = function () {
  this.t = [];
}, d.prototype.render = function (t, e) {
  if (this.__b) {
    if (this.__v.__k) {
      var r = document.createElement("div"),
        u = this.__v.__k[0].__c;
      this.__v.__k[0] = h(this.__b, r, u.__O = u.__P);
    }
    this.__b = null;
  }
  var o = e.__a && n.createElement(n.Fragment, null, t.fallback);
  return o && (o.__u &= -33), [n.createElement(n.Fragment, null, e.__a ? null : t.children), o];
};
var y = function y(n, t, e) {
  if (++e[1] === e[0] && n.o["delete"](t), n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.o.size)) for (e = n.u; e;) {
    for (; e.length > 3;) {
      e.pop()();
    }
    if (e[1] < e[0]) break;
    n.u = e = e[2];
  }
};
function _(n) {
  return this.getChildContext = function () {
    return n.context;
  }, n.children;
}
function g(t) {
  var e = this,
    r = t.i;
  e.componentWillUnmount = function () {
    n.render(null, e.l), e.l = null, e.i = null;
  }, e.i && e.i !== r && e.componentWillUnmount(), e.l || (e.i = r, e.l = {
    nodeType: 1,
    parentNode: r,
    childNodes: [],
    appendChild: function appendChild(n) {
      this.childNodes.push(n), e.i.appendChild(n);
    },
    insertBefore: function insertBefore(n, t) {
      this.childNodes.push(n), e.i.appendChild(n);
    },
    removeChild: function removeChild(n) {
      this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), e.i.removeChild(n);
    }
  }), n.render(n.createElement(_, {
    context: e.context
  }, t.__v), e.l);
}
function S(t, e) {
  var r = n.createElement(g, {
    __v: t,
    i: e
  });
  return r.containerInfo = e, r;
}
(b.prototype = new n.Component()).__a = function (n) {
  var t = this,
    e = m(t.__v),
    r = t.o.get(n);
  return r[0]++, function (u) {
    var o = function o() {
      t.props.revealOrder ? (r.push(u), y(t, n, r)) : u();
    };
    e ? e(o) : o();
  };
}, b.prototype.render = function (t) {
  this.u = null, this.o = new Map();
  var e = n.toChildArray(t.children);
  t.revealOrder && "b" === t.revealOrder[0] && e.reverse();
  for (var r = e.length; r--;) {
    this.o.set(e[r], this.u = [1, 0, this.u]);
  }
  return t.children;
}, b.prototype.componentDidUpdate = b.prototype.componentDidMount = function () {
  var n = this;
  this.o.forEach(function (t, e) {
    y(n, e, t);
  });
};
var C = "undefined" != typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103,
  E = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,
  O = /^on(Ani|Tra|Tou|BeforeInp|Compo)/,
  w = /[A-Z0-9]/g,
  R = "undefined" != typeof document,
  j = function j(n) {
    return ("undefined" != typeof Symbol && "symbol" == _typeof(Symbol()) ? /fil|che|rad/ : /fil|che|ra/).test(n);
  };
function N(t, e, r) {
  return null == e.__k && (e.textContent = ""), n.render(t, e), "function" == typeof r && r(), t ? t.__c : null;
}
function k(t, e, r) {
  return n.hydrate(t, e), "function" == typeof r && r(), t ? t.__c : null;
}
n.Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function (t) {
  Object.defineProperty(n.Component.prototype, t, {
    configurable: !0,
    get: function get() {
      return this["UNSAFE_" + t];
    },
    set: function set(n) {
      Object.defineProperty(this, t, {
        configurable: !0,
        writable: !0,
        value: n
      });
    }
  });
});
var A = n.options.event;
function T() {}
function F() {
  return this.cancelBubble;
}
function I() {
  return this.defaultPrevented;
}
n.options.event = function (n) {
  return A && (n = A(n)), n.persist = T, n.isPropagationStopped = F, n.isDefaultPrevented = I, n.nativeEvent = n;
};
var L,
  U = {
    enumerable: !1,
    configurable: !0,
    get: function get() {
      return this["class"];
    }
  },
  D = n.options.vnode;
n.options.vnode = function (t) {
  "string" == typeof t.type && function (t) {
    var e = t.props,
      r = t.type,
      u = {};
    for (var o in e) {
      var i = e[o];
      if (!("value" === o && "defaultValue" in e && null == i || R && "children" === o && "noscript" === r || "class" === o || "className" === o)) {
        var c = o.toLowerCase();
        "defaultValue" === o && "value" in e && null == e.value ? o = "value" : "download" === o && !0 === i ? i = "" : "translate" === c && "no" === i ? i = !1 : "ondoubleclick" === c ? o = "ondblclick" : "onchange" !== c || "input" !== r && "textarea" !== r || j(e.type) ? "onfocus" === c ? o = "onfocusin" : "onblur" === c ? o = "onfocusout" : O.test(o) ? o = c : -1 === r.indexOf("-") && E.test(o) ? o = o.replace(w, "-$&").toLowerCase() : null === i && (i = void 0) : c = o = "oninput", "oninput" === c && u[o = c] && (o = "oninputCapture"), u[o] = i;
      }
    }
    "select" == r && u.multiple && Array.isArray(u.value) && (u.value = n.toChildArray(e.children).forEach(function (n) {
      n.props.selected = -1 != u.value.indexOf(n.props.value);
    })), "select" == r && null != u.defaultValue && (u.value = n.toChildArray(e.children).forEach(function (n) {
      n.props.selected = u.multiple ? -1 != u.defaultValue.indexOf(n.props.value) : u.defaultValue == n.props.value;
    })), e["class"] && !e.className ? (u["class"] = e["class"], Object.defineProperty(u, "className", U)) : (e.className && !e["class"] || e["class"] && e.className) && (u["class"] = u.className = e.className), t.props = u;
  }(t), t.$$typeof = C, D && D(t);
};
var M = n.options.__r;
n.options.__r = function (n) {
  M && M(n), L = n.__c;
};
var V = n.options.diffed;
n.options.diffed = function (n) {
  V && V(n);
  var t = n.props,
    e = n.__e;
  null != e && "textarea" === n.type && "value" in t && t.value !== e.value && (e.value = null == t.value ? "" : t.value), L = null;
};
var W = {
  ReactCurrentDispatcher: {
    current: {
      readContext: function readContext(n) {
        return L.__n[n.__c].props.value;
      }
    }
  }
};
function P(t) {
  return n.createElement.bind(null, t);
}
function z(n) {
  return !!n && n.$$typeof === C;
}
function B(t) {
  return z(t) && t.type === n.Fragment;
}
function q(t) {
  return z(t) ? n.cloneElement.apply(null, arguments) : t;
}
function H(t) {
  return !!t.__k && (n.render(null, t), !0);
}
function Z(n) {
  return n && (n.base || 1 === n.nodeType && n) || null;
}
var Y = function Y(n, t) {
    return n(t);
  },
  $ = function $(n, t) {
    return n(t);
  },
  G = n.Fragment;
function J(n) {
  n();
}
function K(n) {
  return n;
}
function Q() {
  return [!1, J];
}
var X = t.useLayoutEffect,
  nn = z;
function tn(n, e) {
  var r = e(),
    u = t.useState({
      p: {
        __: r,
        h: e
      }
    }),
    o = u[0].p,
    i = u[1];
  return t.useLayoutEffect(function () {
    o.__ = r, o.h = e, en(o) && i({
      p: o
    });
  }, [n, r, e]), t.useEffect(function () {
    return en(o) && i({
      p: o
    }), n(function () {
      en(o) && i({
        p: o
      });
    });
  }, [n]), r;
}
function en(n) {
  var t,
    e,
    r = n.h,
    u = n.__;
  try {
    var o = r();
    return !((t = u) === (e = o) && (0 !== t || 1 / t == 1 / e) || t != t && e != e);
  } catch (n) {
    return !0;
  }
}
var rn = {
  useState: t.useState,
  useId: t.useId,
  useReducer: t.useReducer,
  useEffect: t.useEffect,
  useLayoutEffect: t.useLayoutEffect,
  useInsertionEffect: X,
  useTransition: Q,
  useDeferredValue: K,
  useSyncExternalStore: tn,
  startTransition: J,
  useRef: t.useRef,
  useImperativeHandle: t.useImperativeHandle,
  useMemo: t.useMemo,
  useCallback: t.useCallback,
  useContext: t.useContext,
  useDebugValue: t.useDebugValue,
  version: "17.0.2",
  Children: a,
  render: N,
  hydrate: k,
  unmountComponentAtNode: H,
  createPortal: S,
  createElement: n.createElement,
  createContext: n.createContext,
  createFactory: P,
  cloneElement: q,
  createRef: n.createRef,
  Fragment: n.Fragment,
  isValidElement: z,
  isElement: nn,
  isFragment: B,
  findDOMNode: Z,
  Component: n.Component,
  PureComponent: u,
  memo: o,
  forwardRef: l,
  flushSync: $,
  unstable_batchedUpdates: Y,
  StrictMode: G,
  Suspense: d,
  SuspenseList: b,
  lazy: x,
  __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: W
};
Object.defineProperty(exports, "Component", {
  enumerable: !0,
  get: function get() {
    return n.Component;
  }
}), Object.defineProperty(exports, "Fragment", {
  enumerable: !0,
  get: function get() {
    return n.Fragment;
  }
}), Object.defineProperty(exports, "createContext", {
  enumerable: !0,
  get: function get() {
    return n.createContext;
  }
}), Object.defineProperty(exports, "createElement", {
  enumerable: !0,
  get: function get() {
    return n.createElement;
  }
}), Object.defineProperty(exports, "createRef", {
  enumerable: !0,
  get: function get() {
    return n.createRef;
  }
}), exports.Children = a, exports.PureComponent = u, exports.StrictMode = G, exports.Suspense = d, exports.SuspenseList = b, exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W, exports.cloneElement = q, exports.createFactory = P, exports.createPortal = S, exports["default"] = rn, exports.findDOMNode = Z, exports.flushSync = $, exports.forwardRef = l, exports.hydrate = k, exports.isElement = nn, exports.isFragment = B, exports.isValidElement = z, exports.lazy = x, exports.memo = o, exports.render = N, exports.startTransition = J, exports.unmountComponentAtNode = H, exports.unstable_batchedUpdates = Y, exports.useDeferredValue = K, exports.useInsertionEffect = X, exports.useSyncExternalStore = tn, exports.useTransition = Q, exports.version = "17.0.2", Object.keys(t).forEach(function (n) {
  "default" === n || exports.hasOwnProperty(n) || Object.defineProperty(exports, n, {
    enumerable: !0,
    get: function get() {
      return t[n];
    }
  });
});

/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(9);
/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/
/* global define */

(function () {
  'use strict';

  var hasOwn = {}.hasOwnProperty;
  function classNames() {
    var classes = '';
    for (var i = 0; i < arguments.length; i++) {
      var arg = arguments[i];
      if (arg) {
        classes = appendClass(classes, parseValue(arg));
      }
    }
    return classes;
  }
  function parseValue(arg) {
    if (typeof arg === 'string' || typeof arg === 'number') {
      return arg;
    }
    if (_typeof(arg) !== 'object') {
      return '';
    }
    if (Array.isArray(arg)) {
      return classNames.apply(null, arg);
    }
    if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
      return arg.toString();
    }
    var classes = '';
    for (var key in arg) {
      if (hasOwn.call(arg, key) && arg[key]) {
        classes = appendClass(classes, key);
      }
    }
    return classes;
  }
  function appendClass(value, newClass) {
    if (!newClass) {
      return value;
    }
    if (value) {
      return value + ' ' + newClass;
    }
    return value + newClass;
  }
  if ( true && module.exports) {
    classNames["default"] = classNames;
    module.exports = classNames;
  } else if ( true && _typeof(__webpack_require__(77)) === 'object' && __webpack_require__(77)) {
    // register as 'classnames', consistent with npm package name
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
      return classNames;
    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else {
    window.classNames = classNames;
  }
})();

/***/ }),
/* 37 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
/* harmony import */ var lodash_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(60);
/* harmony import */ var lodash_size__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_size__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21);
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_5__);




function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }


var autoDiscountCheck = /*#__PURE__*/function () {
  var _ref = Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data, url, shop, cart, getCart) {
    var automaticDiscount, _shouldRemoveItems;
    return _regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            _context.next = 2;
            return fetch("".concat(url, "default/check_auto_discount?shop=").concat(shop)).then(function (resp) {
              if (resp.status === 200) {
                return resp.json();
              }
              return null;
            }).then(function (result) {
              automaticDiscount = result;
            })["catch"](function () {
              automaticDiscount = null;
            });
          case 2:
            if (!(cart && cart.items.find(function (item) {
              return item.discounts.length;
            }) || automaticDiscount)) {
              _context.next = 14;
              break;
            }
            cart.items.forEach(function (item) {
              if (item.discounts && item.discounts[0] && automaticDiscount && automaticDiscount.node && automaticDiscount.node.automaticDiscount && item.discounts[0].title === automaticDiscount.node.automaticDiscount.title) {
                data.hasAutomaticDiscount = true;
              }
            });
            _context.next = 6;
            return fetch('/cart/add.js', {
              headers: {
                Accept: 'application/json',
                'Content-Type': 'application/json'
              },
              method: 'post',
              body: JSON.stringify({
                items: data.offers.map(function (offer) {
                  return {
                    quantity: offer.quantity,
                    id: offer.variant_id
                  };
                })
              })
            });
          case 6:
            _context.next = 8;
            return getCart();
          case 8:
            cart = _context.sent;
            _shouldRemoveItems = {};
            cart.items = cart.items.reduce(function (newCart, item) {
              var newItem = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_5___default()(item);
              data.offers = data.offers.map(function (offer) {
                if (offer.variant_id === item.id) {
                  newItem.quantity = item.quantity - offer.quantity;
                  if (!newItem.quantity) {
                    _shouldRemoveItems[item.id] = 0;
                    newItem = null;
                  } else {
                    if (newItem.discounts[0]) {
                      newItem.discounts[0].amount = item.discounts[0].amount / item.quantity * newItem.quantity;
                    }
                    _shouldRemoveItems[item.id] = newItem.quantity;
                  }
                  return _objectSpread(_objectSpread({}, offer), {}, {
                    discounts: item.discounts[0] ? [_objectSpread(_objectSpread({}, item.discounts[0]), {}, {
                      amount: item.discounts[0].amount / item.quantity * offer.quantity
                    })] : []
                  });
                } else {
                  return offer;
                }
              });
              if (newItem) {
                return [].concat(Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(newCart), [newItem]);
              } else {
                return newCart;
              }
            }, []);
            if (!lodash_size__WEBPACK_IMPORTED_MODULE_4___default()(_shouldRemoveItems)) {
              _context.next = 14;
              break;
            }
            _context.next = 14;
            return fetch('/cart/update.js', {
              headers: {
                Accept: 'application/json',
                'Content-Type': 'application/json'
              },
              method: 'post',
              body: JSON.stringify({
                updates: _objectSpread({}, _shouldRemoveItems)
              })
            });
          case 14:
            if (cart && cart.items.find(function (item) {
              return item.discounts.length;
            })) {
              data.additionalDiscount = null;
            }
            return _context.abrupt("return", data);
          case 16:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return function autoDiscountCheck(_x, _x2, _x3, _x4, _x5) {
    return _ref.apply(this, arguments);
  };
}();
/* harmony default export */ __webpack_exports__["a"] = (autoDiscountCheck);

/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(9);
!function (e, t) {
  "object" == ( false ? undefined : _typeof(exports)) && "object" == ( false ? undefined : _typeof(module)) ? module.exports = t() :  true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
}(this, function () {
  return function (e) {
    function t(r) {
      if (n[r]) return n[r].exports;
      var o = n[r] = {
        i: r,
        l: !1,
        exports: {}
      };
      return e[r].call(o.exports, o, o.exports, t), o.l = !0, o.exports;
    }
    var n = {};
    return t.m = e, t.c = n, t.i = function (e) {
      return e;
    }, t.d = function (e, n, r) {
      t.o(e, n) || Object.defineProperty(e, n, {
        configurable: !1,
        enumerable: !0,
        get: r
      });
    }, t.n = function (e) {
      var n = e && e.__esModule ? function () {
        return e["default"];
      } : function () {
        return e;
      };
      return t.d(n, "a", n), n;
    }, t.o = function (e, t) {
      return Object.prototype.hasOwnProperty.call(e, t);
    }, t.p = "", t(t.s = 1);
  }([function (e, t, n) {
    "use strict";

    function r(e) {
      if (Array.isArray(e)) {
        for (var t = 0, n = Array(e.length); t < e.length; t++) {
          n[t] = e[t];
        }
        return n;
      }
      return Array.from(e);
    }
    Object.defineProperty(t, "__esModule", {
      value: !0
    });
    var o = !1,
      i = !1,
      a = function a() {
        return o || console.warn("Pixel not initialized before using call ReactPixel.init with required params"), o;
      },
      c = function c() {
        for (var e, t = arguments.length, n = Array(t), o = 0; o < t; o++) {
          n[o] = arguments[o];
        }
        (e = console).info.apply(e, r(["[react-facebook-pixel]"].concat(n)));
      },
      f = {
        autoConfig: !0,
        debug: !1
      };
    t["default"] = {
      init: function init(e) {
        var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
          n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : f;
        !function (e, t, n, r, o, i, a) {
          e.fbq || (o = e.fbq = function () {
            o.callMethod ? o.callMethod.apply(o, arguments) : o.queue.push(arguments);
          }, e._fbq || (e._fbq = o), o.push = o, o.loaded = !0, o.version = "2.0", o.queue = [], i = t.createElement(n), i.async = !0, i.src = r, a = t.getElementsByTagName(n)[0], a.parentNode.insertBefore(i, a));
        }(window, document, "script", "https://connect.facebook.net/en_US/fbevents.js"), e ? (!1 === n.autoConfig && fbq("set", "autoConfig", !1, e), fbq("init", e, t), o = !0, i = n.debug) : console.warn("Please insert pixel id for initializing");
      },
      pageView: function pageView() {
        a() && (fbq("track", "PageView"), i && c("called fbq('track', 'PageView');"));
      },
      track: function track(e, t) {
        a() && (fbq("track", e, t), i && (c("called fbq('track', '" + e + "');"), t && c("with data", t)));
      },
      trackCustom: function trackCustom(e, t) {
        a() && (fbq("trackCustom", e, t), i && (c("called fbq('trackCustom', '" + e + "');"), t && c("with data", t)));
      },
      fbq: function (e) {
        function t() {
          return e.apply(this, arguments);
        }
        return t.toString = function () {
          return e.toString();
        }, t;
      }(function () {
        if (a()) {
          for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) {
            t[n] = arguments[n];
          }
          fbq.apply(void 0, t), i && (c("called fbq('" + t.slice(0, 2).join("', '") + "')"), t[2] && c("with data", t[2]));
        }
      })
    };
  }, function (e, t, n) {
    e.exports = n(0);
  }]);
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(28)(module)))

/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {

var _typeof = __webpack_require__(9);
var g;

// This works in non-strict mode
g = function () {
  return this;
}();
try {
  // This works if eval is allowed (see CSP)
  g = g || new Function("return this")();
} catch (e) {
  // This works if the window reference is available
  if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;

/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FrameContextConsumer = exports.FrameContextProvider = exports.useFrame = exports.FrameContext = undefined;
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}
var doc = void 0;
var win = void 0;
if (typeof document !== 'undefined') {
  doc = document;
}
if (typeof window !== 'undefined') {
  win = window;
}
var FrameContext = exports.FrameContext = _react2["default"].createContext({
  document: doc,
  window: win
});
var useFrame = exports.useFrame = function useFrame() {
  return _react2["default"].useContext(FrameContext);
};
var FrameContextProvider = FrameContext.Provider,
  FrameContextConsumer = FrameContext.Consumer;
exports.FrameContextProvider = FrameContextProvider;
exports.FrameContextConsumer = FrameContextConsumer;

/***/ }),
/* 41 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ErrorBoundary; });
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);





function _callSuper(t, o, e) { return o = Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(o), Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }

var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
  Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(ErrorBoundary, _React$Component);
  function ErrorBoundary(props) {
    var _this;
    Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, ErrorBoundary);
    _this = _callSuper(this, ErrorBoundary, [props]);
    _this.state = {
      hasError: false
    };
    return _this;
  }
  Object(_tmp_build_ce1bcc6d_node_modules_next_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(ErrorBoundary, [{
    key: "componentDidCatch",
    value: function componentDidCatch(error) {
      // You can also log the error to an error reporting service
      if (window.TrackJS) {
        window.TrackJS.track(error);
      }
      console.log("error logged to TrackJS:", error);
    }
  }, {
    key: "render",
    value: function render() {
      if (this.state.hasError) {
        // You can render any custom fallback UI
        this.props.handleError();
        return null;
      }
      return this.props.children;
    }
  }], [{
    key: "getDerivedStateFromError",
    value: function getDerivedStateFromError() {
      // Update state so the next render will show the fallback UI.
      return {
        hasError: true
      };
    }
  }]);
  return ErrorBoundary;
}(react__WEBPACK_IMPORTED_MODULE_5__["default"].Component);


/***/ }),
/* 42 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _setPrototypeOf; });
function _setPrototypeOf(o, p) {
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
  };
  return _setPrototypeOf(o, p);
}

/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(9);
(function (factory) {
  ( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module['exports'] = factory() :  true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory()),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
				__WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
})(function () {
  'use strict';

  return function (insertRule) {
    var delimiter = '/*|*/';
    var needle = delimiter + '}';
    function toSheet(block) {
      if (block) try {
        insertRule(block + '}');
      } catch (e) {}
    }
    return function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {
      switch (context) {
        // property
        case 1:
          // @import
          if (depth === 0 && content.charCodeAt(0) === 64) return insertRule(content + ';'), '';
          break;
        // selector
        case 2:
          if (ns === 0) return content + delimiter;
          break;
        // at-rule
        case 3:
          switch (ns) {
            // @font-face, @page
            case 102:
            case 112:
              return insertRule(selectors[0] + content), '';
            default:
              return content + (at === 0 ? delimiter : '');
          }
        case -2:
          content.split(needle).forEach(toSheet);
      }
    };
  };
});

/***/ }),
/* 44 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
var unitlessKeys = {
  animationIterationCount: 1,
  borderImageOutset: 1,
  borderImageSlice: 1,
  borderImageWidth: 1,
  boxFlex: 1,
  boxFlexGroup: 1,
  boxOrdinalGroup: 1,
  columnCount: 1,
  columns: 1,
  flex: 1,
  flexGrow: 1,
  flexPositive: 1,
  flexShrink: 1,
  flexNegative: 1,
  flexOrder: 1,
  gridRow: 1,
  gridRowEnd: 1,
  gridRowSpan: 1,
  gridRowStart: 1,
  gridColumn: 1,
  gridColumnEnd: 1,
  gridColumnSpan: 1,
  gridColumnStart: 1,
  msGridRow: 1,
  msGridRowSpan: 1,
  msGridColumn: 1,
  msGridColumnSpan: 1,
  fontWeight: 1,
  lineHeight: 1,
  opacity: 1,
  order: 1,
  orphans: 1,
  tabSize: 1,
  widows: 1,
  zIndex: 1,
  zoom: 1,
  WebkitLineClamp: 1,
  // SVG-related properties
  fillOpacity: 1,
  floodOpacity: 1,
  stopOpacity: 1,
  strokeDasharray: 1,
  strokeDashoffset: 1,
  strokeMiterlimit: 1,
  strokeOpacity: 1,
  strokeWidth: 1
};
/* harmony default export */ __webpack_exports__["a"] = (unitlessKeys);

/***/ }),
/* 45 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// CONCATENATED MODULE: ./node_modules/@emotion/memoize/dist/memoize.browser.esm.js
function memoize(fn) {
  var cache = {};
  return function (arg) {
    if (cache[arg] === undefined) cache[arg] = fn(arg);
    return cache[arg];
  };
}
/* harmony default export */ var memoize_browser_esm = (memoize);
// CONCATENATED MODULE: ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js

var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23

var index = memoize_browser_esm(function (prop) {
  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
  /* o */ && prop.charCodeAt(1) === 110
  /* n */ && prop.charCodeAt(2) < 91;
}
/* Z+1 */);
/* harmony default export */ var is_prop_valid_browser_esm = __webpack_exports__["a"] = (index);

/***/ }),
/* 46 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// UNUSED EXPORTS: concatArrays, merge

// CONCATENATED MODULE: ./node_modules/is-what/dist/index.esm.js
/**
 * Returns the object type of the given payload
 *
 * @param {*} payload
 * @returns {string}
 */
function getType(payload) {
  return Object.prototype.toString.call(payload).slice(8, -1);
}
/**
 * Returns whether the payload is undefined
 *
 * @param {*} payload
 * @returns {payload is undefined}
 */
function isUndefined(payload) {
  return getType(payload) === 'Undefined';
}
/**
 * Returns whether the payload is null
 *
 * @param {*} payload
 * @returns {payload is null}
 */
function isNull(payload) {
  return getType(payload) === 'Null';
}
/**
 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
 *
 * @param {*} payload
 * @returns {payload is PlainObject}
 */
function isPlainObject(payload) {
  if (getType(payload) !== 'Object') return false;
  return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
}
/**
 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
 *
 * @param {*} payload
 * @returns {payload is PlainObject}
 */
function isObject(payload) {
  return isPlainObject(payload);
}
/**
 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
 *
 * @param {*} payload
 * @returns {payload is { [K in any]: never }}
 */
function isEmptyObject(payload) {
  return isPlainObject(payload) && Object.keys(payload).length === 0;
}
/**
 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
 *
 * @param {*} payload
 * @returns {payload is PlainObject}
 */
function isFullObject(payload) {
  return isPlainObject(payload) && Object.keys(payload).length > 0;
}
/**
 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
 *
 * @param {*} payload
 * @returns {payload is PlainObject}
 */
function isAnyObject(payload) {
  return getType(payload) === 'Object';
}
/**
 * Returns whether the payload is an object like a type passed in < >
 *
 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
 *
 * @template T this must be passed in < >
 * @param {*} payload
 * @returns {payload is T}
 */
function isObjectLike(payload) {
  return isAnyObject(payload);
}
/**
 * Returns whether the payload is a function (regular or async)
 *
 * @param {*} payload
 * @returns {payload is AnyFunction}
 */
function isFunction(payload) {
  return typeof payload === 'function';
}
/**
 * Returns whether the payload is an array
 *
 * @param {any} payload
 * @returns {payload is any[]}
 */
function isArray(payload) {
  return getType(payload) === 'Array';
}
/**
 * Returns whether the payload is a an array with at least 1 item
 *
 * @param {*} payload
 * @returns {payload is any[]}
 */
function isFullArray(payload) {
  return isArray(payload) && payload.length > 0;
}
/**
 * Returns whether the payload is a an empty array
 *
 * @param {*} payload
 * @returns {payload is []}
 */
function isEmptyArray(payload) {
  return isArray(payload) && payload.length === 0;
}
/**
 * Returns whether the payload is a string
 *
 * @param {*} payload
 * @returns {payload is string}
 */
function isString(payload) {
  return getType(payload) === 'String';
}
/**
 * Returns whether the payload is a string, BUT returns false for ''
 *
 * @param {*} payload
 * @returns {payload is string}
 */
function isFullString(payload) {
  return isString(payload) && payload !== '';
}
/**
 * Returns whether the payload is ''
 *
 * @param {*} payload
 * @returns {payload is string}
 */
function isEmptyString(payload) {
  return payload === '';
}
/**
 * Returns whether the payload is a number (but not NaN)
 *
 * This will return `false` for `NaN`!!
 *
 * @param {*} payload
 * @returns {payload is number}
 */
function isNumber(payload) {
  return getType(payload) === 'Number' && !isNaN(payload);
}
/**
 * Returns whether the payload is a boolean
 *
 * @param {*} payload
 * @returns {payload is boolean}
 */
function isBoolean(payload) {
  return getType(payload) === 'Boolean';
}
/**
 * Returns whether the payload is a regular expression (RegExp)
 *
 * @param {*} payload
 * @returns {payload is RegExp}
 */
function isRegExp(payload) {
  return getType(payload) === 'RegExp';
}
/**
 * Returns whether the payload is a Map
 *
 * @param {*} payload
 * @returns {payload is Map<any, any>}
 */
function isMap(payload) {
  return getType(payload) === 'Map';
}
/**
 * Returns whether the payload is a WeakMap
 *
 * @param {*} payload
 * @returns {payload is WeakMap<any, any>}
 */
function isWeakMap(payload) {
  return getType(payload) === 'WeakMap';
}
/**
 * Returns whether the payload is a Set
 *
 * @param {*} payload
 * @returns {payload is Set<any>}
 */
function isSet(payload) {
  return getType(payload) === 'Set';
}
/**
 * Returns whether the payload is a WeakSet
 *
 * @param {*} payload
 * @returns {payload is WeakSet<any>}
 */
function isWeakSet(payload) {
  return getType(payload) === 'WeakSet';
}
/**
 * Returns whether the payload is a Symbol
 *
 * @param {*} payload
 * @returns {payload is symbol}
 */
function isSymbol(payload) {
  return getType(payload) === 'Symbol';
}
/**
 * Returns whether the payload is a Date, and that the date is valid
 *
 * @param {*} payload
 * @returns {payload is Date}
 */
function isDate(payload) {
  return getType(payload) === 'Date' && !isNaN(payload);
}
/**
 * Returns whether the payload is a Blob
 *
 * @param {*} payload
 * @returns {payload is Blob}
 */
function isBlob(payload) {
  return getType(payload) === 'Blob';
}
/**
 * Returns whether the payload is a File
 *
 * @param {*} payload
 * @returns {payload is File}
 */
function isFile(payload) {
  return getType(payload) === 'File';
}
/**
 * Returns whether the payload is a Promise
 *
 * @param {*} payload
 * @returns {payload is Promise<any>}
 */
function isPromise(payload) {
  return getType(payload) === 'Promise';
}
/**
 * Returns whether the payload is an Error
 *
 * @param {*} payload
 * @returns {payload is Error}
 */
function isError(payload) {
  return getType(payload) === 'Error';
}
/**
 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
 *
 * @param {*} payload
 * @returns {payload is typeof NaN}
 */
function isNaNValue(payload) {
  return getType(payload) === 'Number' && isNaN(payload);
}
/**
 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
 *
 * @param {*} payload
 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
 */
function isPrimitive(payload) {
  return isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
}
/**
 * Returns true whether the payload is null or undefined
 *
 * @param {*} payload
 * @returns {(payload is null | undefined)}
 */
var isNullOrUndefined = isOneOf(isNull, isUndefined);
function isOneOf(a, b, c, d, e) {
  return function (value) {
    return a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
  };
}
/**
 * Does a generic check to check that the given payload is of a given type.
 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
 * It will, however, differentiate between object and null
 *
 * @template T
 * @param {*} payload
 * @param {T} type
 * @throws {TypeError} Will throw type error if type is an invalid type
 * @returns {payload is T}
 */
function isType(payload, type) {
  if (!(type instanceof Function)) {
    throw new TypeError('Type must be a function');
  }
  if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
    throw new TypeError('Type is not a class');
  }
  // Classes usually have names (as functions usually have names)
  var name = type.name;
  return getType(payload) === name || Boolean(payload && payload.constructor === type);
}

// CONCATENATED MODULE: ./node_modules/merge-anything/dist/index.esm.js


/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */

function __spreadArrays() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
    s += arguments[i].length;
  }
  for (var r = Array(s), k = 0, i = 0; i < il; i++) {
    for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
      r[k] = a[j];
    }
  }
  return r;
}
function assignProp(carry, key, newVal, originalObject) {
  var propType = originalObject.propertyIsEnumerable(key) ? 'enumerable' : 'nonenumerable';
  if (propType === 'enumerable') carry[key] = newVal;
  if (propType === 'nonenumerable') {
    Object.defineProperty(carry, key, {
      value: newVal,
      enumerable: false,
      writable: true,
      configurable: true
    });
  }
}
function mergeRecursively(origin, newComer, extensions) {
  // work directly on newComer if its not an object
  if (!isPlainObject(newComer)) {
    // extend merge rules
    if (extensions && isArray(extensions)) {
      extensions.forEach(function (extend) {
        newComer = extend(origin, newComer);
      });
    }
    return newComer;
  }
  // define newObject to merge all values upon
  var newObject = {};
  if (isPlainObject(origin)) {
    var props_1 = Object.getOwnPropertyNames(origin);
    var symbols_1 = Object.getOwnPropertySymbols(origin);
    newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
      // @ts-ignore
      var targetVal = origin[key];
      if (!isSymbol(key) && !Object.getOwnPropertyNames(newComer).includes(key) || isSymbol(key) && !Object.getOwnPropertySymbols(newComer).includes(key)) {
        assignProp(carry, key, targetVal, origin);
      }
      return carry;
    }, {});
  }
  var props = Object.getOwnPropertyNames(newComer);
  var symbols = Object.getOwnPropertySymbols(newComer);
  var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
    // re-define the origin and newComer as targetVal and newVal
    var newVal = newComer[key];
    var targetVal = isPlainObject(origin)
    // @ts-ignore
    ? origin[key] : undefined;
    // extend merge rules
    if (extensions && isArray(extensions)) {
      extensions.forEach(function (extend) {
        newVal = extend(targetVal, newVal);
      });
    }
    // When newVal is an object do the merge recursively
    if (targetVal !== undefined && isPlainObject(newVal)) {
      newVal = mergeRecursively(targetVal, newVal, extensions);
    }
    assignProp(carry, key, newVal, newComer);
    return carry;
  }, newObject);
  return result;
}
/**
 * Merge anything recursively.
 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
 * Basic types overwrite objects or other basic types.
 *
 * @param {(IConfig | any)} origin
 * @param {...any[]} newComers
 * @returns the result
 */
function merge(origin) {
  var newComers = [];
  for (var _i = 1; _i < arguments.length; _i++) {
    newComers[_i - 1] = arguments[_i];
  }
  var extensions = null;
  var base = origin;
  if (isPlainObject(origin) && origin.extensions && Object.keys(origin).length === 1) {
    base = {};
    extensions = origin.extensions;
  }
  return newComers.reduce(function (result, newComer) {
    return mergeRecursively(result, newComer, extensions);
  }, base);
}
function concatArrays(originVal, newVal) {
  if (isArray(originVal) && isArray(newVal)) {
    // concat logic
    return originVal.concat(newVal);
  }
  return newVal; // always return newVal as fallback!!
}
/* harmony default export */ var index_esm = __webpack_exports__["a"] = (merge);


/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(9);
!function (t, e) {
  "object" == ( false ? undefined : _typeof(exports)) && "object" == ( false ? undefined : _typeof(module)) ? module.exports = e() :  true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
}(window, function () {
  return function (t) {
    var e = {};
    function n(r) {
      if (e[r]) return e[r].exports;
      var o = e[r] = {
        i: r,
        l: !1,
        exports: {}
      };
      return t[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports;
    }
    return n.m = t, n.c = e, n.d = function (t, e, r) {
      n.o(t, e) || Object.defineProperty(t, e, {
        enumerable: !0,
        get: r
      });
    }, n.r = function (t) {
      "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
        value: "Module"
      }), Object.defineProperty(t, "__esModule", {
        value: !0
      });
    }, n.t = function (t, e) {
      if (1 & e && (t = n(t)), 8 & e) return t;
      if (4 & e && "object" == _typeof(t) && t && t.__esModule) return t;
      var r = Object.create(null);
      if (n.r(r), Object.defineProperty(r, "default", {
        enumerable: !0,
        value: t
      }), 2 & e && "string" != typeof t) for (var o in t) {
        n.d(r, o, function (e) {
          return t[e];
        }.bind(null, o));
      }
      return r;
    }, n.n = function (t) {
      var e = t && t.__esModule ? function () {
        return t["default"];
      } : function () {
        return t;
      };
      return n.d(e, "a", e), e;
    }, n.o = function (t, e) {
      return Object.prototype.hasOwnProperty.call(t, e);
    }, n.p = "", n(n.s = 0);
  }([function (t, e, n) {
    t.exports = n(1);
  }, function (t, e, n) {
    "use strict";

    function r(t) {
      return function (t) {
        if (Array.isArray(t)) return o(t);
      }(t) || function (t) {
        if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t);
      }(t) || function (t, e) {
        if (!t) return;
        if ("string" == typeof t) return o(t, e);
        var n = Object.prototype.toString.call(t).slice(8, -1);
        "Object" === n && t.constructor && (n = t.constructor.name);
        if ("Map" === n || "Set" === n) return Array.from(n);
        if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return o(t, e);
      }(t) || 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 o(t, e) {
      (null == e || e > t.length) && (e = t.length);
      for (var n = 0, r = new Array(e); n < e; n++) {
        r[n] = t[n];
      }
      return r;
    }
    n.r(e);
    var i = !1,
      a = !1,
      u = function u() {
        return i || console.warn("Pixel not initialized before using call ReactSnapchatPixel.init with required params"), i;
      },
      c = function c() {
        for (var t, e = arguments.length, n = new Array(e), o = 0; o < e; o++) {
          n[o] = arguments[o];
        }
        (t = console).info.apply(t, r(["[react-snapchat-pixel]"].concat(n)));
      },
      f = {
        debug: !1
      };
    e["default"] = {
      init: function init(t) {
        var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
          n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : f;
        !function (t, e, n) {
          if (!t.snaptr) {
            var r = t.snaptr = function () {
              r.handleRequest ? r.handleRequest.apply(r, arguments) : r.queue.push(arguments);
            };
            r.queue = [];
            var o = "script",
              i = e.createElement(o);
            i.async = !0, i.src = "https://sc-static.net/scevent.min.js";
            var a = e.getElementsByTagName(o)[0];
            a.parentNode.insertBefore(i, a);
          }
        }(window, document), t ? (snaptr("init", t, e), i = !0, a = n.debug) : console.warn("Please insert pixel id for initializing");
      },
      pageView: function pageView() {
        u() && (snaptr("track", "PAGE_VIEW"), a && c("called snaptr('track', 'PageView');"));
      },
      track: function track(t, e) {
        u() && (snaptr("track", t, e), a && (c("called snaptr('track', '".concat(t, "');")), e && c("with data", e)));
      },
      snaptr: function (t) {
        function e() {
          return t.apply(this, arguments);
        }
        return e.toString = function () {
          return t.toString();
        }, e;
      }(function () {
        if (u()) {
          for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) {
            e[n] = arguments[n];
          }
          snaptr.apply(void 0, e), a && (c("called snaptr('".concat(e.slice(0, 2).join("', '"), "')")), e[2] && c("with data", e[2]));
        }
      })
    };
  }]);
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(28)(module)))

/***/ }),
/* 48 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
  init: function init(taglId) {
    /* eslint-disable */
    !function (e) {
      if (!window.pintrk) {
        window.pintrk = function () {
          window.pintrk.queue.push(Array.prototype.slice.call(arguments));
        };
        var n = window.pintrk;
        n.queue = [], n.version = "3.0";
        var t = document.createElement("script");
        t.async = !0, t.src = e;
        var r = document.getElementsByTagName("script")[0];
        r.parentNode.insertBefore(t, r);
      }
    }("https://s.pinimg.com/ct/core.js");
    pintrk('load', taglId);
    pintrk('page');
  },
  addToCart: function addToCart(product) {
    pintrk('track', 'AddToCart', product);
  },
  addCheckout: function addCheckout(data) {
    pintrk('track', 'Checkout', data);
  }
});

/***/ }),
/* 49 */,
/* 50 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// UNUSED EXPORTS: initialize, ga, set, send, pageview, modalview, timing, event, exception, plugin, outboundLink, testModeAPI, OutboundLink

// NAMESPACE OBJECT: ./node_modules/react-ga/dist/esm/core.js
var core_namespaceObject = {};
__webpack_require__.r(core_namespaceObject);
__webpack_require__.d(core_namespaceObject, "initialize", function() { return initialize; });
__webpack_require__.d(core_namespaceObject, "ga", function() { return ga; });
__webpack_require__.d(core_namespaceObject, "set", function() { return set; });
__webpack_require__.d(core_namespaceObject, "send", function() { return send; });
__webpack_require__.d(core_namespaceObject, "pageview", function() { return pageview; });
__webpack_require__.d(core_namespaceObject, "modalview", function() { return modalview; });
__webpack_require__.d(core_namespaceObject, "timing", function() { return timing; });
__webpack_require__.d(core_namespaceObject, "event", function() { return core_event; });
__webpack_require__.d(core_namespaceObject, "exception", function() { return exception; });
__webpack_require__.d(core_namespaceObject, "plugin", function() { return core_plugin; });
__webpack_require__.d(core_namespaceObject, "outboundLink", function() { return outboundLink; });
__webpack_require__.d(core_namespaceObject, "testModeAPI", function() { return core_testModeAPI; });
__webpack_require__.d(core_namespaceObject, "default", function() { return core; });

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__(4);

// EXTERNAL MODULE: ./node_modules/preact/compat/dist/compat.module.js
var compat_module = __webpack_require__(0);

// EXTERNAL MODULE: ./node_modules/prop-types/index.js
var prop_types = __webpack_require__(17);
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);

// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/utils/console/warn.js
function warn(s) {
  console.warn('[react-ga]', s);
}
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/components/OutboundLink.js

function OutboundLink_typeof(obj) {
  if (typeof Symbol === "function" && Object(esm_typeof["a" /* default */])(Symbol.iterator) === "symbol") {
    OutboundLink_typeof = function _typeof(obj) {
      return Object(esm_typeof["a" /* default */])(obj);
    };
  } else {
    OutboundLink_typeof = function _typeof(obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : Object(esm_typeof["a" /* default */])(obj);
    };
  }
  return OutboundLink_typeof(obj);
}
function ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);
  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    if (enumerableOnly) symbols = symbols.filter(function (sym) {
      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
    });
    keys.push.apply(keys, symbols);
  }
  return keys;
}
function _objectSpread(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};
    if (i % 2) {
      ownKeys(source, true).forEach(function (key) {
        _defineProperty(target, key, source[key]);
      });
    } else if (Object.getOwnPropertyDescriptors) {
      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
      ownKeys(source).forEach(function (key) {
        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
      });
    }
  }
  return target;
}
function _objectWithoutProperties(source, excluded) {
  if (source == null) return {};
  var target = _objectWithoutPropertiesLoose(source, excluded);
  var key, i;
  if (Object.getOwnPropertySymbols) {
    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
    for (i = 0; i < sourceSymbolKeys.length; i++) {
      key = sourceSymbolKeys[i];
      if (excluded.indexOf(key) >= 0) continue;
      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
      target[key] = source[key];
    }
  }
  return target;
}
function _objectWithoutPropertiesLoose(source, excluded) {
  if (source == null) return {};
  var target = {};
  var sourceKeys = Object.keys(source);
  var key, i;
  for (i = 0; i < sourceKeys.length; i++) {
    key = sourceKeys[i];
    if (excluded.indexOf(key) >= 0) continue;
    target[key] = source[key];
  }
  return target;
}
function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}
function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    var descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}
function _createClass(Constructor, protoProps, staticProps) {
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  if (staticProps) _defineProperties(Constructor, staticProps);
  return Constructor;
}
function _possibleConstructorReturn(self, call) {
  if (call && (OutboundLink_typeof(call) === "object" || typeof call === "function")) {
    return call;
  }
  return _assertThisInitialized(self);
}
function _getPrototypeOf(o) {
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  };
  return _getPrototypeOf(o);
}
function _assertThisInitialized(self) {
  if (self === void 0) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }
  return self;
}
function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function");
  }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      writable: true,
      configurable: true
    }
  });
  if (superClass) _setPrototypeOf(subClass, superClass);
}
function _setPrototypeOf(o, p) {
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
  };
  return _setPrototypeOf(o, p);
}
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}



var NEWTAB = '_blank';
var MIDDLECLICK = 1;
var OutboundLink_OutboundLink = /*#__PURE__*/
function (_Component) {
  _inherits(OutboundLink, _Component);
  function OutboundLink() {
    var _getPrototypeOf2;
    var _this;
    _classCallCheck(this, OutboundLink);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(OutboundLink)).call.apply(_getPrototypeOf2, [this].concat(args)));
    _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
      var _this$props = _this.props,
        target = _this$props.target,
        eventLabel = _this$props.eventLabel,
        to = _this$props.to,
        onClick = _this$props.onClick,
        trackerNames = _this$props.trackerNames;
      var eventMeta = {
        label: eventLabel
      };
      var sameTarget = target !== NEWTAB;
      var normalClick = !(event.ctrlKey || event.shiftKey || event.metaKey || event.button === MIDDLECLICK);
      if (sameTarget && normalClick) {
        event.preventDefault();
        OutboundLink.trackLink(eventMeta, function () {
          window.location.href = to;
        }, trackerNames);
      } else {
        OutboundLink.trackLink(eventMeta, function () {}, trackerNames);
      }
      if (onClick) {
        onClick(event);
      }
    });
    return _this;
  }
  _createClass(OutboundLink, [{
    key: "render",
    value: function render() {
      var _this$props2 = this.props,
        href = _this$props2.to,
        oldProps = _objectWithoutProperties(_this$props2, ["to"]);
      var props = _objectSpread({}, oldProps, {
        href: href,
        onClick: this.handleClick
      });
      if (this.props.target === NEWTAB) {
        props.rel = 'noopener noreferrer';
      }
      delete props.eventLabel;
      delete props.trackerNames;
      return /*#__PURE__*/compat_module["default"].createElement('a', props);
    }
  }]);
  return OutboundLink;
}(compat_module["Component"]);
_defineProperty(OutboundLink_OutboundLink, "trackLink", function () {
  warn('ga tracking not enabled');
});
_defineProperty(OutboundLink_OutboundLink, "propTypes", {
  eventLabel: prop_types_default.a.string.isRequired,
  target: prop_types_default.a.string,
  to: prop_types_default.a.string,
  onClick: prop_types_default.a.func,
  trackerNames: prop_types_default.a.arrayOf(prop_types_default.a.string)
});
_defineProperty(OutboundLink_OutboundLink, "defaultProps", {
  target: null,
  to: null,
  onClick: null,
  trackerNames: null
});

// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/utils/mightBeEmail.js
// See if s could be an email address. We don't want to send personal data like email.
// https://support.google.com/analytics/answer/2795983?hl=en
function mightBeEmail(s) {
  // There's no point trying to validate rfc822 fully, just look for ...@...
  return typeof s === 'string' && s.indexOf('@') !== -1;
}
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/utils/trim.js
// GA strings need to have leading/trailing whitespace trimmed, and not all
// browsers have String.prototoype.trim().
function trim(s) {
  return s.replace(/^\s+|\s+$/g, '');
}
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/utils/toTitleCase.js
/**
 * To Title Case 2.1 - http://individed.com/code/to-title-case/
 * Copyright 2008-2013 David Gouch. Licensed under the MIT License.
 * https://github.com/gouch/to-title-case
 */

var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;
function toTitleCase(string) {
  return trim(string).replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function (match, index, title) {
    if (index > 0 && index + match.length !== title.length && match.search(smallWords) > -1 && title.charAt(index - 2) !== ':' && (title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') && title.charAt(index - 1).search(/[^\s-]/) < 0) {
      return match.toLowerCase();
    }
    if (match.substr(1).search(/[A-Z]|\../) > -1) {
      return match;
    }
    return match.charAt(0).toUpperCase() + match.substr(1);
  });
}
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/utils/format.js



var redacted = 'REDACTED (Potential Email Address)';
function format(s, titleCase) {
  if (mightBeEmail(s)) {
    warn('This arg looks like an email address, redacting.');
    return redacted;
  }
  if (titleCase) {
    return toTitleCase(s);
  }
  return s;
}
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/utils/removeLeadingSlash.js
function removeLeadingSlash(string) {
  if (string.substring(0, 1) === '/') {
    return string.substring(1);
  }
  return string;
}
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/utils/loadGA.js
/* harmony default export */ var loadGA = (function (options) {
  var gaAddress = 'https://www.google-analytics.com/analytics.js';
  if (options && options.gaAddress) {
    gaAddress = options.gaAddress;
  } else if (options && options.debug) {
    gaAddress = 'https://www.google-analytics.com/analytics_debug.js';
  } // https://developers.google.com/analytics/devguides/collection/analyticsjs/

  /* eslint-disable */

  (function (i, s, o, g, r, a, m) {
    i['GoogleAnalyticsObject'] = r;
    i[r] = i[r] || function () {
      (i[r].q = i[r].q || []).push(arguments);
    }, i[r].l = 1 * new Date();
    a = s.createElement(o), m = s.getElementsByTagName(o)[0];
    a.async = 1;
    a.src = g;
    m.parentNode.insertBefore(a, m);
  })(window, document, 'script', gaAddress, 'ga');
  /* eslint-enable */
});
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/utils/console/log.js
function log(s) {
  console.info('[react-ga]', s);
}
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/utils/testModeAPI.js
var gaCalls = [];
/* harmony default export */ var testModeAPI = ({
  calls: gaCalls,
  ga: function ga() {
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    gaCalls.push([].concat(args));
  },
  resetCalls: function resetCalls() {
    gaCalls.length = 0;
  }
});
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/core.js

function core_objectWithoutProperties(source, excluded) {
  if (source == null) return {};
  var target = core_objectWithoutPropertiesLoose(source, excluded);
  var key, i;
  if (Object.getOwnPropertySymbols) {
    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
    for (i = 0; i < sourceSymbolKeys.length; i++) {
      key = sourceSymbolKeys[i];
      if (excluded.indexOf(key) >= 0) continue;
      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
      target[key] = source[key];
    }
  }
  return target;
}
function core_objectWithoutPropertiesLoose(source, excluded) {
  if (source == null) return {};
  var target = {};
  var sourceKeys = Object.keys(source);
  var key, i;
  for (i = 0; i < sourceKeys.length; i++) {
    key = sourceKeys[i];
    if (excluded.indexOf(key) >= 0) continue;
    target[key] = source[key];
  }
  return target;
}
function core_ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);
  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    if (enumerableOnly) symbols = symbols.filter(function (sym) {
      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
    });
    keys.push.apply(keys, symbols);
  }
  return keys;
}
function core_objectSpread(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};
    if (i % 2) {
      core_ownKeys(source, true).forEach(function (key) {
        core_defineProperty(target, key, source[key]);
      });
    } else if (Object.getOwnPropertyDescriptors) {
      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
      core_ownKeys(source).forEach(function (key) {
        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
      });
    }
  }
  return target;
}
function core_defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}
function core_typeof(obj) {
  if (typeof Symbol === "function" && Object(esm_typeof["a" /* default */])(Symbol.iterator) === "symbol") {
    core_typeof = function _typeof(obj) {
      return Object(esm_typeof["a" /* default */])(obj);
    };
  } else {
    core_typeof = function _typeof(obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : Object(esm_typeof["a" /* default */])(obj);
    };
  }
  return core_typeof(obj);
}
function _toConsumableArray(arr) {
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
}
function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance");
}
function _iterableToArray(iter) {
  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
function _arrayWithoutHoles(arr) {
  if (Array.isArray(arr)) {
    for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
      arr2[i] = arr[i];
    }
    return arr2;
  }
}

/**
 * React Google Analytics Module
 *
 * @package react-ga
 * @author  Adam Lofting <adam@mozillafoundation.org>
 *          Atul Varma <atul@mozillafoundation.org>
 */

/**
 * Utilities
 */







var _isNotBrowser = typeof window === 'undefined' || typeof document === 'undefined';
var _debug = false;
var _titleCase = true;
var _testMode = false;
var _alwaysSendToDefaultTracker = true;
var core_internalGa = function internalGa() {
  var _window;
  if (_testMode) return testModeAPI.ga.apply(testModeAPI, arguments);
  if (_isNotBrowser) return false;
  if (!window.ga) return warn('ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually');
  return (_window = window).ga.apply(_window, arguments);
};
function _format(s) {
  return format(s, _titleCase);
}
function _gaCommand(trackerNames) {
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  var command = args[0];
  if (typeof core_internalGa === 'function') {
    if (typeof command !== 'string') {
      warn('ga command must be a string');
      return;
    }
    if (_alwaysSendToDefaultTracker || !Array.isArray(trackerNames)) core_internalGa.apply(void 0, args);
    if (Array.isArray(trackerNames)) {
      trackerNames.forEach(function (name) {
        core_internalGa.apply(void 0, _toConsumableArray(["".concat(name, ".").concat(command)].concat(args.slice(1))));
      });
    }
  }
}
function _initialize(gaTrackingID, options) {
  if (!gaTrackingID) {
    warn('gaTrackingID is required in initialize()');
    return;
  }
  if (options) {
    if (options.debug && options.debug === true) {
      _debug = true;
    }
    if (options.titleCase === false) {
      _titleCase = false;
    }
    if (options.useExistingGa) {
      return;
    }
  }
  if (options && options.gaOptions) {
    core_internalGa('create', gaTrackingID, options.gaOptions);
  } else {
    core_internalGa('create', gaTrackingID, 'auto');
  }
}
function initialize(configsOrTrackingId, options) {
  if (options && options.testMode === true) {
    _testMode = true;
  } else {
    if (_isNotBrowser) {
      return false;
    }
    if (!options || options.standardImplementation !== true) loadGA(options);
  }
  _alwaysSendToDefaultTracker = options && typeof options.alwaysSendToDefaultTracker === 'boolean' ? options.alwaysSendToDefaultTracker : true;
  if (Array.isArray(configsOrTrackingId)) {
    configsOrTrackingId.forEach(function (config) {
      if (core_typeof(config) !== 'object') {
        warn('All configs must be an object');
        return;
      }
      _initialize(config.trackingId, config);
    });
  } else {
    _initialize(configsOrTrackingId, options);
  }
  return true;
}
/**
 * ga:
 * Returns the original GA object.
 */

function ga() {
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    args[_key2] = arguments[_key2];
  }
  if (args.length > 0) {
    core_internalGa.apply(void 0, args);
    if (_debug) {
      log('called ga(\'arguments\');');
      log("with arguments: ".concat(JSON.stringify(args)));
    }
  }
  return window.ga;
}
/**
 * set:
 * GA tracker set method
 * @param {Object} fieldsObject - a field/value pair or a group of field/value pairs on the tracker
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function set(fieldsObject, trackerNames) {
  if (!fieldsObject) {
    warn('`fieldsObject` is required in .set()');
    return;
  }
  if (core_typeof(fieldsObject) !== 'object') {
    warn('Expected `fieldsObject` arg to be an Object');
    return;
  }
  if (Object.keys(fieldsObject).length === 0) {
    warn('empty `fieldsObject` given to .set()');
  }
  _gaCommand(trackerNames, 'set', fieldsObject);
  if (_debug) {
    log('called ga(\'set\', fieldsObject);');
    log("with fieldsObject: ".concat(JSON.stringify(fieldsObject)));
  }
}
/**
 * send:
 * Clone of the low level `ga.send` method
 * WARNING: No validations will be applied to this
 * @param  {Object} fieldObject - field object for tracking different analytics
 * @param  {Array} trackerNames - trackers to send the command to
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function send(fieldObject, trackerNames) {
  _gaCommand(trackerNames, 'send', fieldObject);
  if (_debug) {
    log('called ga(\'send\', fieldObject);');
    log("with fieldObject: ".concat(JSON.stringify(fieldObject)));
    log("with trackers: ".concat(JSON.stringify(trackerNames)));
  }
}
/**
 * pageview:
 * Basic GA pageview tracking
 * @param  {String} path - the current page page e.g. '/about'
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 * @param {String} title - (optional) the page title e. g. 'My Website'
 */

function pageview(rawPath, trackerNames, title) {
  if (!rawPath) {
    warn('path is required in .pageview()');
    return;
  }
  var path = trim(rawPath);
  if (path === '') {
    warn('path cannot be an empty string in .pageview()');
    return;
  }
  var extraFields = {};
  if (title) {
    extraFields.title = title;
  }
  if (typeof ga === 'function') {
    _gaCommand(trackerNames, 'send', core_objectSpread({
      hitType: 'pageview',
      page: path
    }, extraFields));
    if (_debug) {
      log('called ga(\'send\', \'pageview\', path);');
      var extraLog = '';
      if (title) {
        extraLog = " and title: ".concat(title);
      }
      log("with path: ".concat(path).concat(extraLog));
    }
  }
}
/**
 * modalview:
 * a proxy to basic GA pageview tracking to consistently track
 * modal views that are an equivalent UX to a traditional pageview
 * @param  {String} modalName e.g. 'add-or-edit-club'
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function modalview(rawModalName, trackerNames) {
  if (!rawModalName) {
    warn('modalName is required in .modalview(modalName)');
    return;
  }
  var modalName = removeLeadingSlash(trim(rawModalName));
  if (modalName === '') {
    warn('modalName cannot be an empty string or a single / in .modalview()');
    return;
  }
  if (typeof ga === 'function') {
    var path = "/modal/".concat(modalName);
    _gaCommand(trackerNames, 'send', 'pageview', path);
    if (_debug) {
      log('called ga(\'send\', \'pageview\', path);');
      log("with path: ".concat(path));
    }
  }
}
/**
 * timing:
 * GA timing
 * @param args.category {String} required
 * @param args.variable {String} required
 * @param args.value  {Int}  required
 * @param args.label  {String} required
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function timing() {
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    category = _ref.category,
    variable = _ref.variable,
    value = _ref.value,
    label = _ref.label;
  var trackerNames = arguments.length > 1 ? arguments[1] : undefined;
  if (typeof ga === 'function') {
    if (!category || !variable || !value || typeof value !== 'number') {
      warn('args.category, args.variable ' + 'AND args.value are required in timing() ' + 'AND args.value has to be a number');
      return;
    } // Required Fields

    var fieldObject = {
      hitType: 'timing',
      timingCategory: _format(category),
      timingVar: _format(variable),
      timingValue: value
    };
    if (label) {
      fieldObject.timingLabel = _format(label);
    }
    send(fieldObject, trackerNames);
  }
}
/**
 * event:
 * GA event tracking
 * @param args.category {String} required
 * @param args.action {String} required
 * @param args.label {String} optional
 * @param args.value {Int} optional
 * @param args.nonInteraction {boolean} optional
 * @param args.transport {string} optional
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function core_event() {
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    category = _ref2.category,
    action = _ref2.action,
    label = _ref2.label,
    value = _ref2.value,
    nonInteraction = _ref2.nonInteraction,
    transport = _ref2.transport,
    args = core_objectWithoutProperties(_ref2, ["category", "action", "label", "value", "nonInteraction", "transport"]);
  var trackerNames = arguments.length > 1 ? arguments[1] : undefined;
  if (typeof ga === 'function') {
    // Simple Validation
    if (!category || !action) {
      warn('args.category AND args.action are required in event()');
      return;
    } // Required Fields

    var fieldObject = {
      hitType: 'event',
      eventCategory: _format(category),
      eventAction: _format(action)
    }; // Optional Fields

    if (label) {
      fieldObject.eventLabel = _format(label);
    }
    if (typeof value !== 'undefined') {
      if (typeof value !== 'number') {
        warn('Expected `args.value` arg to be a Number.');
      } else {
        fieldObject.eventValue = value;
      }
    }
    if (typeof nonInteraction !== 'undefined') {
      if (typeof nonInteraction !== 'boolean') {
        warn('`args.nonInteraction` must be a boolean.');
      } else {
        fieldObject.nonInteraction = nonInteraction;
      }
    }
    if (typeof transport !== 'undefined') {
      if (typeof transport !== 'string') {
        warn('`args.transport` must be a string.');
      } else {
        if (['beacon', 'xhr', 'image'].indexOf(transport) === -1) {
          warn('`args.transport` must be either one of these values: `beacon`, `xhr` or `image`');
        }
        fieldObject.transport = transport;
      }
    }
    Object.keys(args).filter(function (key) {
      return key.substr(0, 'dimension'.length) === 'dimension';
    }).forEach(function (key) {
      fieldObject[key] = args[key];
    });
    Object.keys(args).filter(function (key) {
      return key.substr(0, 'metric'.length) === 'metric';
    }).forEach(function (key) {
      fieldObject[key] = args[key];
    }); // Send to GA

    send(fieldObject, trackerNames);
  }
}
/**
 * exception:
 * GA exception tracking
 * @param args.description {String} optional
 * @param args.fatal {boolean} optional
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function exception(_ref3, trackerNames) {
  var description = _ref3.description,
    fatal = _ref3.fatal;
  if (typeof ga === 'function') {
    // Required Fields
    var fieldObject = {
      hitType: 'exception'
    }; // Optional Fields

    if (description) {
      fieldObject.exDescription = _format(description);
    }
    if (typeof fatal !== 'undefined') {
      if (typeof fatal !== 'boolean') {
        warn('`args.fatal` must be a boolean.');
      } else {
        fieldObject.exFatal = fatal;
      }
    } // Send to GA

    send(fieldObject, trackerNames);
  }
}
var core_plugin = {
  /**
   * require:
   * GA requires a plugin
   * @param name {String} e.g. 'ecommerce' or 'myplugin'
   * @param options {Object} optional e.g {path: '/log', debug: true}
   * @param trackerName {String} optional e.g 'trackerName'
   */
  require: function require(rawName, options, trackerName) {
    if (typeof ga === 'function') {
      // Required Fields
      if (!rawName) {
        warn('`name` is required in .require()');
        return;
      }
      var name = trim(rawName);
      if (name === '') {
        warn('`name` cannot be an empty string in .require()');
        return;
      }
      var requireString = trackerName ? "".concat(trackerName, ".require") : 'require'; // Optional Fields

      if (options) {
        if (core_typeof(options) !== 'object') {
          warn('Expected `options` arg to be an Object');
          return;
        }
        if (Object.keys(options).length === 0) {
          warn('Empty `options` given to .require()');
        }
        ga(requireString, name, options);
        if (_debug) {
          log("called ga('require', '".concat(name, "', ").concat(JSON.stringify(options)));
        }
      } else {
        ga(requireString, name);
        if (_debug) {
          log("called ga('require', '".concat(name, "');"));
        }
      }
    }
  },
  /**
   * execute:
   * GA execute action for plugin
   * Takes variable number of arguments
   * @param pluginName {String} e.g. 'ecommerce' or 'myplugin'
   * @param action {String} e.g. 'addItem' or 'myCustomAction'
   * @param actionType {String} optional e.g. 'detail'
   * @param payload {Object} optional e.g { id: '1x5e', name : 'My product to track' }
   */
  execute: function execute(pluginName, action) {
    var payload;
    var actionType;
    if ((arguments.length <= 2 ? 0 : arguments.length - 2) === 1) {
      payload = arguments.length <= 2 ? undefined : arguments[2];
    } else {
      actionType = arguments.length <= 2 ? undefined : arguments[2];
      payload = arguments.length <= 3 ? undefined : arguments[3];
    }
    if (typeof ga === 'function') {
      if (typeof pluginName !== 'string') {
        warn('Expected `pluginName` arg to be a String.');
      } else if (typeof action !== 'string') {
        warn('Expected `action` arg to be a String.');
      } else {
        var command = "".concat(pluginName, ":").concat(action);
        payload = payload || null;
        if (actionType && payload) {
          ga(command, actionType, payload);
          if (_debug) {
            log("called ga('".concat(command, "');"));
            log("actionType: \"".concat(actionType, "\" with payload: ").concat(JSON.stringify(payload)));
          }
        } else if (payload) {
          ga(command, payload);
          if (_debug) {
            log("called ga('".concat(command, "');"));
            log("with payload: ".concat(JSON.stringify(payload)));
          }
        } else {
          ga(command);
          if (_debug) {
            log("called ga('".concat(command, "');"));
          }
        }
      }
    }
  }
};
/**
 * outboundLink:
 * GA outboundLink tracking
 * @param args.label {String} e.g. url, or 'Create an Account'
 * @param {function} hitCallback - Called after processing a hit.
 */

function outboundLink(args, hitCallback, trackerNames) {
  if (typeof hitCallback !== 'function') {
    warn('hitCallback function is required');
    return;
  }
  if (typeof ga === 'function') {
    // Simple Validation
    if (!args || !args.label) {
      warn('args.label is required in outboundLink()');
      return;
    } // Required Fields

    var fieldObject = {
      hitType: 'event',
      eventCategory: 'Outbound',
      eventAction: 'Click',
      eventLabel: _format(args.label)
    };
    var safetyCallbackCalled = false;
    var safetyCallback = function safetyCallback() {
      // This prevents a delayed response from GA
      // causing hitCallback from being fired twice
      safetyCallbackCalled = true;
      hitCallback();
    }; // Using a timeout to ensure the execution of critical application code
    // in the case when the GA server might be down
    // or an ad blocker prevents sending the data
    // register safety net timeout:

    var t = setTimeout(safetyCallback, 250);
    var clearableCallbackForGA = function clearableCallbackForGA() {
      clearTimeout(t);
      if (!safetyCallbackCalled) {
        hitCallback();
      }
    };
    fieldObject.hitCallback = clearableCallbackForGA; // Send to GA

    send(fieldObject, trackerNames);
  } else {
    // if ga is not defined, return the callback so the application
    // continues to work as expected
    setTimeout(hitCallback, 0);
  }
}
var core_testModeAPI = testModeAPI;
/* harmony default export */ var core = ({
  initialize: initialize,
  ga: ga,
  set: set,
  send: send,
  pageview: pageview,
  modalview: modalview,
  timing: timing,
  event: core_event,
  exception: exception,
  plugin: core_plugin,
  outboundLink: outboundLink,
  testModeAPI: testModeAPI
});
// CONCATENATED MODULE: ./node_modules/react-ga/dist/esm/index.js
function esm_ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);
  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    if (enumerableOnly) symbols = symbols.filter(function (sym) {
      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
    });
    keys.push.apply(keys, symbols);
  }
  return keys;
}
function esm_objectSpread(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};
    if (i % 2) {
      esm_ownKeys(source, true).forEach(function (key) {
        esm_defineProperty(target, key, source[key]);
      });
    } else if (Object.getOwnPropertyDescriptors) {
      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
      esm_ownKeys(source).forEach(function (key) {
        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
      });
    }
  }
  return target;
}
function esm_defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}


var esm_initialize = initialize;
var esm_ga = ga;
var esm_set = set;
var esm_send = send;
var esm_pageview = pageview;
var esm_modalview = modalview;
var esm_timing = timing;
var esm_event = core_event;
var esm_exception = exception;
var esm_plugin = core_plugin;
var esm_outboundLink = outboundLink;
var esm_testModeAPI = core_testModeAPI;
OutboundLink_OutboundLink.origTrackLink = OutboundLink_OutboundLink.trackLink;
OutboundLink_OutboundLink.trackLink = outboundLink;
var esm_OutboundLink = OutboundLink_OutboundLink;
/* harmony default export */ var esm = __webpack_exports__["a"] = (esm_objectSpread({}, core_namespaceObject, {
  OutboundLink: esm_OutboundLink
}));

/***/ }),
/* 51 */,
/* 52 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _typeof = __webpack_require__(9);
var isMergeableObject = function isMergeableObject(value) {
  return isNonNullObject(value) && !isSpecial(value);
};
function isNonNullObject(value) {
  return !!value && _typeof(value) === 'object';
}
function isSpecial(value) {
  var stringValue = Object.prototype.toString.call(value);
  return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value);
}

// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
var canUseSymbol = typeof Symbol === 'function' && Symbol["for"];
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol["for"]('react.element') : 0xeac7;
function isReactElement(value) {
  return value.$$typeof === REACT_ELEMENT_TYPE;
}
function emptyTarget(val) {
  return Array.isArray(val) ? [] : {};
}
function cloneUnlessOtherwiseSpecified(value, options) {
  return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
}
function defaultArrayMerge(target, source, options) {
  return target.concat(source).map(function (element) {
    return cloneUnlessOtherwiseSpecified(element, options);
  });
}
function getMergeFunction(key, options) {
  if (!options.customMerge) {
    return deepmerge;
  }
  var customMerge = options.customMerge(key);
  return typeof customMerge === 'function' ? customMerge : deepmerge;
}
function getEnumerableOwnPropertySymbols(target) {
  return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function (symbol) {
    return Object.propertyIsEnumerable.call(target, symbol);
  }) : [];
}
function getKeys(target) {
  return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
}
function propertyIsOnObject(object, property) {
  try {
    return property in object;
  } catch (_) {
    return false;
  }
}

// Protects from prototype poisoning and unexpected merging up the prototype chain.
function propertyIsUnsafe(target, key) {
  return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
  && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
  && Object.propertyIsEnumerable.call(target, key)); // and also unsafe if they're nonenumerable.
}
function mergeObject(target, source, options) {
  var destination = {};
  if (options.isMergeableObject(target)) {
    getKeys(target).forEach(function (key) {
      destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
    });
  }
  getKeys(source).forEach(function (key) {
    if (propertyIsUnsafe(target, key)) {
      return;
    }
    if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
      destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
    } else {
      destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
    }
  });
  return destination;
}
function deepmerge(target, source, options) {
  options = options || {};
  options.arrayMerge = options.arrayMerge || defaultArrayMerge;
  options.isMergeableObject = options.isMergeableObject || isMergeableObject;
  // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
  // implementations can use it. The caller may not replace it.
  options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
  var sourceIsArray = Array.isArray(source);
  var targetIsArray = Array.isArray(target);
  var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
  if (!sourceAndTargetTypesMatch) {
    return cloneUnlessOtherwiseSpecified(source, options);
  } else if (sourceIsArray) {
    return options.arrayMerge(target, source, options);
  } else {
    return mergeObject(target, source, options);
  }
}
deepmerge.all = function deepmergeAll(array, options) {
  if (!Array.isArray(array)) {
    throw new Error('first argument should be an array');
  }
  return array.reduce(function (prev, next) {
    return deepmerge(prev, next, options);
  }, {});
};
var deepmerge_1 = deepmerge;
module.exports = deepmerge_1;

/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



var ReactPropTypesSecret = __webpack_require__(54);
function emptyFunction() {}
function emptyFunctionWithReset() {}
emptyFunctionWithReset.resetWarningCache = emptyFunction;
module.exports = function () {
  function shim(props, propName, componentName, location, propFullName, secret) {
    if (secret === ReactPropTypesSecret) {
      // It is still safe when called from React.
      return;
    }
    var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
    err.name = 'Invariant Violation';
    throw err;
  }
  ;
  shim.isRequired = shim;
  function getShim() {
    return shim;
  }
  ;
  // Important!
  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
  var ReactPropTypes = {
    array: shim,
    bigint: shim,
    bool: shim,
    func: shim,
    number: shim,
    object: shim,
    string: shim,
    symbol: shim,
    any: shim,
    arrayOf: getShim,
    element: shim,
    elementType: shim,
    instanceOf: getShim,
    node: shim,
    objectOf: getShim,
    oneOf: getShim,
    oneOfType: getShim,
    shape: getShim,
    exact: getShim,
    checkPropTypes: emptyFunctionWithReset,
    resetWarningCache: emptyFunction
  };
  ReactPropTypes.PropTypes = ReactPropTypes;
  return ReactPropTypes;
};

/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;

/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _typeof = __webpack_require__(9);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Frame = undefined;
var _extends = Object.assign || function (target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i];
    for (var key in source) {
      if (Object.prototype.hasOwnProperty.call(source, key)) {
        target[key] = source[key];
      }
    }
  }
  return target;
};
var _createClass = function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
  }
  return function (Constructor, protoProps, staticProps) {
    if (protoProps) defineProperties(Constructor.prototype, protoProps);
    if (staticProps) defineProperties(Constructor, staticProps);
    return Constructor;
  };
}();
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(0);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _propTypes = __webpack_require__(17);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Context = __webpack_require__(40);
var _Content = __webpack_require__(56);
var _Content2 = _interopRequireDefault(_Content);
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}
function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}
function _possibleConstructorReturn(self, call) {
  if (!self) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }
  return call && (_typeof(call) === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass));
  }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      enumerable: false,
      writable: true,
      configurable: true
    }
  });
  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var Frame = exports.Frame = function (_Component) {
  _inherits(Frame, _Component);

  // React warns when you render directly into the body since browser extensions
  // also inject into the body and can mess up React. For this reason
  // initialContent is expected to have a div inside of the body
  // element that we render react into.
  function Frame(props, context) {
    _classCallCheck(this, Frame);
    var _this = _possibleConstructorReturn(this, (Frame.__proto__ || Object.getPrototypeOf(Frame)).call(this, props, context));
    _this.setRef = function (node) {
      _this.nodeRef.current = node;
      var forwardedRef = _this.props.forwardedRef; // eslint-disable-line react/prop-types

      if (typeof forwardedRef === 'function') {
        forwardedRef(node);
      } else if (forwardedRef) {
        forwardedRef.current = node;
      }
    };
    _this.handleLoad = function () {
      clearInterval(_this.loadCheck);
      // Bail update as some browsers will trigger on both DOMContentLoaded & onLoad ala firefox
      if (!_this.state.iframeLoaded) {
        _this.setState({
          iframeLoaded: true
        });
      }
    };
    _this.loadCheck = function () {
      return setInterval(function () {
        _this.handleLoad();
      }, 500);
    };
    _this._isMounted = false;
    _this.nodeRef = _react2["default"].createRef();
    _this.state = {
      iframeLoaded: false
    };
    return _this;
  }
  _createClass(Frame, [{
    key: 'componentDidMount',
    value: function componentDidMount() {
      this._isMounted = true;
      var doc = this.getDoc();
      if (doc) {
        this.nodeRef.current.contentWindow.addEventListener('DOMContentLoaded', this.handleLoad);
      }
    }
  }, {
    key: 'componentWillUnmount',
    value: function componentWillUnmount() {
      this._isMounted = false;
      this.nodeRef.current.removeEventListener('DOMContentLoaded', this.handleLoad);
    }
  }, {
    key: 'getDoc',
    value: function getDoc() {
      return this.nodeRef.current ? this.nodeRef.current.contentDocument : null; // eslint-disable-line
    }
  }, {
    key: 'getMountTarget',
    value: function getMountTarget() {
      var doc = this.getDoc();
      if (this.props.mountTarget) {
        return doc.querySelector(this.props.mountTarget);
      }
      return doc.body.children[0];
    }

    // In certain situations on a cold cache DOMContentLoaded never gets called
    // fallback to an interval to check if that's the case
  }, {
    key: 'renderFrameContents',
    value: function renderFrameContents() {
      if (!this._isMounted) {
        return null;
      }
      var doc = this.getDoc();
      if (!doc) {
        return null;
      }
      var contentDidMount = this.props.contentDidMount;
      var contentDidUpdate = this.props.contentDidUpdate;
      var win = doc.defaultView || doc.parentView;
      var contents = _react2["default"].createElement(_Content2["default"], {
        contentDidMount: contentDidMount,
        contentDidUpdate: contentDidUpdate
      }, _react2["default"].createElement(_Context.FrameContextProvider, {
        value: {
          document: doc,
          window: win
        }
      }, _react2["default"].createElement('div', {
        className: 'frame-content'
      }, this.props.children)));
      var mountTarget = this.getMountTarget();
      return [_reactDom2["default"].createPortal(this.props.head, this.getDoc().head), _reactDom2["default"].createPortal(contents, mountTarget)];
    }
  }, {
    key: 'render',
    value: function render() {
      var props = _extends({}, this.props, {
        srcDoc: this.props.initialContent,
        children: undefined // The iframe isn't ready so we drop children from props here. #12, #17
      });
      delete props.head;
      delete props.initialContent;
      delete props.mountTarget;
      delete props.contentDidMount;
      delete props.contentDidUpdate;
      delete props.forwardedRef;
      return _react2["default"].createElement('iframe', _extends({}, props, {
        ref: this.setRef,
        onLoad: this.handleLoad
      }), this.state.iframeLoaded && this.renderFrameContents());
    }
  }]);
  return Frame;
}(_react.Component);
Frame.propTypes = {
  style: _propTypes2["default"].object,
  // eslint-disable-line
  head: _propTypes2["default"].node,
  initialContent: _propTypes2["default"].string,
  mountTarget: _propTypes2["default"].string,
  contentDidMount: _propTypes2["default"].func,
  contentDidUpdate: _propTypes2["default"].func,
  children: _propTypes2["default"].oneOfType([_propTypes2["default"].element, _propTypes2["default"].arrayOf(_propTypes2["default"].element)])
};
Frame.defaultProps = {
  style: {},
  head: null,
  children: undefined,
  mountTarget: undefined,
  contentDidMount: function contentDidMount() {},
  contentDidUpdate: function contentDidUpdate() {},
  initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
};
exports["default"] = _react2["default"].forwardRef(function (props, ref) {
  return _react2["default"].createElement(Frame, _extends({}, props, {
    forwardedRef: ref
  }));
});

/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _typeof = __webpack_require__(9);
Object.defineProperty(exports, "__esModule", {
  value: true
});
var _createClass = function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
  }
  return function (Constructor, protoProps, staticProps) {
    if (protoProps) defineProperties(Constructor.prototype, protoProps);
    if (staticProps) defineProperties(Constructor, staticProps);
    return Constructor;
  };
}();
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(17);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}
function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}
function _possibleConstructorReturn(self, call) {
  if (!self) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }
  return call && (_typeof(call) === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass));
  }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      enumerable: false,
      writable: true,
      configurable: true
    }
  });
  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
} // eslint-disable-line no-unused-vars

var Content = function (_Component) {
  _inherits(Content, _Component);
  function Content() {
    _classCallCheck(this, Content);
    return _possibleConstructorReturn(this, (Content.__proto__ || Object.getPrototypeOf(Content)).apply(this, arguments));
  }
  _createClass(Content, [{
    key: 'componentDidMount',
    value: function componentDidMount() {
      this.props.contentDidMount();
    }
  }, {
    key: 'componentDidUpdate',
    value: function componentDidUpdate() {
      this.props.contentDidUpdate();
    }
  }, {
    key: 'render',
    value: function render() {
      return _react.Children.only(this.props.children);
    }
  }]);
  return Content;
}(_react.Component);
Content.propTypes = {
  children: _propTypes2["default"].element.isRequired,
  contentDidMount: _propTypes2["default"].func.isRequired,
  contentDidUpdate: _propTypes2["default"].func.isRequired
};
exports["default"] = Content;

/***/ }),
/* 57 */
/***/ (function(module, exports) {

// shim for using process in browser
var process = module.exports = {};

// cached from whatever global is present so that test runners that stub it
// don't break things.  But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals.  It's inside a
// function because try/catches deoptimize in certain engines.

var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
  throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout() {
  throw new Error('clearTimeout has not been defined');
}
(function () {
  try {
    if (typeof setTimeout === 'function') {
      cachedSetTimeout = setTimeout;
    } else {
      cachedSetTimeout = defaultSetTimout;
    }
  } catch (e) {
    cachedSetTimeout = defaultSetTimout;
  }
  try {
    if (typeof clearTimeout === 'function') {
      cachedClearTimeout = clearTimeout;
    } else {
      cachedClearTimeout = defaultClearTimeout;
    }
  } catch (e) {
    cachedClearTimeout = defaultClearTimeout;
  }
})();
function runTimeout(fun) {
  if (cachedSetTimeout === setTimeout) {
    //normal enviroments in sane situations
    return setTimeout(fun, 0);
  }
  // if setTimeout wasn't available but was latter defined
  if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
    cachedSetTimeout = setTimeout;
    return setTimeout(fun, 0);
  }
  try {
    // when when somebody has screwed with setTimeout but no I.E. maddness
    return cachedSetTimeout(fun, 0);
  } catch (e) {
    try {
      // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
      return cachedSetTimeout.call(null, fun, 0);
    } catch (e) {
      // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
      return cachedSetTimeout.call(this, fun, 0);
    }
  }
}
function runClearTimeout(marker) {
  if (cachedClearTimeout === clearTimeout) {
    //normal enviroments in sane situations
    return clearTimeout(marker);
  }
  // if clearTimeout wasn't available but was latter defined
  if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
    cachedClearTimeout = clearTimeout;
    return clearTimeout(marker);
  }
  try {
    // when when somebody has screwed with setTimeout but no I.E. maddness
    return cachedClearTimeout(marker);
  } catch (e) {
    try {
      // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
      return cachedClearTimeout.call(null, marker);
    } catch (e) {
      // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
      // Some versions of I.E. have different rules for clearTimeout vs setTimeout
      return cachedClearTimeout.call(this, marker);
    }
  }
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
  if (!draining || !currentQueue) {
    return;
  }
  draining = false;
  if (currentQueue.length) {
    queue = currentQueue.concat(queue);
  } else {
    queueIndex = -1;
  }
  if (queue.length) {
    drainQueue();
  }
}
function drainQueue() {
  if (draining) {
    return;
  }
  var timeout = runTimeout(cleanUpNextTick);
  draining = true;
  var len = queue.length;
  while (len) {
    currentQueue = queue;
    queue = [];
    while (++queueIndex < len) {
      if (currentQueue) {
        currentQueue[queueIndex].run();
      }
    }
    queueIndex = -1;
    len = queue.length;
  }
  currentQueue = null;
  draining = false;
  runClearTimeout(timeout);
}
process.nextTick = function (fun) {
  var args = new Array(arguments.length - 1);
  if (arguments.length > 1) {
    for (var i = 1; i < arguments.length; i++) {
      args[i - 1] = arguments[i];
    }
  }
  queue.push(new Item(fun, args));
  if (queue.length === 1 && !draining) {
    runTimeout(drainQueue);
  }
};

// v8 likes predictible objects
function Item(fun, array) {
  this.fun = fun;
  this.array = array;
}
Item.prototype.run = function () {
  this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) {
  return [];
};
process.binding = function (name) {
  throw new Error('process.binding is not supported');
};
process.cwd = function () {
  return '/';
};
process.chdir = function (dir) {
  throw new Error('process.chdir is not supported');
};
process.umask = function () {
  return 0;
};

/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



var _typeof = __webpack_require__(9);
var b = "function" === typeof Symbol && Symbol["for"],
  c = b ? Symbol["for"]("react.element") : 60103,
  d = b ? Symbol["for"]("react.portal") : 60106,
  e = b ? Symbol["for"]("react.fragment") : 60107,
  f = b ? Symbol["for"]("react.strict_mode") : 60108,
  g = b ? Symbol["for"]("react.profiler") : 60114,
  h = b ? Symbol["for"]("react.provider") : 60109,
  k = b ? Symbol["for"]("react.context") : 60110,
  l = b ? Symbol["for"]("react.async_mode") : 60111,
  m = b ? Symbol["for"]("react.concurrent_mode") : 60111,
  n = b ? Symbol["for"]("react.forward_ref") : 60112,
  p = b ? Symbol["for"]("react.suspense") : 60113,
  q = b ? Symbol["for"]("react.suspense_list") : 60120,
  r = b ? Symbol["for"]("react.memo") : 60115,
  t = b ? Symbol["for"]("react.lazy") : 60116,
  v = b ? Symbol["for"]("react.block") : 60121,
  w = b ? Symbol["for"]("react.fundamental") : 60117,
  x = b ? Symbol["for"]("react.responder") : 60118,
  y = b ? Symbol["for"]("react.scope") : 60119;
function z(a) {
  if ("object" === _typeof(a) && null !== a) {
    var u = a.$$typeof;
    switch (u) {
      case c:
        switch (a = a.type, a) {
          case l:
          case m:
          case e:
          case g:
          case f:
          case p:
            return a;
          default:
            switch (a = a && a.$$typeof, a) {
              case k:
              case n:
              case t:
              case r:
              case h:
                return a;
              default:
                return u;
            }
        }
      case d:
        return u;
    }
  }
}
function A(a) {
  return z(a) === m;
}
exports.AsyncMode = l;
exports.ConcurrentMode = m;
exports.ContextConsumer = k;
exports.ContextProvider = h;
exports.Element = c;
exports.ForwardRef = n;
exports.Fragment = e;
exports.Lazy = t;
exports.Memo = r;
exports.Portal = d;
exports.Profiler = g;
exports.StrictMode = f;
exports.Suspense = p;
exports.isAsyncMode = function (a) {
  return A(a) || z(a) === l;
};
exports.isConcurrentMode = A;
exports.isContextConsumer = function (a) {
  return z(a) === k;
};
exports.isContextProvider = function (a) {
  return z(a) === h;
};
exports.isElement = function (a) {
  return "object" === _typeof(a) && null !== a && a.$$typeof === c;
};
exports.isForwardRef = function (a) {
  return z(a) === n;
};
exports.isFragment = function (a) {
  return z(a) === e;
};
exports.isLazy = function (a) {
  return z(a) === t;
};
exports.isMemo = function (a) {
  return z(a) === r;
};
exports.isPortal = function (a) {
  return z(a) === d;
};
exports.isProfiler = function (a) {
  return z(a) === g;
};
exports.isStrictMode = function (a) {
  return z(a) === f;
};
exports.isSuspense = function (a) {
  return z(a) === p;
};
exports.isValidElementType = function (a) {
  return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === _typeof(a) && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
};
exports.typeOf = z;

/***/ }),
/* 59 */,
/* 60 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var _typeof = __webpack_require__(9);
/**
 * lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/** `Object#toString` result references. */
var funcTag = '[object Function]',
  genTag = '[object GeneratorFunction]',
  mapTag = '[object Map]',
  objectTag = '[object Object]',
  promiseTag = '[object Promise]',
  setTag = '[object Set]',
  stringTag = '[object String]',
  weakMapTag = '[object WeakMap]';
var dataViewTag = '[object DataView]';

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used to compose unicode character classes. */
var rsAstralRange = "\\ud800-\\udfff",
  rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23",
  rsComboSymbolsRange = "\\u20d0-\\u20f0",
  rsVarRange = "\\ufe0e\\ufe0f";

/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange + ']',
  rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
  rsFitz = "\\ud83c[\\udffb-\\udfff]",
  rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  rsNonAstral = '[^' + rsAstralRange + ']',
  rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}",
  rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]",
  rsZWJ = "\\u200d";

/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?',
  rsOptVar = '[' + rsVarRange + ']?',
  rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  rsSeq = rsOptVar + reOptMod + rsOptJoin,
  rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';

/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');

/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');

/** Detect free variable `global` from Node.js. */
var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/**
 * Gets the size of an ASCII `string`.
 *
 * @private
 * @param {string} string The string inspect.
 * @returns {number} Returns the string size.
 */
var asciiSize = baseProperty('length');

/**
 * The base implementation of `_.property` without support for deep paths.
 *
 * @private
 * @param {string} key The key of the property to get.
 * @returns {Function} Returns the new accessor function.
 */
function baseProperty(key) {
  return function (object) {
    return object == null ? undefined : object[key];
  };
}

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

/**
 * Checks if `string` contains Unicode symbols.
 *
 * @private
 * @param {string} string The string to inspect.
 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
 */
function hasUnicode(string) {
  return reHasUnicode.test(string);
}

/**
 * Checks if `value` is a host object in IE < 9.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
 */
function isHostObject(value) {
  // Many host objects are `Object` objects that can coerce to strings
  // despite having improperly defined `toString` methods.
  var result = false;
  if (value != null && typeof value.toString != 'function') {
    try {
      result = !!(value + '');
    } catch (e) {}
  }
  return result;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function (arg) {
    return func(transform(arg));
  };
}

/**
 * Gets the number of symbols in `string`.
 *
 * @private
 * @param {string} string The string to inspect.
 * @returns {number} Returns the string size.
 */
function stringSize(string) {
  return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
}

/**
 * Gets the size of a Unicode `string`.
 *
 * @private
 * @param {string} string The string inspect.
 * @returns {number} Returns the string size.
 */
function unicodeSize(string) {
  var result = reUnicode.lastIndex = 0;
  while (reUnicode.test(string)) {
    result++;
  }
  return result;
}

/** Used for built-in method references. */
var funcProto = Function.prototype,
  objectProto = Object.prototype;

/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];

/** Used to detect methods masquerading as native. */
var maskSrcKey = function () {
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  return uid ? 'Symbol(src)_1.' + uid : '';
}();

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var objectToString = objectProto.toString;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);

/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView'),
  Map = getNative(root, 'Map'),
  Promise = getNative(root, 'Promise'),
  Set = getNative(root, 'Set'),
  WeakMap = getNative(root, 'WeakMap');

/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
  mapCtorString = toSource(Map),
  promiseCtorString = toSource(Promise),
  setCtorString = toSource(Set),
  weakMapCtorString = toSource(WeakMap);

/**
 * The base implementation of `getTag`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  return objectToString.call(value);
}

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject(value) || isMasked(value)) {
    return false;
  }
  var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
  return pattern.test(toSource(value));
}

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
  var value = getValue(object, key);
  return baseIsNative(value) ? value : undefined;
}

/**
 * Gets the `toStringTag` of `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
var getTag = baseGetTag;

// Fallback for data views, maps, sets, and weak maps in IE 11,
// for data views in Edge < 14, and promises in Node.js.
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
  getTag = function getTag(value) {
    var result = objectToString.call(value),
      Ctor = result == objectTag ? value.constructor : undefined,
      ctorString = Ctor ? toSource(Ctor) : undefined;
    if (ctorString) {
      switch (ctorString) {
        case dataViewCtorString:
          return dataViewTag;
        case mapCtorString:
          return mapTag;
        case promiseCtorString:
          return promiseTag;
        case setCtorString:
          return setTag;
        case weakMapCtorString:
          return weakMapTag;
      }
    }
    return result;
  };
}

/**
 * Checks if `func` has its source masked.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
 */
function isMasked(func) {
  return !!maskSrcKey && maskSrcKey in func;
}

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
    proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
  return value === proto;
}

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to process.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {}
    try {
      return func + '';
    } catch (e) {}
  }
  return '';
}

/**
 * Gets the size of `collection` by returning its length for array-like
 * values or the number of own enumerable string keyed properties for objects.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Collection
 * @param {Array|Object|string} collection The collection to inspect.
 * @returns {number} Returns the collection size.
 * @example
 *
 * _.size([1, 2, 3]);
 * // => 3
 *
 * _.size({ 'a': 1, 'b': 2 });
 * // => 2
 *
 * _.size('pebbles');
 * // => 7
 */
function size(collection) {
  if (collection == null) {
    return 0;
  }
  if (isArrayLike(collection)) {
    return isString(collection) ? stringSize(collection) : collection.length;
  }
  var tag = getTag(collection);
  if (tag == mapTag || tag == setTag) {
    return collection.size;
  }
  return baseKeys(collection).length;
}

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 8-9 which returns 'object' for typed array and other constructors.
  var tag = isObject(value) ? objectToString.call(value) : '';
  return tag == funcTag || tag == genTag;
}

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = _typeof(value);
  return !!value && (type == 'object' || type == 'function');
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return !!value && _typeof(value) == 'object';
}

/**
 * Checks if `value` is classified as a `String` primitive or object.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a string, else `false`.
 * @example
 *
 * _.isString('abc');
 * // => true
 *
 * _.isString(1);
 * // => false
 */
function isString(value) {
  return typeof value == 'string' || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag;
}
module.exports = size;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(39)))

/***/ }),
/* 61 */,
/* 62 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__(4);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules
var toConsumableArray = __webpack_require__(10);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__(14);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__(13);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
var possibleConstructorReturn = __webpack_require__(15);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
var getPrototypeOf = __webpack_require__(7);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__(5);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__(16);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(3);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(11);

// EXTERNAL MODULE: ./node_modules/preact/compat/dist/compat.module.js
var compat_module = __webpack_require__(0);

// EXTERNAL MODULE: ./node_modules/lodash.clonedeep/index.js
var lodash_clonedeep = __webpack_require__(21);
var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);

// EXTERNAL MODULE: ./lib/isOutOfStock.js
var isOutOfStock = __webpack_require__(20);

// EXTERNAL MODULE: ./redux/currencies.js
var currencies = __webpack_require__(33);

// EXTERNAL MODULE: ./lib/getUpsellCartSum.js
var getUpsellCartSum = __webpack_require__(30);

// EXTERNAL MODULE: ./lib/autoDiscountCheck.js
var autoDiscountCheck = __webpack_require__(37);

// EXTERNAL MODULE: ./node_modules/styled-components/dist/styled-components.browser.esm.js
var styled_components_browser_esm = __webpack_require__(2);

// CONCATENATED MODULE: ./components/WidgetComponent/GlobalStyle.js

var GlobalStyle = Object(styled_components_browser_esm["b" /* createGlobalStyle */])([".carousel .control-arrow,.carousel.carousel-slider .control-arrow{-webkit-transition:all .25s ease-in;-moz-transition:all .25s ease-in;-ms-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in;opacity:.4;position:absolute;z-index:2;top:20px;background:0 0;border:0;font-size:32px;cursor:pointer}.carousel .control-arrow:hover{opacity:1}.carousel .control-arrow:before,.carousel.carousel-slider .control-arrow:before{margin:0 5px;display:inline-block;border-top:8px solid transparent;border-bottom:8px solid transparent;content:''}.carousel .control-disabled.control-arrow{opacity:0;cursor:inherit;display:none}.carousel .control-prev.control-arrow{left:0}.carousel .control-prev.control-arrow:before{border-right:8px solid #fff}.carousel .control-next.control-arrow{right:0}.carousel .control-next.control-arrow:before{border-left:8px solid #fff}.carousel{position:relative;width:100%}.carousel *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.carousel img{width:100%;display:inline-block;pointer-events:none}.carousel .carousel{position:relative}.carousel .control-arrow{outline:0;border:0;background:0 0;top:50%;margin-top:-13px;font-size:18px}.carousel .thumbs-wrapper{margin:20px;overflow:hidden}.carousel .thumbs{-webkit-transition:all .15s ease-in;-moz-transition:all .15s ease-in;-ms-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);position:relative;list-style:none;white-space:nowrap}.carousel .thumb{-webkit-transition:border .15s ease-in;-moz-transition:border .15s ease-in;-ms-transition:border .15s ease-in;-o-transition:border .15s ease-in;transition:border .15s ease-in;display:inline-block;width:80px;margin-right:6px;white-space:nowrap;overflow:hidden;border:3px solid #fff;padding:2px}.carousel .thumb:focus{border:3px solid #ccc;outline:0}.carousel .thumb.selected,.carousel .thumb:hover{border:3px solid #333}.carousel .thumb img{vertical-align:top}.carousel.carousel-slider{position:relative;margin:0;overflow:hidden}.carousel.carousel-slider .control-arrow{width:2.4rem;height:3rem;top:0;color:#fff;font-size:26px;bottom:0;margin-top:0;padding:5px}.carousel.carousel-slider .control-arrow:hover{background:rgba(0,0,0,.2)}.carousel .slider-wrapper{overflow:hidden;margin:auto;width:100%;-webkit-transition:height .15s ease-in;-moz-transition:height .15s ease-in;-ms-transition:height .15s ease-in;-o-transition:height .15s ease-in;transition:height .15s ease-in}.carousel .slider-wrapper.axis-horizontal .slider{-ms-box-orient:horizontal;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-moz-flex;display:-webkit-flex;display:flex}.carousel .slider-wrapper.axis-horizontal .slider .slide{flex-direction:column;flex-flow:column}.carousel .slider-wrapper.axis-vertical{-ms-box-orient:horizontal;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-moz-flex;display:-webkit-flex;display:flex}.carousel .slider-wrapper.axis-vertical .slider{-webkit-flex-direction:column;flex-direction:column}.carousel .slider{margin:0;padding:0;position:relative;list-style:none;width:100%}.carousel .slider.animated{-webkit-transition:all .35s ease-in-out;-moz-transition:all .35s ease-in-out;-ms-transition:all .35s ease-in-out;-o-transition:all .35s ease-in-out;transition:all .35s ease-in-out}video{outline:none !important;}.carousel .slide{min-width:100%;margin:0;position:relative;text-align:center;background:#000}.carousel .slide img{width:100%;vertical-align:top;border:0}.carousel .slide iframe{display:inline-block;border:0}.carousel .slide .legend{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-ms-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out;position:absolute;bottom:40px;left:50%;margin-left:-45%;width:90%;border-radius:10px;background:#000;color:#fff;padding:10px;font-size:12px;text-align:center;opacity:.25;-webkit-transition:opacity .35s ease-in-out;-moz-transition:opacity .35s ease-in-out;-ms-transition:opacity .35s ease-in-out;-o-transition:opacity .35s ease-in-out;transition:opacity .35s ease-in-out}.carousel .control-dots{position:absolute;bottom:0;margin:10px 0;text-align:center;width:100%}@media (min-width:960px){.carousel .control-dots{bottom:0}}.carousel .control-dots .dot{-webkit-transition:opacity .25s ease-in;-moz-transition:opacity .25s ease-in;-ms-transition:opacity .25s ease-in;-o-transition:opacity .25s ease-in;transition:opacity .25s ease-in;opacity:.3;box-shadow:1px 1px 2px rgba(0,0,0,.9);background:#fff;border-radius:50%;width:8px;height:8px;cursor:pointer;display:inline-block;margin:0 8px}.carousel .control-dots .dot.selected,.carousel .control-dots .dot:hover{opacity:1}.carousel .carousel-status{position:absolute;top:0;right:0;padding:5px;font-size:10px;text-shadow:1px 1px 1px rgba(0,0,0,.9);color:#fff}.carousel:hover .slide .legend{opacity:1}.carouselImage{-webkit-animation:fadein 1.5s;-moz-animation:fadein 1.5s;-ms-animation:fadein 1.5s;-o-animation:fadein 1.5s;animation:fadein 1.5s;}input:focus,select:focus,button:focus{outline:none;}.carousel-root.carousel:focus{outline:none;}@keyframes fadein{from{opacity:0;}to{opacity:1;}}@-moz-keyframes fadein{from{opacity:0;}to{opacity:1;}}@-webkit-keyframes fadein{from{opacity:0;}to{opacity:1;}}@-ms-keyframes fadein{from{opacity:0;}to{opacity:1;}}@-o-keyframes fadein{from{opacity:0;}to{opacity:1;}}"]);
/* harmony default export */ var WidgetComponent_GlobalStyle = (GlobalStyle);
// EXTERNAL MODULE: ./components/WidgetComponent/components/WidgetParams.js + 3 modules
var WidgetParams = __webpack_require__(25);

// CONCATENATED MODULE: ./components/WidgetComponent/WidgetComponent.js










var __jsx = compat_module["default"].createElement;
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { Object(defineProperty["a" /* default */])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == Object(esm_typeof["a" /* default */])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(Object(esm_typeof["a" /* default */])(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }








var getCart = /*#__PURE__*/function () {
  var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
    var _response;
    return _regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            _context.prev = 0;
            _context.next = 3;
            return fetch("/cart.js", {
              method: "GET"
            });
          case 3:
            _response = _context.sent;
            _context.next = 6;
            return _response.json();
          case 6:
            return _context.abrupt("return", _context.sent);
          case 9:
            _context.prev = 9;
            _context.t0 = _context["catch"](0);
            return _context.abrupt("return", null);
          case 12:
          case "end":
            return _context.stop();
        }
      }
    }, _callee, null, [[0, 9]]);
  }));
  return function getCart() {
    return _ref.apply(this, arguments);
  };
}();
var WidgetComponent_WidgetComponent = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(WidgetComponent, _Component);
  function WidgetComponent(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, WidgetComponent);
    _this = _callSuper(this, WidgetComponent, [props]);
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "getQuantity", function (campaign, active_offer, declined) {
      try {
        if (declined) {
          return campaign && campaign.offers && campaign.offers[active_offer] && campaign.offers[active_offer].declinedOffer && campaign.offers[active_offer].declinedOffer.has_required_amount_products && campaign.offers[active_offer].declinedOffer.required_amount_products ? campaign.offers[active_offer].declinedOffer.required_amount_products : 1;
        }
        return campaign && campaign.offers && campaign.offers[active_offer] && campaign.offers[active_offer].has_required_amount_products && campaign.offers[active_offer].required_amount_products ? campaign.offers[active_offer].required_amount_products : 1;
      } catch (_unused2) {
        return 1;
      }
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "currencyChange", function (amount) {
      try {
        var _result3 = amount;
        if (window && window.conversionBearAutoCurrencyConverter && window.conversionBearAutoCurrencyConverter.convert) {
          var _data3 = window.conversionBearAutoCurrencyConverter.convert(amount, "{{amount_no_formatting}}");
          _result3 = _data3.amount;
          _this.state.moneyFormatForce = _data3.default_format;
        }
        return _result3;
      } catch (e) {
        console.log("currencyChange e", e);
        return amount;
      }
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "getVariantCurrency", function (variant) {
      var tpm = _objectSpread({}, variant);
      if (tpm.price) {
        tpm.price = _this.currencyChange(tpm.price);
      }
      if (tpm.compare_at_price) {
        tpm.compare_at_price = _this.currencyChange(tpm.compare_at_price);
      }
      return tpm;
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "goToOffer", function (step) {
      var _this$props = _this.props,
        campaign = _this$props.campaign,
        isPreview = _this$props.isPreview,
        getHeight = _this$props.getHeight;
      var history_offer = _this.state.history_offer;
      if (isPreview) {
        return;
      }
      var variant = {};
      var tmp_variants = campaign && campaign.offers && campaign.offers[step] ? campaign.offers[step].product.variants : [];
      tmp_variants.some(function (item) {
        if (!Object(isOutOfStock["a" /* default */])(item)) {
          variant = item;
          return true;
        }
        return false;
      });
      _this.setState({
        active_offer: step,
        history_offer: history_offer < step + 1 ? step : history_offer,
        startTime: new Date().getTime(),
        quantity: _this.getQuantity(campaign, step),
        variant: _this.getVariantCurrency(variant),
        initialVariant: variant
      }, function () {
        if (getHeight) {
          getHeight();
        }
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "skipOffers", function (skip) {
      var _this$props2 = _this.props,
        conversionBearUpsell = _this$props2.conversionBearUpsell,
        campaign = _this$props2.campaign;
      _this.setState({
        loadingButton: true
      });
      _this.setHideGoToCheckout(true);
      if (!_this.state.data.offers.length && !skip && campaign.page_to_show === "thankyou_page") {
        conversionBearUpsell.closeApp();
      } else {
        _this.goToCheckout();
      }
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "nextOffer", function (skip) {
      var _this$props3 = _this.props,
        campaign = _this$props3.campaign,
        getHeight = _this$props3.getHeight;
      var hideCountDownTimerItems = _this.state.hideCountDownTimerItems;
      var _this$state = _this.state,
        active_offer = _this$state.active_offer,
        history_offer = _this$state.history_offer;
      if (campaign.offers.length <= active_offer + 1) {
        if (history_offer !== 4) {
          _this.setState({
            history_offer: 4
          }, function () {
            if (getHeight) {
              getHeight();
            }
          });
        }
        if (skip) {
          _this.skipOffers(skip);
        }
        return null;
      }
      if (campaign.offers.length - 1 > active_offer) {
        hideCountDownTimerItems["offer_".concat(active_offer)] = true;
      }
      var variant = {};
      var plusOffer = 1;
      if (skip && campaign.offers[_this.state.active_offer + plusOffer].declinedOffer ? campaign.offers[_this.state.active_offer + plusOffer].declinedOffer.outOfStock : campaign.offers[_this.state.active_offer + 1].outOfStock) {
        if (_this.state.active_offer === 1) {
          _this.skipOffers();
          return;
        }
        plusOffer = 2;
      }
      var nextActiveOffer = campaign.offers[_this.state.active_offer + plusOffer];
      if (!skip && campaign.offers[_this.state.active_offer + 1] && campaign.offers[_this.state.active_offer + 1].skip_offer) {
        if (campaign.page_to_show === "cart_page" || _this.state.data && _this.state.data.offers && _this.state.data.offers.length) {
          _this.setState({
            loadingButton: true
          });
          _this.setHideGoToCheckout(true);
          _this.goToCheckout();
        }
        return;
      }
      var isDeclinedOffer = skip && plusOffer !== 2 && nextActiveOffer.declinedOffer;
      var declinedOfferVariants = campaign && nextActiveOffer && nextActiveOffer.declinedOffer ? nextActiveOffer.declinedOffer.product.variants : [];
      var offerVariants = campaign && nextActiveOffer && nextActiveOffer.product ? nextActiveOffer.product.variants : [];
      var tmp_variants = isDeclinedOffer ? declinedOfferVariants : offerVariants;
      if (!tmp_variants.length) {
        _this.skipOffers();
        return;
      }
      tmp_variants.some(function (item) {
        if (!Object(isOutOfStock["a" /* default */])(item)) {
          variant = item;
          return true;
        }
        return false;
      });
      _this.setState({
        active_offer: _this.state.active_offer + plusOffer,
        declined: plusOffer === 2 ? false : Boolean(skip && nextActiveOffer.declinedOffer),
        prevOfferCondition: _this.state.declined,
        history_offer: history_offer < active_offer + plusOffer ? active_offer + plusOffer : history_offer,
        startTime: new Date().getTime(),
        quantity: _this.getQuantity(campaign, _this.state.active_offer + plusOffer, isDeclinedOffer),
        variant: _this.getVariantCurrency(variant),
        initialVariant: variant,
        hideCountDownTimerItems: hideCountDownTimerItems
      }, function () {
        if (getHeight) {
          getHeight();
        }
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "prevOffer", function () {
      var _this$props4 = _this.props,
        campaign = _this$props4.campaign,
        getHeight = _this$props4.getHeight;
      var _this$state2 = _this.state,
        active_offer = _this$state2.active_offer,
        prevOfferCondition = _this$state2.prevOfferCondition;
      if (active_offer <= 0) {
        return null;
      }
      var variant = {};
      var tmp_variants = campaign ? prevOfferCondition && campaign.offers[_this.state.active_offer - 1].declinedOffer ? campaign.offers[_this.state.active_offer - 1].declinedOffer.product.variants : campaign.offers[_this.state.active_offer - 1].product.variants : [];
      tmp_variants.some(function (item) {
        if (!Object(isOutOfStock["a" /* default */])(item)) {
          variant = item;
          return true;
        }
        return false;
      });
      _this.setState({
        active_offer: _this.state.active_offer - 1,
        declined: Boolean(prevOfferCondition && campaign.offers[_this.state.active_offer - 1].declinedOffer),
        startTime: new Date().getTime(),
        variant: _this.getVariantCurrency(variant),
        initialVariant: variant,
        quantity: _this.getQuantity(campaign, _this.state.active_offer - 1, Boolean(prevOfferCondition && campaign.offers[_this.state.active_offer - 1].declinedOffer))
      }, function () {
        if (getHeight) {
          getHeight();
        }
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setMinimized", function (status) {
      var setMinimized = _this.props.setMinimized;
      if (setMinimized) {
        setMinimized(status);
        return;
      }
      _this.setState({
        minimized: status
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "addOffer", function () {
      var _this$props5 = _this.props,
        isDemo = _this$props5.isDemo,
        campaign = _this$props5.campaign,
        settings = _this$props5.settings,
        conversionBearUpsell = _this$props5.conversionBearUpsell;
      _this.setState({
        customFieldErrors: {}
      });
      var _this$state3 = _this.state,
        data = _this$state3.data,
        quantity = _this$state3.quantity,
        initialVariant = _this$state3.initialVariant,
        active_offer = _this$state3.active_offer,
        currency_format = _this$state3.currency_format,
        funnelTotalPrice = _this$state3.funnelTotalPrice,
        funnelTotalPriceWithoutDiscount = _this$state3.funnelTotalPriceWithoutDiscount;
      var variant = initialVariant;
      if (_this.props.settings.advanced.facebook_pixel_id || _this.props.settings.advanced.pinterest_tag_id || _this.props.settings.advanced.google_analytics_id || _this.props.settings.advanced.snapchat_pixel_id || _this.props.settings.advanced.tiktok_pixel_id) {
        var _price2 = variant.price;
        var _currency2 = settings.default_currency || "USD";
        try {
          if (conversionBearUpsell && conversionBearUpsell.onAcceptOffer && typeof conversionBearUpsell.onAcceptOffer === "function") {
            conversionBearUpsell.onAcceptOffer({
              content_name: campaign.offers[active_offer].product.title,
              content_ids: [variant.product_id, variant.id],
              content_type: "product",
              value: _price2,
              currency: _currency2
            });
          }
        } catch (e) {
          console.log("onAcceptOffer error:", e);
        }
        if (window.fbq) {
          window.fbq("track", "AddToCart", {
            content_name: campaign.offers[active_offer].product.title,
            content_ids: [variant.product_id, variant.id],
            content_type: window.cbReportFBeventAsProductGroup ? "product_group" : "product",
            value: _price2,
            currency: _currency2
          });
        } else if (_this.props.settings.advanced.facebook_pixel_id && _this.props.ReactPixel && _this.props.ReactPixel.fbq) {
          _this.props.ReactPixel.fbq("track", "AddToCart", {
            content_name: campaign.offers[active_offer].product.title,
            content_ids: [variant.product_id, variant.id],
            content_type: window.cbReportFBeventAsProductGroup ? "product_group" : "product",
            value: _price2,
            currency: _currency2
          });
        }
        if (_this.props.settings.advanced.snapchat_pixel_id && _this.props.ReactSnapchat && _this.props.ReactSnapchat.snaptr) {
          _this.props.ReactSnapchat.snaptr("track", "ADD_CART", {
            item_ids: [variant.product_id, variant.id],
            price: _price2,
            currency: _currency2
          });
        }
        if (_this.props.settings.advanced.google_analytics_id && _this.props.ReactGA && _this.props.ReactGA.ga) {
          var _ga2 = _this.props.ReactGA.ga();
          _ga2("ec:addProduct", {
            id: variant.product_id,
            name: campaign.offers[active_offer].product.title,
            variant: variant.id,
            price: _price2,
            quantity: quantity
          });
          _ga2("ec:setAction", "add");
          _ga2("send", "event", "UX", "click", "add to cart");
        }
        if (_this.props.settings.advanced.pinterest_tag_id && _this.props.ReactPinterest && _this.props.ReactPinterest.addToCart) {
          _this.props.ReactPinterest.addToCart({
            value: _price2,
            order_quantity: quantity,
            currency: _currency2
          });
        }
        if (window.ttq && window.ttq.track && _this.props.settings.advanced.tiktok_pixel_id) {
          window.ttq.track("AddToCart", {
            content_id: variant.product_id,
            quantity: quantity,
            value: _price2,
            currency: _currency2
          });
        }
      }
      var newOffers = Object(toConsumableArray["a" /* default */])(data.offers);
      var properties = [];
      if (_this.state.properties[active_offer]) {
        var _ret = function () {
          var errors = {};
          var _loop = function _loop(key) {
            if (campaign.offers[active_offer].custom_fields) {
              campaign.offers[active_offer].custom_fields.forEach(function (field) {
                if (field.field_name === key && field.required_field && !_this.state.properties[active_offer][key].value) {
                  if (field.show_on_specific_variant && field.specific_variant_ids) {
                    errors[key] = field.specific_variant_ids.includes(variant.id);
                  } else {
                    errors[key] = true;
                  }
                }
              });
            }
            if (_this.state.properties[active_offer][key] && _this.state.properties[active_offer][key].name) {
              properties.push(_this.state.properties[active_offer][key]);
            }
          };
          for (var key in _this.state.properties[active_offer]) {
            _loop(key);
          }
          if (Object.values(errors).filter(function (error) {
            return error;
          }).length) {
            _this.setState({
              customFieldErrors: errors
            });
            return {
              v: true
            };
          }
        }();
        if (Object(esm_typeof["a" /* default */])(_ret) === "object") return _ret.v;
      }
      if (newOffers[active_offer]) {
        newOffers[active_offer] = {
          product_id: variant.product_id || variant.featured_image && variant.featured_image.product_id,
          variant_id: variant.id,
          active_offer: active_offer,
          quantity: quantity,
          properties: properties,
          condition: _this.state.declined
        };
        _this.setState({
          funnelTotalPrice: funnelTotalPrice - Number(initialVariant.price) * data.offers[active_offer].quantity + Number(initialVariant.price) * quantity,
          funnelTotalPriceWithoutDiscount: funnelTotalPriceWithoutDiscount - Number(initialVariant.compare_at_price || initialVariant.price) * data.offers[active_offer].quantity + Number(initialVariant.compare_at_price || initialVariant.price) * quantity
        });
      } else {
        _this.setState({
          funnelTotalPrice: funnelTotalPrice + Number(initialVariant.price) * quantity,
          funnelTotalPriceWithoutDiscount: funnelTotalPriceWithoutDiscount + Number(initialVariant.compare_at_price || initialVariant.price) * quantity
        });
        newOffers = [].concat(Object(toConsumableArray["a" /* default */])(newOffers), [isDemo ? _objectSpread(_objectSpread({}, variant), {}, {
          product_id: variant.product_id,
          variant_id: variant.id,
          active_offer: active_offer,
          quantity: quantity,
          price: currency_format.replace(/\{\{.*?\}\}/, variant.price).replace(/<[^>]*>/g, ""),
          product_image: campaign.offers[active_offer].product.images && campaign.offers[active_offer].product.images[0].src,
          title: campaign.offers[active_offer].product.title,
          isOneVariant: campaign.offers[active_offer].product.variants && campaign.offers[active_offer].product.variants.length === 1
        }) : {
          product_id: variant.product_id || variant.featured_image && variant.featured_image.product_id,
          variant_id: variant.id,
          active_offer: active_offer,
          quantity: quantity,
          properties: properties,
          condition: _this.state.declined,
          discount: campaign.offers[active_offer].discount
        }]);
      }
      _this.setState({
        data: {
          campaign_id: data.campaign_id,
          show_this_funnel_once: data.show_this_funnel_once,
          offers: newOffers
        }
      }, function () {
        if (active_offer === campaign.offers.length - 1) {
          _this.goToCheckout();
        } else {
          _this.nextOffer();
        }
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "onChangeVariant", function (variant) {
      _this.setState({
        variant: _this.getVariantCurrency(variant),
        initialVariant: variant,
        customFieldErrors: {}
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "onChangeQuantity", function (quantity) {
      var campaign = _this.props.campaign;
      var _this$state4 = _this.state,
        active_offer = _this$state4.active_offer,
        declined = _this$state4.declined;
      var offer = campaign.offers[active_offer];
      var onlyDeclinedOffer = false;
      if (declined) {
        onlyDeclinedOffer = true;
        if (offer.declinedOffer && offer.declinedOffer.limit_products && quantity > offer.declinedOffer.limit_products_amount) {
          return null;
        }
        if (offer.declinedOffer && offer.declinedOffer.has_required_amount_products && quantity < offer.declinedOffer.required_amount_products) {
          return null;
        }
      }
      if (!onlyDeclinedOffer && offer.limit_products && quantity > offer.limit_products_amount) {
        return null;
      }
      if (!onlyDeclinedOffer && offer.has_required_amount_products && quantity < offer.required_amount_products) {
        return null;
      }
      _this.setState({
        quantity: quantity,
        customFieldErrors: {}
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setUpsellAmount", function (upsell_amount) {
      _this.setState({
        upsell_amount: upsell_amount
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setAdditionalDiscount", function (additionalDiscount) {
      var data = _objectSpread({
        additionalOrderDiscount: additionalDiscount.order_discount,
        additionalDiscount: additionalDiscount.line_items,
        freeShipping: additionalDiscount.freeShipping
      }, _this.state.data);
      _this.setState({
        data: data
      });
      _this.state.data.additionalOrderDiscount = additionalDiscount.order_discount;
      _this.state.data.additionalDiscount = additionalDiscount.line_items;
      _this.state.data.freeShipping = additionalDiscount.freeShipping;
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "applyBundlesBeerDiscountCode", /*#__PURE__*/function () {
      var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(code) {
        var _this$props6, url, shop, campaign, _this$state5, data, active_offer, funnelTotalPrice, cart, upsellCartSum, totalPrice, newData, body;
        return _regeneratorRuntime().wrap(function _callee3$(_context3) {
          while (1) {
            switch (_context3.prev = _context3.next) {
              case 0:
                _this$props6 = _this.props, url = _this$props6.url, shop = _this$props6.shop, campaign = _this$props6.campaign;
                _this$state5 = _this.state, data = _this$state5.data, active_offer = _this$state5.active_offer, funnelTotalPrice = _this$state5.funnelTotalPrice;
                _context3.next = 4;
                return getCart();
              case 4:
                cart = _context3.sent;
                upsellCartSum = Object(getUpsellCartSum["a" /* default */])(data.offers, campaign, active_offer, cart);
                totalPrice = (campaign.offer_type === "upsell" ? upsellCartSum : cart.total_price) / 100 + funnelTotalPrice;
                _context3.next = 9;
                return Object(autoDiscountCheck["a" /* default */])(lodash_clonedeep_default()(data), url, shop, lodash_clonedeep_default()(cart), getCart);
              case 9:
                newData = _context3.sent;
                body = _objectSpread(_objectSpread({}, newData), {}, {
                  cart: cart,
                  totalPrice: totalPrice,
                  campaign: campaign
                });
                return _context3.abrupt("return", fetch("".concat(url, "default/check_discount_code?shop=").concat(shop, "&code=").concat(encodeURIComponent(code)), {
                  method: "POST",
                  headers: {
                    "Content-Type": "application/json"
                  },
                  body: JSON.stringify(body)
                }).then(function (resp) {
                  return resp.json();
                }).then( /*#__PURE__*/function () {
                  var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(result) {
                    var _Shopify;
                    var upsell_amount, _cart_items_count, _offer_items_count;
                    return _regeneratorRuntime().wrap(function _callee2$(_context2) {
                      while (1) {
                        switch (_context2.prev = _context2.next) {
                          case 0:
                            _this.setAdditionalDiscount(result);
                            upsell_amount = 0;
                            if (result.line_items && result.line_items.length && !result.hasAutomaticDiscount) {
                              result.line_items.forEach(function (item) {
                                if (item.type === "offer") {
                                  upsell_amount += item.compare_at_price * (item.quantity || 1) - item.applied_discount.amount;
                                }
                              });
                            } else if (result.order_discount && !result.hasAutomaticDiscount) {
                              if (result.order_discount.value_type === "percentage") {
                                upsell_amount = funnelTotalPrice - funnelTotalPrice / 100 * result.order_discount.amount;
                              } else {
                                _cart_items_count = cart.item_count;
                                _offer_items_count = data.offers.reduce(function (acc, item) {
                                  return acc + item.quantity;
                                }, 0);
                                upsell_amount = funnelTotalPrice - result.order_discount.amount / (_cart_items_count + _offer_items_count) * _offer_items_count;
                                upsell_amount = upsell_amount > 0 ? upsell_amount : 0;
                              }
                            }
                            _this.setUpsellAmount(upsell_amount / (((_Shopify = Shopify) === null || _Shopify === void 0 || (_Shopify = _Shopify.currency) === null || _Shopify === void 0 ? void 0 : _Shopify.rate) || 1));
                          case 4:
                          case "end":
                            return _context2.stop();
                        }
                      }
                    }, _callee2);
                  }));
                  return function (_x2) {
                    return _ref3.apply(this, arguments);
                  };
                }())["catch"](function () {
                  return null;
                }));
              case 12:
              case "end":
                return _context3.stop();
            }
          }
        }, _callee3);
      }));
      return function (_x) {
        return _ref2.apply(this, arguments);
      };
    }());
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "goToCheckout", /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
      var done,
        _this$state6,
        upsell_amount,
        data,
        properties,
        _this$props7,
        goToCheckout,
        conversionBearUpsell,
        campaign,
        _stopFlow,
        hasSubscription,
        _window,
        _productsFromFunnel,
        _code,
        _cart,
        _this$props8,
        url,
        shop,
        _campaign,
        _this$state7,
        _data2,
        active_offer,
        funnelTotalPrice,
        _upsellCartSum,
        _totalPrice,
        _newData,
        _result2,
        _discounted_upsell_amount,
        _cart_items_count2,
        _offer_items_count2,
        _args4 = arguments;
      return _regeneratorRuntime().wrap(function _callee4$(_context4) {
        while (1) {
          switch (_context4.prev = _context4.next) {
            case 0:
              done = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : false;
              _this$state6 = _this.state, upsell_amount = _this$state6.upsell_amount, data = _this$state6.data, properties = _this$state6.properties;
              if (!_this.state.disableGoToCheckout) {
                _context4.next = 4;
                break;
              }
              return _context4.abrupt("return", null);
            case 4:
              _this.setState({
                disableGoToCheckout: true
              });
              _this$props7 = _this.props, goToCheckout = _this$props7.goToCheckout, conversionBearUpsell = _this$props7.conversionBearUpsell, campaign = _this$props7.campaign; // custom checkout function
              _context4.prev = 6;
              if (!(conversionBearUpsell && conversionBearUpsell.customGoToCheckout && typeof conversionBearUpsell.customGoToCheckout === "function")) {
                _context4.next = 11;
                break;
              }
              _stopFlow = conversionBearUpsell.customGoToCheckout(_objectSpread(_objectSpread({}, _this.state), {}, {
                campaign: campaign
              }));
              if (!_stopFlow) {
                _context4.next = 11;
                break;
              }
              return _context4.abrupt("return");
            case 11:
              if (conversionBearUpsell && conversionBearUpsell.onAcceptOffer && typeof conversionBearUpsell.onAcceptOffer === "function") {
                conversionBearUpsell.onProceedToCheckout(_this.state.data);
              }
              _context4.next = 18;
              break;
            case 14:
              _context4.prev = 14;
              _context4.t0 = _context4["catch"](6);
              _this.setState({
                disableGoToCheckout: false
              });
              console.log("goToCheckout -> e", _context4.t0);
            case 18:
              hasSubscription = properties && Object.values(_this.state.properties).some(function (_ref5) {
                var shipping_interval_frequency = _ref5.shipping_interval_frequency;
                return Boolean(shipping_interval_frequency === null || shipping_interval_frequency === void 0 ? void 0 : shipping_interval_frequency.value);
              });
              if (!(goToCheckout && typeof goToCheckout === "function")) {
                _context4.next = 52;
                break;
              }
              if (!(_this.props.campaign.allow_coupon_code && _this.state.data.offers.length && !done && !hasSubscription)) {
                _context4.next = 24;
                break;
              }
              _this.setState({
                showDiscountCode: true,
                disableGoToCheckout: false
              });
              _context4.next = 52;
              break;
            case 24:
              if (!(window.bundlesBear && window.bundlesBear.discountStatus === "exists" && !data.additionalDiscount && !data.additionalOrderDiscount && _this.state.data.offers.length)) {
                _context4.next = 31;
                break;
              }
              _productsFromFunnel = data.offers.map(function (offer) {
                var currentOffer = offer.condition ? campaign.offers[offer.active_offer].declinedOffer : campaign.offers[offer.active_offer];
                var _currentOffer$product = currentOffer.product.variants.find(function (variant) {
                    return variant.id === offer.variant_id;
                  }),
                  price = _currentOffer$product.price;
                return {
                  product_id: offer.product_id,
                  quantity: offer.quantity,
                  discount: offer.condition ? campaign.offers[offer.active_offer].declinedOffer.discount : campaign.offers[offer.active_offer].discount,
                  price: price,
                  id: offer.variant_id
                };
              });
              _context4.next = 28;
              return window.bundlesBear.applyDiscount(_productsFromFunnel);
            case 28:
              _code = _context4.sent;
              _context4.next = 31;
              return _this.applyBundlesBeerDiscountCode(_code);
            case 31:
              if (!localStorage.getItem("cbUpsellAdditonalDiscountCode")) {
                _context4.next = 51;
                break;
              }
              _context4.next = 34;
              return getCart();
            case 34:
              _cart = _context4.sent;
              _this$props8 = _this.props, url = _this$props8.url, shop = _this$props8.shop, _campaign = _this$props8.campaign;
              _this$state7 = _this.state, _data2 = _this$state7.data, active_offer = _this$state7.active_offer, funnelTotalPrice = _this$state7.funnelTotalPrice;
              _upsellCartSum = Object(getUpsellCartSum["a" /* default */])(_data2.offers, _campaign, active_offer, _cart);
              _totalPrice = (_campaign.offer_type === "upsell" ? _upsellCartSum : _cart.total_price) / 100 + funnelTotalPrice;
              _context4.next = 41;
              return Object(autoDiscountCheck["a" /* default */])(lodash_clonedeep_default()(_data2), url, shop, lodash_clonedeep_default()(_cart), getCart);
            case 41:
              _newData = _context4.sent;
              _context4.next = 44;
              return fetch("".concat(url, "default/check_discount_code?shop=").concat(shop, "&code=").concat(encodeURIComponent(localStorage.getItem("cbUpsellAdditonalDiscountCode"))), {
                method: "POST",
                headers: {
                  "Content-Type": "application/json"
                },
                body: JSON.stringify(_objectSpread(_objectSpread({}, _newData), {}, {
                  cart: _cart,
                  campaign: _campaign,
                  totalPrice: _totalPrice
                }))
              }).then(function (resp) {
                return resp.json();
              });
            case 44:
              _result2 = _context4.sent;
              _this.setAdditionalDiscount(_result2);
              _discounted_upsell_amount = 0;
              if (_result2.line_items && _result2.line_items.length && !_result2.hasAutomaticDiscount) {
                _result2.line_items.forEach(function (item) {
                  if (item.type === "offer") {
                    _discounted_upsell_amount += item.compare_at_price * (item.quantity || 1) - item.applied_discount.amount;
                  }
                });
              } else if (_result2.order_discount && !_result2.hasAutomaticDiscount) {
                if (_result2.order_discount.value_type === "percentage") {
                  _discounted_upsell_amount = funnelTotalPrice - funnelTotalPrice / 100 * _result2.order_discount.amount;
                } else {
                  _cart_items_count2 = _cart.item_count;
                  _offer_items_count2 = _data2.offers.reduce(function (acc, item) {
                    return acc + item.quantity;
                  }, 0);
                  _discounted_upsell_amount = funnelTotalPrice - _result2.order_discount.amount / (_cart_items_count2 + _offer_items_count2) * _offer_items_count2;
                  _discounted_upsell_amount = _discounted_upsell_amount > 0 ? _discounted_upsell_amount : 0;
                }
              }
              _this.setUpsellAmount(_discounted_upsell_amount);
              goToCheckout(_objectSpread(_objectSpread({}, _this.state.data), {}, {
                offerIndex: _campaign.offerIndex,
                upsell_amount: _discounted_upsell_amount || upsell_amount,
                withBundlesBearDiscount: false,
                campaign: _campaign,
                additionalOrderDiscount: _result2 === null || _result2 === void 0 ? void 0 : _result2.order_discount
              }));
              return _context4.abrupt("return");
            case 51:
              goToCheckout(_objectSpread(_objectSpread({}, _this.state.data), {}, {
                offerIndex: campaign.offerIndex,
                upsell_amount: _this.state.upsell_amount,
                withBundlesBearDiscount: ((_window = window) === null || _window === void 0 || (_window = _window.bundlesBear) === null || _window === void 0 ? void 0 : _window.discountStatus) === "exists",
                campaign: campaign
              }));
            case 52:
            case "end":
              return _context4.stop();
          }
        }
      }, _callee4, null, [[6, 14]]);
    })));
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "closeDiscountBlock", function () {
      _this.setState({
        showDiscountCode: false,
        data: _objectSpread(_objectSpread({}, _this.state.data), {}, {
          offers: []
        }),
        active_offer: 0,
        funnelTotalPrice: 0,
        funnelTotalPriceWithoutDiscount: 0
      });
      _this.goToOffer(0);
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setItemHideCountDownTimer", function (item, value) {
      var hideCountDownTimerItems = _this.state.hideCountDownTimerItems;
      var getHeight = _this.props.getHeight;
      hideCountDownTimerItems[item] = value;
      _this.setState({
        hideCountDownTimerItems: hideCountDownTimerItems
      }, function () {
        if (getHeight) {
          getHeight();
        }
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setHideGoToCheckout", function (status) {
      _this.setState({
        hideGoToCheckout: status
      });
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "onChangeProperties", function (value, name) {
      var _this$state8 = _this.state,
        properties = _this$state8.properties,
        active_offer = _this$state8.active_offer;
      _this.state.properties = _objectSpread(_objectSpread({}, properties || {}), {}, Object(defineProperty["a" /* default */])({}, active_offer, _objectSpread(_objectSpread({}, properties[active_offer] || []), {}, Object(defineProperty["a" /* default */])({}, name, {
        name: value === null ? null : name,
        value: value
      }))));
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setQuantity", function (campaign, active_offer, declined, quantity) {
      try {
        if (!_this.props.isPreview) {
          return quantity;
        }
        if (declined) {
          return campaign && campaign.offers && campaign.offers[active_offer] && campaign.offers[active_offer].declinedOffer && campaign.offers[active_offer].declinedOffer.has_required_amount_products ? campaign.offers[active_offer].declinedOffer.required_amount_products > quantity ? campaign.offers[active_offer].declinedOffer.required_amount_products : quantity : quantity;
        }
        return campaign && campaign.offers && campaign.offers[active_offer] && campaign.offers[active_offer].has_required_amount_products ? campaign.offers[active_offer].required_amount_products > quantity ? campaign.offers[active_offer].required_amount_products : quantity : quantity;
      } catch (_unused3) {
        return quantity;
      }
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "_getSeconds", function () {
      var settings = _this.props.settings;
      var _ref6 = settings && settings.design && settings.design.theme || {},
        countdown_timer = _ref6.countdown_timer;
      var seconds = 0;
      if (countdown_timer && Array.isArray(countdown_timer.start_countdown_from)) {
        var _seconds10 = !isNaN(parseFloat(countdown_timer.start_countdown_from[0])) ? parseFloat(countdown_timer.start_countdown_from[0]) * 600 : 0;
        var _seconds11 = !isNaN(parseFloat(countdown_timer.start_countdown_from[1])) ? parseFloat(countdown_timer.start_countdown_from[1]) * 60 : 0;
        var _seconds12 = !isNaN(parseFloat(countdown_timer.start_countdown_from[2])) ? parseFloat(countdown_timer.start_countdown_from[2]) * 10 : 0;
        var _seconds13 = !isNaN(parseFloat(countdown_timer.start_countdown_from[3])) ? parseFloat(countdown_timer.start_countdown_from[3]) : 0;
        seconds = _seconds10 + _seconds11 + _seconds12 + _seconds13;
      }
      return seconds;
    });
    var currency_variant = {};
    var _tmp_variants = props.campaign && props.campaign.offers && props.campaign.offers[0] && props.campaign.offers[0].product && props.campaign.offers[0].product.variants ? props.campaign.offers[0].product.variants : [];
    _tmp_variants.some(function (variant) {
      if (!Object(isOutOfStock["a" /* default */])(variant)) {
        if (props.campaign.trigger_subscription_type === "replace_with_subscription" && !variant.subscription) {
          return false;
        }
        currency_variant = variant;
        return true;
      }
      return false;
    });
    var _currency_format = "${{amount}}";
    if (props.settings && props.settings.default_money_format) {
      _currency_format = props.settings.default_money_format;
    }
    if (props.currency && props.settings && props.currency != props.settings.default_currency && currencies["a" /* default */][props.currency]) {
      _currency_format = currencies["a" /* default */][props.currency].money_format;
    }
    _this.state = {
      active_offer: 0,
      history_offer: 0,
      currency_format: _currency_format,
      data: {
        campaign_id: props.campaign._id || "",
        offers: props.isPreview ? [1] : [],
        show_this_funnel_once: props.campaign.show_this_funnel_once
      },
      variant: currency_variant,
      initialVariant: currency_variant,
      moneyFormatForce: "",
      quantity: _this.getQuantity(props.campaign, 0),
      maxTime: _this._getSeconds(),
      startTime: new Date().getTime(),
      minimized: props.minimized,
      hideCountDownTimerItems: {},
      hideGoToCheckout: false,
      showDiscountCode: false,
      funnelTotalPrice: 0,
      funnelTotalPriceWithoutDiscount: 0,
      properties: {},
      customFieldErrors: {},
      upsell_amount: 0
    };
    _this.state.variant = _this.getVariantCurrency(currency_variant);
    if (props.campaign && props.campaign.offers) {
      props.campaign.offers.forEach(function (offer, index) {
        _this.state.hideCountDownTimerItems["offer_".concat(index)] = false;
      });
    }
    if (Object(esm_typeof["a" /* default */])(props.active_offer_force) !== undefined && props.campaign && props.campaign.offers.length - 1 >= props.active_offer_force) {
      var _firstVariant = {};
      if (props.campaign) {
        _firstVariant = _this.props.declinedOfferWasChanged ? props.campaign.offers[props.active_offer_force].declinedOffer.product.variants[0] : props.campaign.offers[props.active_offer_force].product.variants[0];
      }
      _this.state.variant = _this.getVariantCurrency(_firstVariant);
      _this.state.active_offer = props.active_offer_force;
      _this.state.history_offer = props.active_offer_force;
      _this.state.declined = _this.props.declinedOfferWasChanged;
      _this.state.initialVariant = _firstVariant;
      _this.state.quantity = _this.getQuantity(props.campaign, props.active_offer_force, _this.props.declinedOfferWasChanged);
    }
    return _this;
  }
  Object(createClass["a" /* default */])(WidgetComponent, [{
    key: "componentWillReceiveProps",
    value: function componentWillReceiveProps(nextProps) {
      var _this2 = this;
      var _this$state9 = this.state,
        active_offer = _this$state9.active_offer,
        declined = _this$state9.declined;
      if (nextProps.isCampaign) {
        this.setState({
          variant: declined ? nextProps.campaign && nextProps.campaign.offers && nextProps.campaign.offers[active_offer] && nextProps.campaign.offers[active_offer].declinedOffer && nextProps.campaign.offers[active_offer].declinedOffer.product ? nextProps.campaign.offers[active_offer].declinedOffer.product.variants[0] : {} : nextProps.campaign && nextProps.campaign.offers && nextProps.campaign.offers[active_offer] ? nextProps.campaign.offers[active_offer].product.variants[0] : {}
        }, function () {
          if (Object(esm_typeof["a" /* default */])(nextProps.active_offer_force) !== undefined) {
            _this2.goToOffer(nextProps.active_offer_force);
          }
        });
      }
      if (nextProps.isPreview) {
        var settings = nextProps.settings;
        var _ref7 = settings && settings.design && settings.design.theme || {},
          countdown_timer = _ref7.countdown_timer;
        var _seconds5 = 0;
        if (Array.isArray(countdown_timer.start_countdown_from)) {
          var _seconds6 = !isNaN(parseFloat(countdown_timer.start_countdown_from[0])) ? parseFloat(countdown_timer.start_countdown_from[0]) * 600 : 0;
          var _seconds7 = !isNaN(parseFloat(countdown_timer.start_countdown_from[1])) ? parseFloat(countdown_timer.start_countdown_from[1]) * 60 : 0;
          var _seconds8 = !isNaN(parseFloat(countdown_timer.start_countdown_from[2])) ? parseFloat(countdown_timer.start_countdown_from[2]) * 10 : 0;
          var _seconds9 = !isNaN(parseFloat(countdown_timer.start_countdown_from[3])) ? parseFloat(countdown_timer.start_countdown_from[3]) : 0;
          _seconds5 = _seconds6 + _seconds7 + _seconds8 + _seconds9;
        }
        this.setState({
          minimized: nextProps.minimized,
          maxTime: _seconds5
        });
      } else {
        this.setState({
          minimized: nextProps.minimized
        });
      }
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this3 = this;
      var _this$props9 = this.props,
        conversionBearUpsell = _this$props9.conversionBearUpsell,
        appEvent = _this$props9.appEvent;
      if (conversionBearUpsell && conversionBearUpsell.onLoaded && typeof conversionBearUpsell.onLoaded === "function") {
        conversionBearUpsell.onLoaded();
      }
      if (appEvent) {
        appEvent.listen("conversionBearAutoCurrencyConverter:updated", function (data) {
          _this3.setState({
            variant: _this3.getVariantCurrency(_this3.state.initialVariant)
          });
        });
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this$props10 = this.props,
        settings = _this$props10.settings,
        campaign = _this$props10.campaign,
        isMobile = _this$props10.isMobile,
        isPreview = _this$props10.isPreview,
        setCountDownTimerAnimate = _this$props10.setCountDownTimerAnimate,
        containerHeight = _this$props10.containerHeight,
        pageToShow = _this$props10.pageToShow,
        isCartPage = _this$props10.isCartPage,
        isDesktopView = _this$props10.isDesktopView,
        isShowBrand = _this$props10.isShowBrand,
        url = _this$props10.url,
        shop = _this$props10.shop,
        designDiscount = _this$props10.designDiscount,
        setWidgetHeightOnInputBlur = _this$props10.setWidgetHeightOnInputBlur,
        Widget = _this$props10.Widget;
      var _this$state10 = this.state,
        properties = _this$state10.properties,
        customFieldErrors = _this$state10.customFieldErrors,
        active_offer = _this$state10.active_offer,
        currency_format = _this$state10.currency_format,
        data = _this$state10.data,
        variant = _this$state10.variant,
        quantity = _this$state10.quantity,
        moneyFormatForce = _this$state10.moneyFormatForce,
        minimized = _this$state10.minimized,
        history_offer = _this$state10.history_offer,
        hideCountDownTimerItems = _this$state10.hideCountDownTimerItems,
        hideGoToCheckout = _this$state10.hideGoToCheckout,
        showDiscountCode = _this$state10.showDiscountCode,
        funnelTotalPrice = _this$state10.funnelTotalPrice,
        funnelTotalPriceWithoutDiscount = _this$state10.funnelTotalPriceWithoutDiscount,
        loadingButton = _this$state10.loadingButton;
      var settings_theme = settings && settings.design && settings.design.theme || {};
      var offer = this.state.declined ? campaign.offers[active_offer].declinedOffer : campaign.offers[active_offer];
      if (offer && offer.outOfStock && !loadingButton) {
        if (campaign.offers.length <= active_offer + 1) {
          this.skipOffers();
        } else {
          this.nextOffer();
        }
      }
      var page_to_show = "thankyou_page";
      if (pageToShow) {
        page_to_show = pageToShow;
      } else {
        page_to_show = campaign.page_to_show;
      }
      return __jsx(compat_module["default"].Fragment, null, __jsx(WidgetComponent_GlobalStyle, null), __jsx(WidgetParams["a" /* WidgetParamsContext */].Provider, {
        value: {
          settings: settings,
          theme: settings_theme,
          isPreview: isPreview,
          isDesktopView: isDesktopView,
          isShowBrand: isShowBrand,
          currencyFormat: moneyFormatForce || currency_format
        }
      }, __jsx(Widget, {
        settings: settings,
        isDesktopView: isDesktopView,
        isPreview: isPreview,
        settings_theme: settings_theme,
        campaign: campaign,
        offer: offer,
        active_offer: active_offer,
        currency_format: moneyFormatForce || currency_format,
        data: data,
        goToCheckout: this.goToCheckout,
        variant: variant,
        quantity: this.setQuantity(campaign, active_offer, this.state.declined, quantity),
        onChangeVariant: this.onChangeVariant,
        onChangeQuantity: this.onChangeQuantity,
        nextOffer: this.nextOffer,
        addOffer: this.addOffer,
        prevOffer: this.prevOffer,
        maxTime: this.state.maxTime,
        startTime: this.state.startTime,
        minimized: minimized,
        setMinimized: this.setMinimized,
        isMobile: isMobile,
        isCartPage: isCartPage,
        history_offer: history_offer,
        goToOffer: this.goToOffer,
        hideCountDownTimerItems: hideCountDownTimerItems,
        setItemHideCountDownTimer: this.setItemHideCountDownTimer,
        setCountDownTimerAnimate: setCountDownTimerAnimate,
        containerHeight: containerHeight,
        hideGoToCheckout: hideGoToCheckout,
        setHideGoToCheckout: this.setHideGoToCheckout,
        pageToShow: page_to_show,
        isShowBrand: isShowBrand,
        showDiscountCode: showDiscountCode,
        url: url,
        shop: shop,
        setAdditionalDiscount: this.setAdditionalDiscount,
        funnelTotalPrice: funnelTotalPrice,
        funnelTotalPriceWithoutDiscount: funnelTotalPriceWithoutDiscount,
        closeDiscountBlock: this.closeDiscountBlock,
        designDiscount: designDiscount,
        onChangeProperties: this.onChangeProperties,
        customFieldErrors: customFieldErrors,
        properties: properties[active_offer],
        loadingButton: loadingButton,
        setUpsellAmount: this.setUpsellAmount,
        setWidgetHeightOnInputBlur: setWidgetHeightOnInputBlur
      })));
    }
  }]);
  return WidgetComponent;
}(compat_module["Component"]);
/* harmony default export */ var components_WidgetComponent_WidgetComponent = __webpack_exports__["a"] = (WidgetComponent_WidgetComponent);

/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {

var _slicedToArray = __webpack_require__(89);
var _asyncToGenerator = __webpack_require__(94);
var _typeof = __webpack_require__(9);
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = function __export(target, all) {
  for (var name in all) {
    __defProp(target, name, {
      get: all[name],
      enumerable: true
    });
  }
};
var __copyProps = function __copyProps(to, from, except, desc) {
  if (from && _typeof(from) === "object" || typeof from === "function") {
    var _iterator = _createForOfIteratorHelper(__getOwnPropNames(from)),
      _step;
    try {
      var _loop = function _loop() {
        var key = _step.value;
        if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
          get: function get() {
            return from[key];
          },
          enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
        });
      };
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        _loop();
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
  }
  return to;
};
var __toESM = function __toESM(mod, isNodeMode, target) {
  return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
    value: mod,
    enumerable: true
  }) : target, mod);
};
var __toCommonJS = function __toCommonJS(mod) {
  return __copyProps(__defProp({}, "__esModule", {
    value: true
  }), mod);
};
var utils_exports = {};
__export(utils_exports, {
  callPlayer: function callPlayer() {
    return _callPlayer;
  },
  getConfig: function getConfig() {
    return _getConfig;
  },
  getSDK: function getSDK() {
    return _getSDK;
  },
  isBlobUrl: function isBlobUrl() {
    return _isBlobUrl;
  },
  isMediaStream: function isMediaStream() {
    return _isMediaStream;
  },
  lazy: function lazy() {
    return _lazy;
  },
  omit: function omit() {
    return _omit;
  },
  parseEndTime: function parseEndTime() {
    return _parseEndTime;
  },
  parseStartTime: function parseStartTime() {
    return _parseStartTime;
  },
  queryString: function queryString() {
    return _queryString;
  },
  randomString: function randomString() {
    return _randomString;
  },
  supportsWebKitPresentationMode: function supportsWebKitPresentationMode() {
    return _supportsWebKitPresentationMode;
  }
});
module.exports = __toCommonJS(utils_exports);
var import_react = __toESM(__webpack_require__(0));
var import_load_script = __toESM(__webpack_require__(111));
var import_deepmerge = __toESM(__webpack_require__(52));
var _lazy = function _lazy(componentImportFn) {
  return import_react["default"].lazy( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
    var obj;
    return _regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            _context.next = 2;
            return componentImportFn();
          case 2:
            obj = _context.sent;
            return _context.abrupt("return", typeof obj["default"] === "function" ? obj : obj["default"]);
          case 4:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  })));
};
var MATCH_START_QUERY = /[?&#](?:start|t)=([0-9hms]+)/;
var MATCH_END_QUERY = /[?&#]end=([0-9hms]+)/;
var MATCH_START_STAMP = /(\d+)(h|m|s)/g;
var MATCH_NUMERIC = /^\d+$/;
function parseTimeParam(url, pattern) {
  if (url instanceof Array) {
    return void 0;
  }
  var match = url.match(pattern);
  if (match) {
    var _stamp = match[1];
    if (_stamp.match(MATCH_START_STAMP)) {
      return parseTimeString(_stamp);
    }
    if (MATCH_NUMERIC.test(_stamp)) {
      return parseInt(_stamp);
    }
  }
  return void 0;
}
function parseTimeString(stamp) {
  var seconds = 0;
  var array = MATCH_START_STAMP.exec(stamp);
  while (array !== null) {
    var _array = array,
      _array2 = _slicedToArray(_array, 3),
      count = _array2[1],
      period = _array2[2];
    if (period === "h") seconds += parseInt(count, 10) * 60 * 60;
    if (period === "m") seconds += parseInt(count, 10) * 60;
    if (period === "s") seconds += parseInt(count, 10);
    array = MATCH_START_STAMP.exec(stamp);
  }
  return seconds;
}
function _parseStartTime(url) {
  return parseTimeParam(url, MATCH_START_QUERY);
}
function _parseEndTime(url) {
  return parseTimeParam(url, MATCH_END_QUERY);
}
function _randomString() {
  return Math.random().toString(36).substr(2, 5);
}
function _queryString(object) {
  return Object.keys(object).map(function (key) {
    return "".concat(key, "=").concat(object[key]);
  }).join("&");
}
function getGlobal(key) {
  if (window[key]) {
    return window[key];
  }
  if (window.exports && window.exports[key]) {
    return window.exports[key];
  }
  if (window.module && window.module.exports && window.module.exports[key]) {
    return window.module.exports[key];
  }
  return null;
}
var requests = {};
var _getSDK = enableStubOn(function getSDK2(url, sdkGlobal) {
  var sdkReady = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  var isLoaded = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {
    return true;
  };
  var fetchScript = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : import_load_script["default"];
  var existingGlobal = getGlobal(sdkGlobal);
  if (existingGlobal && isLoaded(existingGlobal)) {
    return Promise.resolve(existingGlobal);
  }
  return new Promise(function (resolve, reject) {
    if (requests[url]) {
      requests[url].push({
        resolve: resolve,
        reject: reject
      });
      return;
    }
    requests[url] = [{
      resolve: resolve,
      reject: reject
    }];
    var onLoaded = function onLoaded(sdk) {
      requests[url].forEach(function (request) {
        return request.resolve(sdk);
      });
    };
    if (sdkReady) {
      var _previousOnReady = window[sdkReady];
      window[sdkReady] = function () {
        if (_previousOnReady) _previousOnReady();
        onLoaded(getGlobal(sdkGlobal));
      };
    }
    fetchScript(url, function (err) {
      if (err) {
        requests[url].forEach(function (request) {
          return request.reject(err);
        });
        requests[url] = null;
      } else if (!sdkReady) {
        onLoaded(getGlobal(sdkGlobal));
      }
    });
  });
});
function _getConfig(props, defaultProps) {
  return (0, import_deepmerge["default"])(defaultProps.config, props.config);
}
function _omit(object) {
  var _ref2;
  for (var _len = arguments.length, arrays = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    arrays[_key - 1] = arguments[_key];
  }
  var omitKeys = (_ref2 = []).concat.apply(_ref2, arrays);
  var output = {};
  var keys = Object.keys(object);
  for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
    var _key2 = _keys[_i];
    if (omitKeys.indexOf(_key2) === -1) {
      output[_key2] = object[_key2];
    }
  }
  return output;
}
function _callPlayer(method) {
  var _this$player;
  if (!this.player || !this.player[method]) {
    var _message = "ReactPlayer: ".concat(this.constructor.displayName, " player could not call %c").concat(method, "%c \u2013 ");
    if (!this.player) {
      _message += "The player was not available";
    } else if (!this.player[method]) {
      _message += "The method was not available";
    }
    console.warn(_message, "font-weight: bold", "");
    return null;
  }
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key3 = 1; _key3 < _len2; _key3++) {
    args[_key3 - 1] = arguments[_key3];
  }
  return (_this$player = this.player)[method].apply(_this$player, args);
}
function _isMediaStream(url) {
  return typeof window !== "undefined" && typeof window.MediaStream !== "undefined" && url instanceof window.MediaStream;
}
function _isBlobUrl(url) {
  return /^blob:/.test(url);
}
function _supportsWebKitPresentationMode() {
  var video = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.createElement("video");
  var notMobile = /iPhone|iPod/.test(navigator.userAgent) === false;
  return video.webkitSupportsPresentationMode && typeof video.webkitSetPresentationMode === "function" && notMobile;
}
function enableStubOn(fn) {
  if (false) { var _wrap; }
  return fn;
}

/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(9);
/* global define */

(function (root, pluralize) {
  /* istanbul ignore else */
  if ( true && ( false ? undefined : _typeof(exports)) === 'object' && ( false ? undefined : _typeof(module)) === 'object') {
    // Node.
    module.exports = pluralize();
  } else if (true) {
    // AMD, registers as an anonymous module.
    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
      return pluralize();
    }).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else {}
})(this, function () {
  // Rule storage - pluralize and singularize need to be run sequentially,
  // while other rules can be optimized using an object for instant lookups.
  var pluralRules = [];
  var singularRules = [];
  var uncountables = {};
  var irregularPlurals = {};
  var irregularSingles = {};

  /**
   * Sanitize a pluralization rule to a usable regular expression.
   *
   * @param  {(RegExp|string)} rule
   * @return {RegExp}
   */
  function sanitizeRule(rule) {
    if (typeof rule === 'string') {
      return new RegExp('^' + rule + '$', 'i');
    }
    return rule;
  }

  /**
   * Pass in a word token to produce a function that can replicate the case on
   * another word.
   *
   * @param  {string}   word
   * @param  {string}   token
   * @return {Function}
   */
  function restoreCase(word, token) {
    // Tokens are an exact match.
    if (word === token) return token;

    // Lower cased words. E.g. "hello".
    if (word === word.toLowerCase()) return token.toLowerCase();

    // Upper cased words. E.g. "WHISKY".
    if (word === word.toUpperCase()) return token.toUpperCase();

    // Title cased words. E.g. "Title".
    if (word[0] === word[0].toUpperCase()) {
      return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
    }

    // Lower cased words. E.g. "test".
    return token.toLowerCase();
  }

  /**
   * Interpolate a regexp string.
   *
   * @param  {string} str
   * @param  {Array}  args
   * @return {string}
   */
  function interpolate(str, args) {
    return str.replace(/\$(\d{1,2})/g, function (match, index) {
      return args[index] || '';
    });
  }

  /**
   * Replace a word using a rule.
   *
   * @param  {string} word
   * @param  {Array}  rule
   * @return {string}
   */
  function replace(word, rule) {
    return word.replace(rule[0], function (match, index) {
      var result = interpolate(rule[1], arguments);
      if (match === '') {
        return restoreCase(word[index - 1], result);
      }
      return restoreCase(match, result);
    });
  }

  /**
   * Sanitize a word by passing in the word and sanitization rules.
   *
   * @param  {string}   token
   * @param  {string}   word
   * @param  {Array}    rules
   * @return {string}
   */
  function sanitizeWord(token, word, rules) {
    // Empty string or doesn't need fixing.
    if (!token.length || uncountables.hasOwnProperty(token)) {
      return word;
    }
    var len = rules.length;

    // Iterate over the sanitization rules and use the first one to match.
    while (len--) {
      var rule = rules[len];
      if (rule[0].test(word)) return replace(word, rule);
    }
    return word;
  }

  /**
   * Replace a word with the updated word.
   *
   * @param  {Object}   replaceMap
   * @param  {Object}   keepMap
   * @param  {Array}    rules
   * @return {Function}
   */
  function replaceWord(replaceMap, keepMap, rules) {
    return function (word) {
      // Get the correct token and case restoration functions.
      var token = word.toLowerCase();

      // Check against the keep object map.
      if (keepMap.hasOwnProperty(token)) {
        return restoreCase(word, token);
      }

      // Check against the replacement map for a direct word replacement.
      if (replaceMap.hasOwnProperty(token)) {
        return restoreCase(word, replaceMap[token]);
      }

      // Run all the rules against the word.
      return sanitizeWord(token, word, rules);
    };
  }

  /**
   * Check if a word is part of the map.
   */
  function checkWord(replaceMap, keepMap, rules, bool) {
    return function (word) {
      var token = word.toLowerCase();
      if (keepMap.hasOwnProperty(token)) return true;
      if (replaceMap.hasOwnProperty(token)) return false;
      return sanitizeWord(token, token, rules) === token;
    };
  }

  /**
   * Pluralize or singularize a word based on the passed in count.
   *
   * @param  {string}  word      The word to pluralize
   * @param  {number}  count     How many of the word exist
   * @param  {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks)
   * @return {string}
   */
  function pluralize(word, count, inclusive) {
    var pluralized = count === 1 ? pluralize.singular(word) : pluralize.plural(word);
    return (inclusive ? count + ' ' : '') + pluralized;
  }

  /**
   * Pluralize a word.
   *
   * @type {Function}
   */
  pluralize.plural = replaceWord(irregularSingles, irregularPlurals, pluralRules);

  /**
   * Check if a word is plural.
   *
   * @type {Function}
   */
  pluralize.isPlural = checkWord(irregularSingles, irregularPlurals, pluralRules);

  /**
   * Singularize a word.
   *
   * @type {Function}
   */
  pluralize.singular = replaceWord(irregularPlurals, irregularSingles, singularRules);

  /**
   * Check if a word is singular.
   *
   * @type {Function}
   */
  pluralize.isSingular = checkWord(irregularPlurals, irregularSingles, singularRules);

  /**
   * Add a pluralization rule to the collection.
   *
   * @param {(string|RegExp)} rule
   * @param {string}          replacement
   */
  pluralize.addPluralRule = function (rule, replacement) {
    pluralRules.push([sanitizeRule(rule), replacement]);
  };

  /**
   * Add a singularization rule to the collection.
   *
   * @param {(string|RegExp)} rule
   * @param {string}          replacement
   */
  pluralize.addSingularRule = function (rule, replacement) {
    singularRules.push([sanitizeRule(rule), replacement]);
  };

  /**
   * Add an uncountable word rule.
   *
   * @param {(string|RegExp)} word
   */
  pluralize.addUncountableRule = function (word) {
    if (typeof word === 'string') {
      uncountables[word.toLowerCase()] = true;
      return;
    }

    // Set singular and plural references for the word.
    pluralize.addPluralRule(word, '$0');
    pluralize.addSingularRule(word, '$0');
  };

  /**
   * Add an irregular word definition.
   *
   * @param {string} single
   * @param {string} plural
   */
  pluralize.addIrregularRule = function (single, plural) {
    plural = plural.toLowerCase();
    single = single.toLowerCase();
    irregularSingles[single] = plural;
    irregularPlurals[plural] = single;
  };

  /**
   * Irregular rules.
   */
  [
  // Pronouns.
  ['I', 'we'], ['me', 'us'], ['he', 'they'], ['she', 'they'], ['them', 'them'], ['myself', 'ourselves'], ['yourself', 'yourselves'], ['itself', 'themselves'], ['herself', 'themselves'], ['himself', 'themselves'], ['themself', 'themselves'], ['is', 'are'], ['was', 'were'], ['has', 'have'], ['this', 'these'], ['that', 'those'],
  // Words ending in with a consonant and `o`.
  ['echo', 'echoes'], ['dingo', 'dingoes'], ['volcano', 'volcanoes'], ['tornado', 'tornadoes'], ['torpedo', 'torpedoes'],
  // Ends with `us`.
  ['genus', 'genera'], ['viscus', 'viscera'],
  // Ends with `ma`.
  ['stigma', 'stigmata'], ['stoma', 'stomata'], ['dogma', 'dogmata'], ['lemma', 'lemmata'], ['schema', 'schemata'], ['anathema', 'anathemata'],
  // Other irregular rules.
  ['ox', 'oxen'], ['axe', 'axes'], ['die', 'dice'], ['yes', 'yeses'], ['foot', 'feet'], ['eave', 'eaves'], ['goose', 'geese'], ['tooth', 'teeth'], ['quiz', 'quizzes'], ['human', 'humans'], ['proof', 'proofs'], ['carve', 'carves'], ['valve', 'valves'], ['looey', 'looies'], ['thief', 'thieves'], ['groove', 'grooves'], ['pickaxe', 'pickaxes'], ['passerby', 'passersby']].forEach(function (rule) {
    return pluralize.addIrregularRule(rule[0], rule[1]);
  });

  /**
   * Pluralization rules.
   */
  [[/s?$/i, 's'], [/[^\u0000-\u007F]$/i, '$0'], [/([^aeiou]ese)$/i, '$1'], [/(ax|test)is$/i, '$1es'], [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'], [/(e[mn]u)s?$/i, '$1s'], [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'], [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'], [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'], [/(seraph|cherub)(?:im)?$/i, '$1im'], [/(her|at|gr)o$/i, '$1oes'], [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'], [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'], [/sis$/i, 'ses'], [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'], [/([^aeiouy]|qu)y$/i, '$1ies'], [/([^ch][ieo][ln])ey$/i, '$1ies'], [/(x|ch|ss|sh|zz)$/i, '$1es'], [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'], [/\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'], [/(pe)(?:rson|ople)$/i, '$1ople'], [/(child)(?:ren)?$/i, '$1ren'], [/eaux$/i, '$0'], [/m[ae]n$/i, 'men'], ['thou', 'you']].forEach(function (rule) {
    return pluralize.addPluralRule(rule[0], rule[1]);
  });

  /**
   * Singularization rules.
   */
  [[/s$/i, ''], [/(ss)$/i, '$1'], [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, '$1fe'], [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'], [/ies$/i, 'y'], [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'], [/\b(mon|smil)ies$/i, '$1ey'], [/\b((?:tit)?m|l)ice$/i, '$1ouse'], [/(seraph|cherub)im$/i, '$1'], [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, '$1'], [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, '$1sis'], [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'], [/(test)(?:is|es)$/i, '$1is'], [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'], [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'], [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'], [/(alumn|alg|vertebr)ae$/i, '$1a'], [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'], [/(matr|append)ices$/i, '$1ix'], [/(pe)(rson|ople)$/i, '$1rson'], [/(child)ren$/i, '$1'], [/(eau)x?$/i, '$1'], [/men$/i, 'man']].forEach(function (rule) {
    return pluralize.addSingularRule(rule[0], rule[1]);
  });

  /**
   * Uncountable rules.
   */
  [
  // Singular words with no plurals.
  'adulthood', 'advice', 'agenda', 'aid', 'aircraft', 'alcohol', 'ammo', 'analytics', 'anime', 'athletics', 'audio', 'bison', 'blood', 'bream', 'buffalo', 'butter', 'carp', 'cash', 'chassis', 'chess', 'clothing', 'cod', 'commerce', 'cooperation', 'corps', 'debris', 'diabetes', 'digestion', 'elk', 'energy', 'equipment', 'excretion', 'expertise', 'firmware', 'flounder', 'fun', 'gallows', 'garbage', 'graffiti', 'hardware', 'headquarters', 'health', 'herpes', 'highjinks', 'homework', 'housework', 'information', 'jeans', 'justice', 'kudos', 'labour', 'literature', 'machinery', 'mackerel', 'mail', 'media', 'mews', 'moose', 'music', 'mud', 'manga', 'news', 'only', 'personnel', 'pike', 'plankton', 'pliers', 'police', 'pollution', 'premises', 'rain', 'research', 'rice', 'salmon', 'scissors', 'series', 'sewage', 'shambles', 'shrimp', 'software', 'species', 'staff', 'swine', 'tennis', 'traffic', 'transportation', 'trout', 'tuna', 'wealth', 'welfare', 'whiting', 'wildebeest', 'wildlife', 'you', /pok[eé]mon$/i,
  // Regexes.
  /[^aeiou]ese$/i,
  // "chinese", "japanese"
  /deer$/i,
  // "deer", "reindeer"
  /fish$/i,
  // "fish", "blowfish", "angelfish"
  /measles$/i, /o[iu]s$/i,
  // "carnivorous"
  /pox$/i,
  // "chickpox", "smallpox"
  /sheep$/i].forEach(pluralize.addUncountableRule);
  return pluralize;
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(28)(module)))

/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {

var _typeof = __webpack_require__(9);
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = function __export(target, all) {
  for (var name in all) {
    __defProp(target, name, {
      get: all[name],
      enumerable: true
    });
  }
};
var __copyProps = function __copyProps(to, from, except, desc) {
  if (from && _typeof(from) === "object" || typeof from === "function") {
    var _iterator = _createForOfIteratorHelper(__getOwnPropNames(from)),
      _step;
    try {
      var _loop = function _loop() {
        var key = _step.value;
        if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
          get: function get() {
            return from[key];
          },
          enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
        });
      };
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        _loop();
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
  }
  return to;
};
var __toESM = function __toESM(mod, isNodeMode, target) {
  return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
    value: mod,
    enumerable: true
  }) : target, mod);
};
var __toCommonJS = function __toCommonJS(mod) {
  return __copyProps(__defProp({}, "__esModule", {
    value: true
  }), mod);
};
var src_exports = {};
__export(src_exports, {
  "default": function _default() {
    return src_default;
  }
});
module.exports = __toCommonJS(src_exports);
var import_players = __toESM(__webpack_require__(107));
var import_ReactPlayer = __webpack_require__(112);
var fallback = import_players["default"][import_players["default"].length - 1];
var src_default = (0, import_ReactPlayer.createReactPlayer)(import_players["default"], fallback);

/***/ }),
/* 66 */
/***/ (function(module, exports) {

function _assertThisInitialized(self) {
  if (self === void 0) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }
  return self;
}
module.exports = _assertThisInitialized;

/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _default = function _default(position, metric, axis) {
  var positionPercent = position === 0 ? position : position + metric;
  var positionCss = axis === 'horizontal' ? [positionPercent, 0, 0] : [0, positionPercent, 0];
  var transitionProp = 'translate3d';
  var translatedPosition = '(' + positionCss.join(',') + ')';
  return transitionProp + translatedPosition;
};
exports["default"] = _default;

/***/ }),
/* 68 */
/***/ (function(module, exports) {

function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}
module.exports = _defineProperty;

/***/ }),
/* 69 */
/***/ (function(module, exports) {

function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}
module.exports = _classCallCheck;

/***/ }),
/* 70 */
/***/ (function(module, exports) {

function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    var descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}
function _createClass(Constructor, protoProps, staticProps) {
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  if (staticProps) _defineProperties(Constructor, staticProps);
  return Constructor;
}
module.exports = _createClass;

/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {

var setPrototypeOf = __webpack_require__(113);
function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function");
  }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      writable: true,
      configurable: true
    }
  });
  if (superClass) setPrototypeOf(subClass, superClass);
}
module.exports = _inherits;

/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {

var _typeof = __webpack_require__(9);
var assertThisInitialized = __webpack_require__(66);
function _possibleConstructorReturn(self, call) {
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
    return call;
  }
  return assertThisInitialized(self);
}
module.exports = _possibleConstructorReturn;

/***/ }),
/* 73 */
/***/ (function(module, exports) {

function _getPrototypeOf(o) {
  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  };
  return _getPrototypeOf(o);
}
module.exports = _getPrototypeOf;

/***/ }),
/* 74 */,
/* 75 */
/***/ (function(module, exports) {

function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;
  for (var i = 0, arr2 = new Array(len); i < len; i++) {
    arr2[i] = arr[i];
  }
  return arr2;
}
module.exports = _arrayLikeToArray;

/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {

var arrayLikeToArray = __webpack_require__(75);
function _unsupportedIterableToArray(o, minLen) {
  if (!o) return;
  if (typeof o === "string") return arrayLikeToArray(o, minLen);
  var n = Object.prototype.toString.call(o).slice(8, -1);
  if (n === "Object" && o.constructor) n = o.constructor.name;
  if (n === "Map" || n === "Set") return Array.from(o);
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
}
module.exports = _unsupportedIterableToArray;

/***/ }),
/* 77 */
/***/ (function(module, exports) {

/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
module.exports = __webpack_amd_options__;

/* WEBPACK VAR INJECTION */}.call(this, {}))

/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(102)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (exports, _reactSwipe) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  var _reactSwipe2 = _interopRequireDefault(_reactSwipe);
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
      "default": obj
    };
  }
  exports["default"] = _reactSwipe2["default"];
});

/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _classnames = _interopRequireDefault(__webpack_require__(36));
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}
var _default = {
  ROOT: function ROOT(customClassName) {
    return (0, _classnames["default"])(_defineProperty({
      'carousel-root': true
    }, customClassName || '', !!customClassName));
  },
  CAROUSEL: function CAROUSEL(isSlider) {
    return (0, _classnames["default"])({
      carousel: true,
      'carousel-slider': isSlider
    });
  },
  WRAPPER: function WRAPPER(isSlider, axis) {
    return (0, _classnames["default"])({
      'thumbs-wrapper': !isSlider,
      'slider-wrapper': isSlider,
      'axis-horizontal': axis === 'horizontal',
      'axis-vertical': axis !== 'horizontal'
    });
  },
  SLIDER: function SLIDER(isSlider, isSwiping) {
    return (0, _classnames["default"])({
      thumbs: !isSlider,
      slider: isSlider,
      animated: !isSwiping
    });
  },
  ITEM: function ITEM(isSlider, selected, previous) {
    return (0, _classnames["default"])({
      thumb: !isSlider,
      slide: isSlider,
      selected: selected,
      previous: previous
    });
  },
  ARROW_PREV: function ARROW_PREV(disabled) {
    return (0, _classnames["default"])({
      'control-arrow control-prev': true,
      'control-disabled': disabled
    });
  },
  ARROW_NEXT: function ARROW_NEXT(disabled) {
    return (0, _classnames["default"])({
      'control-arrow control-next': true,
      'control-disabled': disabled
    });
  },
  DOT: function DOT(selected) {
    return (0, _classnames["default"])({
      dot: true,
      selected: selected
    });
  }
};
exports["default"] = _default;

/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(__webpack_require__(0));
var _cssClasses = _interopRequireDefault(__webpack_require__(79));
var _dimensions = __webpack_require__(103);
var _CSSTranslate = _interopRequireDefault(__webpack_require__(67));
var _reactEasySwipe = _interopRequireDefault(__webpack_require__(78));
var _window = _interopRequireDefault(__webpack_require__(81));
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}
function _getRequireWildcardCache() {
  if (typeof WeakMap !== "function") return null;
  var cache = new WeakMap();
  _getRequireWildcardCache = function _getRequireWildcardCache() {
    return cache;
  };
  return cache;
}
function _interopRequireWildcard(obj) {
  if (obj && obj.__esModule) {
    return obj;
  }
  if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
    return {
      "default": obj
    };
  }
  var cache = _getRequireWildcardCache();
  if (cache && cache.has(obj)) {
    return cache.get(obj);
  }
  var newObj = {};
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  for (var key in obj) {
    if (Object.prototype.hasOwnProperty.call(obj, key)) {
      var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
      if (desc && (desc.get || desc.set)) {
        Object.defineProperty(newObj, key, desc);
      } else {
        newObj[key] = obj[key];
      }
    }
  }
  newObj["default"] = obj;
  if (cache) {
    cache.set(obj, newObj);
  }
  return newObj;
}
function _typeof(obj) {
  "@babel/helpers - typeof";

  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
    _typeof = function _typeof(obj) {
      return typeof obj;
    };
  } else {
    _typeof = function _typeof(obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };
  }
  return _typeof(obj);
}
function _extends() {
  _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  return _extends.apply(this, arguments);
}
function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}
function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    var descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}
function _createClass(Constructor, protoProps, staticProps) {
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  if (staticProps) _defineProperties(Constructor, staticProps);
  return Constructor;
}
function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function");
  }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      writable: true,
      configurable: true
    }
  });
  if (superClass) _setPrototypeOf(subClass, superClass);
}
function _setPrototypeOf(o, p) {
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
  };
  return _setPrototypeOf(o, p);
}
function _createSuper(Derived) {
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
  return function _createSuperInternal() {
    var Super = _getPrototypeOf(Derived),
      result;
    if (hasNativeReflectConstruct) {
      var NewTarget = _getPrototypeOf(this).constructor;
      result = Reflect.construct(Super, arguments, NewTarget);
    } else {
      result = Super.apply(this, arguments);
    }
    return _possibleConstructorReturn(this, result);
  };
}
function _possibleConstructorReturn(self, call) {
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
    return call;
  }
  return _assertThisInitialized(self);
}
function _assertThisInitialized(self) {
  if (self === void 0) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }
  return self;
}
function _isNativeReflectConstruct() {
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  if (Reflect.construct.sham) return false;
  if (typeof Proxy === "function") return true;
  try {
    Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
    return true;
  } catch (e) {
    return false;
  }
}
function _getPrototypeOf(o) {
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  };
  return _getPrototypeOf(o);
}
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}
var isKeyboardEvent = function isKeyboardEvent(e) {
  return e.hasOwnProperty('key');
};
var Thumbs = /*#__PURE__*/function (_Component) {
  _inherits(Thumbs, _Component);
  var _super = _createSuper(Thumbs);
  function Thumbs(_props) {
    var _this;
    _classCallCheck(this, Thumbs);
    _this = _super.call(this, _props);
    _defineProperty(_assertThisInitialized(_this), "itemsWrapperRef", void 0);
    _defineProperty(_assertThisInitialized(_this), "itemsListRef", void 0);
    _defineProperty(_assertThisInitialized(_this), "thumbsRef", void 0);
    _defineProperty(_assertThisInitialized(_this), "setItemsWrapperRef", function (node) {
      _this.itemsWrapperRef = node;
    });
    _defineProperty(_assertThisInitialized(_this), "setItemsListRef", function (node) {
      _this.itemsListRef = node;
    });
    _defineProperty(_assertThisInitialized(_this), "setThumbsRef", function (node, index) {
      if (!_this.thumbsRef) {
        _this.thumbsRef = [];
      }
      _this.thumbsRef[index] = node;
    });
    _defineProperty(_assertThisInitialized(_this), "updateSizes", function () {
      if (!_this.props.children || !_this.itemsWrapperRef || !_this.thumbsRef) {
        return;
      }
      var total = _react.Children.count(_this.props.children);
      var wrapperSize = _this.itemsWrapperRef.clientWidth;
      var itemSize = _this.props.thumbWidth ? _this.props.thumbWidth : (0, _dimensions.outerWidth)(_this.thumbsRef[0]);
      var visibleItems = Math.floor(wrapperSize / itemSize);
      var showArrows = visibleItems < total;
      var lastPosition = showArrows ? total - visibleItems : 0;
      _this.setState(function (_state, props) {
        return {
          itemSize: itemSize,
          visibleItems: visibleItems,
          firstItem: showArrows ? _this.getFirstItem(props.selectedItem) : 0,
          lastPosition: lastPosition,
          showArrows: showArrows
        };
      });
    });
    _defineProperty(_assertThisInitialized(_this), "handleClickItem", function (index, item, e) {
      if (!isKeyboardEvent(e) || e.key === 'Enter') {
        var handler = _this.props.onSelectItem;
        if (typeof handler === 'function') {
          handler(index, item);
        }
      }
    });
    _defineProperty(_assertThisInitialized(_this), "onSwipeStart", function () {
      _this.setState({
        swiping: true
      });
    });
    _defineProperty(_assertThisInitialized(_this), "onSwipeEnd", function () {
      _this.setState({
        swiping: false
      });
    });
    _defineProperty(_assertThisInitialized(_this), "onSwipeMove", function (delta) {
      var deltaX = delta.x;
      if (!_this.state.itemSize || !_this.itemsWrapperRef || !_this.state.visibleItems) {
        return false;
      }
      var leftBoundary = 0;
      var childrenLength = _react.Children.count(_this.props.children);
      var currentPosition = -(_this.state.firstItem * 100) / _this.state.visibleItems;
      var lastLeftItem = Math.max(childrenLength - _this.state.visibleItems, 0);
      var lastLeftBoundary = -lastLeftItem * 100 / _this.state.visibleItems; // prevent user from swiping left out of boundaries

      if (currentPosition === leftBoundary && deltaX > 0) {
        deltaX = 0;
      } // prevent user from swiping right out of boundaries

      if (currentPosition === lastLeftBoundary && deltaX < 0) {
        deltaX = 0;
      }
      var wrapperSize = _this.itemsWrapperRef.clientWidth;
      var position = currentPosition + 100 / (wrapperSize / deltaX); // if 3d isn't available we will use left to move

      if (_this.itemsListRef) {
        ['WebkitTransform', 'MozTransform', 'MsTransform', 'OTransform', 'transform', 'msTransform'].forEach(function (prop) {
          _this.itemsListRef.style[prop] = (0, _CSSTranslate["default"])(position, '%', _this.props.axis);
        });
      }
      return true;
    });
    _defineProperty(_assertThisInitialized(_this), "slideRight", function (positions) {
      _this.moveTo(_this.state.firstItem - (typeof positions === 'number' ? positions : 1));
    });
    _defineProperty(_assertThisInitialized(_this), "slideLeft", function (positions) {
      _this.moveTo(_this.state.firstItem + (typeof positions === 'number' ? positions : 1));
    });
    _defineProperty(_assertThisInitialized(_this), "moveTo", function (position) {
      // position can't be lower than 0
      position = position < 0 ? 0 : position; // position can't be higher than last postion

      position = position >= _this.state.lastPosition ? _this.state.lastPosition : position;
      _this.setState({
        firstItem: position
      });
    });
    _this.state = {
      selectedItem: _props.selectedItem,
      swiping: false,
      showArrows: false,
      firstItem: 0,
      visibleItems: 0,
      lastPosition: 0
    };
    return _this;
  }
  _createClass(Thumbs, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      this.setupThumbs();
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps) {
      if (this.props.selectedItem !== this.state.selectedItem) {
        this.setState({
          selectedItem: this.props.selectedItem,
          firstItem: this.getFirstItem(this.props.selectedItem)
        });
      }
      if (this.props.children === prevProps.children) {
        return;
      } // This will capture any size changes for arrow adjustments etc.
      // usually in the same render cycle so we don't see any flickers

      this.updateSizes();
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.destroyThumbs();
    }
  }, {
    key: "setupThumbs",
    value: function setupThumbs() {
      // as the widths are calculated, we need to resize
      // the carousel when the window is resized
      (0, _window["default"])().addEventListener('resize', this.updateSizes); // issue #2 - image loading smaller

      (0, _window["default"])().addEventListener('DOMContentLoaded', this.updateSizes); // when the component is rendered we need to calculate
      // the container size to adjust the responsive behaviour

      this.updateSizes();
    }
  }, {
    key: "destroyThumbs",
    value: function destroyThumbs() {
      // removing listeners
      (0, _window["default"])().removeEventListener('resize', this.updateSizes);
      (0, _window["default"])().removeEventListener('DOMContentLoaded', this.updateSizes);
    }
  }, {
    key: "getFirstItem",
    value: function getFirstItem(selectedItem) {
      var firstItem = selectedItem;
      if (selectedItem >= this.state.lastPosition) {
        firstItem = this.state.lastPosition;
      }
      if (selectedItem < this.state.firstItem + this.state.visibleItems) {
        firstItem = this.state.firstItem;
      }
      if (selectedItem < this.state.firstItem) {
        firstItem = selectedItem;
      }
      return firstItem;
    }
  }, {
    key: "renderItems",
    value: function renderItems() {
      var _this2 = this;
      return this.props.children.map(function (img, index) {
        var itemClass = _cssClasses["default"].ITEM(false, index === _this2.state.selectedItem);
        var thumbProps = {
          key: index,
          ref: function ref(e) {
            return _this2.setThumbsRef(e, index);
          },
          className: itemClass,
          onClick: _this2.handleClickItem.bind(_this2, index, _this2.props.children[index]),
          onKeyDown: _this2.handleClickItem.bind(_this2, index, _this2.props.children[index]),
          'aria-label': "".concat(_this2.props.labels.item, " ").concat(index + 1),
          style: {
            width: _this2.props.thumbWidth
          }
        };
        return /*#__PURE__*/_react["default"].createElement("li", _extends({}, thumbProps, {
          role: "button",
          tabIndex: 0
        }), img);
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this3 = this;
      if (!this.props.children) {
        return null;
      }
      var isSwipeable = _react.Children.count(this.props.children) > 1; // show left arrow?

      var hasPrev = this.state.showArrows && this.state.firstItem > 0; // show right arrow

      var hasNext = this.state.showArrows && this.state.firstItem < this.state.lastPosition; // obj to hold the transformations and styles

      var itemListStyles = {};
      var currentPosition = -this.state.firstItem * (this.state.itemSize || 0);
      var transformProp = (0, _CSSTranslate["default"])(currentPosition, 'px', this.props.axis);
      var transitionTime = this.props.transitionTime + 'ms';
      itemListStyles = {
        WebkitTransform: transformProp,
        MozTransform: transformProp,
        MsTransform: transformProp,
        OTransform: transformProp,
        transform: transformProp,
        msTransform: transformProp,
        WebkitTransitionDuration: transitionTime,
        MozTransitionDuration: transitionTime,
        MsTransitionDuration: transitionTime,
        OTransitionDuration: transitionTime,
        transitionDuration: transitionTime,
        msTransitionDuration: transitionTime
      };
      return /*#__PURE__*/_react["default"].createElement("div", {
        className: _cssClasses["default"].CAROUSEL(false)
      }, /*#__PURE__*/_react["default"].createElement("div", {
        className: _cssClasses["default"].WRAPPER(false),
        ref: this.setItemsWrapperRef
      }, /*#__PURE__*/_react["default"].createElement("button", {
        type: "button",
        className: _cssClasses["default"].ARROW_PREV(!hasPrev),
        onClick: function onClick() {
          return _this3.slideRight();
        },
        "aria-label": this.props.labels.leftArrow
      }), isSwipeable ? /*#__PURE__*/_react["default"].createElement(_reactEasySwipe["default"], {
        tagName: "ul",
        className: _cssClasses["default"].SLIDER(false, this.state.swiping),
        onSwipeLeft: this.slideLeft,
        onSwipeRight: this.slideRight,
        onSwipeMove: this.onSwipeMove,
        onSwipeStart: this.onSwipeStart,
        onSwipeEnd: this.onSwipeEnd,
        style: itemListStyles,
        innerRef: this.setItemsListRef,
        allowMouseEvents: this.props.emulateTouch
      }, this.renderItems()) : /*#__PURE__*/_react["default"].createElement("ul", {
        className: _cssClasses["default"].SLIDER(false, this.state.swiping),
        ref: function ref(node) {
          return _this3.setItemsListRef(node);
        },
        style: itemListStyles
      }, this.renderItems()), /*#__PURE__*/_react["default"].createElement("button", {
        type: "button",
        className: _cssClasses["default"].ARROW_NEXT(!hasNext),
        onClick: function onClick() {
          return _this3.slideLeft();
        },
        "aria-label": this.props.labels.rightArrow
      })));
    }
  }]);
  return Thumbs;
}(_react.Component);
exports["default"] = Thumbs;
_defineProperty(Thumbs, "displayName", 'Thumbs');
_defineProperty(Thumbs, "defaultProps", {
  axis: 'horizontal',
  labels: {
    leftArrow: 'previous slide / item',
    rightArrow: 'next slide / item',
    item: 'slide item'
  },
  selectedItem: 0,
  thumbWidth: 80,
  transitionTime: 350
});

/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _default = function _default() {
  return window;
};
exports["default"] = _default;

/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.setPosition = exports.getPosition = exports.isKeyboardEvent = exports.defaultStatusFormatter = exports.noop = void 0;
var _react = __webpack_require__(0);
var _CSSTranslate = _interopRequireDefault(__webpack_require__(67));
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}
var noop = function noop() {};
exports.noop = noop;
var defaultStatusFormatter = function defaultStatusFormatter(current, total) {
  return "".concat(current, " of ").concat(total);
};
exports.defaultStatusFormatter = defaultStatusFormatter;
var isKeyboardEvent = function isKeyboardEvent(e) {
  return e ? e.hasOwnProperty('key') : false;
};
/**
 * Gets the list 'position' relative to a current index
 * @param index
 */

exports.isKeyboardEvent = isKeyboardEvent;
var getPosition = function getPosition(index, props) {
  if (props.infiniteLoop) {
    // index has to be added by 1 because of the first cloned slide
    ++index;
  }
  if (index === 0) {
    return 0;
  }
  var childrenLength = _react.Children.count(props.children);
  if (props.centerMode && props.axis === 'horizontal') {
    var currentPosition = -index * props.centerSlidePercentage;
    var lastPosition = childrenLength - 1;
    if (index && (index !== lastPosition || props.infiniteLoop)) {
      currentPosition += (100 - props.centerSlidePercentage) / 2;
    } else if (index === lastPosition) {
      currentPosition += 100 - props.centerSlidePercentage;
    }
    return currentPosition;
  }
  return -index * 100;
};
/**
 * Sets the 'position' transform for sliding animations
 * @param position
 * @param forceReflow
 */

exports.getPosition = getPosition;
var setPosition = function setPosition(position, axis) {
  var style = {};
  ['WebkitTransform', 'MozTransform', 'MsTransform', 'OTransform', 'transform', 'msTransform'].forEach(function (prop) {
    // @ts-ignore
    style[prop] = (0, _CSSTranslate["default"])(position, '%', axis);
  });
  return style;
};
exports.setPosition = setPosition;

/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {

var _typeof = __webpack_require__(9);
/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */

var hasElementType = typeof Element !== 'undefined';
var hasMap = typeof Map === 'function';
var hasSet = typeof Set === 'function';
var hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;

// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js

function equal(a, b) {
  // START: fast-deep-equal es6/index.js 3.1.3
  if (a === b) return true;
  if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
    if (a.constructor !== b.constructor) return false;
    var length, i, keys;
    if (Array.isArray(a)) {
      length = a.length;
      if (length != b.length) return false;
      for (i = length; i-- !== 0;) {
        if (!equal(a[i], b[i])) return false;
      }
      return true;
    }

    // START: Modifications:
    // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code
    //    to co-exist with es5.
    // 2. Replace `for of` with es5 compliant iteration using `for`.
    //    Basically, take:
    //
    //    ```js
    //    for (i of a.entries())
    //      if (!b.has(i[0])) return false;
    //    ```
    //
    //    ... and convert to:
    //
    //    ```js
    //    it = a.entries();
    //    while (!(i = it.next()).done)
    //      if (!b.has(i.value[0])) return false;
    //    ```
    //
    //    **Note**: `i` access switches to `i.value`.
    var it;
    if (hasMap && a instanceof Map && b instanceof Map) {
      if (a.size !== b.size) return false;
      it = a.entries();
      while (!(i = it.next()).done) {
        if (!b.has(i.value[0])) return false;
      }
      it = a.entries();
      while (!(i = it.next()).done) {
        if (!equal(i.value[1], b.get(i.value[0]))) return false;
      }
      return true;
    }
    if (hasSet && a instanceof Set && b instanceof Set) {
      if (a.size !== b.size) return false;
      it = a.entries();
      while (!(i = it.next()).done) {
        if (!b.has(i.value[0])) return false;
      }
      return true;
    }
    // END: Modifications

    if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
      length = a.length;
      if (length != b.length) return false;
      for (i = length; i-- !== 0;) {
        if (a[i] !== b[i]) return false;
      }
      return true;
    }
    if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
    // START: Modifications:
    // Apply guards for `Object.create(null)` handling. See:
    // - https://github.com/FormidableLabs/react-fast-compare/issues/64
    // - https://github.com/epoberezkin/fast-deep-equal/issues/49
    if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();
    if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();
    // END: Modifications

    keys = Object.keys(a);
    length = keys.length;
    if (length !== Object.keys(b).length) return false;
    for (i = length; i-- !== 0;) {
      if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
    }
    // END: fast-deep-equal

    // START: react-fast-compare
    // custom handling for DOM elements
    if (hasElementType && a instanceof Element) return false;

    // custom handling for React/Preact
    for (i = length; i-- !== 0;) {
      if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {
        // React-specific: avoid traversing React elements' _owner
        // Preact-specific: avoid traversing Preact elements' __v and __o
        //    __v = $_original / $_vnode
        //    __o = $_owner
        // These properties contain circular references and are not needed when
        // comparing the actual elements (and not their owners)
        // .$$typeof and ._store on just reasonable markers of elements

        continue;
      }

      // all other properties should be traversed as usual
      if (!equal(a[keys[i]], b[keys[i]])) return false;
    }
    // END: react-fast-compare

    // START: fast-deep-equal
    return true;
  }
  return a !== a && b !== b;
}
// end fast-deep-equal

module.exports = function isEqual(a, b) {
  try {
    return equal(a, b);
  } catch (error) {
    if ((error.message || '').match(/stack|recursion/i)) {
      // warn on circular references, don't crash
      // browsers give this different errors name and messages:
      // chrome/safari: "RangeError", "Maximum call stack size exceeded"
      // firefox: "InternalError", too much recursion"
      // edge: "Error", "Out of stack space"
      console.warn('react-fast-compare cannot handle circular refs');
      return false;
    }
    // some other error. we should definitely know about these
    throw error;
  }
};

/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {

var _typeof = __webpack_require__(9);
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = function __export(target, all) {
  for (var name in all) {
    __defProp(target, name, {
      get: all[name],
      enumerable: true
    });
  }
};
var __copyProps = function __copyProps(to, from, except, desc) {
  if (from && _typeof(from) === "object" || typeof from === "function") {
    var _iterator = _createForOfIteratorHelper(__getOwnPropNames(from)),
      _step;
    try {
      var _loop = function _loop() {
        var key = _step.value;
        if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
          get: function get() {
            return from[key];
          },
          enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
        });
      };
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        _loop();
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
  }
  return to;
};
var __toESM = function __toESM(mod, isNodeMode, target) {
  return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
    value: mod,
    enumerable: true
  }) : target, mod);
};
var __toCommonJS = function __toCommonJS(mod) {
  return __copyProps(__defProp({}, "__esModule", {
    value: true
  }), mod);
};
var props_exports = {};
__export(props_exports, {
  defaultProps: function defaultProps() {
    return _defaultProps;
  },
  propTypes: function propTypes() {
    return _propTypes;
  }
});
module.exports = __toCommonJS(props_exports);
var import_prop_types = __toESM(__webpack_require__(17));
var _import_prop_types$de = import_prop_types["default"],
  string = _import_prop_types$de.string,
  bool = _import_prop_types$de.bool,
  number = _import_prop_types$de.number,
  array = _import_prop_types$de.array,
  oneOfType = _import_prop_types$de.oneOfType,
  shape = _import_prop_types$de.shape,
  object = _import_prop_types$de.object,
  func = _import_prop_types$de.func,
  node = _import_prop_types$de.node;
var _propTypes = {
  url: oneOfType([string, array, object]),
  playing: bool,
  loop: bool,
  controls: bool,
  volume: number,
  muted: bool,
  playbackRate: number,
  width: oneOfType([string, number]),
  height: oneOfType([string, number]),
  style: object,
  progressInterval: number,
  playsinline: bool,
  pip: bool,
  stopOnUnmount: bool,
  light: oneOfType([bool, string, object]),
  playIcon: node,
  previewTabIndex: number,
  previewAriaLabel: string,
  fallback: node,
  oEmbedUrl: string,
  wrapper: oneOfType([string, func, shape({
    render: func.isRequired
  })]),
  config: shape({
    soundcloud: shape({
      options: object
    }),
    youtube: shape({
      playerVars: object,
      embedOptions: object,
      onUnstarted: func
    }),
    facebook: shape({
      appId: string,
      version: string,
      playerId: string,
      attributes: object
    }),
    dailymotion: shape({
      params: object
    }),
    vimeo: shape({
      playerOptions: object,
      title: string
    }),
    mux: shape({
      attributes: object,
      version: string
    }),
    file: shape({
      attributes: object,
      tracks: array,
      forceVideo: bool,
      forceAudio: bool,
      forceHLS: bool,
      forceSafariHLS: bool,
      forceDisableHls: bool,
      forceDASH: bool,
      forceFLV: bool,
      hlsOptions: object,
      hlsVersion: string,
      dashVersion: string,
      flvVersion: string
    }),
    wistia: shape({
      options: object,
      playerId: string,
      customControls: array
    }),
    mixcloud: shape({
      options: object
    }),
    twitch: shape({
      options: object,
      playerId: string
    }),
    vidyard: shape({
      options: object
    })
  }),
  onReady: func,
  onStart: func,
  onPlay: func,
  onPause: func,
  onBuffer: func,
  onBufferEnd: func,
  onEnded: func,
  onError: func,
  onDuration: func,
  onSeek: func,
  onPlaybackRateChange: func,
  onPlaybackQualityChange: func,
  onProgress: func,
  onClickPreview: func,
  onEnablePIP: func,
  onDisablePIP: func
};
var noop = function noop() {};
var _defaultProps = {
  playing: false,
  loop: false,
  controls: false,
  volume: null,
  muted: false,
  playbackRate: 1,
  width: "640px",
  height: "360px",
  style: {},
  progressInterval: 1e3,
  playsinline: false,
  pip: false,
  stopOnUnmount: true,
  light: false,
  fallback: null,
  wrapper: "div",
  previewTabIndex: 0,
  previewAriaLabel: "",
  oEmbedUrl: "https://noembed.com/embed?url={url}",
  config: {
    soundcloud: {
      options: {
        visual: true,
        // Undocumented, but makes player fill container and look better
        buying: false,
        liking: false,
        download: false,
        sharing: false,
        show_comments: false,
        show_playcount: false
      }
    },
    youtube: {
      playerVars: {
        playsinline: 1,
        showinfo: 0,
        rel: 0,
        iv_load_policy: 3,
        modestbranding: 1
      },
      embedOptions: {},
      onUnstarted: noop
    },
    facebook: {
      appId: "1309697205772819",
      version: "v3.3",
      playerId: null,
      attributes: {}
    },
    dailymotion: {
      params: {
        api: 1,
        "endscreen-enable": false
      }
    },
    vimeo: {
      playerOptions: {
        autopause: false,
        byline: false,
        portrait: false,
        title: false
      },
      title: null
    },
    mux: {
      attributes: {},
      version: "2"
    },
    file: {
      attributes: {},
      tracks: [],
      forceVideo: false,
      forceAudio: false,
      forceHLS: false,
      forceDASH: false,
      forceFLV: false,
      hlsOptions: {},
      hlsVersion: "1.1.4",
      dashVersion: "3.1.3",
      flvVersion: "1.5.0",
      forceDisableHls: false
    },
    wistia: {
      options: {},
      playerId: null,
      customControls: null
    },
    mixcloud: {
      options: {
        hide_cover: 1
      }
    },
    twitch: {
      options: {},
      playerId: null
    },
    vidyard: {
      options: {}
    }
  },
  onReady: noop,
  onStart: noop,
  onPlay: noop,
  onPause: noop,
  onBuffer: noop,
  onBufferEnd: noop,
  onEnded: noop,
  onError: noop,
  onDuration: noop,
  onSeek: noop,
  onPlaybackRateChange: noop,
  onPlaybackQualityChange: noop,
  onProgress: noop,
  onClickPreview: noop,
  onEnablePIP: noop,
  onDisablePIP: noop
};

/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global, module) {var _typeof = __webpack_require__(9);
/**
 * Lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright JS Foundation and other contributors <https://js.foundation/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;

/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';

/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
  COMPARE_UNORDERED_FLAG = 2;

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
  arrayTag = '[object Array]',
  asyncTag = '[object AsyncFunction]',
  boolTag = '[object Boolean]',
  dateTag = '[object Date]',
  errorTag = '[object Error]',
  funcTag = '[object Function]',
  genTag = '[object GeneratorFunction]',
  mapTag = '[object Map]',
  numberTag = '[object Number]',
  nullTag = '[object Null]',
  objectTag = '[object Object]',
  promiseTag = '[object Promise]',
  proxyTag = '[object Proxy]',
  regexpTag = '[object RegExp]',
  setTag = '[object Set]',
  stringTag = '[object String]',
  symbolTag = '[object Symbol]',
  undefinedTag = '[object Undefined]',
  weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
  dataViewTag = '[object DataView]',
  float32Tag = '[object Float32Array]',
  float64Tag = '[object Float64Array]',
  int8Tag = '[object Int8Array]',
  int16Tag = '[object Int16Array]',
  int32Tag = '[object Int32Array]',
  uint8Tag = '[object Uint8Array]',
  uint8ClampedTag = '[object Uint8ClampedArray]',
  uint16Tag = '[object Uint16Array]',
  uint32Tag = '[object Uint32Array]';

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;

/** Detect free variable `global` from Node.js. */
var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Detect free variable `exports`. */
var freeExports = ( false ? undefined : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && ( false ? undefined : _typeof(module)) == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = function () {
  try {
    return freeProcess && freeProcess.binding && freeProcess.binding('util');
  } catch (e) {}
}();

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * A specialized version of `_.filter` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} predicate The function invoked per iteration.
 * @returns {Array} Returns the new filtered array.
 */
function arrayFilter(array, predicate) {
  var index = -1,
    length = array == null ? 0 : array.length,
    resIndex = 0,
    result = [];
  while (++index < length) {
    var value = array[index];
    if (predicate(value, index, array)) {
      result[resIndex++] = value;
    }
  }
  return result;
}

/**
 * Appends the elements of `values` to `array`.
 *
 * @private
 * @param {Array} array The array to modify.
 * @param {Array} values The values to append.
 * @returns {Array} Returns `array`.
 */
function arrayPush(array, values) {
  var index = -1,
    length = values.length,
    offset = array.length;
  while (++index < length) {
    array[offset + index] = values[index];
  }
  return array;
}

/**
 * A specialized version of `_.some` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} predicate The function invoked per iteration.
 * @returns {boolean} Returns `true` if any element passes the predicate check,
 *  else `false`.
 */
function arraySome(array, predicate) {
  var index = -1,
    length = array == null ? 0 : array.length;
  while (++index < length) {
    if (predicate(array[index], index, array)) {
      return true;
    }
  }
  return false;
}

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
    result = Array(n);
  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function (value) {
    return func(value);
  };
}

/**
 * Checks if a `cache` value for `key` exists.
 *
 * @private
 * @param {Object} cache The cache to query.
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function cacheHas(cache, key) {
  return cache.has(key);
}

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

/**
 * Converts `map` to its key-value pairs.
 *
 * @private
 * @param {Object} map The map to convert.
 * @returns {Array} Returns the key-value pairs.
 */
function mapToArray(map) {
  var index = -1,
    result = Array(map.size);
  map.forEach(function (value, key) {
    result[++index] = [key, value];
  });
  return result;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function (arg) {
    return func(transform(arg));
  };
}

/**
 * Converts `set` to an array of its values.
 *
 * @private
 * @param {Object} set The set to convert.
 * @returns {Array} Returns the values.
 */
function setToArray(set) {
  var index = -1,
    result = Array(set.size);
  set.forEach(function (value) {
    result[++index] = value;
  });
  return result;
}

/** Used for built-in method references. */
var arrayProto = Array.prototype,
  funcProto = Function.prototype,
  objectProto = Object.prototype;

/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/** Used to detect methods masquerading as native. */
var maskSrcKey = function () {
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  return uid ? 'Symbol(src)_1.' + uid : '';
}();

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined,
  _Symbol = root.Symbol,
  Uint8Array = root.Uint8Array,
  propertyIsEnumerable = objectProto.propertyIsEnumerable,
  splice = arrayProto.splice,
  symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols,
  nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  nativeKeys = overArg(Object.keys, Object);

/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView'),
  Map = getNative(root, 'Map'),
  Promise = getNative(root, 'Promise'),
  Set = getNative(root, 'Set'),
  WeakMap = getNative(root, 'WeakMap'),
  nativeCreate = getNative(Object, 'create');

/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
  mapCtorString = toSource(Map),
  promiseCtorString = toSource(Promise),
  setCtorString = toSource(Set),
  weakMapCtorString = toSource(WeakMap);

/** Used to convert symbols to primitives and strings. */
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
  symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;

/**
 * Creates a hash object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Hash(entries) {
  var index = -1,
    length = entries == null ? 0 : entries.length;
  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the hash.
 *
 * @private
 * @name clear
 * @memberOf Hash
 */
function hashClear() {
  this.__data__ = nativeCreate ? nativeCreate(null) : {};
  this.size = 0;
}

/**
 * Removes `key` and its value from the hash.
 *
 * @private
 * @name delete
 * @memberOf Hash
 * @param {Object} hash The hash to modify.
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function hashDelete(key) {
  var result = this.has(key) && delete this.__data__[key];
  this.size -= result ? 1 : 0;
  return result;
}

/**
 * Gets the hash value for `key`.
 *
 * @private
 * @name get
 * @memberOf Hash
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function hashGet(key) {
  var data = this.__data__;
  if (nativeCreate) {
    var result = data[key];
    return result === HASH_UNDEFINED ? undefined : result;
  }
  return hasOwnProperty.call(data, key) ? data[key] : undefined;
}

/**
 * Checks if a hash value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Hash
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function hashHas(key) {
  var data = this.__data__;
  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}

/**
 * Sets the hash `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Hash
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the hash instance.
 */
function hashSet(key, value) {
  var data = this.__data__;
  this.size += this.has(key) ? 0 : 1;
  data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
  return this;
}

// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;

/**
 * Creates an list cache object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function ListCache(entries) {
  var index = -1,
    length = entries == null ? 0 : entries.length;
  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the list cache.
 *
 * @private
 * @name clear
 * @memberOf ListCache
 */
function listCacheClear() {
  this.__data__ = [];
  this.size = 0;
}

/**
 * Removes `key` and its value from the list cache.
 *
 * @private
 * @name delete
 * @memberOf ListCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function listCacheDelete(key) {
  var data = this.__data__,
    index = assocIndexOf(data, key);
  if (index < 0) {
    return false;
  }
  var lastIndex = data.length - 1;
  if (index == lastIndex) {
    data.pop();
  } else {
    splice.call(data, index, 1);
  }
  --this.size;
  return true;
}

/**
 * Gets the list cache value for `key`.
 *
 * @private
 * @name get
 * @memberOf ListCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function listCacheGet(key) {
  var data = this.__data__,
    index = assocIndexOf(data, key);
  return index < 0 ? undefined : data[index][1];
}

/**
 * Checks if a list cache value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf ListCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function listCacheHas(key) {
  return assocIndexOf(this.__data__, key) > -1;
}

/**
 * Sets the list cache `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf ListCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the list cache instance.
 */
function listCacheSet(key, value) {
  var data = this.__data__,
    index = assocIndexOf(data, key);
  if (index < 0) {
    ++this.size;
    data.push([key, value]);
  } else {
    data[index][1] = value;
  }
  return this;
}

// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;

/**
 * Creates a map cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function MapCache(entries) {
  var index = -1,
    length = entries == null ? 0 : entries.length;
  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the map.
 *
 * @private
 * @name clear
 * @memberOf MapCache
 */
function mapCacheClear() {
  this.size = 0;
  this.__data__ = {
    'hash': new Hash(),
    'map': new (Map || ListCache)(),
    'string': new Hash()
  };
}

/**
 * Removes `key` and its value from the map.
 *
 * @private
 * @name delete
 * @memberOf MapCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function mapCacheDelete(key) {
  var result = getMapData(this, key)['delete'](key);
  this.size -= result ? 1 : 0;
  return result;
}

/**
 * Gets the map value for `key`.
 *
 * @private
 * @name get
 * @memberOf MapCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function mapCacheGet(key) {
  return getMapData(this, key).get(key);
}

/**
 * Checks if a map value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf MapCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function mapCacheHas(key) {
  return getMapData(this, key).has(key);
}

/**
 * Sets the map `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf MapCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the map cache instance.
 */
function mapCacheSet(key, value) {
  var data = getMapData(this, key),
    size = data.size;
  data.set(key, value);
  this.size += data.size == size ? 0 : 1;
  return this;
}

// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;

/**
 *
 * Creates an array cache object to store unique values.
 *
 * @private
 * @constructor
 * @param {Array} [values] The values to cache.
 */
function SetCache(values) {
  var index = -1,
    length = values == null ? 0 : values.length;
  this.__data__ = new MapCache();
  while (++index < length) {
    this.add(values[index]);
  }
}

/**
 * Adds `value` to the array cache.
 *
 * @private
 * @name add
 * @memberOf SetCache
 * @alias push
 * @param {*} value The value to cache.
 * @returns {Object} Returns the cache instance.
 */
function setCacheAdd(value) {
  this.__data__.set(value, HASH_UNDEFINED);
  return this;
}

/**
 * Checks if `value` is in the array cache.
 *
 * @private
 * @name has
 * @memberOf SetCache
 * @param {*} value The value to search for.
 * @returns {number} Returns `true` if `value` is found, else `false`.
 */
function setCacheHas(value) {
  return this.__data__.has(value);
}

// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;

/**
 * Creates a stack cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Stack(entries) {
  var data = this.__data__ = new ListCache(entries);
  this.size = data.size;
}

/**
 * Removes all key-value entries from the stack.
 *
 * @private
 * @name clear
 * @memberOf Stack
 */
function stackClear() {
  this.__data__ = new ListCache();
  this.size = 0;
}

/**
 * Removes `key` and its value from the stack.
 *
 * @private
 * @name delete
 * @memberOf Stack
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function stackDelete(key) {
  var data = this.__data__,
    result = data['delete'](key);
  this.size = data.size;
  return result;
}

/**
 * Gets the stack value for `key`.
 *
 * @private
 * @name get
 * @memberOf Stack
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function stackGet(key) {
  return this.__data__.get(key);
}

/**
 * Checks if a stack value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Stack
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function stackHas(key) {
  return this.__data__.has(key);
}

/**
 * Sets the stack `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Stack
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the stack cache instance.
 */
function stackSet(key, value) {
  var data = this.__data__;
  if (data instanceof ListCache) {
    var pairs = data.__data__;
    if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
      pairs.push([key, value]);
      this.size = ++data.size;
      return this;
    }
    data = this.__data__ = new MapCache(pairs);
  }
  data.set(key, value);
  this.size = data.size;
  return this;
}

// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  var isArr = isArray(value),
    isArg = !isArr && isArguments(value),
    isBuff = !isArr && !isArg && isBuffer(value),
    isType = !isArr && !isArg && !isBuff && isTypedArray(value),
    skipIndexes = isArr || isArg || isBuff || isType,
    result = skipIndexes ? baseTimes(value.length, String) : [],
    length = result.length;
  for (var key in value) {
    if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (
    // Safari 9 has enumerable `arguments.length` in strict mode.
    key == 'length' ||
    // Node.js 0.10 has enumerable non-index properties on buffers.
    isBuff && (key == 'offset' || key == 'parent') ||
    // PhantomJS 2 has enumerable non-index properties on typed arrays.
    isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') ||
    // Skip index properties.
    isIndex(key, length)))) {
      result.push(key);
    }
  }
  return result;
}

/**
 * Gets the index at which the `key` is found in `array` of key-value pairs.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} key The key to search for.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function assocIndexOf(array, key) {
  var length = array.length;
  while (length--) {
    if (eq(array[length][0], key)) {
      return length;
    }
  }
  return -1;
}

/**
 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
 * symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {Function} keysFunc The function to get the keys of `object`.
 * @param {Function} symbolsFunc The function to get the symbols of `object`.
 * @returns {Array} Returns the array of property names and symbols.
 */
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  var result = keysFunc(object);
  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  if (value == null) {
    return value === undefined ? undefinedTag : nullTag;
  }
  return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}

/**
 * The base implementation of `_.isArguments`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 */
function baseIsArguments(value) {
  return isObjectLike(value) && baseGetTag(value) == argsTag;
}

/**
 * The base implementation of `_.isEqual` which supports partial comparisons
 * and tracks traversed objects.
 *
 * @private
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @param {boolean} bitmask The bitmask flags.
 *  1 - Unordered comparison
 *  2 - Partial comparison
 * @param {Function} [customizer] The function to customize comparisons.
 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 */
function baseIsEqual(value, other, bitmask, customizer, stack) {
  if (value === other) {
    return true;
  }
  if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
    return value !== value && other !== other;
  }
  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}

/**
 * A specialized version of `baseIsEqual` for arrays and objects which performs
 * deep comparisons and tracks traversed objects enabling objects with circular
 * references to be compared.
 *
 * @private
 * @param {Object} object The object to compare.
 * @param {Object} other The other object to compare.
 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
 * @param {Function} customizer The function to customize comparisons.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
 */
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  var objIsArr = isArray(object),
    othIsArr = isArray(other),
    objTag = objIsArr ? arrayTag : getTag(object),
    othTag = othIsArr ? arrayTag : getTag(other);
  objTag = objTag == argsTag ? objectTag : objTag;
  othTag = othTag == argsTag ? objectTag : othTag;
  var objIsObj = objTag == objectTag,
    othIsObj = othTag == objectTag,
    isSameTag = objTag == othTag;
  if (isSameTag && isBuffer(object)) {
    if (!isBuffer(other)) {
      return false;
    }
    objIsArr = true;
    objIsObj = false;
  }
  if (isSameTag && !objIsObj) {
    stack || (stack = new Stack());
    return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  }
  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
      othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
    if (objIsWrapped || othIsWrapped) {
      var objUnwrapped = objIsWrapped ? object.value() : object,
        othUnwrapped = othIsWrapped ? other.value() : other;
      stack || (stack = new Stack());
      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
    }
  }
  if (!isSameTag) {
    return false;
  }
  stack || (stack = new Stack());
  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject(value) || isMasked(value)) {
    return false;
  }
  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  return pattern.test(toSource(value));
}

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * A specialized version of `baseIsEqualDeep` for arrays with support for
 * partial deep comparisons.
 *
 * @private
 * @param {Array} array The array to compare.
 * @param {Array} other The other array to compare.
 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
 * @param {Function} customizer The function to customize comparisons.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Object} stack Tracks traversed `array` and `other` objects.
 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
 */
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
    arrLength = array.length,
    othLength = other.length;
  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
    return false;
  }
  // Assume cyclic values are equal.
  var stacked = stack.get(array);
  if (stacked && stack.get(other)) {
    return stacked == other;
  }
  var index = -1,
    result = true,
    seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
  stack.set(array, other);
  stack.set(other, array);

  // Ignore non-index properties.
  while (++index < arrLength) {
    var arrValue = array[index],
      othValue = other[index];
    if (customizer) {
      var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
    }
    if (compared !== undefined) {
      if (compared) {
        continue;
      }
      result = false;
      break;
    }
    // Recursively compare arrays (susceptible to call stack limits).
    if (seen) {
      if (!arraySome(other, function (othValue, othIndex) {
        if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
          return seen.push(othIndex);
        }
      })) {
        result = false;
        break;
      }
    } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
      result = false;
      break;
    }
  }
  stack['delete'](array);
  stack['delete'](other);
  return result;
}

/**
 * A specialized version of `baseIsEqualDeep` for comparing objects of
 * the same `toStringTag`.
 *
 * **Note:** This function only supports comparing values with tags of
 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
 *
 * @private
 * @param {Object} object The object to compare.
 * @param {Object} other The other object to compare.
 * @param {string} tag The `toStringTag` of the objects to compare.
 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
 * @param {Function} customizer The function to customize comparisons.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Object} stack Tracks traversed `object` and `other` objects.
 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
 */
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  switch (tag) {
    case dataViewTag:
      if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
        return false;
      }
      object = object.buffer;
      other = other.buffer;
    case arrayBufferTag:
      if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
        return false;
      }
      return true;
    case boolTag:
    case dateTag:
    case numberTag:
      // Coerce booleans to `1` or `0` and dates to milliseconds.
      // Invalid dates are coerced to `NaN`.
      return eq(+object, +other);
    case errorTag:
      return object.name == other.name && object.message == other.message;
    case regexpTag:
    case stringTag:
      // Coerce regexes to strings and treat strings, primitives and objects,
      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
      // for more details.
      return object == other + '';
    case mapTag:
      var convert = mapToArray;
    case setTag:
      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
      convert || (convert = setToArray);
      if (object.size != other.size && !isPartial) {
        return false;
      }
      // Assume cyclic values are equal.
      var stacked = stack.get(object);
      if (stacked) {
        return stacked == other;
      }
      bitmask |= COMPARE_UNORDERED_FLAG;

      // Recursively compare objects (susceptible to call stack limits).
      stack.set(object, other);
      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
      stack['delete'](object);
      return result;
    case symbolTag:
      if (symbolValueOf) {
        return symbolValueOf.call(object) == symbolValueOf.call(other);
      }
  }
  return false;
}

/**
 * A specialized version of `baseIsEqualDeep` for objects with support for
 * partial deep comparisons.
 *
 * @private
 * @param {Object} object The object to compare.
 * @param {Object} other The other object to compare.
 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
 * @param {Function} customizer The function to customize comparisons.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Object} stack Tracks traversed `object` and `other` objects.
 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
 */
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
    objProps = getAllKeys(object),
    objLength = objProps.length,
    othProps = getAllKeys(other),
    othLength = othProps.length;
  if (objLength != othLength && !isPartial) {
    return false;
  }
  var index = objLength;
  while (index--) {
    var key = objProps[index];
    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
      return false;
    }
  }
  // Assume cyclic values are equal.
  var stacked = stack.get(object);
  if (stacked && stack.get(other)) {
    return stacked == other;
  }
  var result = true;
  stack.set(object, other);
  stack.set(other, object);
  var skipCtor = isPartial;
  while (++index < objLength) {
    key = objProps[index];
    var objValue = object[key],
      othValue = other[key];
    if (customizer) {
      var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
    }
    // Recursively compare objects (susceptible to call stack limits).
    if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
      result = false;
      break;
    }
    skipCtor || (skipCtor = key == 'constructor');
  }
  if (result && !skipCtor) {
    var objCtor = object.constructor,
      othCtor = other.constructor;

    // Non `Object` object instances with different constructors are not equal.
    if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
      result = false;
    }
  }
  stack['delete'](object);
  stack['delete'](other);
  return result;
}

/**
 * Creates an array of own enumerable property names and symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names and symbols.
 */
function getAllKeys(object) {
  return baseGetAllKeys(object, keys, getSymbols);
}

/**
 * Gets the data for `map`.
 *
 * @private
 * @param {Object} map The map to query.
 * @param {string} key The reference key.
 * @returns {*} Returns the map data.
 */
function getMapData(map, key) {
  var data = map.__data__;
  return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
}

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
  var value = getValue(object, key);
  return baseIsNative(value) ? value : undefined;
}

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag),
    tag = value[symToStringTag];
  try {
    value[symToStringTag] = undefined;
    var unmasked = true;
  } catch (e) {}
  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag] = tag;
    } else {
      delete value[symToStringTag];
    }
  }
  return result;
}

/**
 * Creates an array of the own enumerable symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of symbols.
 */
var getSymbols = !nativeGetSymbols ? stubArray : function (object) {
  if (object == null) {
    return [];
  }
  object = Object(object);
  return arrayFilter(nativeGetSymbols(object), function (symbol) {
    return propertyIsEnumerable.call(object, symbol);
  });
};

/**
 * Gets the `toStringTag` of `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
var getTag = baseGetTag;

// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
  getTag = function getTag(value) {
    var result = baseGetTag(value),
      Ctor = result == objectTag ? value.constructor : undefined,
      ctorString = Ctor ? toSource(Ctor) : '';
    if (ctorString) {
      switch (ctorString) {
        case dataViewCtorString:
          return dataViewTag;
        case mapCtorString:
          return mapTag;
        case promiseCtorString:
          return promiseTag;
        case setCtorString:
          return setTag;
        case weakMapCtorString:
          return weakMapTag;
      }
    }
    return result;
  };
}

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  length = length == null ? MAX_SAFE_INTEGER : length;
  return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}

/**
 * Checks if `value` is suitable for use as unique object key.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
 */
function isKeyable(value) {
  var type = _typeof(value);
  return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
}

/**
 * Checks if `func` has its source masked.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
 */
function isMasked(func) {
  return !!maskSrcKey && maskSrcKey in func;
}

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
    proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
  return value === proto;
}

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString(value) {
  return nativeObjectToString.call(value);
}

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to convert.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {}
    try {
      return func + '';
    } catch (e) {}
  }
  return '';
}

/**
 * Performs a
 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * comparison between two values to determine if they are equivalent.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.eq(object, object);
 * // => true
 *
 * _.eq(object, other);
 * // => false
 *
 * _.eq('a', 'a');
 * // => true
 *
 * _.eq('a', Object('a'));
 * // => false
 *
 * _.eq(NaN, NaN);
 * // => true
 */
function eq(value, other) {
  return value === other || value !== value && other !== other;
}

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
var isArguments = baseIsArguments(function () {
  return arguments;
}()) ? baseIsArguments : function (value) {
  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
};

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/**
 * Performs a deep comparison between two values to determine if they are
 * equivalent.
 *
 * **Note:** This method supports comparing arrays, array buffers, booleans,
 * date objects, error objects, maps, numbers, `Object` objects, regexes,
 * sets, strings, symbols, and typed arrays. `Object` objects are compared
 * by their own, not inherited, enumerable properties. Functions and DOM
 * nodes are compared by strict equality, i.e. `===`.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.isEqual(object, other);
 * // => true
 *
 * object === other;
 * // => false
 */
function isEqual(value, other) {
  return baseIsEqual(value, other);
}

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  if (!isObject(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag(value);
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = _typeof(value);
  return value != null && (type == 'object' || type == 'function');
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return value != null && _typeof(value) == 'object';
}

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

/**
 * Creates an array of the own enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects. See the
 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * for more details.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keys(new Foo);
 * // => ['a', 'b'] (iteration order is not guaranteed)
 *
 * _.keys('hi');
 * // => ['0', '1']
 */
function keys(object) {
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}

/**
 * This method returns a new empty array.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {Array} Returns the new empty array.
 * @example
 *
 * var arrays = _.times(2, _.stubArray);
 *
 * console.log(arrays);
 * // => [[], []]
 *
 * console.log(arrays[0] === arrays[1]);
 * // => false
 */
function stubArray() {
  return [];
}

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}
module.exports = isEqual;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(39), __webpack_require__(28)(module)))

/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "Carousel", {
  enumerable: true,
  get: function get() {
    return _Carousel["default"];
  }
});
Object.defineProperty(exports, "CarouselProps", {
  enumerable: true,
  get: function get() {
    return _types.CarouselProps;
  }
});
Object.defineProperty(exports, "Thumbs", {
  enumerable: true,
  get: function get() {
    return _Thumbs["default"];
  }
});
var _Carousel = _interopRequireDefault(__webpack_require__(101));
var _types = __webpack_require__(106);
var _Thumbs = _interopRequireDefault(__webpack_require__(80));
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}

/***/ }),
/* 87 */,
/* 88 */
/***/ (function(module, exports, __webpack_require__) {

var _typeof = __webpack_require__(9);
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = function __export(target, all) {
  for (var name in all) {
    __defProp(target, name, {
      get: all[name],
      enumerable: true
    });
  }
};
var __copyProps = function __copyProps(to, from, except, desc) {
  if (from && _typeof(from) === "object" || typeof from === "function") {
    var _iterator = _createForOfIteratorHelper(__getOwnPropNames(from)),
      _step;
    try {
      var _loop = function _loop() {
        var key = _step.value;
        if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
          get: function get() {
            return from[key];
          },
          enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
        });
      };
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        _loop();
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
  }
  return to;
};
var __toCommonJS = function __toCommonJS(mod) {
  return __copyProps(__defProp({}, "__esModule", {
    value: true
  }), mod);
};
var patterns_exports = {};
__export(patterns_exports, {
  AUDIO_EXTENSIONS: function AUDIO_EXTENSIONS() {
    return _AUDIO_EXTENSIONS;
  },
  DASH_EXTENSIONS: function DASH_EXTENSIONS() {
    return _DASH_EXTENSIONS;
  },
  FLV_EXTENSIONS: function FLV_EXTENSIONS() {
    return _FLV_EXTENSIONS;
  },
  HLS_EXTENSIONS: function HLS_EXTENSIONS() {
    return _HLS_EXTENSIONS;
  },
  MATCH_URL_DAILYMOTION: function MATCH_URL_DAILYMOTION() {
    return _MATCH_URL_DAILYMOTION;
  },
  MATCH_URL_FACEBOOK: function MATCH_URL_FACEBOOK() {
    return _MATCH_URL_FACEBOOK;
  },
  MATCH_URL_FACEBOOK_WATCH: function MATCH_URL_FACEBOOK_WATCH() {
    return _MATCH_URL_FACEBOOK_WATCH;
  },
  MATCH_URL_KALTURA: function MATCH_URL_KALTURA() {
    return _MATCH_URL_KALTURA;
  },
  MATCH_URL_MIXCLOUD: function MATCH_URL_MIXCLOUD() {
    return _MATCH_URL_MIXCLOUD;
  },
  MATCH_URL_MUX: function MATCH_URL_MUX() {
    return _MATCH_URL_MUX;
  },
  MATCH_URL_SOUNDCLOUD: function MATCH_URL_SOUNDCLOUD() {
    return _MATCH_URL_SOUNDCLOUD;
  },
  MATCH_URL_STREAMABLE: function MATCH_URL_STREAMABLE() {
    return _MATCH_URL_STREAMABLE;
  },
  MATCH_URL_TWITCH_CHANNEL: function MATCH_URL_TWITCH_CHANNEL() {
    return _MATCH_URL_TWITCH_CHANNEL;
  },
  MATCH_URL_TWITCH_VIDEO: function MATCH_URL_TWITCH_VIDEO() {
    return _MATCH_URL_TWITCH_VIDEO;
  },
  MATCH_URL_VIDYARD: function MATCH_URL_VIDYARD() {
    return _MATCH_URL_VIDYARD;
  },
  MATCH_URL_VIMEO: function MATCH_URL_VIMEO() {
    return _MATCH_URL_VIMEO;
  },
  MATCH_URL_WISTIA: function MATCH_URL_WISTIA() {
    return _MATCH_URL_WISTIA;
  },
  MATCH_URL_YOUTUBE: function MATCH_URL_YOUTUBE() {
    return _MATCH_URL_YOUTUBE;
  },
  VIDEO_EXTENSIONS: function VIDEO_EXTENSIONS() {
    return _VIDEO_EXTENSIONS;
  },
  canPlay: function canPlay() {
    return _canPlay;
  }
});
module.exports = __toCommonJS(patterns_exports);
var import_utils = __webpack_require__(63);
var _MATCH_URL_YOUTUBE = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//;
var _MATCH_URL_SOUNDCLOUD = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
var _MATCH_URL_VIMEO = /vimeo\.com\/(?!progressive_redirect).+/;
var _MATCH_URL_MUX = /stream\.mux\.com\/(\w+)/;
var _MATCH_URL_FACEBOOK = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
var _MATCH_URL_FACEBOOK_WATCH = /^https?:\/\/fb\.watch\/.+$/;
var _MATCH_URL_STREAMABLE = /streamable\.com\/([a-z0-9]+)$/;
var _MATCH_URL_WISTIA = /(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/;
var _MATCH_URL_TWITCH_VIDEO = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
var _MATCH_URL_TWITCH_CHANNEL = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/;
var _MATCH_URL_DAILYMOTION = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/;
var _MATCH_URL_MIXCLOUD = /mixcloud\.com\/([^/]+\/[^/]+)/;
var _MATCH_URL_VIDYARD = /vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/;
var _MATCH_URL_KALTURA = /^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/;
var _AUDIO_EXTENSIONS = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
var _VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i;
var _HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
var _DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
var _FLV_EXTENSIONS = /\.(flv)($|\?)/i;
var canPlayFile = function canPlayFile(url) {
  if (url instanceof Array) {
    var _iterator2 = _createForOfIteratorHelper(url),
      _step2;
    try {
      for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
        var _item = _step2.value;
        if (typeof _item === "string" && canPlayFile(_item)) {
          return true;
        }
        if (canPlayFile(_item.src)) {
          return true;
        }
      }
    } catch (err) {
      _iterator2.e(err);
    } finally {
      _iterator2.f();
    }
    return false;
  }
  if ((0, import_utils.isMediaStream)(url) || (0, import_utils.isBlobUrl)(url)) {
    return true;
  }
  return _AUDIO_EXTENSIONS.test(url) || _VIDEO_EXTENSIONS.test(url) || _HLS_EXTENSIONS.test(url) || _DASH_EXTENSIONS.test(url) || _FLV_EXTENSIONS.test(url);
};
var _canPlay = {
  youtube: function youtube(url) {
    if (url instanceof Array) {
      return url.every(function (item) {
        return _MATCH_URL_YOUTUBE.test(item);
      });
    }
    return _MATCH_URL_YOUTUBE.test(url);
  },
  soundcloud: function soundcloud(url) {
    return _MATCH_URL_SOUNDCLOUD.test(url) && !_AUDIO_EXTENSIONS.test(url);
  },
  vimeo: function vimeo(url) {
    return _MATCH_URL_VIMEO.test(url) && !_VIDEO_EXTENSIONS.test(url) && !_HLS_EXTENSIONS.test(url);
  },
  mux: function mux(url) {
    return _MATCH_URL_MUX.test(url);
  },
  facebook: function facebook(url) {
    return _MATCH_URL_FACEBOOK.test(url) || _MATCH_URL_FACEBOOK_WATCH.test(url);
  },
  streamable: function streamable(url) {
    return _MATCH_URL_STREAMABLE.test(url);
  },
  wistia: function wistia(url) {
    return _MATCH_URL_WISTIA.test(url);
  },
  twitch: function twitch(url) {
    return _MATCH_URL_TWITCH_VIDEO.test(url) || _MATCH_URL_TWITCH_CHANNEL.test(url);
  },
  dailymotion: function dailymotion(url) {
    return _MATCH_URL_DAILYMOTION.test(url);
  },
  mixcloud: function mixcloud(url) {
    return _MATCH_URL_MIXCLOUD.test(url);
  },
  vidyard: function vidyard(url) {
    return _MATCH_URL_VIDYARD.test(url);
  },
  kaltura: function kaltura(url) {
    return _MATCH_URL_KALTURA.test(url);
  },
  file: canPlayFile
};

/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {

var arrayWithHoles = __webpack_require__(108);
var iterableToArrayLimit = __webpack_require__(109);
var unsupportedIterableToArray = __webpack_require__(76);
var nonIterableRest = __webpack_require__(110);
function _slicedToArray(arr, i) {
  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
}
module.exports = _slicedToArray;

/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {

var arrayWithoutHoles = __webpack_require__(91);
var iterableToArray = __webpack_require__(92);
var unsupportedIterableToArray = __webpack_require__(76);
var nonIterableSpread = __webpack_require__(93);
function _toConsumableArray(arr) {
  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
}
module.exports = _toConsumableArray;

/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {

var arrayLikeToArray = __webpack_require__(75);
function _arrayWithoutHoles(arr) {
  if (Array.isArray(arr)) return arrayLikeToArray(arr);
}
module.exports = _arrayWithoutHoles;

/***/ }),
/* 92 */
/***/ (function(module, exports) {

function _iterableToArray(iter) {
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
module.exports = _iterableToArray;

/***/ }),
/* 93 */
/***/ (function(module, exports) {

function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableSpread;

/***/ }),
/* 94 */
/***/ (function(module, exports) {

function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  try {
    var info = gen[key](arg);
    var value = info.value;
  } catch (error) {
    reject(error);
    return;
  }
  if (info.done) {
    resolve(value);
  } else {
    Promise.resolve(value).then(_next, _throw);
  }
}
function _asyncToGenerator(fn) {
  return function () {
    var self = this,
      args = arguments;
    return new Promise(function (resolve, reject) {
      var gen = fn.apply(self, args);
      function _next(value) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
      }
      function _throw(err) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
      }
      _next(undefined);
    });
  };
}
module.exports = _asyncToGenerator;

/***/ }),
/* 95 */,
/* 96 */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(97);

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(99)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(98)(false);
// imports


// module
exports.push([module.i, "@keyframes fadeInOpacity{0%{opacity:0}50%{opacity:.5}100%{opacity:1}}@keyframes fadeInColorBlack{0%{background-color:rgba(0,0,0,0)}100%{background-color:rgba(0,0,0,.7)}}@keyframes fadeDownColorBlack{0%{background-color:rgba(0,0,0,.7)}100%{background-color:rgba(0,0,0,0)}}@keyframes fadeUpCB{0%{height:135px}100%{height:calc(100vh - 40px)}}@keyframes fadeDownCB{0%{height:calc(100vh - 40px)}100%{height:135px}}", ""]);

// exports


/***/ }),
/* 98 */
/***/ (function(module, exports) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function (useSourceMap) {
  var list = [];

  // return the list of modules as css string
  list.toString = function toString() {
    return this.map(function (item) {
      var content = cssWithMappingToString(item, useSourceMap);
      if (item[2]) {
        return "@media " + item[2] + "{" + content + "}";
      } else {
        return content;
      }
    }).join("");
  };

  // import a list of modules into the list
  list.i = function (modules, mediaQuery) {
    if (typeof modules === "string") modules = [[null, modules, ""]];
    var alreadyImportedModules = {};
    for (var i = 0; i < this.length; i++) {
      var id = this[i][0];
      if (typeof id === "number") alreadyImportedModules[id] = true;
    }
    for (i = 0; i < modules.length; i++) {
      var item = modules[i];
      // skip already imported module
      // this implementation is not 100% perfect for weird media query combinations
      //  when a module is imported multiple times with different media queries.
      //  I hope this will never occur (Hey this way we have smaller bundles)
      if (typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
        if (mediaQuery && !item[2]) {
          item[2] = mediaQuery;
        } else if (mediaQuery) {
          item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
        }
        list.push(item);
      }
    }
  };
  return list;
};
function cssWithMappingToString(item, useSourceMap) {
  var content = item[1] || '';
  var cssMapping = item[3];
  if (!cssMapping) {
    return content;
  }
  if (useSourceMap && typeof btoa === 'function') {
    var sourceMapping = toComment(cssMapping);
    var sourceURLs = cssMapping.sources.map(function (source) {
      return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
    });
    return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  }
  return [content].join('\n');
}

// Adapted from convert-source-map (MIT)
function toComment(sourceMap) {
  // eslint-disable-next-line no-undef
  var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  return '/*# ' + data + ' */';
}

/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/

var stylesInDom = {};

var	memoize = function (fn) {
	var memo;

	return function () {
		if (typeof memo === "undefined") memo = fn.apply(this, arguments);
		return memo;
	};
};

var isOldIE = memoize(function () {
	// Test for IE <= 9 as proposed by Browserhacks
	// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
	// Tests for existence of standard globals is to allow style-loader
	// to operate correctly into non-standard environments
	// @see https://github.com/webpack-contrib/style-loader/issues/177
	return window && document && document.all && !window.atob;
});

var getTarget = function (target, parent) {
  if (parent){
    return parent.querySelector(target);
  }
  return document.querySelector(target);
};

var getElement = (function (fn) {
	var memo = {};

	return function(target, parent) {
                // If passing function in options, then use it for resolve "head" element.
                // Useful for Shadow Root style i.e
                // {
                //   insertInto: function () { return document.querySelector("#foo").shadowRoot }
                // }
                if (typeof target === 'function') {
                        return target();
                }
                if (typeof memo[target] === "undefined") {
			var styleTarget = getTarget.call(this, target, parent);
			// Special case to return head of iframe instead of iframe itself
			if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
				try {
					// This will throw an exception if access to iframe is blocked
					// due to cross-origin restrictions
					styleTarget = styleTarget.contentDocument.head;
				} catch(e) {
					styleTarget = null;
				}
			}
			memo[target] = styleTarget;
		}
		return memo[target]
	};
})();

var singleton = null;
var	singletonCounter = 0;
var	stylesInsertedAtTop = [];

var	fixUrls = __webpack_require__(100);

module.exports = function(list, options) {
	if (typeof DEBUG !== "undefined" && DEBUG) {
		if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
	}

	options = options || {};

	options.attrs = typeof options.attrs === "object" ? options.attrs : {};

	// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
	// tags it will allow on a page
	if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();

	// By default, add <style> tags to the <head> element
        if (!options.insertInto) options.insertInto = "head";

	// By default, add <style> tags to the bottom of the target
	if (!options.insertAt) options.insertAt = "bottom";

	var styles = listToStyles(list, options);

	addStylesToDom(styles, options);

	return function update (newList) {
		var mayRemove = [];

		for (var i = 0; i < styles.length; i++) {
			var item = styles[i];
			var domStyle = stylesInDom[item.id];

			domStyle.refs--;
			mayRemove.push(domStyle);
		}

		if(newList) {
			var newStyles = listToStyles(newList, options);
			addStylesToDom(newStyles, options);
		}

		for (var i = 0; i < mayRemove.length; i++) {
			var domStyle = mayRemove[i];

			if(domStyle.refs === 0) {
				for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();

				delete stylesInDom[domStyle.id];
			}
		}
	};
};

function addStylesToDom (styles, options) {
	for (var i = 0; i < styles.length; i++) {
		var item = styles[i];
		var domStyle = stylesInDom[item.id];

		if(domStyle) {
			domStyle.refs++;

			for(var j = 0; j < domStyle.parts.length; j++) {
				domStyle.parts[j](item.parts[j]);
			}

			for(; j < item.parts.length; j++) {
				domStyle.parts.push(addStyle(item.parts[j], options));
			}
		} else {
			var parts = [];

			for(var j = 0; j < item.parts.length; j++) {
				parts.push(addStyle(item.parts[j], options));
			}

			stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
		}
	}
}

function listToStyles (list, options) {
	var styles = [];
	var newStyles = {};

	for (var i = 0; i < list.length; i++) {
		var item = list[i];
		var id = options.base ? item[0] + options.base : item[0];
		var css = item[1];
		var media = item[2];
		var sourceMap = item[3];
		var part = {css: css, media: media, sourceMap: sourceMap};

		if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
		else newStyles[id].parts.push(part);
	}

	return styles;
}

function insertStyleElement (options, style) {
	var target = getElement(options.insertInto)

	if (!target) {
		throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
	}

	var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];

	if (options.insertAt === "top") {
		if (!lastStyleElementInsertedAtTop) {
			target.insertBefore(style, target.firstChild);
		} else if (lastStyleElementInsertedAtTop.nextSibling) {
			target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
		} else {
			target.appendChild(style);
		}
		stylesInsertedAtTop.push(style);
	} else if (options.insertAt === "bottom") {
		target.appendChild(style);
	} else if (typeof options.insertAt === "object" && options.insertAt.before) {
		var nextSibling = getElement(options.insertAt.before, target);
		target.insertBefore(style, nextSibling);
	} else {
		throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
	}
}

function removeStyleElement (style) {
	if (style.parentNode === null) return false;
	style.parentNode.removeChild(style);

	var idx = stylesInsertedAtTop.indexOf(style);
	if(idx >= 0) {
		stylesInsertedAtTop.splice(idx, 1);
	}
}

function createStyleElement (options) {
	var style = document.createElement("style");

	if(options.attrs.type === undefined) {
		options.attrs.type = "text/css";
	}

	if(options.attrs.nonce === undefined) {
		var nonce = getNonce();
		if (nonce) {
			options.attrs.nonce = nonce;
		}
	}

	addAttrs(style, options.attrs);
	insertStyleElement(options, style);

	return style;
}

function createLinkElement (options) {
	var link = document.createElement("link");

	if(options.attrs.type === undefined) {
		options.attrs.type = "text/css";
	}
	options.attrs.rel = "stylesheet";

	addAttrs(link, options.attrs);
	insertStyleElement(options, link);

	return link;
}

function addAttrs (el, attrs) {
	Object.keys(attrs).forEach(function (key) {
		el.setAttribute(key, attrs[key]);
	});
}

function getNonce() {
	if (false) {}

	return __webpack_require__.nc;
}

function addStyle (obj, options) {
	var style, update, remove, result;

	// If a transform function was defined, run it on the css
	if (options.transform && obj.css) {
	    result = typeof options.transform === 'function'
		 ? options.transform(obj.css) 
		 : options.transform.default(obj.css);

	    if (result) {
	    	// If transform returns a value, use that instead of the original css.
	    	// This allows running runtime transformations on the css.
	    	obj.css = result;
	    } else {
	    	// If the transform function returns a falsy value, don't add this css.
	    	// This allows conditional loading of css
	    	return function() {
	    		// noop
	    	};
	    }
	}

	if (options.singleton) {
		var styleIndex = singletonCounter++;

		style = singleton || (singleton = createStyleElement(options));

		update = applyToSingletonTag.bind(null, style, styleIndex, false);
		remove = applyToSingletonTag.bind(null, style, styleIndex, true);

	} else if (
		obj.sourceMap &&
		typeof URL === "function" &&
		typeof URL.createObjectURL === "function" &&
		typeof URL.revokeObjectURL === "function" &&
		typeof Blob === "function" &&
		typeof btoa === "function"
	) {
		style = createLinkElement(options);
		update = updateLink.bind(null, style, options);
		remove = function () {
			removeStyleElement(style);

			if(style.href) URL.revokeObjectURL(style.href);
		};
	} else {
		style = createStyleElement(options);
		update = applyToTag.bind(null, style);
		remove = function () {
			removeStyleElement(style);
		};
	}

	update(obj);

	return function updateStyle (newObj) {
		if (newObj) {
			if (
				newObj.css === obj.css &&
				newObj.media === obj.media &&
				newObj.sourceMap === obj.sourceMap
			) {
				return;
			}

			update(obj = newObj);
		} else {
			remove();
		}
	};
}

var replaceText = (function () {
	var textStore = [];

	return function (index, replacement) {
		textStore[index] = replacement;

		return textStore.filter(Boolean).join('\n');
	};
})();

function applyToSingletonTag (style, index, remove, obj) {
	var css = remove ? "" : obj.css;

	if (style.styleSheet) {
		style.styleSheet.cssText = replaceText(index, css);
	} else {
		var cssNode = document.createTextNode(css);
		var childNodes = style.childNodes;

		if (childNodes[index]) style.removeChild(childNodes[index]);

		if (childNodes.length) {
			style.insertBefore(cssNode, childNodes[index]);
		} else {
			style.appendChild(cssNode);
		}
	}
}

function applyToTag (style, obj) {
	var css = obj.css;
	var media = obj.media;

	if(media) {
		style.setAttribute("media", media)
	}

	if(style.styleSheet) {
		style.styleSheet.cssText = css;
	} else {
		while(style.firstChild) {
			style.removeChild(style.firstChild);
		}

		style.appendChild(document.createTextNode(css));
	}
}

function updateLink (link, options, obj) {
	var css = obj.css;
	var sourceMap = obj.sourceMap;

	/*
		If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
		and there is no publicPath defined then lets turn convertToAbsoluteUrls
		on by default.  Otherwise default to the convertToAbsoluteUrls option
		directly
	*/
	var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;

	if (options.convertToAbsoluteUrls || autoFixUrls) {
		css = fixUrls(css);
	}

	if (sourceMap) {
		// http://stackoverflow.com/a/26603875
		css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
	}

	var blob = new Blob([css], { type: "text/css" });

	var oldSrc = link.href;

	link.href = URL.createObjectURL(blob);

	if(oldSrc) URL.revokeObjectURL(oldSrc);
}


/***/ }),
/* 100 */
/***/ (function(module, exports) {

/**
 * When source maps are enabled, `style-loader` uses a link element with a data-uri to
 * embed the css on the page. This breaks all relative urls because now they are relative to a
 * bundle instead of the current page.
 *
 * One solution is to only use full urls, but that may be impossible.
 *
 * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
 *
 * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
 *
 */

module.exports = function (css) {
  // get current location
  var location = typeof window !== "undefined" && window.location;
  if (!location) {
    throw new Error("fixUrls requires window.location");
  }

  // blank or null?
  if (!css || typeof css !== "string") {
    return css;
  }
  var baseUrl = location.protocol + "//" + location.host;
  var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");

  // convert each url(...)
  /*
  This regular expression is just a way to recursively match brackets within
  a string.
  	 /url\s*\(  = Match on the word "url" with any whitespace after it and then a parens
     (  = Start a capturing group
       (?:  = Start a non-capturing group
           [^)(]  = Match anything that isn't a parentheses
           |  = OR
           \(  = Match a start parentheses
               (?:  = Start another non-capturing groups
                   [^)(]+  = Match anything that isn't a parentheses
                   |  = OR
                   \(  = Match a start parentheses
                       [^)(]*  = Match anything that isn't a parentheses
                   \)  = Match a end parentheses
               )  = End Group
               *\) = Match anything and then a close parens
           )  = Close non-capturing group
           *  = Match anything
        )  = Close capturing group
   \)  = Match a close parens
  	 /gi  = Get all matches, not the first.  Be case insensitive.
   */
  var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (fullMatch, origUrl) {
    // strip quotes (if they exist)
    var unquotedOrigUrl = origUrl.trim().replace(/^"(.*)"$/, function (o, $1) {
      return $1;
    }).replace(/^'(.*)'$/, function (o, $1) {
      return $1;
    });

    // already a full url? no change
    if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
      return fullMatch;
    }

    // convert the url to a full url
    var newUrl;
    if (unquotedOrigUrl.indexOf("//") === 0) {
      //TODO: should we add protocol?
      newUrl = unquotedOrigUrl;
    } else if (unquotedOrigUrl.indexOf("/") === 0) {
      // path should be relative to the base url
      newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
    } else {
      // path should be relative to current directory
      newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
    }

    // send back the fixed url(...)
    return "url(" + JSON.stringify(newUrl) + ")";
  });

  // send back the fixed css
  return fixedCss;
};

/***/ }),
/* 101 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(__webpack_require__(0));
var _reactEasySwipe = _interopRequireDefault(__webpack_require__(78));
var _cssClasses = _interopRequireDefault(__webpack_require__(79));
var _Thumbs = _interopRequireDefault(__webpack_require__(80));
var _document = _interopRequireDefault(__webpack_require__(104));
var _window = _interopRequireDefault(__webpack_require__(81));
var _utils = __webpack_require__(82);
var _animations = __webpack_require__(105);
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}
function _getRequireWildcardCache() {
  if (typeof WeakMap !== "function") return null;
  var cache = new WeakMap();
  _getRequireWildcardCache = function _getRequireWildcardCache() {
    return cache;
  };
  return cache;
}
function _interopRequireWildcard(obj) {
  if (obj && obj.__esModule) {
    return obj;
  }
  if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
    return {
      "default": obj
    };
  }
  var cache = _getRequireWildcardCache();
  if (cache && cache.has(obj)) {
    return cache.get(obj);
  }
  var newObj = {};
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  for (var key in obj) {
    if (Object.prototype.hasOwnProperty.call(obj, key)) {
      var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
      if (desc && (desc.get || desc.set)) {
        Object.defineProperty(newObj, key, desc);
      } else {
        newObj[key] = obj[key];
      }
    }
  }
  newObj["default"] = obj;
  if (cache) {
    cache.set(obj, newObj);
  }
  return newObj;
}
function _typeof(obj) {
  "@babel/helpers - typeof";

  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
    _typeof = function _typeof(obj) {
      return typeof obj;
    };
  } else {
    _typeof = function _typeof(obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };
  }
  return _typeof(obj);
}
function _extends() {
  _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  return _extends.apply(this, arguments);
}
function ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);
  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    if (enumerableOnly) symbols = symbols.filter(function (sym) {
      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
    });
    keys.push.apply(keys, symbols);
  }
  return keys;
}
function _objectSpread(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};
    if (i % 2) {
      ownKeys(Object(source), true).forEach(function (key) {
        _defineProperty(target, key, source[key]);
      });
    } else if (Object.getOwnPropertyDescriptors) {
      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
      ownKeys(Object(source)).forEach(function (key) {
        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
      });
    }
  }
  return target;
}
function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}
function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    var descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}
function _createClass(Constructor, protoProps, staticProps) {
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  if (staticProps) _defineProperties(Constructor, staticProps);
  return Constructor;
}
function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function");
  }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      writable: true,
      configurable: true
    }
  });
  if (superClass) _setPrototypeOf(subClass, superClass);
}
function _setPrototypeOf(o, p) {
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
  };
  return _setPrototypeOf(o, p);
}
function _createSuper(Derived) {
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
  return function _createSuperInternal() {
    var Super = _getPrototypeOf(Derived),
      result;
    if (hasNativeReflectConstruct) {
      var NewTarget = _getPrototypeOf(this).constructor;
      result = Reflect.construct(Super, arguments, NewTarget);
    } else {
      result = Super.apply(this, arguments);
    }
    return _possibleConstructorReturn(this, result);
  };
}
function _possibleConstructorReturn(self, call) {
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
    return call;
  }
  return _assertThisInitialized(self);
}
function _assertThisInitialized(self) {
  if (self === void 0) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }
  return self;
}
function _isNativeReflectConstruct() {
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  if (Reflect.construct.sham) return false;
  if (typeof Proxy === "function") return true;
  try {
    Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
    return true;
  } catch (e) {
    return false;
  }
}
function _getPrototypeOf(o) {
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  };
  return _getPrototypeOf(o);
}
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}
var Carousel = /*#__PURE__*/function (_React$Component) {
  _inherits(Carousel, _React$Component);
  var _super = _createSuper(Carousel);

  // @ts-ignore
  function Carousel(props) {
    var _this;
    _classCallCheck(this, Carousel);
    _this = _super.call(this, props);
    _defineProperty(_assertThisInitialized(_this), "thumbsRef", void 0);
    _defineProperty(_assertThisInitialized(_this), "carouselWrapperRef", void 0);
    _defineProperty(_assertThisInitialized(_this), "listRef", void 0);
    _defineProperty(_assertThisInitialized(_this), "itemsRef", void 0);
    _defineProperty(_assertThisInitialized(_this), "timer", void 0);
    _defineProperty(_assertThisInitialized(_this), "animationHandler", void 0);
    _defineProperty(_assertThisInitialized(_this), "setThumbsRef", function (node) {
      _this.thumbsRef = node;
    });
    _defineProperty(_assertThisInitialized(_this), "setCarouselWrapperRef", function (node) {
      _this.carouselWrapperRef = node;
    });
    _defineProperty(_assertThisInitialized(_this), "setListRef", function (node) {
      _this.listRef = node;
    });
    _defineProperty(_assertThisInitialized(_this), "setItemsRef", function (node, index) {
      if (!_this.itemsRef) {
        _this.itemsRef = [];
      }
      _this.itemsRef[index] = node;
    });
    _defineProperty(_assertThisInitialized(_this), "autoPlay", function () {
      if (_react.Children.count(_this.props.children) <= 1) {
        return;
      }
      _this.clearAutoPlay();
      if (!_this.props.autoPlay) {
        return;
      }
      _this.timer = setTimeout(function () {
        _this.increment();
      }, _this.props.interval);
    });
    _defineProperty(_assertThisInitialized(_this), "clearAutoPlay", function () {
      if (_this.timer) clearTimeout(_this.timer);
    });
    _defineProperty(_assertThisInitialized(_this), "resetAutoPlay", function () {
      _this.clearAutoPlay();
      _this.autoPlay();
    });
    _defineProperty(_assertThisInitialized(_this), "stopOnHover", function () {
      _this.setState({
        isMouseEntered: true
      }, _this.clearAutoPlay);
    });
    _defineProperty(_assertThisInitialized(_this), "startOnLeave", function () {
      _this.setState({
        isMouseEntered: false
      }, _this.autoPlay);
    });
    _defineProperty(_assertThisInitialized(_this), "isFocusWithinTheCarousel", function () {
      if (!_this.carouselWrapperRef) {
        return false;
      }
      if ((0, _document["default"])().activeElement === _this.carouselWrapperRef || _this.carouselWrapperRef.contains((0, _document["default"])().activeElement)) {
        return true;
      }
      return false;
    });
    _defineProperty(_assertThisInitialized(_this), "navigateWithKeyboard", function (e) {
      if (!_this.isFocusWithinTheCarousel()) {
        return;
      }
      var axis = _this.props.axis;
      var isHorizontal = axis === 'horizontal';
      var keyNames = {
        ArrowUp: 38,
        ArrowRight: 39,
        ArrowDown: 40,
        ArrowLeft: 37
      };
      var nextKey = isHorizontal ? keyNames.ArrowRight : keyNames.ArrowDown;
      var prevKey = isHorizontal ? keyNames.ArrowLeft : keyNames.ArrowUp;
      if (nextKey === e.keyCode) {
        _this.increment();
      } else if (prevKey === e.keyCode) {
        _this.decrement();
      }
    });
    _defineProperty(_assertThisInitialized(_this), "updateSizes", function () {
      if (!_this.state.initialized || !_this.itemsRef || _this.itemsRef.length === 0) {
        return;
      }
      var isHorizontal = _this.props.axis === 'horizontal';
      var firstItem = _this.itemsRef[0];
      if (!firstItem) {
        return;
      }
      var itemSize = isHorizontal ? firstItem.clientWidth : firstItem.clientHeight;
      _this.setState({
        itemSize: itemSize
      });
      if (_this.thumbsRef) {
        _this.thumbsRef.updateSizes();
      }
    });
    _defineProperty(_assertThisInitialized(_this), "setMountState", function () {
      _this.setState({
        hasMount: true
      });
      _this.updateSizes();
    });
    _defineProperty(_assertThisInitialized(_this), "handleClickItem", function (index, item) {
      if (_react.Children.count(_this.props.children) === 0) {
        return;
      }
      if (_this.state.cancelClick) {
        _this.setState({
          cancelClick: false
        });
        return;
      }
      _this.props.onClickItem(index, item);
      if (index !== _this.state.selectedItem) {
        _this.setState({
          selectedItem: index
        });
      }
    });
    _defineProperty(_assertThisInitialized(_this), "handleOnChange", function (index, item) {
      if (_react.Children.count(_this.props.children) <= 1) {
        return;
      }
      _this.props.onChange(index, item);
    });
    _defineProperty(_assertThisInitialized(_this), "handleClickThumb", function (index, item) {
      _this.props.onClickThumb(index, item);
      _this.moveTo(index);
    });
    _defineProperty(_assertThisInitialized(_this), "onSwipeStart", function (event) {
      _this.setState({
        swiping: true
      });
      _this.props.onSwipeStart(event);
    });
    _defineProperty(_assertThisInitialized(_this), "onSwipeEnd", function (event) {
      _this.setState({
        swiping: false,
        cancelClick: false,
        swipeMovementStarted: false
      });
      _this.props.onSwipeEnd(event);
      _this.clearAutoPlay();
      if (_this.state.autoPlay) {
        _this.autoPlay();
      }
    });
    _defineProperty(_assertThisInitialized(_this), "onSwipeMove", function (delta, event) {
      _this.props.onSwipeMove(event);
      var animationHandlerResponse = _this.props.swipeAnimationHandler(delta, _this.props, _this.state, _this.setState.bind(_assertThisInitialized(_this)));
      _this.setState(_objectSpread({}, animationHandlerResponse)); // If we have not moved, we should have an empty object returned
      // Return false to allow scrolling when not swiping

      return !!Object.keys(animationHandlerResponse).length;
    });
    _defineProperty(_assertThisInitialized(_this), "decrement", function () {
      var positions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
      _this.moveTo(_this.state.selectedItem - (typeof positions === 'number' ? positions : 1));
    });
    _defineProperty(_assertThisInitialized(_this), "increment", function () {
      var positions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
      _this.moveTo(_this.state.selectedItem + (typeof positions === 'number' ? positions : 1));
    });
    _defineProperty(_assertThisInitialized(_this), "moveTo", function (position) {
      if (typeof position !== 'number') {
        return;
      }
      var lastPosition = _react.Children.count(_this.props.children) - 1;
      if (position < 0) {
        position = _this.props.infiniteLoop ? lastPosition : 0;
      }
      if (position > lastPosition) {
        position = _this.props.infiniteLoop ? 0 : lastPosition;
      }
      _this.selectItem({
        // if it's not a slider, we don't need to set position here
        selectedItem: position
      }); // don't reset auto play when stop on hover is enabled, doing so will trigger a call to auto play more than once
      // and will result in the interval function not being cleared correctly.

      if (_this.state.autoPlay && _this.state.isMouseEntered === false) {
        _this.resetAutoPlay();
      }
    });
    _defineProperty(_assertThisInitialized(_this), "onClickNext", function () {
      _this.increment(1);
    });
    _defineProperty(_assertThisInitialized(_this), "onClickPrev", function () {
      _this.decrement(1);
    });
    _defineProperty(_assertThisInitialized(_this), "onSwipeForward", function () {
      _this.increment(1);
      if (_this.props.emulateTouch) {
        _this.setState({
          cancelClick: true
        });
      }
    });
    _defineProperty(_assertThisInitialized(_this), "onSwipeBackwards", function () {
      _this.decrement(1);
      if (_this.props.emulateTouch) {
        _this.setState({
          cancelClick: true
        });
      }
    });
    _defineProperty(_assertThisInitialized(_this), "changeItem", function (newIndex) {
      return function (e) {
        if (!(0, _utils.isKeyboardEvent)(e) || e.key === 'Enter') {
          _this.moveTo(newIndex);
        }
      };
    });
    _defineProperty(_assertThisInitialized(_this), "selectItem", function (state) {
      // Merge in the new state while updating updating previous item
      _this.setState(_objectSpread({
        previousItem: _this.state.selectedItem
      }, state), function () {
        // Run animation handler and update styles based on it
        _this.setState(_this.animationHandler(_this.props, _this.state));
      });
      _this.handleOnChange(state.selectedItem, _react.Children.toArray(_this.props.children)[state.selectedItem]);
    });
    _defineProperty(_assertThisInitialized(_this), "getInitialImage", function () {
      var selectedItem = _this.props.selectedItem;
      var item = _this.itemsRef && _this.itemsRef[selectedItem];
      var images = item && item.getElementsByTagName('img') || [];
      return images[0];
    });
    _defineProperty(_assertThisInitialized(_this), "getVariableItemHeight", function (position) {
      var item = _this.itemsRef && _this.itemsRef[position];
      if (_this.state.hasMount && item && item.children.length) {
        var slideImages = item.children[0].getElementsByTagName('img') || [];
        if (slideImages.length > 0) {
          var image = slideImages[0];
          if (!image.complete) {
            // if the image is still loading, the size won't be available so we trigger a new render after it's done
            var onImageLoad = function onImageLoad() {
              _this.forceUpdate();
              image.removeEventListener('load', onImageLoad);
            };
            image.addEventListener('load', onImageLoad);
          }
        } // try to get img first, if img not there find first display tag

        var displayItem = slideImages[0] || item.children[0];
        var height = displayItem.clientHeight;
        return height > 0 ? height : null;
      }
      return null;
    });
    var initState = {
      initialized: false,
      previousItem: props.selectedItem,
      selectedItem: props.selectedItem,
      hasMount: false,
      isMouseEntered: false,
      autoPlay: props.autoPlay,
      swiping: false,
      swipeMovementStarted: false,
      cancelClick: false,
      itemSize: 1,
      itemListStyle: {},
      slideStyle: {},
      selectedStyle: {},
      prevStyle: {}
    };
    _this.animationHandler = typeof props.animationHandler === 'function' && props.animationHandler || props.animationHandler === 'fade' && _animations.fadeAnimationHandler || _animations.slideAnimationHandler;
    _this.state = _objectSpread(_objectSpread({}, initState), _this.animationHandler(props, initState));
    return _this;
  }
  _createClass(Carousel, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      if (!this.props.children) {
        return;
      }
      this.setupCarousel();
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps, prevState) {
      if (!prevProps.children && this.props.children && !this.state.initialized) {
        this.setupCarousel();
      }
      if (!prevProps.autoFocus && this.props.autoFocus) {
        this.forceFocus();
      }
      if (prevState.swiping && !this.state.swiping) {
        // We stopped swiping, ensure we are heading to the new/current slide and not stuck
        this.setState(_objectSpread({}, this.props.stopSwipingHandler(this.props, this.state)));
      }
      if (prevProps.selectedItem !== this.props.selectedItem || prevProps.centerMode !== this.props.centerMode) {
        this.updateSizes();
        this.moveTo(this.props.selectedItem);
      }
      if (prevProps.autoPlay !== this.props.autoPlay) {
        if (this.props.autoPlay) {
          this.setupAutoPlay();
        } else {
          this.destroyAutoPlay();
        }
        this.setState({
          autoPlay: this.props.autoPlay
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.destroyCarousel();
    }
  }, {
    key: "setupCarousel",
    value: function setupCarousel() {
      var _this2 = this;
      this.bindEvents();
      if (this.state.autoPlay && _react.Children.count(this.props.children) > 1) {
        this.setupAutoPlay();
      }
      if (this.props.autoFocus) {
        this.forceFocus();
      }
      this.setState({
        initialized: true
      }, function () {
        var initialImage = _this2.getInitialImage();
        if (initialImage && !initialImage.complete) {
          // if it's a carousel of images, we set the mount state after the first image is loaded
          initialImage.addEventListener('load', _this2.setMountState);
        } else {
          _this2.setMountState();
        }
      });
    }
  }, {
    key: "destroyCarousel",
    value: function destroyCarousel() {
      if (this.state.initialized) {
        this.unbindEvents();
        this.destroyAutoPlay();
      }
    }
  }, {
    key: "setupAutoPlay",
    value: function setupAutoPlay() {
      this.autoPlay();
      var carouselWrapper = this.carouselWrapperRef;
      if (this.props.stopOnHover && carouselWrapper) {
        carouselWrapper.addEventListener('mouseenter', this.stopOnHover);
        carouselWrapper.addEventListener('mouseleave', this.startOnLeave);
      }
    }
  }, {
    key: "destroyAutoPlay",
    value: function destroyAutoPlay() {
      this.clearAutoPlay();
      var carouselWrapper = this.carouselWrapperRef;
      if (this.props.stopOnHover && carouselWrapper) {
        carouselWrapper.removeEventListener('mouseenter', this.stopOnHover);
        carouselWrapper.removeEventListener('mouseleave', this.startOnLeave);
      }
    }
  }, {
    key: "bindEvents",
    value: function bindEvents() {
      // as the widths are calculated, we need to resize
      // the carousel when the window is resized
      (0, _window["default"])().addEventListener('resize', this.updateSizes); // issue #2 - image loading smaller

      (0, _window["default"])().addEventListener('DOMContentLoaded', this.updateSizes);
      if (this.props.useKeyboardArrows) {
        (0, _document["default"])().addEventListener('keydown', this.navigateWithKeyboard);
      }
    }
  }, {
    key: "unbindEvents",
    value: function unbindEvents() {
      // removing listeners
      (0, _window["default"])().removeEventListener('resize', this.updateSizes);
      (0, _window["default"])().removeEventListener('DOMContentLoaded', this.updateSizes);
      var initialImage = this.getInitialImage();
      if (initialImage) {
        initialImage.removeEventListener('load', this.setMountState);
      }
      if (this.props.useKeyboardArrows) {
        (0, _document["default"])().removeEventListener('keydown', this.navigateWithKeyboard);
      }
    }
  }, {
    key: "forceFocus",
    value: function forceFocus() {
      var _this$carouselWrapper;
      (_this$carouselWrapper = this.carouselWrapperRef) === null || _this$carouselWrapper === void 0 ? void 0 : _this$carouselWrapper.focus();
    }
  }, {
    key: "renderItems",
    value: function renderItems(isClone) {
      var _this3 = this;
      if (!this.props.children) {
        return [];
      }
      return _react.Children.map(this.props.children, function (item, index) {
        var isSelected = index === _this3.state.selectedItem;
        var isPrevious = index === _this3.state.previousItem;
        var style = isSelected && _this3.state.selectedStyle || isPrevious && _this3.state.prevStyle || _this3.state.slideStyle || {};
        if (_this3.props.centerMode && _this3.props.axis === 'horizontal') {
          style = _objectSpread(_objectSpread({}, style), {}, {
            minWidth: _this3.props.centerSlidePercentage + '%'
          });
        }
        if (_this3.state.swiping && _this3.state.swipeMovementStarted) {
          style = _objectSpread(_objectSpread({}, style), {}, {
            pointerEvents: 'none'
          });
        }
        var slideProps = {
          ref: function ref(e) {
            return _this3.setItemsRef(e, index);
          },
          key: 'itemKey' + index + (isClone ? 'clone' : ''),
          className: _cssClasses["default"].ITEM(true, index === _this3.state.selectedItem, index === _this3.state.previousItem),
          onClick: _this3.handleClickItem.bind(_this3, index, item),
          style: style
        };
        return /*#__PURE__*/_react["default"].createElement("li", slideProps, _this3.props.renderItem(item, {
          isSelected: index === _this3.state.selectedItem,
          isPrevious: index === _this3.state.previousItem
        }));
      });
    }
  }, {
    key: "renderControls",
    value: function renderControls() {
      var _this4 = this;
      var _this$props = this.props,
        showIndicators = _this$props.showIndicators,
        labels = _this$props.labels,
        renderIndicator = _this$props.renderIndicator,
        children = _this$props.children;
      if (!showIndicators) {
        return null;
      }
      return /*#__PURE__*/_react["default"].createElement("ul", {
        className: "control-dots"
      }, _react.Children.map(children, function (_, index) {
        return renderIndicator && renderIndicator(_this4.changeItem(index), index === _this4.state.selectedItem, index, labels.item);
      }));
    }
  }, {
    key: "renderStatus",
    value: function renderStatus() {
      if (!this.props.showStatus) {
        return null;
      }
      return /*#__PURE__*/_react["default"].createElement("p", {
        className: "carousel-status"
      }, this.props.statusFormatter(this.state.selectedItem + 1, _react.Children.count(this.props.children)));
    }
  }, {
    key: "renderThumbs",
    value: function renderThumbs() {
      if (!this.props.showThumbs || !this.props.children || _react.Children.count(this.props.children) === 0) {
        return null;
      }
      return /*#__PURE__*/_react["default"].createElement(_Thumbs["default"], {
        ref: this.setThumbsRef,
        onSelectItem: this.handleClickThumb,
        selectedItem: this.state.selectedItem,
        transitionTime: this.props.transitionTime,
        thumbWidth: this.props.thumbWidth,
        labels: this.props.labels,
        emulateTouch: this.props.emulateTouch
      }, this.props.renderThumbs(this.props.children));
    }
  }, {
    key: "render",
    value: function render() {
      var _this5 = this;
      if (!this.props.children || _react.Children.count(this.props.children) === 0) {
        return null;
      }
      var isSwipeable = this.props.swipeable && _react.Children.count(this.props.children) > 1;
      var isHorizontal = this.props.axis === 'horizontal';
      var canShowArrows = this.props.showArrows && _react.Children.count(this.props.children) > 1; // show left arrow?

      var hasPrev = canShowArrows && (this.state.selectedItem > 0 || this.props.infiniteLoop) || false; // show right arrow

      var hasNext = canShowArrows && (this.state.selectedItem < _react.Children.count(this.props.children) - 1 || this.props.infiniteLoop) || false;
      var itemsClone = this.renderItems(true);
      var firstClone = itemsClone.shift();
      var lastClone = itemsClone.pop();
      var swiperProps = {
        className: _cssClasses["default"].SLIDER(true, this.state.swiping),
        onSwipeMove: this.onSwipeMove,
        onSwipeStart: this.onSwipeStart,
        onSwipeEnd: this.onSwipeEnd,
        style: this.state.itemListStyle,
        tolerance: this.props.swipeScrollTolerance
      };
      var containerStyles = {};
      if (isHorizontal) {
        swiperProps.onSwipeLeft = this.onSwipeForward;
        swiperProps.onSwipeRight = this.onSwipeBackwards;
        if (this.props.dynamicHeight) {
          var itemHeight = this.getVariableItemHeight(this.state.selectedItem); // swiperProps.style.height = itemHeight || 'auto';

          containerStyles.height = itemHeight || 'auto';
        }
      } else {
        swiperProps.onSwipeUp = this.props.verticalSwipe === 'natural' ? this.onSwipeBackwards : this.onSwipeForward;
        swiperProps.onSwipeDown = this.props.verticalSwipe === 'natural' ? this.onSwipeForward : this.onSwipeBackwards;
        swiperProps.style = _objectSpread(_objectSpread({}, swiperProps.style), {}, {
          height: this.state.itemSize
        });
        containerStyles.height = this.state.itemSize;
      }
      return /*#__PURE__*/_react["default"].createElement("div", {
        "aria-label": this.props.ariaLabel,
        className: _cssClasses["default"].ROOT(this.props.className),
        ref: this.setCarouselWrapperRef,
        tabIndex: this.props.useKeyboardArrows ? 0 : undefined
      }, /*#__PURE__*/_react["default"].createElement("div", {
        className: _cssClasses["default"].CAROUSEL(true),
        style: {
          width: this.props.width
        }
      }, this.renderControls(), this.props.renderArrowPrev(this.onClickPrev, hasPrev, this.props.labels.leftArrow), /*#__PURE__*/_react["default"].createElement("div", {
        className: _cssClasses["default"].WRAPPER(true, this.props.axis),
        style: containerStyles
      }, isSwipeable ? /*#__PURE__*/_react["default"].createElement(_reactEasySwipe["default"], _extends({
        tagName: "ul",
        innerRef: this.setListRef
      }, swiperProps, {
        allowMouseEvents: this.props.emulateTouch
      }), this.props.infiniteLoop && lastClone, this.renderItems(), this.props.infiniteLoop && firstClone) : /*#__PURE__*/_react["default"].createElement("ul", {
        className: _cssClasses["default"].SLIDER(true, this.state.swiping),
        ref: function ref(node) {
          return _this5.setListRef(node);
        },
        style: this.state.itemListStyle || {}
      }, this.props.infiniteLoop && lastClone, this.renderItems(), this.props.infiniteLoop && firstClone)), this.props.renderArrowNext(this.onClickNext, hasNext, this.props.labels.rightArrow), this.renderStatus()), this.renderThumbs());
    }
  }]);
  return Carousel;
}(_react["default"].Component);
exports["default"] = Carousel;
_defineProperty(Carousel, "displayName", 'Carousel');
_defineProperty(Carousel, "defaultProps", {
  ariaLabel: undefined,
  axis: 'horizontal',
  centerSlidePercentage: 80,
  interval: 3000,
  labels: {
    leftArrow: 'previous slide / item',
    rightArrow: 'next slide / item',
    item: 'slide item'
  },
  onClickItem: _utils.noop,
  onClickThumb: _utils.noop,
  onChange: _utils.noop,
  onSwipeStart: function onSwipeStart() {},
  onSwipeEnd: function onSwipeEnd() {},
  onSwipeMove: function onSwipeMove() {
    return false;
  },
  preventMovementUntilSwipeScrollTolerance: false,
  renderArrowPrev: function renderArrowPrev(onClickHandler, hasPrev, label) {
    return /*#__PURE__*/_react["default"].createElement("button", {
      type: "button",
      "aria-label": label,
      className: _cssClasses["default"].ARROW_PREV(!hasPrev),
      onClick: onClickHandler
    });
  },
  renderArrowNext: function renderArrowNext(onClickHandler, hasNext, label) {
    return /*#__PURE__*/_react["default"].createElement("button", {
      type: "button",
      "aria-label": label,
      className: _cssClasses["default"].ARROW_NEXT(!hasNext),
      onClick: onClickHandler
    });
  },
  renderIndicator: function renderIndicator(onClickHandler, isSelected, index, label) {
    return /*#__PURE__*/_react["default"].createElement("li", {
      className: _cssClasses["default"].DOT(isSelected),
      onClick: onClickHandler,
      onKeyDown: onClickHandler,
      value: index,
      key: index,
      role: "button",
      tabIndex: 0,
      "aria-label": "".concat(label, " ").concat(index + 1)
    });
  },
  renderItem: function renderItem(item) {
    return item;
  },
  renderThumbs: function renderThumbs(children) {
    var images = _react.Children.map(children, function (item) {
      var img = item; // if the item is not an image, try to find the first image in the item's children.

      if (item.type !== 'img') {
        img = _react.Children.toArray(item.props.children).find(function (children) {
          return children.type === 'img';
        });
      }
      if (!img) {
        return undefined;
      }
      return img;
    });
    if (images.filter(function (image) {
      return image;
    }).length === 0) {
      console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md");
      return [];
    }
    return images;
  },
  statusFormatter: _utils.defaultStatusFormatter,
  selectedItem: 0,
  showArrows: true,
  showIndicators: true,
  showStatus: true,
  showThumbs: true,
  stopOnHover: true,
  swipeScrollTolerance: 5,
  swipeable: true,
  transitionTime: 350,
  verticalSwipe: 'standard',
  width: '100%',
  animationHandler: 'slide',
  swipeAnimationHandler: _animations.slideSwipeAnimationHandler,
  stopSwipingHandler: _animations.slideStopSwipingHandler
});

/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(9);
(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(17)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (exports, _react, _propTypes) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.setHasSupportToCaptureOption = setHasSupportToCaptureOption;
  var _react2 = _interopRequireDefault(_react);
  var _propTypes2 = _interopRequireDefault(_propTypes);
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
      "default": obj
    };
  }
  var _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  function _objectWithoutProperties(obj, keys) {
    var target = {};
    for (var i in obj) {
      if (keys.indexOf(i) >= 0) continue;
      if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
      target[i] = obj[i];
    }
    return target;
  }
  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }
  var _createClass = function () {
    function defineProperties(target, props) {
      for (var i = 0; i < props.length; i++) {
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
      }
    }
    return function (Constructor, protoProps, staticProps) {
      if (protoProps) defineProperties(Constructor.prototype, protoProps);
      if (staticProps) defineProperties(Constructor, staticProps);
      return Constructor;
    };
  }();
  function _possibleConstructorReturn(self, call) {
    if (!self) {
      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    }
    return call && (_typeof(call) === "object" || typeof call === "function") ? call : self;
  }
  function _inherits(subClass, superClass) {
    if (typeof superClass !== "function" && superClass !== null) {
      throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass));
    }
    subClass.prototype = Object.create(superClass && superClass.prototype, {
      constructor: {
        value: subClass,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
    if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  }
  var supportsCaptureOption = false;
  function setHasSupportToCaptureOption(hasSupport) {
    supportsCaptureOption = hasSupport;
  }
  try {
    addEventListener('test', null, Object.defineProperty({}, 'capture', {
      get: function get() {
        setHasSupportToCaptureOption(true);
      }
    }));
  } catch (e) {} // eslint-disable-line no-empty

  function getSafeEventHandlerOpts() {
    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
      capture: true
    };
    return supportsCaptureOption ? options : options.capture;
  }

  /**
   * [getPosition returns a position element that works for mouse or touch events]
   * @param  {[Event]} event [the received event]
   * @return {[Object]}      [x and y coords]
   */
  function getPosition(event) {
    if ('touches' in event) {
      var _event$touches$ = event.touches[0],
        pageX = _event$touches$.pageX,
        pageY = _event$touches$.pageY;
      return {
        x: pageX,
        y: pageY
      };
    }
    var screenX = event.screenX,
      screenY = event.screenY;
    return {
      x: screenX,
      y: screenY
    };
  }
  var ReactSwipe = function (_Component) {
    _inherits(ReactSwipe, _Component);
    function ReactSwipe() {
      var _ref;
      _classCallCheck(this, ReactSwipe);
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      var _this = _possibleConstructorReturn(this, (_ref = ReactSwipe.__proto__ || Object.getPrototypeOf(ReactSwipe)).call.apply(_ref, [this].concat(args)));
      _this._handleSwipeStart = _this._handleSwipeStart.bind(_this);
      _this._handleSwipeMove = _this._handleSwipeMove.bind(_this);
      _this._handleSwipeEnd = _this._handleSwipeEnd.bind(_this);
      _this._onMouseDown = _this._onMouseDown.bind(_this);
      _this._onMouseMove = _this._onMouseMove.bind(_this);
      _this._onMouseUp = _this._onMouseUp.bind(_this);
      _this._setSwiperRef = _this._setSwiperRef.bind(_this);
      return _this;
    }
    _createClass(ReactSwipe, [{
      key: 'componentDidMount',
      value: function componentDidMount() {
        if (this.swiper) {
          this.swiper.addEventListener('touchmove', this._handleSwipeMove, getSafeEventHandlerOpts({
            capture: true,
            passive: false
          }));
        }
      }
    }, {
      key: 'componentWillUnmount',
      value: function componentWillUnmount() {
        if (this.swiper) {
          this.swiper.removeEventListener('touchmove', this._handleSwipeMove, getSafeEventHandlerOpts({
            capture: true,
            passive: false
          }));
        }
      }
    }, {
      key: '_onMouseDown',
      value: function _onMouseDown(event) {
        if (!this.props.allowMouseEvents) {
          return;
        }
        this.mouseDown = true;
        document.addEventListener('mouseup', this._onMouseUp);
        document.addEventListener('mousemove', this._onMouseMove);
        this._handleSwipeStart(event);
      }
    }, {
      key: '_onMouseMove',
      value: function _onMouseMove(event) {
        if (!this.mouseDown) {
          return;
        }
        this._handleSwipeMove(event);
      }
    }, {
      key: '_onMouseUp',
      value: function _onMouseUp(event) {
        this.mouseDown = false;
        document.removeEventListener('mouseup', this._onMouseUp);
        document.removeEventListener('mousemove', this._onMouseMove);
        this._handleSwipeEnd(event);
      }
    }, {
      key: '_handleSwipeStart',
      value: function _handleSwipeStart(event) {
        var _getPosition = getPosition(event),
          x = _getPosition.x,
          y = _getPosition.y;
        this.moveStart = {
          x: x,
          y: y
        };
        this.props.onSwipeStart(event);
      }
    }, {
      key: '_handleSwipeMove',
      value: function _handleSwipeMove(event) {
        if (!this.moveStart) {
          return;
        }
        var _getPosition2 = getPosition(event),
          x = _getPosition2.x,
          y = _getPosition2.y;
        var deltaX = x - this.moveStart.x;
        var deltaY = y - this.moveStart.y;
        this.moving = true;

        // handling the responsability of cancelling the scroll to
        // the component handling the event
        var shouldPreventDefault = this.props.onSwipeMove({
          x: deltaX,
          y: deltaY
        }, event);
        if (shouldPreventDefault && event.cancelable) {
          event.preventDefault();
        }
        this.movePosition = {
          deltaX: deltaX,
          deltaY: deltaY
        };
      }
    }, {
      key: '_handleSwipeEnd',
      value: function _handleSwipeEnd(event) {
        this.props.onSwipeEnd(event);
        var tolerance = this.props.tolerance;
        if (this.moving && this.movePosition) {
          if (this.movePosition.deltaX < -tolerance) {
            this.props.onSwipeLeft(1, event);
          } else if (this.movePosition.deltaX > tolerance) {
            this.props.onSwipeRight(1, event);
          }
          if (this.movePosition.deltaY < -tolerance) {
            this.props.onSwipeUp(1, event);
          } else if (this.movePosition.deltaY > tolerance) {
            this.props.onSwipeDown(1, event);
          }
        }
        this.moveStart = null;
        this.moving = false;
        this.movePosition = null;
      }
    }, {
      key: '_setSwiperRef',
      value: function _setSwiperRef(node) {
        this.swiper = node;
        this.props.innerRef(node);
      }
    }, {
      key: 'render',
      value: function render() {
        var _props = this.props,
          tagName = _props.tagName,
          className = _props.className,
          style = _props.style,
          children = _props.children,
          allowMouseEvents = _props.allowMouseEvents,
          onSwipeUp = _props.onSwipeUp,
          onSwipeDown = _props.onSwipeDown,
          onSwipeLeft = _props.onSwipeLeft,
          onSwipeRight = _props.onSwipeRight,
          onSwipeStart = _props.onSwipeStart,
          onSwipeMove = _props.onSwipeMove,
          onSwipeEnd = _props.onSwipeEnd,
          innerRef = _props.innerRef,
          tolerance = _props.tolerance,
          props = _objectWithoutProperties(_props, ['tagName', 'className', 'style', 'children', 'allowMouseEvents', 'onSwipeUp', 'onSwipeDown', 'onSwipeLeft', 'onSwipeRight', 'onSwipeStart', 'onSwipeMove', 'onSwipeEnd', 'innerRef', 'tolerance']);
        return _react2["default"].createElement(this.props.tagName, _extends({
          ref: this._setSwiperRef,
          onMouseDown: this._onMouseDown,
          onTouchStart: this._handleSwipeStart,
          onTouchEnd: this._handleSwipeEnd,
          className: className,
          style: style
        }, props), children);
      }
    }]);
    return ReactSwipe;
  }(_react.Component);
  ReactSwipe.displayName = 'ReactSwipe';
  ReactSwipe.propTypes = {
    tagName: _propTypes2["default"].string,
    className: _propTypes2["default"].string,
    style: _propTypes2["default"].object,
    children: _propTypes2["default"].node,
    allowMouseEvents: _propTypes2["default"].bool,
    onSwipeUp: _propTypes2["default"].func,
    onSwipeDown: _propTypes2["default"].func,
    onSwipeLeft: _propTypes2["default"].func,
    onSwipeRight: _propTypes2["default"].func,
    onSwipeStart: _propTypes2["default"].func,
    onSwipeMove: _propTypes2["default"].func,
    onSwipeEnd: _propTypes2["default"].func,
    innerRef: _propTypes2["default"].func,
    tolerance: _propTypes2["default"].number.isRequired
  };
  ReactSwipe.defaultProps = {
    tagName: 'div',
    allowMouseEvents: false,
    onSwipeUp: function onSwipeUp() {},
    onSwipeDown: function onSwipeDown() {},
    onSwipeLeft: function onSwipeLeft() {},
    onSwipeRight: function onSwipeRight() {},
    onSwipeStart: function onSwipeStart() {},
    onSwipeMove: function onSwipeMove() {},
    onSwipeEnd: function onSwipeEnd() {},
    innerRef: function innerRef() {},
    tolerance: 0
  };
  exports["default"] = ReactSwipe;
});

/***/ }),
/* 103 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.outerWidth = void 0;
var outerWidth = function outerWidth(el) {
  var width = el.offsetWidth;
  var style = getComputedStyle(el);
  width += parseInt(style.marginLeft) + parseInt(style.marginRight);
  return width;
};
exports.outerWidth = outerWidth;

/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _default = function _default() {
  return document;
};
exports["default"] = _default;

/***/ }),
/* 105 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.fadeAnimationHandler = exports.slideStopSwipingHandler = exports.slideSwipeAnimationHandler = exports.slideAnimationHandler = void 0;
var _react = __webpack_require__(0);
var _CSSTranslate = _interopRequireDefault(__webpack_require__(67));
var _utils = __webpack_require__(82);
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}
function ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);
  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    if (enumerableOnly) symbols = symbols.filter(function (sym) {
      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
    });
    keys.push.apply(keys, symbols);
  }
  return keys;
}
function _objectSpread(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};
    if (i % 2) {
      ownKeys(Object(source), true).forEach(function (key) {
        _defineProperty(target, key, source[key]);
      });
    } else if (Object.getOwnPropertyDescriptors) {
      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
      ownKeys(Object(source)).forEach(function (key) {
        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
      });
    }
  }
  return target;
}
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}

/**
 * Main animation handler for the default 'sliding' style animation
 * @param props
 * @param state
 */
var slideAnimationHandler = function slideAnimationHandler(props, state) {
  var returnStyles = {};
  var selectedItem = state.selectedItem;
  var previousItem = selectedItem;
  var lastPosition = _react.Children.count(props.children) - 1;
  var needClonedSlide = props.infiniteLoop && (selectedItem < 0 || selectedItem > lastPosition); // Handle list position if it needs a clone

  if (needClonedSlide) {
    if (previousItem < 0) {
      if (props.centerMode && props.centerSlidePercentage && props.axis === 'horizontal') {
        returnStyles.itemListStyle = (0, _utils.setPosition)(-(lastPosition + 2) * props.centerSlidePercentage - (100 - props.centerSlidePercentage) / 2, props.axis);
      } else {
        returnStyles.itemListStyle = (0, _utils.setPosition)(-(lastPosition + 2) * 100, props.axis);
      }
    } else if (previousItem > lastPosition) {
      returnStyles.itemListStyle = (0, _utils.setPosition)(0, props.axis);
    }
    return returnStyles;
  }
  var currentPosition = (0, _utils.getPosition)(selectedItem, props); // if 3d is available, let's take advantage of the performance of transform

  var transformProp = (0, _CSSTranslate["default"])(currentPosition, '%', props.axis);
  var transitionTime = props.transitionTime + 'ms';
  returnStyles.itemListStyle = {
    WebkitTransform: transformProp,
    msTransform: transformProp,
    OTransform: transformProp,
    transform: transformProp
  };
  if (!state.swiping) {
    returnStyles.itemListStyle = _objectSpread(_objectSpread({}, returnStyles.itemListStyle), {}, {
      WebkitTransitionDuration: transitionTime,
      MozTransitionDuration: transitionTime,
      OTransitionDuration: transitionTime,
      transitionDuration: transitionTime,
      msTransitionDuration: transitionTime
    });
  }
  return returnStyles;
};
/**
 * Swiping animation handler for the default 'sliding' style animation
 * @param delta
 * @param props
 * @param state
 * @param setState
 */

exports.slideAnimationHandler = slideAnimationHandler;
var slideSwipeAnimationHandler = function slideSwipeAnimationHandler(delta, props, state, setState) {
  var returnStyles = {};
  var isHorizontal = props.axis === 'horizontal';
  var childrenLength = _react.Children.count(props.children);
  var initialBoundry = 0;
  var currentPosition = (0, _utils.getPosition)(state.selectedItem, props);
  var finalBoundry = props.infiniteLoop ? (0, _utils.getPosition)(childrenLength - 1, props) - 100 : (0, _utils.getPosition)(childrenLength - 1, props);
  var axisDelta = isHorizontal ? delta.x : delta.y;
  var handledDelta = axisDelta; // prevent user from swiping left out of boundaries

  if (currentPosition === initialBoundry && axisDelta > 0) {
    handledDelta = 0;
  } // prevent user from swiping right out of boundaries

  if (currentPosition === finalBoundry && axisDelta < 0) {
    handledDelta = 0;
  }
  var position = currentPosition + 100 / (state.itemSize / handledDelta);
  var hasMoved = Math.abs(axisDelta) > props.swipeScrollTolerance;
  if (props.infiniteLoop && hasMoved) {
    // When allowing infinite loop, if we slide left from position 0 we reveal the cloned last slide that appears before it
    // if we slide even further we need to jump to other side so it can continue - and vice versa for the last slide
    if (state.selectedItem === 0 && position > -100) {
      position -= childrenLength * 100;
    } else if (state.selectedItem === childrenLength - 1 && position < -childrenLength * 100) {
      position += childrenLength * 100;
    }
  }
  if (!props.preventMovementUntilSwipeScrollTolerance || hasMoved || state.swipeMovementStarted) {
    if (!state.swipeMovementStarted) {
      setState({
        swipeMovementStarted: true
      });
    }
    returnStyles.itemListStyle = (0, _utils.setPosition)(position, props.axis);
  } //allows scroll if the swipe was within the tolerance

  if (hasMoved && !state.cancelClick) {
    setState({
      cancelClick: true
    });
  }
  return returnStyles;
};
/**
 * Default 'sliding' style animination handler for when a swipe action stops.
 * @param props
 * @param state
 */

exports.slideSwipeAnimationHandler = slideSwipeAnimationHandler;
var slideStopSwipingHandler = function slideStopSwipingHandler(props, state) {
  var currentPosition = (0, _utils.getPosition)(state.selectedItem, props);
  var itemListStyle = (0, _utils.setPosition)(currentPosition, props.axis);
  return {
    itemListStyle: itemListStyle
  };
};
/**
 * Main animation handler for the default 'fade' style animation
 * @param props
 * @param state
 */

exports.slideStopSwipingHandler = slideStopSwipingHandler;
var fadeAnimationHandler = function fadeAnimationHandler(props, state) {
  var transitionTime = props.transitionTime + 'ms';
  var transitionTimingFunction = 'ease-in-out';
  var slideStyle = {
    position: 'absolute',
    display: 'block',
    zIndex: -2,
    minHeight: '100%',
    opacity: 0,
    top: 0,
    right: 0,
    left: 0,
    bottom: 0,
    transitionTimingFunction: transitionTimingFunction,
    msTransitionTimingFunction: transitionTimingFunction,
    MozTransitionTimingFunction: transitionTimingFunction,
    WebkitTransitionTimingFunction: transitionTimingFunction,
    OTransitionTimingFunction: transitionTimingFunction
  };
  if (!state.swiping) {
    slideStyle = _objectSpread(_objectSpread({}, slideStyle), {}, {
      WebkitTransitionDuration: transitionTime,
      MozTransitionDuration: transitionTime,
      OTransitionDuration: transitionTime,
      transitionDuration: transitionTime,
      msTransitionDuration: transitionTime
    });
  }
  return {
    slideStyle: slideStyle,
    selectedStyle: _objectSpread(_objectSpread({}, slideStyle), {}, {
      opacity: 1,
      position: 'relative'
    }),
    prevStyle: _objectSpread({}, slideStyle)
  };
};
exports.fadeAnimationHandler = fadeAnimationHandler;

/***/ }),
/* 106 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/***/ }),
/* 107 */
/***/ (function(module, exports, __webpack_require__) {

var _typeof = __webpack_require__(9);
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = function __export(target, all) {
  for (var name in all) {
    __defProp(target, name, {
      get: all[name],
      enumerable: true
    });
  }
};
var __copyProps = function __copyProps(to, from, except, desc) {
  if (from && _typeof(from) === "object" || typeof from === "function") {
    var _iterator = _createForOfIteratorHelper(__getOwnPropNames(from)),
      _step;
    try {
      var _loop = function _loop() {
        var key = _step.value;
        if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
          get: function get() {
            return from[key];
          },
          enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
        });
      };
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        _loop();
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
  }
  return to;
};
var __toESM = function __toESM(mod, isNodeMode, target) {
  return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
    value: mod,
    enumerable: true
  }) : target, mod);
};
var __toCommonJS = function __toCommonJS(mod) {
  return __copyProps(__defProp({}, "__esModule", {
    value: true
  }), mod);
};
var players_exports = {};
__export(players_exports, {
  "default": function _default() {
    return players_default;
  }
});
module.exports = __toCommonJS(players_exports);
var import_utils = __webpack_require__(63);
var import_patterns = __webpack_require__(88);
var players_default = [{
  key: "youtube",
  name: "YouTube",
  canPlay: import_patterns.canPlay.youtube,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerYouTube */ 15).then(__webpack_require__.t.bind(null, 120, 7));
  })
}, {
  key: "soundcloud",
  name: "SoundCloud",
  canPlay: import_patterns.canPlay.soundcloud,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerSoundCloud */ 9).then(__webpack_require__.t.bind(null, 121, 7));
  })
}, {
  key: "vimeo",
  name: "Vimeo",
  canPlay: import_patterns.canPlay.vimeo,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerVimeo */ 13).then(__webpack_require__.t.bind(null, 122, 7));
  })
}, {
  key: "mux",
  name: "Mux",
  canPlay: import_patterns.canPlay.mux,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerMux */ 7).then(__webpack_require__.t.bind(null, 123, 7));
  })
}, {
  key: "facebook",
  name: "Facebook",
  canPlay: import_patterns.canPlay.facebook,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerFacebook */ 3).then(__webpack_require__.t.bind(null, 124, 7));
  })
}, {
  key: "streamable",
  name: "Streamable",
  canPlay: import_patterns.canPlay.streamable,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerStreamable */ 10).then(__webpack_require__.t.bind(null, 125, 7));
  })
}, {
  key: "wistia",
  name: "Wistia",
  canPlay: import_patterns.canPlay.wistia,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerWistia */ 14).then(__webpack_require__.t.bind(null, 126, 7));
  })
}, {
  key: "twitch",
  name: "Twitch",
  canPlay: import_patterns.canPlay.twitch,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerTwitch */ 11).then(__webpack_require__.t.bind(null, 127, 7));
  })
}, {
  key: "dailymotion",
  name: "DailyMotion",
  canPlay: import_patterns.canPlay.dailymotion,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerDailyMotion */ 2).then(__webpack_require__.t.bind(null, 128, 7));
  })
}, {
  key: "mixcloud",
  name: "Mixcloud",
  canPlay: import_patterns.canPlay.mixcloud,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerMixcloud */ 6).then(__webpack_require__.t.bind(null, 129, 7));
  })
}, {
  key: "vidyard",
  name: "Vidyard",
  canPlay: import_patterns.canPlay.vidyard,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerVidyard */ 12).then(__webpack_require__.t.bind(null, 130, 7));
  })
}, {
  key: "kaltura",
  name: "Kaltura",
  canPlay: import_patterns.canPlay.kaltura,
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerKaltura */ 5).then(__webpack_require__.t.bind(null, 131, 7));
  })
}, {
  key: "file",
  name: "FilePlayer",
  canPlay: import_patterns.canPlay.file,
  canEnablePIP: function canEnablePIP(url) {
    return import_patterns.canPlay.file(url) && (document.pictureInPictureEnabled || (0, import_utils.supportsWebKitPresentationMode)()) && !import_patterns.AUDIO_EXTENSIONS.test(url);
  },
  lazyPlayer: (0, import_utils.lazy)(function () {
    return __webpack_require__.e(/* import() | reactPlayerFilePlayer */ 4).then(__webpack_require__.t.bind(null, 132, 7));
  })
}];

/***/ }),
/* 108 */
/***/ (function(module, exports) {

function _arrayWithHoles(arr) {
  if (Array.isArray(arr)) return arr;
}
module.exports = _arrayWithHoles;

/***/ }),
/* 109 */
/***/ (function(module, exports) {

function _iterableToArrayLimit(arr, i) {
  if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
  var _arr = [];
  var _n = true;
  var _d = false;
  var _e = undefined;
  try {
    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
      _arr.push(_s.value);
      if (i && _arr.length === i) break;
    }
  } catch (err) {
    _d = true;
    _e = err;
  } finally {
    try {
      if (!_n && _i["return"] != null) _i["return"]();
    } finally {
      if (_d) throw _e;
    }
  }
  return _arr;
}
module.exports = _iterableToArrayLimit;

/***/ }),
/* 110 */
/***/ (function(module, exports) {

function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableRest;

/***/ }),
/* 111 */
/***/ (function(module, exports) {

module.exports = function load(src, opts, cb) {
  var head = document.head || document.getElementsByTagName('head')[0];
  var script = document.createElement('script');
  if (typeof opts === 'function') {
    cb = opts;
    opts = {};
  }
  opts = opts || {};
  cb = cb || function () {};
  script.type = opts.type || 'text/javascript';
  script.charset = opts.charset || 'utf8';
  script.async = 'async' in opts ? !!opts.async : true;
  script.src = src;
  if (opts.attrs) {
    setAttributes(script, opts.attrs);
  }
  if (opts.text) {
    script.text = '' + opts.text;
  }
  var onend = 'onload' in script ? stdOnEnd : ieOnEnd;
  onend(script, cb);

  // some good legacy browsers (firefox) fail the 'in' detection above
  // so as a fallback we always set onload
  // old IE will ignore this and new IE will set onload
  if (!script.onload) {
    stdOnEnd(script, cb);
  }
  head.appendChild(script);
};
function setAttributes(script, attrs) {
  for (var attr in attrs) {
    script.setAttribute(attr, attrs[attr]);
  }
}
function stdOnEnd(script, cb) {
  script.onload = function () {
    this.onerror = this.onload = null;
    cb(null, script);
  };
  script.onerror = function () {
    // this.onload = null here is necessary
    // because even IE9 works not like others
    this.onerror = this.onload = null;
    cb(new Error('Failed to load ' + this.src), script);
  };
}
function ieOnEnd(script, cb) {
  script.onreadystatechange = function () {
    if (this.readyState != 'complete' && this.readyState != 'loaded') return;
    this.onreadystatechange = null;
    cb(null, script); // there is no way to catch loading errors in IE8
  };
}

/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var _defineProperty = __webpack_require__(68);
var _toConsumableArray = __webpack_require__(90);
var _classCallCheck = __webpack_require__(69);
var _createClass = __webpack_require__(70);
var _assertThisInitialized = __webpack_require__(66);
var _inherits = __webpack_require__(71);
var _possibleConstructorReturn = __webpack_require__(72);
var _getPrototypeOf = __webpack_require__(73);
var _typeof = __webpack_require__(9);
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = function __defNormalProp(obj, key, value) {
  return key in obj ? __defProp(obj, key, {
    enumerable: true,
    configurable: true,
    writable: true,
    value: value
  }) : obj[key] = value;
};
var __export = function __export(target, all) {
  for (var name in all) {
    __defProp(target, name, {
      get: all[name],
      enumerable: true
    });
  }
};
var __copyProps = function __copyProps(to, from, except, desc) {
  if (from && _typeof(from) === "object" || typeof from === "function") {
    var _iterator = _createForOfIteratorHelper(__getOwnPropNames(from)),
      _step;
    try {
      var _loop = function _loop() {
        var key = _step.value;
        if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
          get: function get() {
            return from[key];
          },
          enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
        });
      };
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        _loop();
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
  }
  return to;
};
var __toESM = function __toESM(mod, isNodeMode, target) {
  return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
    value: mod,
    enumerable: true
  }) : target, mod);
};
var __toCommonJS = function __toCommonJS(mod) {
  return __copyProps(__defProp({}, "__esModule", {
    value: true
  }), mod);
};
var __publicField = function __publicField(obj, key, value) {
  __defNormalProp(obj, _typeof(key) !== "symbol" ? key + "" : key, value);
  return value;
};
var ReactPlayer_exports = {};
__export(ReactPlayer_exports, {
  createReactPlayer: function createReactPlayer() {
    return _createReactPlayer;
  }
});
module.exports = __toCommonJS(ReactPlayer_exports);
var import_react = __toESM(__webpack_require__(0));
var import_deepmerge = __toESM(__webpack_require__(52));
var import_memoize_one = __toESM(__webpack_require__(26));
var import_react_fast_compare = __toESM(__webpack_require__(83));
var import_props = __webpack_require__(84);
var import_utils = __webpack_require__(63);
var import_Player = __toESM(__webpack_require__(114));
var Preview = (0, import_utils.lazy)(function () {
  return __webpack_require__.e(/* import() | reactPlayerPreview */ 8).then(__webpack_require__.t.bind(null, 133, 7));
});
var IS_BROWSER = typeof window !== "undefined" && window.document && typeof document !== "undefined";
var IS_GLOBAL = typeof global !== "undefined" && global.window && global.window.document;
var SUPPORTED_PROPS = Object.keys(import_props.propTypes);
var UniversalSuspense = IS_BROWSER || IS_GLOBAL ? import_react.Suspense : function () {
  return null;
};
var customPlayers = [];
var _createReactPlayer = function _createReactPlayer(players, fallback) {
  var _a;
  return _a = /*#__PURE__*/function (_import_react$Compone) {
    "use strict";

    _inherits(_a, _import_react$Compone);
    var _super = _createSuper(_a);
    function _a() {
      var _this;
      _classCallCheck(this, _a);
      _this = _super.apply(this, arguments);
      __publicField(_assertThisInitialized(_this), "state", {
        showPreview: !!_this.props.light
      });
      // Use references, as refs is used by React
      __publicField(_assertThisInitialized(_this), "references", {
        wrapper: function wrapper(_wrapper) {
          _this.wrapper = _wrapper;
        },
        player: function player(_player) {
          _this.player = _player;
        }
      });
      __publicField(_assertThisInitialized(_this), "handleClickPreview", function (e) {
        _this.setState({
          showPreview: false
        });
        _this.props.onClickPreview(e);
      });
      __publicField(_assertThisInitialized(_this), "showPreview", function () {
        _this.setState({
          showPreview: true
        });
      });
      __publicField(_assertThisInitialized(_this), "getDuration", function () {
        if (!_this.player) return null;
        return _this.player.getDuration();
      });
      __publicField(_assertThisInitialized(_this), "getCurrentTime", function () {
        if (!_this.player) return null;
        return _this.player.getCurrentTime();
      });
      __publicField(_assertThisInitialized(_this), "getSecondsLoaded", function () {
        if (!_this.player) return null;
        return _this.player.getSecondsLoaded();
      });
      __publicField(_assertThisInitialized(_this), "getInternalPlayer", function () {
        var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "player";
        if (!_this.player) return null;
        return _this.player.getInternalPlayer(key);
      });
      __publicField(_assertThisInitialized(_this), "seekTo", function (fraction, type, keepPlaying) {
        if (!_this.player) return null;
        _this.player.seekTo(fraction, type, keepPlaying);
      });
      __publicField(_assertThisInitialized(_this), "handleReady", function () {
        _this.props.onReady(_assertThisInitialized(_this));
      });
      __publicField(_assertThisInitialized(_this), "getActivePlayer", (0, import_memoize_one["default"])(function (url) {
        for (var _i = 0, _arr = [].concat(customPlayers, _toConsumableArray(players)); _i < _arr.length; _i++) {
          var _player2 = _arr[_i];
          if (_player2.canPlay(url)) {
            return _player2;
          }
        }
        if (fallback) {
          return fallback;
        }
        return null;
      }));
      __publicField(_assertThisInitialized(_this), "getConfig", (0, import_memoize_one["default"])(function (url, key) {
        var config = _this.props.config;
        return import_deepmerge["default"].all([import_props.defaultProps.config, import_props.defaultProps.config[key] || {}, config, config[key] || {}]);
      }));
      __publicField(_assertThisInitialized(_this), "getAttributes", (0, import_memoize_one["default"])(function (url) {
        return (0, import_utils.omit)(_this.props, SUPPORTED_PROPS);
      }));
      __publicField(_assertThisInitialized(_this), "renderActivePlayer", function (url) {
        if (!url) return null;
        var player = _this.getActivePlayer(url);
        if (!player) return null;
        var config = _this.getConfig(url, player.key);
        return /* @__PURE__ */import_react["default"].createElement(import_Player["default"], _objectSpread(_objectSpread({}, _this.props), {}, {
          key: player.key,
          ref: _this.references.player,
          config: config,
          activePlayer: player.lazyPlayer || player,
          onReady: _this.handleReady
        }));
      });
      return _this;
    }
    _createClass(_a, [{
      key: "shouldComponentUpdate",
      value: function shouldComponentUpdate(nextProps, nextState) {
        return !(0, import_react_fast_compare["default"])(this.props, nextProps) || !(0, import_react_fast_compare["default"])(this.state, nextState);
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps) {
        var light = this.props.light;
        if (!prevProps.light && light) {
          this.setState({
            showPreview: true
          });
        }
        if (prevProps.light && !light) {
          this.setState({
            showPreview: false
          });
        }
      }
    }, {
      key: "renderPreview",
      value: function renderPreview(url) {
        if (!url) return null;
        var _this$props = this.props,
          light = _this$props.light,
          playIcon = _this$props.playIcon,
          previewTabIndex = _this$props.previewTabIndex,
          oEmbedUrl = _this$props.oEmbedUrl,
          previewAriaLabel = _this$props.previewAriaLabel;
        return /* @__PURE__ */import_react["default"].createElement(Preview, {
          url: url,
          light: light,
          playIcon: playIcon,
          previewTabIndex: previewTabIndex,
          previewAriaLabel: previewAriaLabel,
          oEmbedUrl: oEmbedUrl,
          onClick: this.handleClickPreview
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this$props2 = this.props,
          url = _this$props2.url,
          style = _this$props2.style,
          width = _this$props2.width,
          height = _this$props2.height,
          fallback2 = _this$props2.fallback,
          Wrapper = _this$props2.wrapper;
        var showPreview = this.state.showPreview;
        var attributes = this.getAttributes(url);
        var wrapperRef = typeof Wrapper === "string" ? this.references.wrapper : void 0;
        return /* @__PURE__ */import_react["default"].createElement(Wrapper, _objectSpread({
          ref: wrapperRef,
          style: _objectSpread(_objectSpread({}, style), {}, {
            width: width,
            height: height
          })
        }, attributes), /* @__PURE__ */import_react["default"].createElement(UniversalSuspense, {
          fallback: fallback2
        }, showPreview ? this.renderPreview(url) : this.renderActivePlayer(url)));
      }
    }]);
    return _a;
  }(import_react.Component), __publicField(_a, "displayName", "ReactPlayer"), __publicField(_a, "propTypes", import_props.propTypes), __publicField(_a, "defaultProps", import_props.defaultProps), __publicField(_a, "addCustomPlayer", function (player) {
    customPlayers.push(player);
  }), __publicField(_a, "removeCustomPlayers", function () {
    customPlayers.length = 0;
  }), __publicField(_a, "canPlay", function (url) {
    for (var _i2 = 0, _arr2 = [].concat(customPlayers, _toConsumableArray(players)); _i2 < _arr2.length; _i2++) {
      var _Player = _arr2[_i2];
      if (_Player.canPlay(url)) {
        return true;
      }
    }
    return false;
  }), __publicField(_a, "canEnablePIP", function (url) {
    for (var _i3 = 0, _arr3 = [].concat(customPlayers, _toConsumableArray(players)); _i3 < _arr3.length; _i3++) {
      var _Player2 = _arr3[_i3];
      if (_Player2.canEnablePIP && _Player2.canEnablePIP(url)) {
        return true;
      }
    }
    return false;
  }), _a;
};
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(39)))

/***/ }),
/* 113 */
/***/ (function(module, exports) {

function _setPrototypeOf(o, p) {
  module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
  };
  return _setPrototypeOf(o, p);
}
module.exports = _setPrototypeOf;

/***/ }),
/* 114 */
/***/ (function(module, exports, __webpack_require__) {

var _defineProperty = __webpack_require__(68);
var _classCallCheck = __webpack_require__(69);
var _createClass = __webpack_require__(70);
var _assertThisInitialized = __webpack_require__(66);
var _inherits = __webpack_require__(71);
var _possibleConstructorReturn = __webpack_require__(72);
var _getPrototypeOf = __webpack_require__(73);
var _typeof = __webpack_require__(9);
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = function __defNormalProp(obj, key, value) {
  return key in obj ? __defProp(obj, key, {
    enumerable: true,
    configurable: true,
    writable: true,
    value: value
  }) : obj[key] = value;
};
var __export = function __export(target, all) {
  for (var name in all) {
    __defProp(target, name, {
      get: all[name],
      enumerable: true
    });
  }
};
var __copyProps = function __copyProps(to, from, except, desc) {
  if (from && _typeof(from) === "object" || typeof from === "function") {
    var _iterator = _createForOfIteratorHelper(__getOwnPropNames(from)),
      _step;
    try {
      var _loop = function _loop() {
        var key = _step.value;
        if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
          get: function get() {
            return from[key];
          },
          enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
        });
      };
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        _loop();
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
  }
  return to;
};
var __toESM = function __toESM(mod, isNodeMode, target) {
  return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
    value: mod,
    enumerable: true
  }) : target, mod);
};
var __toCommonJS = function __toCommonJS(mod) {
  return __copyProps(__defProp({}, "__esModule", {
    value: true
  }), mod);
};
var __publicField = function __publicField(obj, key, value) {
  __defNormalProp(obj, _typeof(key) !== "symbol" ? key + "" : key, value);
  return value;
};
var Player_exports = {};
__export(Player_exports, {
  "default": function _default() {
    return Player;
  }
});
module.exports = __toCommonJS(Player_exports);
var import_react = __toESM(__webpack_require__(0));
var import_react_fast_compare = __toESM(__webpack_require__(83));
var import_props = __webpack_require__(84);
var import_utils = __webpack_require__(63);
var SEEK_ON_PLAY_EXPIRY = 5e3;
var Player = /*#__PURE__*/function (_import_react$Compone) {
  "use strict";

  _inherits(Player, _import_react$Compone);
  var _super = _createSuper(Player);
  function Player() {
    var _this;
    _classCallCheck(this, Player);
    _this = _super.apply(this, arguments);
    __publicField(_assertThisInitialized(_this), "mounted", false);
    __publicField(_assertThisInitialized(_this), "isReady", false);
    __publicField(_assertThisInitialized(_this), "isPlaying", false);
    // Track playing state internally to prevent bugs
    __publicField(_assertThisInitialized(_this), "isLoading", true);
    // Use isLoading to prevent onPause when switching URL
    __publicField(_assertThisInitialized(_this), "loadOnReady", null);
    __publicField(_assertThisInitialized(_this), "startOnPlay", true);
    __publicField(_assertThisInitialized(_this), "seekOnPlay", null);
    __publicField(_assertThisInitialized(_this), "onDurationCalled", false);
    __publicField(_assertThisInitialized(_this), "handlePlayerMount", function (player) {
      if (_this.player) {
        _this.progress();
        return;
      }
      _this.player = player;
      _this.player.load(_this.props.url);
      _this.progress();
    });
    __publicField(_assertThisInitialized(_this), "getInternalPlayer", function (key) {
      if (!_this.player) return null;
      return _this.player[key];
    });
    __publicField(_assertThisInitialized(_this), "progress", function () {
      if (_this.props.url && _this.player && _this.isReady) {
        var _playedSeconds = _this.getCurrentTime() || 0;
        var _loadedSeconds = _this.getSecondsLoaded();
        var _duration = _this.getDuration();
        if (_duration) {
          var _progress = {
            playedSeconds: _playedSeconds,
            played: _playedSeconds / _duration
          };
          if (_loadedSeconds !== null) {
            _progress.loadedSeconds = _loadedSeconds;
            _progress.loaded = _loadedSeconds / _duration;
          }
          if (_progress.playedSeconds !== _this.prevPlayed || _progress.loadedSeconds !== _this.prevLoaded) {
            _this.props.onProgress(_progress);
          }
          _this.prevPlayed = _progress.playedSeconds;
          _this.prevLoaded = _progress.loadedSeconds;
        }
      }
      _this.progressTimeout = setTimeout(_this.progress, _this.props.progressFrequency || _this.props.progressInterval);
    });
    __publicField(_assertThisInitialized(_this), "handleReady", function () {
      if (!_this.mounted) return;
      _this.isReady = true;
      _this.isLoading = false;
      var _this$props = _this.props,
        onReady = _this$props.onReady,
        playing = _this$props.playing,
        volume = _this$props.volume,
        muted = _this$props.muted;
      onReady();
      if (!muted && volume !== null) {
        _this.player.setVolume(volume);
      }
      if (_this.loadOnReady) {
        _this.player.load(_this.loadOnReady, true);
        _this.loadOnReady = null;
      } else if (playing) {
        _this.player.play();
      }
      _this.handleDurationCheck();
    });
    __publicField(_assertThisInitialized(_this), "handlePlay", function () {
      _this.isPlaying = true;
      _this.isLoading = false;
      var _this$props2 = _this.props,
        onStart = _this$props2.onStart,
        onPlay = _this$props2.onPlay,
        playbackRate = _this$props2.playbackRate;
      if (_this.startOnPlay) {
        if (_this.player.setPlaybackRate && playbackRate !== 1) {
          _this.player.setPlaybackRate(playbackRate);
        }
        onStart();
        _this.startOnPlay = false;
      }
      onPlay();
      if (_this.seekOnPlay) {
        _this.seekTo(_this.seekOnPlay);
        _this.seekOnPlay = null;
      }
      _this.handleDurationCheck();
    });
    __publicField(_assertThisInitialized(_this), "handlePause", function (e) {
      _this.isPlaying = false;
      if (!_this.isLoading) {
        _this.props.onPause(e);
      }
    });
    __publicField(_assertThisInitialized(_this), "handleEnded", function () {
      var _this$props3 = _this.props,
        activePlayer = _this$props3.activePlayer,
        loop = _this$props3.loop,
        onEnded = _this$props3.onEnded;
      if (activePlayer.loopOnEnded && loop) {
        _this.seekTo(0);
      }
      if (!loop) {
        _this.isPlaying = false;
        onEnded();
      }
    });
    __publicField(_assertThisInitialized(_this), "handleError", function () {
      var _this$props4;
      _this.isLoading = false;
      (_this$props4 = _this.props).onError.apply(_this$props4, arguments);
    });
    __publicField(_assertThisInitialized(_this), "handleDurationCheck", function () {
      clearTimeout(_this.durationCheckTimeout);
      var duration = _this.getDuration();
      if (duration) {
        if (!_this.onDurationCalled) {
          _this.props.onDuration(duration);
          _this.onDurationCalled = true;
        }
      } else {
        _this.durationCheckTimeout = setTimeout(_this.handleDurationCheck, 100);
      }
    });
    __publicField(_assertThisInitialized(_this), "handleLoaded", function () {
      _this.isLoading = false;
    });
    return _this;
  }
  _createClass(Player, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      this.mounted = true;
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      clearTimeout(this.progressTimeout);
      clearTimeout(this.durationCheckTimeout);
      if (this.isReady && this.props.stopOnUnmount) {
        this.player.stop();
        if (this.player.disablePIP) {
          this.player.disablePIP();
        }
      }
      this.mounted = false;
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps) {
      var _this2 = this;
      if (!this.player) {
        return;
      }
      var _this$props5 = this.props,
        url = _this$props5.url,
        playing = _this$props5.playing,
        volume = _this$props5.volume,
        muted = _this$props5.muted,
        playbackRate = _this$props5.playbackRate,
        pip = _this$props5.pip,
        loop = _this$props5.loop,
        activePlayer = _this$props5.activePlayer,
        disableDeferredLoading = _this$props5.disableDeferredLoading;
      if (!(0, import_react_fast_compare["default"])(prevProps.url, url)) {
        if (this.isLoading && !activePlayer.forceLoad && !disableDeferredLoading && !(0, import_utils.isMediaStream)(url)) {
          console.warn("ReactPlayer: the attempt to load ".concat(url, " is being deferred until the player has loaded"));
          this.loadOnReady = url;
          return;
        }
        this.isLoading = true;
        this.startOnPlay = true;
        this.onDurationCalled = false;
        this.player.load(url, this.isReady);
      }
      if (!prevProps.playing && playing && !this.isPlaying) {
        this.player.play();
      }
      if (prevProps.playing && !playing && this.isPlaying) {
        this.player.pause();
      }
      if (!prevProps.pip && pip && this.player.enablePIP) {
        this.player.enablePIP();
      }
      if (prevProps.pip && !pip && this.player.disablePIP) {
        this.player.disablePIP();
      }
      if (prevProps.volume !== volume && volume !== null) {
        this.player.setVolume(volume);
      }
      if (prevProps.muted !== muted) {
        if (muted) {
          this.player.mute();
        } else {
          this.player.unmute();
          if (volume !== null) {
            setTimeout(function () {
              return _this2.player.setVolume(volume);
            });
          }
        }
      }
      if (prevProps.playbackRate !== playbackRate && this.player.setPlaybackRate) {
        this.player.setPlaybackRate(playbackRate);
      }
      if (prevProps.loop !== loop && this.player.setLoop) {
        this.player.setLoop(loop);
      }
    }
  }, {
    key: "getDuration",
    value: function getDuration() {
      if (!this.isReady) return null;
      return this.player.getDuration();
    }
  }, {
    key: "getCurrentTime",
    value: function getCurrentTime() {
      if (!this.isReady) return null;
      return this.player.getCurrentTime();
    }
  }, {
    key: "getSecondsLoaded",
    value: function getSecondsLoaded() {
      if (!this.isReady) return null;
      return this.player.getSecondsLoaded();
    }
  }, {
    key: "seekTo",
    value: function seekTo(amount, type, keepPlaying) {
      var _this3 = this;
      if (!this.isReady) {
        if (amount !== 0) {
          this.seekOnPlay = amount;
          setTimeout(function () {
            _this3.seekOnPlay = null;
          }, SEEK_ON_PLAY_EXPIRY);
        }
        return;
      }
      var isFraction = !type ? amount > 0 && amount < 1 : type === "fraction";
      if (isFraction) {
        var _duration2 = this.player.getDuration();
        if (!_duration2) {
          console.warn("ReactPlayer: could not seek using fraction \u2013\xA0duration not yet available");
          return;
        }
        this.player.seekTo(_duration2 * amount, keepPlaying);
        return;
      }
      this.player.seekTo(amount, keepPlaying);
    }
  }, {
    key: "render",
    value: function render() {
      var Player2 = this.props.activePlayer;
      if (!Player2) {
        return null;
      }
      return /* @__PURE__ */import_react["default"].createElement(Player2, _objectSpread(_objectSpread({}, this.props), {}, {
        onMount: this.handlePlayerMount,
        onReady: this.handleReady,
        onPlay: this.handlePlay,
        onPause: this.handlePause,
        onEnded: this.handleEnded,
        onLoaded: this.handleLoaded,
        onError: this.handleError
      }));
    }
  }]);
  return Player;
}(import_react.Component);
__publicField(Player, "displayName", "Player");
__publicField(Player, "propTypes", import_props.propTypes);
__publicField(Player, "defaultProps", import_props.defaultProps);

/***/ }),
/* 115 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, "closeApp", function() { return /* binding */ closeApp; });
__webpack_require__.d(__webpack_exports__, "show", function() { return /* binding */ show; });
__webpack_require__.d(__webpack_exports__, "showCartPageWidget", function() { return /* binding */ showCartPageWidget; });
__webpack_require__.d(__webpack_exports__, "showFunnel", function() { return /* binding */ showFunnel; });
__webpack_require__.d(__webpack_exports__, "setCustomGoToCheckout", function() { return /* binding */ setCustomGoToCheckout; });
__webpack_require__.d(__webpack_exports__, "onAcceptOffer", function() { return /* binding */ onAcceptOffer; });
__webpack_require__.d(__webpack_exports__, "onProceedToCheckout", function() { return /* binding */ onProceedToCheckout; });
__webpack_require__.d(__webpack_exports__, "getCampaignStatus", function() { return /* binding */ getCampaignStatus; });
__webpack_require__.d(__webpack_exports__, "onProceedToCheckoutWithNoMatchingFunnel", function() { return /* binding */ onProceedToCheckoutWithNoMatchingFunnel; });
__webpack_require__.d(__webpack_exports__, "setCachedCampaign", function() { return /* binding */ setCachedCampaign; });
__webpack_require__.d(__webpack_exports__, "setCachedAdditionalDiscountCode", function() { return /* binding */ setCachedAdditionalDiscountCode; });

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules
var toConsumableArray = __webpack_require__(10);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__(4);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
var slicedToArray = __webpack_require__(8);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(11);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(3);

// EXTERNAL MODULE: ./node_modules/preact/compat/dist/compat.module.js
var compat_module = __webpack_require__(0);

// EXTERNAL MODULE: ./node_modules/react-facebook-pixel/dist/fb-pixel.js
var fb_pixel = __webpack_require__(38);
var fb_pixel_default = /*#__PURE__*/__webpack_require__.n(fb_pixel);

// EXTERNAL MODULE: ./node_modules/react-snapchat-pixel/dist/snapchat-pixel.js
var snapchat_pixel = __webpack_require__(47);
var snapchat_pixel_default = /*#__PURE__*/__webpack_require__.n(snapchat_pixel);

// EXTERNAL MODULE: ./node_modules/react-ga/dist/esm/index.js + 11 modules
var esm = __webpack_require__(50);

// EXTERNAL MODULE: ./node_modules/lodash.isequal/index.js
var lodash_isequal = __webpack_require__(85);
var lodash_isequal_default = /*#__PURE__*/__webpack_require__.n(lodash_isequal);

// EXTERNAL MODULE: ./lib/Pinterest.js
var Pinterest = __webpack_require__(48);

// EXTERNAL MODULE: ./widget/style.scss
var widget_style = __webpack_require__(96);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__(13);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__(14);

// CONCATENATED MODULE: ./lib/MyEventListenerApp.js




var MyEventListenerApp_MyEvent = /*#__PURE__*/Object(createClass["a" /* default */])(function MyEvent(_namespace) {
  var _this = this;
  Object(classCallCheck["a" /* default */])(this, MyEvent);
  Object(defineProperty["a" /* default */])(this, "trigger", function (event, data) {
    window.postMessage({
      namespace: _this.namespace,
      event: event,
      data: data
    }, "*");
  });
  Object(defineProperty["a" /* default */])(this, "listen", function (eventWithNamespace, cb) {
    var _eventWithNamespace$s = eventWithNamespace.split(':'),
      _eventWithNamespace$s2 = Object(slicedToArray["a" /* default */])(_eventWithNamespace$s, 2),
      namespace = _eventWithNamespace$s2[0],
      event = _eventWithNamespace$s2[1];
    if (!event) {
      return;
    }
    _this.listeners.push({
      namespace: namespace,
      event: event,
      cb: cb
    });
  });
  this.namespace = _namespace;
  this.listeners = [];
  window.addEventListener("message", function (message) {
    _this.listeners.forEach(function (listener) {
      if (message.data.namespace === listener.namespace && message.data.event === listener.event) {
        listener.cb(message.data.data);
      }
    });
  }, false);
});
/* harmony default export */ var MyEventListenerApp = (MyEventListenerApp_MyEvent);
// CONCATENATED MODULE: ./lib/integrations/initRechargeIntegration.js


function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == Object(esm_typeof["a" /* default */])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(Object(esm_typeof["a" /* default */])(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function initRechargeIntegration(_x) {
  return _initRechargeIntegration.apply(this, arguments);
}
function _initRechargeIntegration() {
  _initRechargeIntegration = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(acceptedOffers) {
    return _regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            if (acceptedOffers && window.conversionBearUpsell.RECHARGE_PRODUCTS && window.conversionBearUpsell.RECHARGE_PRODUCTS.length && window.conversionBearUpsell.RECHARGE_PRODUCTS.some(function (e) {
              return JSON.stringify(acceptedOffers).indexOf(e.variantId) > -1;
            })) {
              console.log("Detected a recharge product in one of the upsell offers. Redirecting to Recharge checkout...");
              addRecharegeItemToCart(acceptedOffers[0].variant_id, acceptedOffers[0].quantity, acceptedOffers[0].frequency, acceptedOffers[0].unit_Type).then(function () {
                return null;
              });
            }
          case 1:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return _initRechargeIntegration.apply(this, arguments);
}
function addRecharegeItemToCart(_x2, _x3, _x4, _x5) {
  return _addRecharegeItemToCart.apply(this, arguments);
}
function _addRecharegeItemToCart() {
  _addRecharegeItemToCart = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(variant_id, qty, frequency, unit_type) {
    var data;
    return _regeneratorRuntime().wrap(function _callee2$(_context2) {
      while (1) {
        switch (_context2.prev = _context2.next) {
          case 0:
            data = {
              id: variant_id,
              quantity: qty,
              properties: {
                shipping_interval_frequency: frequency,
                shipping_interval_unit_type: unit_type
              }
            };
            return _context2.abrupt("return", fetch("/cart/add.js", {
              method: "POST",
              headers: {
                Accept: "application/json",
                "Content-Type": "application/json"
              },
              body: JSON.stringify(data)
            }).then(function (resp) {
              var paramCart = "&cart_token=" + (document.cookie.match("(^|; )cart=([^;]*)") || 0)[2];
              var paramDomain = "myshopify_domain=".concat(window.Shopify.shop);
              window.location = "https://checkout.rechargeapps.com/r/checkout?" + paramDomain + paramCart; // add cart token from response from shopify
            }));
          case 2:
          case "end":
            return _context2.stop();
        }
      }
    }, _callee2);
  }));
  return _addRecharegeItemToCart.apply(this, arguments);
}
/* harmony default export */ var integrations_initRechargeIntegration = (initRechargeIntegration);
// CONCATENATED MODULE: ./lib/buttonSelectorHooks.js
var addToCartSelectors = ['.add_to_cart_btn', '.add_to_cart_button', '.add_to_cart', '.add-to-cart-btn', '.add-to-cart-button', '.add-to-cart', '.addToCart', '.AddToCart', '.AddtoCart', '.addtocart', '.btn_add_to_cart', '.btn-add-to-cart', '.btn-addtocart', '.button_add_to_cart', '.button-add-to-cart', '[data-action="add-to-cart"]', '[data-action="AddToCart"]', '[name=add]', '[name=addToCart]', '[name=AddToCart]', '#add-to-cart-btn', '#add-to-cart', '#AddToCart', '#addToCartBtn', '#addToCartButton', '#btn-add-to-cart', '#btnAddToCart', '#shopify_add_to_cart', 'a[href^="/cart/add"]'];
var goToCheckoutSelectors = ['[name="checkout"]', 'a[href^="/checkout"]'];
// CONCATENATED MODULE: ./lib/updateCartNote.js


function updateCartNote_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ updateCartNote_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == Object(esm_typeof["a" /* default */])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(Object(esm_typeof["a" /* default */])(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var updateCartNotes = /*#__PURE__*/function () {
  var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/updateCartNote_regeneratorRuntime().mark(function _callee() {
    var _cartNote, _noteInputSelectors, _selector;
    return updateCartNote_regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            _context.prev = 0;
            _noteInputSelectors = ['#note', '#cartSpecialInstructions', '[name="note"]'];
            _selector = _noteInputSelectors.find(function (selector) {
              return document.querySelector(selector);
            });
            if (!(_selector && document.querySelector(_selector).value)) {
              _context.next = 7;
              break;
            }
            _cartNote = document.querySelector(_selector).value;
            _context.next = 8;
            break;
          case 7:
            return _context.abrupt("return");
          case 8:
            if (!(_cartNote && _cartNote !== "")) {
              _context.next = 11;
              break;
            }
            _context.next = 11;
            return fetch('/cart/update.js', {
              headers: {
                Accept: 'application/json',
                'Content-Type': 'application/json'
              },
              method: 'post',
              body: JSON.stringify({
                note: _cartNote
              })
            });
          case 11:
            _context.next = 17;
            break;
          case 13:
            _context.prev = 13;
            _context.t0 = _context["catch"](0);
            console.log("updateCartNotes -> e", _context.t0);
            return _context.abrupt("return");
          case 17:
          case "end":
            return _context.stop();
        }
      }
    }, _callee, null, [[0, 13]]);
  }));
  return function updateCartNotes() {
    return _ref.apply(this, arguments);
  };
}();
/* harmony default export */ var updateCartNote = (updateCartNotes);
// CONCATENATED MODULE: ./lib/submitterPolyfill.js
function submitterPolyfill() {
  var lastBtn = null;
  document.addEventListener('click', function (event) {
    if (!event.target.closest) {
      return;
    }
    lastBtn = event.target.closest('button, input[type=submit]');
  }, true);
  document.addEventListener('submit', function (event) {
    if (event.submitter) {
      return;
    }
    var canditates = [document.activeElement, lastBtn];
    for (var _i = 0; _i < canditates.length; _i++) {
      var _candidate = canditates[_i];
      if (!_candidate) {
        continue;
      }
      if (!_candidate.form) {
        continue;
      }
      if (!_candidate.matches('button, input[type=button], input[type=image], input[type=submit]')) {
        continue;
      }
      event.submitter = _candidate;
      return;
    }
    event.submitter = event.target.querySelector('button, input[type=button], input[type=image], input[type=submit]');
  }, true);
}
/* harmony default export */ var lib_submitterPolyfill = (submitterPolyfill);
// CONCATENATED MODULE: ./components/WidgetComponent/utils.js


function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { Object(defineProperty["a" /* default */])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var compareVariantOptions = function compareVariantOptions(left, right) {
  return ["option1", "option2", "option3"].every(function (key) {
    return left[key] === right[key];
  });
};
var utils_getVariantParamsFromId = function getVariantParamsFromId(id) {
  var qs = id && id.split("?")[1];
  var searchParams = qs && new URLSearchParams(qs);
  var params = searchParams && Object.fromEntries(Object(toConsumableArray["a" /* default */])(searchParams.entries()));
  if (params && params.shipping_interval_frequency) {
    params.shipping_interval_frequency = parseInt(params.shipping_interval_frequency, 10);
  }
  return params;
};
var getVariantIdFromProps = function getVariantIdFromProps(_ref) {
  var id = _ref.id,
    properties = _ref.properties;
  var _ref2 = properties || {},
    shipping_interval_unit_type = _ref2.shipping_interval_unit_type,
    shipping_interval_frequency = _ref2.shipping_interval_frequency;
  if (shipping_interval_unit_type && shipping_interval_frequency) {
    var _params = {
      shipping_interval_unit_type: shipping_interval_unit_type,
      shipping_interval_frequency: shipping_interval_frequency
    };
    var _searchParams = new URLSearchParams(_params);
    return "".concat(id, "?").concat(_searchParams.toString());
  } else {
    return String(id);
  }
};
var normalizeVariantId = function normalizeVariantId(id) {
  return String(id).split("?")[0];
};
var compareVariantIds = function compareVariantIds(left, right) {
  return normalizeVariantId(left) === normalizeVariantId(right);
};
var getAvailableVariants = function getAvailableVariants(offer, isSubscription) {
  var isOneTime = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  var product = offer.product;
  var excludeVariantIds = offer.is_exclude_variants && Array.isArray(offer.exclude_variant_ids) ? offer.exclude_variant_ids : [];
  excludeVariantIds = excludeVariantIds.map(function (id) {
    return String(id);
  });
  var oneTimeVariants = product.variants.filter(function (variant) {
    return !excludeVariantIds.includes(String(variant.id)) && !variant.subscription;
  });
  var subscriptionVariants = product.variants.filter(function (variant) {
    return !excludeVariantIds.includes(String(variant.id)) && variant.subscription;
  }).filter(function (variant) {
    return oneTimeVariants.some(function (it) {
      return compareVariantOptions(it, variant);
    });
  });
  var variants = isSubscription ? subscriptionVariants : oneTimeVariants;
  return variants.length === 0 ? product.variants : variants;
};
var getAvailableOptions = function getAvailableOptions(product, selectedVariant, availableVariants) {
  var options = [];
  var variants = availableVariants;
  product.options.forEach(function (option, index) {
    var key = "option".concat(index + 1);
    option.values.forEach(function (value) {
      if (variants.some(function (item) {
        return item[key] === value;
      })) {
        if (!options[index]) {
          options[index] = _objectSpread(_objectSpread({}, option), {}, {
            values: []
          });
        }
        options[index].values.push({
          title: value,
          value: value
        });
      }
    });
    variants = variants.filter(function (item) {
      return item[key] === selectedVariant[key];
    });
  });
  return options;
};
// EXTERNAL MODULE: ./widget/ErrorBoundary.js
var ErrorBoundary = __webpack_require__(41);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(12);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
var possibleConstructorReturn = __webpack_require__(15);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
var getPrototypeOf = __webpack_require__(7);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__(5);

// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__(16);

// EXTERNAL MODULE: ./node_modules/react-frame-component/lib/index.js
var lib = __webpack_require__(29);
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);

// EXTERNAL MODULE: ./node_modules/styled-components/dist/styled-components.browser.esm.js
var styled_components_browser_esm = __webpack_require__(2);

// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(36);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);

// EXTERNAL MODULE: ./components/WidgetComponent/WidgetComponent.js + 1 modules
var WidgetComponent = __webpack_require__(62);

// CONCATENATED MODULE: ./widget/components/Head.js






var __jsx = compat_module["default"].createElement;
function _callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }



var Head_CloseIcon = function CloseIcon(props) {
  return __jsx("svg", Object(esm_extends["a" /* default */])({
    width: "12",
    height: "12",
    viewBox: "0 0 12 12",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg"
  }, props), __jsx("path", {
    d: "M12 1.20857L10.7914 0L6 4.79143L1.20857 0L0 1.20857L4.79143 6L0 10.7914L1.20857 12L6 7.20857L10.7914 12L12 10.7914L7.20857 6L12 1.20857Z",
    fill: "#C1C1C1"
  }));
};
var ClickDiv = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Head__ClickDiv",
  componentId: "sc-h419cx-0"
})(["cursor:pointer;padding-left:20px;padding-right:10px;height:26px;display:flex;align-items:center;"]);
var Head_Header = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(Header, _Component);
  function Header(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, Header);
    _this = _callSuper(this, Header, [props]);
    _this.state = {};
    _this.swipe = {
      startX: 0,
      startY: 0,
      endX: 0,
      endY: 0
    };
    return _this;
  }
  Object(createClass["a" /* default */])(Header, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;
      //
      var element = compat_module["default"].findDOMNode(this);
      element.addEventListener('touchstart', function (event) {
        var setMinimized = _this2.props.setMinimized;
        if (event.target.className !== 'cb-widget-header') {
          setMinimized(true);
          return null;
        }
        var touchobj = event.changedTouches[0];
        // dist = 0
        _this2.swipe.startX = touchobj.pageX;
        _this2.swipe.startY = touchobj.pageY;
        event.preventDefault();
      }, false);
      element.addEventListener('touchend', function (event) {
        var setMinimized = _this2.props.setMinimized;
        var touchobj = event.changedTouches[0];
        _this2.swipe.endX = touchobj.pageX;
        _this2.swipe.endY = touchobj.pageY;
        if (_this2.swipe.endY - _this2.swipe.startY > 50) {
          setMinimized(true);
        }
        event.preventDefault();
      }, false);
    }
  }, {
    key: "render",
    value: function render() {
      var setMinimized = this.props.setMinimized;
      return __jsx("div", {
        className: "cb-widget-header",
        onClick: function onClick(event) {
          return event.stopPropagation();
        }
      }, __jsx(ClickDiv, {
        onClick: function onClick() {
          setMinimized(true);
        }
      }, __jsx(Head_CloseIcon, null)));
    }
  }]);
  return Header;
}(compat_module["Component"]);
/* harmony default export */ var Head = (Head_Header);
// EXTERNAL MODULE: ./node_modules/lodash.findindex/index.js
var lodash_findindex = __webpack_require__(18);
var lodash_findindex_default = /*#__PURE__*/__webpack_require__.n(lodash_findindex);

// CONCATENATED MODULE: ./redux/config.js
var config = {
  fonts: [{
    caption: 'Lato',
    'font-family': 'Lato',
    "class": 'Font-Lato'
  }, {
    caption: 'Arial',
    'font-family': 'Arial',
    "class": 'Font-Arial'
  }, {
    caption: 'Roboto',
    'font-family': 'Roboto',
    "class": 'Font-Roboto'
  }, {
    caption: 'Raleway',
    'font-family': 'Raleway',
    "class": 'Font-Raleway'
  }, {
    caption: 'Josefin Slab',
    'font-family': 'Josefin Slab',
    "class": 'Font-Josefin_Slab'
  }, {
    caption: 'Open Sans',
    'font-family': 'Open Sans',
    "class": 'Font-Open_Sans'
  }, {
    caption: 'Montserrat',
    'font-family': 'Montserrat',
    "class": 'Font-Montserrat'
  }, {
    caption: 'Ubuntu',
    'font-family': 'Ubuntu',
    "class": 'Font-Ubuntu'
  }, {
    caption: 'Bitter',
    'font-family': 'Bitter',
    "class": 'Font-Bitter'
  }, {
    caption: 'Pacifico',
    'font-family': 'Pacifico',
    "class": 'Font-Pacifico'
  }, {
    caption: 'Noto Sans',
    'font-family': 'Noto Sans',
    "class": 'Font-Noto_Sans'
  }, {
    caption: 'Acme',
    'font-family': 'Acme',
    "class": 'Font-Acme'
  }, {
    caption: 'Archivo',
    'font-family': 'Archivo',
    "class": 'Font-Archivo'
  }, {
    caption: 'Asap',
    'font-family': 'Asap',
    "class": 'Font-Asap'
  }, {
    caption: 'Barlow',
    'font-family': 'Barlow',
    "class": 'Font-Barlow'
  }, {
    caption: 'Cabin',
    'font-family': 'Cabin',
    "class": 'Font-Cabin'
  }, {
    caption: 'Catamaran',
    'font-family': 'Catamaran',
    "class": 'Font-Catamaran'
  }, {
    caption: 'Didact',
    'font-family': 'Didact Gothic',
    "class": 'Font-Didact'
  }, {
    caption: 'Fjalla',
    'font-family': 'Fjalla One',
    "class": 'Font-Fjalla'
  }, {
    caption: 'Fredoka',
    'font-family': 'Fredoka One',
    "class": 'Font-Fredoka'
  }, {
    caption: 'Hammersmith',
    'font-family': 'Hammersmith One',
    "class": 'Font-Hammersmith'
  }, {
    caption: 'Josefin Sans',
    'font-family': 'Josefin Sans',
    "class": 'Font-Josefin'
  }, {
    caption: 'Kalam',
    'font-family': 'Kalam',
    "class": 'Font-Kalam'
  }, {
    caption: 'Lora',
    'font-family': 'Lora',
    "class": 'Font-Lora'
  }, {
    caption: 'Manjari',
    'font-family': 'Manjari',
    "class": 'Font-Manjari'
  }, {
    caption: 'Mansalva',
    'font-family': 'Mansalva',
    "class": 'Font-Mansalva'
  }, {
    caption: 'Notable',
    'font-family': 'Notable',
    "class": 'Font-Notable'
  }, {
    caption: 'Oswald',
    'font-family': 'Oswald',
    "class": 'Font-Oswald'
  }, {
    caption: 'Overpass',
    'font-family': 'Overpass',
    "class": 'Font-Overpass'
  }, {
    caption: 'Neuton',
    'font-family': 'Neuton',
    "class": 'Font-Neuton'
  }, {
    caption: 'Ultra',
    'font-family': 'Ultra',
    "class": 'Font-Ultra'
  }, {
    caption: 'Vidaloka',
    'font-family': 'Vidaloka',
    "class": 'Font-Vidaloka'
  }, {
    caption: 'Vollkorn',
    'font-family': 'Vollkorn',
    "class": 'Font-Vollkorn'
  }, {
    caption: 'Lexend',
    'font-family': 'Lexend Zetta',
    "class": 'Font-Lexend'
  }, {
    caption: 'Poppins',
    'font-family': 'Poppins',
    "class": 'Font-Poppins'
  }, {
    caption: 'Playfair Display',
    'font-family': 'Playfair Display',
    "class": 'Font-Playfair'
  }, {
    caption: 'Work Sans',
    'font-family': 'Work Sans',
    "class": 'Font-Work'
  }, {
    caption: 'Nunito',
    'font-family': 'Nunito',
    "class": 'Font-Nunito'
  }, {
    caption: 'Roboto Condensed',
    'font-family': 'Roboto Condensed',
    "class": 'Font-Roboto-Condensed'
  }, {
    caption: 'Cardo',
    'font-family': 'Cardo',
    "class": 'Font-Cardo'
  }, {
    caption: 'Heebo',
    'font-family': 'Heebo',
    "class": 'Font-Heebo'
  }],
  colors: {
    storefront: ['#464141', '#BEBEBE', '#80d1ff', '#BAFBF7', '#E5FF46'],
    recommended: ['#2FC3A6', '#3ED07E', '#41A3DD', '#AD71C5', '#466078', '#263644', '#F3CA31', '#F2A531', '#E85649', '#E1E9EB', '#47C1BF'],
    gradients: [{
      name: 'gradient_yellow',
      style: 'linear-gradient(90deg, #F3CA31 0%, #F2A531 100%)',
      start_color: '#F3CA31',
      end_color: '#F2A531'
    }, {
      name: 'gradient_violet',
      style: 'linear-gradient(90deg, #AD71C5 0%, #B600FF 100%)',
      start_color: '#AD71C5',
      end_color: '#B600FF'
    }, {
      name: 'gradient_green',
      style: 'linear-gradient(90deg, #2FC3A6 0%, #3ED07E 100%)',
      start_color: '#2FC3A6',
      end_color: '#3ED07E'
    }, {
      name: 'gradient_blue',
      style: 'linear-gradient(90deg, #09BCB9 0%, #0D6EC8 100%)',
      start_color: '#09BCB9',
      end_color: '#0D6EC8'
    }, {
      name: 'gradient_orange',
      style: 'linear-gradient(90deg, #FB40FF 0%, #FFCE1A 100%)',
      start_color: '#FB40FF',
      end_color: '#FFCE1A'
    }, {
      name: 'gradient_violet2',
      style: 'linear-gradient(90deg, #4401FF 0%, #A901FF 100%)',
      start_color: '#4401FF',
      end_color: '#A901FF'
    }, {
      name: 'gradient_pink',
      style: 'linear-gradient(90deg, #FC4353 0%, #FC2179 100%)',
      start_color: '#FC4353',
      end_color: '#FC2179'
    }, {
      name: 'gradient_instagram',
      style: 'linear-gradient(90deg, #FFBF00 0%, #FF00A4 47.94%, #4F5CD5 100%)',
      start_color: '#FFBF00',
      end_color: '#4F5CD5'
    }]
  },
  pricing: [{
    name: 'Free',
    price: 0,
    item: [true, true, true, true, false],
    limit: 100
  }, {
    name: 'Silver',
    price: 49.99,
    item: [true, true, true, true, true],
    limit: 2000
  }, {
    name: 'Gold',
    tooltipMassage: 'LIMITED TIME OFFER',
    compareAtPrice: 119.99,
    price: 99.99,
    item: [true, true, true, true, true],
    limit: 5000
  }, {
    name: 'Platinum',
    price: 149.99,
    item: [true, true, true, true, true],
    limit: 10000
  }, {
    name: 'Unlimited',
    tooltipMassage: 'RECOMMENDED',
    price: 299.99,
    item: [true, true, true, true, true],
    limit: 'Unlimited'
  }],
  veteranPlan: {
    name: 'Partner Plan',
    compareAtPrice: 199.99,
    price: 19.99,
    item: [true, true, true, true, true],
    limit: 'Unlimited'
  },
  earlyPlan: {
    name: 'Partner Plan',
    compareAtPrice: 199.99,
    price: 29.99,
    item: [true, true, true, true, true],
    limit: 'Unlimited'
  }
};
/* harmony default export */ var redux_config = (config);
// CONCATENATED MODULE: ./components/WidgetComponent/components/icons/ArrowLeft.js

var ArrowLeft_jsx = compat_module["default"].createElement;

var ArrowLeft_ArrowLeft = function ArrowLeft(props) {
  return ArrowLeft_jsx("svg", Object(esm_extends["a" /* default */])({
    width: "6",
    height: "10",
    viewBox: "0 0 6 10",
    xmlns: "http://www.w3.org/2000/svg"
  }, props), ArrowLeft_jsx("path", {
    d: "M0.00068452 5C0.000684529 4.78668 0.0823477 4.57335 0.244841 4.41086L4.41134 0.244365C4.73716 -0.081455 5.2638 -0.081455 5.58962 0.244365C5.91544 0.570185 5.91544 1.09683 5.58962 1.42265L2.01227 5L5.58962 8.57735C5.91544 8.90317 5.91544 9.42982 5.58962 9.75564C5.2638 10.0815 4.73715 10.0815 4.41133 9.75564L0.244841 5.58914C0.0823476 5.42665 0.00068451 5.21332 0.00068452 5Z"
  }));
};
/* harmony default export */ var icons_ArrowLeft = (ArrowLeft_ArrowLeft);
// CONCATENATED MODULE: ./components/WidgetComponent/components/icons/ArrowRight.js

var ArrowRight_jsx = compat_module["default"].createElement;

var ArrowRight_ArrowRight = function ArrowRight(props) {
  return ArrowRight_jsx("svg", Object(esm_extends["a" /* default */])({
    width: "6",
    height: "10",
    viewBox: "0 0 6 10",
    xmlns: "http://www.w3.org/2000/svg"
  }, props), ArrowRight_jsx("path", {
    d: "M5.8333 5C5.8333 5.21332 5.75164 5.42665 5.58914 5.58914L1.42265 9.75564C1.09683 10.0815 0.570185 10.0815 0.244365 9.75564C-0.081455 9.42982 -0.081455 8.90317 0.244365 8.57735L3.82172 5L0.244364 1.42265C-0.0814554 1.09683 -0.0814554 0.570185 0.244364 0.244365C0.570184 -0.0814553 1.09683 -0.0814553 1.42265 0.244365L5.58914 4.41086C5.75164 4.57335 5.8333 4.78668 5.8333 5Z"
  }));
};
/* harmony default export */ var icons_ArrowRight = (ArrowRight_ArrowRight);
// CONCATENATED MODULE: ./components/WidgetComponent/components/TopNavigation.js





var TopNavigation_jsx = compat_module["default"].createElement;
function TopNavigation_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, TopNavigation_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function TopNavigation_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (TopNavigation_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }






var colors = redux_config.colors;
var TopNavigation_TopNavigation = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(TopNavigation, _Component);
  function TopNavigation(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, TopNavigation);
    _this = TopNavigation_callSuper(this, TopNavigation, [props]);
    _this.state = {};
    return _this;
  }
  Object(createClass["a" /* default */])(TopNavigation, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
        campaign = _this$props.campaign,
        active_offer = _this$props.active_offer,
        settings_theme = _this$props.settings_theme,
        nextOffer = _this$props.nextOffer,
        prevOffer = _this$props.prevOffer,
        isPreview = _this$props.isPreview,
        isDesktopView = _this$props.isDesktopView;
      var background_color = '#212B36';
      if (settings_theme.upsell_page.top_background_color) {
        background_color = settings_theme.upsell_page.top_background_color;
        if (background_color.indexOf('gradient_') > -1) {
          var _index = lodash_findindex_default()(colors.gradients, ['name', background_color]);
          if (_index > -1) {
            background_color = colors.gradients[_index].style;
          }
        }
      }
      if (campaign.offers.length === 1) {
        return null;
      }
      var Container = styled_components_browser_esm["c" /* default */].div.withConfig({
        displayName: "TopNavigation__Container",
        componentId: "sc-cbs-0"
      })(["display:flex;background:", ";flex-direction:column;"], background_color);
      var Nav = styled_components_browser_esm["c" /* default */].div.withConfig({
        displayName: "TopNavigation__Nav",
        componentId: "sc-cbs-1"
      })(["display:flex;justify-content:space-between;padding:1.1rem 1rem;"]);
      var Left = styled_components_browser_esm["c" /* default */].div.withConfig({
        displayName: "TopNavigation__Left",
        componentId: "sc-cbs-2"
      })(["display:flex;align-items:baseline;cursor:pointer;font-size:1.5rem;line-height:1.8rem;", ""], function (_ref) {
        var isDesktopView = _ref.isDesktopView;
        return isDesktopView ? "\n        color: ".concat(settings_theme.upsell_page.text_color, ";\n        font-family: ").concat(settings_theme.top_bar.font, ";\n      ") : "\n        color: ".concat(settings_theme.upsell_page.text_color, ";\n        font-family: 'Open Sans', sans-serif;\n      ");
      });
      var Right = styled_components_browser_esm["c" /* default */].div.withConfig({
        displayName: "TopNavigation__Right",
        componentId: "sc-cbs-3"
      })(["color:", ";display:flex;align-items:baseline;cursor:pointer;line-height:1.8rem;font-size:1.5rem;", ""], settings_theme.upsell_page.text_color, function (_ref2) {
        var isDesktopView = _ref2.isDesktopView;
        return isDesktopView ? "\n        color: ".concat(settings_theme.upsell_page.text_color, ";\n        font-family: ").concat(settings_theme.top_bar.font, ";\n      ") : "\n        color: ".concat(settings_theme.upsell_page.text_color, ";\n        font-family: 'Open Sans', sans-serif;\n      ");
      });
      return TopNavigation_jsx(Container, {
        id: "top-navigation",
        top_background_color: settings_theme.upsell_page.top_background_color
      }, TopNavigation_jsx(Nav, null, active_offer !== 0 ? TopNavigation_jsx(Left, {
        text_color: settings_theme.upsell_page.text_color,
        isDesktopView: isDesktopView,
        onClick: function onClick() {
          prevOffer();
        }
      }, TopNavigation_jsx(icons_ArrowLeft, {
        style: {
          width: '1.8rem',
          fill: settings_theme.upsell_page.text_color
        }
      }), " ", settings_theme.upsell_page.previous_offer_text || '') : TopNavigation_jsx("div", null), campaign.offers.length !== active_offer + 1 ? TopNavigation_jsx(Right, {
        text_color: settings_theme.upsell_page.text_color,
        isDesktopView: isDesktopView,
        onClick: function onClick() {
          nextOffer();
        }
      }, settings_theme.upsell_page.next_offer_text || '', " ", TopNavigation_jsx(icons_ArrowRight, {
        style: {
          width: '1.8rem',
          fill: settings_theme.upsell_page.text_color
        }
      })) : null));
    }
  }]);
  return TopNavigation;
}(compat_module["Component"]);
/* harmony default export */ var components_TopNavigation = (TopNavigation_TopNavigation);
// CONCATENATED MODULE: ./components/WidgetComponent/components/NextOfferMobile.js





var NextOfferMobile_jsx = compat_module["default"].createElement;
function NextOfferMobile_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, NextOfferMobile_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function NextOfferMobile_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (NextOfferMobile_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }


var ContainerRight = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "NextOfferMobile__ContainerRight",
  componentId: "sc-jy2poa-0"
})(["position:absolute;height:100%;width:30%;right:0;"]);
var ContainerLeft = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "NextOfferMobile__ContainerLeft",
  componentId: "sc-jy2poa-1"
})(["position:absolute;height:100%;width:30%;left:0;"]);
var NextOfferMobile_NextOfferMobile = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(NextOfferMobile, _Component);
  function NextOfferMobile(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, NextOfferMobile);
    _this = NextOfferMobile_callSuper(this, NextOfferMobile, [props]);
    _this.state = {};
    return _this;
  }
  Object(createClass["a" /* default */])(NextOfferMobile, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
        nextOffer = _this$props.nextOffer,
        campaign = _this$props.campaign,
        active_offer = _this$props.active_offer,
        prevOffer = _this$props.prevOffer,
        isMobile = _this$props.isMobile;
      if (!isMobile) {
        return null;
      }
      return NextOfferMobile_jsx(compat_module["default"].Fragment, null, active_offer !== 0 ? NextOfferMobile_jsx(ContainerLeft, {
        onClick: function onClick() {
          if (prevOffer) {
            prevOffer();
          }
        }
      }) : null, campaign.offers.length !== active_offer + 1 ? NextOfferMobile_jsx(ContainerRight, {
        onClick: function onClick() {
          if (nextOffer) {
            nextOffer();
          }
        }
      }) : null);
    }
  }]);
  return NextOfferMobile;
}(compat_module["Component"]);
/* harmony default export */ var components_NextOfferMobile = (NextOfferMobile_NextOfferMobile);
// CONCATENATED MODULE: ./components/WidgetComponent/components/TopBar.js
var TopBar_jsx = compat_module["default"].createElement;





var TopBar_colors = redux_config.colors;
var TopBar_TopBar = function TopBar(props) {
  var top_bar = props.settings_theme.top_bar,
    offer = props.offer,
    isDesktopView = props.isDesktopView;
  if (!top_bar.show) {
    return null;
  }
  var background_color = '#212B36';
  if (top_bar.background_color) {
    background_color = top_bar.background_color;
    if (top_bar.background_color.indexOf('gradient_') > -1) {
      var _index = lodash_findindex_default()(TopBar_colors.gradients, ['name', top_bar.background_color]);
      if (_index > -1) {
        background_color = TopBar_colors.gradients[_index].style;
      }
    }
  }
  var Container = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "TopBar__Container",
    componentId: "sc-1axsm0y-0"
  })(["display:flex;width:100%;", " background:", ";justify-content:center;color:", ";align-items:center;position:relative;"], function (_ref) {
    var isDesktopView = _ref.isDesktopView;
    return isDesktopView ? 'padding: 0.8rem 1rem;' : ' padding: 1rem;';
  }, background_color, top_bar.text_color);
  var Paragraph = styled_components_browser_esm["c" /* default */].p.withConfig({
    displayName: "TopBar__Paragraph",
    componentId: "sc-1axsm0y-1"
  })(["", " margin:0;overflow:hidden;text-overflow:ellipsis;color:", ";font-size:", "rem;font-family:", ";text-align:center;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;width:100%;"], function (_ref2) {
    var isDesktopView = _ref2.isDesktopView;
    return isDesktopView ? "\n     overflow: hidden;\n     text-overflow: ellipsis;\n     display: -webkit-box;\n     -webkit-line-clamp: 2;\n     -webkit-box-orient: vertical;\n      line-height: calc(".concat(top_bar.text_size / 10, "rem + ").concat(top_bar.font === 'Pacifico' ? '1.8rem' : '5px', ");\n    ") : "\n      line-height:  ".concat(top_bar.font === 'Pacifico' ? 1.8 : 1.3, ";\n      max-height: 54px;  \n    ");
  }, top_bar.text_color, top_bar.text_size / 10, top_bar.font);
  var title = offer.offer_text;
  return TopBar_jsx(Container, {
    id: "top-bar",
    isDesktopView: isDesktopView
  }, TopBar_jsx(components_NextOfferMobile, props), TopBar_jsx(Paragraph, {
    isDesktopView: isDesktopView,
    dangerouslySetInnerHTML: {
      __html: title
    }
  }));
};
/* harmony default export */ var components_TopBar = (TopBar_TopBar);
// CONCATENATED MODULE: ./components/WidgetComponent/components/CountdownTimer.js







var CountdownTimer_jsx = compat_module["default"].createElement;
function CountdownTimer_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, CountdownTimer_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function CountdownTimer_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (CountdownTimer_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }






var CountdownTimer_colors = redux_config.colors;
var CountdownTimer_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CountdownTimer__Container",
  componentId: "sc-1qnx14f-0"
})(["display:flex;background:", ";justify-content:center;align-items:center;flex-direction:column;border-radius:0.2rem;position:relative;", " opacity:1;&.fadeDownColor{transition:opacity .5s;-moz-transition:opacity .5s;-webkit-transition:opacity .5s;opacity:0;", ";", ";", ";", ";}&.fadeDownHeight{transition:min-height .5s linear;-moz-transition:min-height .5s linear;-webkit-transition:min-height .5s linear;min-height:0px;}"], function (props) {
  return props.background_color;
}, function (_ref) {
  var isDesktopView = _ref.isDesktopView;
  return isDesktopView ? "\n      padding: 8px 1rem;\n      margin: 2px 1rem;\n    " : "\n      margin: 0 1rem;\n      margin-bottom: 1rem;\n      padding: 0.9rem 1rem;\n    ";
}, function (props) {
  return props.minimized ? "height: calc(100vh - ".concat(props.containerHeight - props.height - 10, "px)") : "min-height: ".concat(props.height, "px");
}, function (props) {
  return props.minimized ? 'margin: 0 !important' : '';
}, function (props) {
  return props.minimized || props.animateHeight ? 'padding: 0 !important;' : '';
}, function (props) {
  return props.animateHeight ? 'display: block !important;' : '';
});
var ContainerText = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CountdownTimer__ContainerText",
  componentId: "sc-1qnx14f-1"
})(["color:", ";font-size:", "rem;line-height:", "rem;font-family:", ";text-align:center;"], function (props) {
  return props.countdown_timer.text_color;
}, function (props) {
  return props.countdown_timer.text_size / 10;
}, function (props) {
  return (parseInt(props.countdown_timer.text_size, 10) + 3) / 10;
}, function (props) {
  return props.countdown_timer.font;
});
var Text = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CountdownTimer__Text",
  componentId: "sc-1qnx14f-2"
})(["overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word;"]);
var ContainerTextCartPage = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CountdownTimer__ContainerTextCartPage",
  componentId: "sc-1qnx14f-3"
})(["color:", ";font-size:", "rem;line-height:", "rem;font-family:", ";text-align:center;display:flex;"], function (props) {
  return props.countdown_timer.text_color;
}, function (props) {
  return props.countdown_timer.text_size / 10;
}, function (props) {
  return props.isDesktopView ? (parseInt(props.countdown_timer.text_size, 10) + (props.countdown_timer.font === 'Pacifico' ? 12 : 5)) / 10 : (parseInt(props.countdown_timer.text_size, 10) + 3) / 10;
}, function (props) {
  return props.countdown_timer.font;
});
var Timer = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CountdownTimer__Timer",
  componentId: "sc-1qnx14f-4"
})(["align-self:flex-end;margin-left:5px;"]);
var CountdownTimer_CountdownTimer = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(CountdownTimer, _Component);
  function CountdownTimer(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, CountdownTimer);
    _this = CountdownTimer_callSuper(this, CountdownTimer, [props]);
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "startInterval", function () {
      clearInterval(_this.timer);
      _this.timer = setInterval(function () {
        var nextOffer = _this.props.nextOffer;
        var _this$state = _this.state,
          startTime = _this$state.startTime,
          maxTime = _this$state.maxTime;
        var _this$props = _this.props,
          isPreview = _this$props.isPreview,
          campaign = _this$props.campaign,
          active_offer = _this$props.active_offer,
          setItemHideCountDownTimer = _this$props.setItemHideCountDownTimer,
          setCountDownTimerAnimate = _this$props.setCountDownTimerAnimate,
          minimized = _this$props.minimized;
        if (isPreview) {
          return;
        }
        var seconds = maxTime - Math.round(new Date().getTime() - startTime) / 1000;
        if (seconds <= 0) {
          nextOffer();
          if (active_offer === campaign.offers.length - 1) {
            _this.setState({
              seconds: 0,
              animate: true
            }, function () {
              if (setCountDownTimerAnimate) {
                setCountDownTimerAnimate();
              }
              setTimeout(function () {
                if (minimized) {
                  _this.setState({
                    hideContent: true
                  });
                  if (setCountDownTimerAnimate) {
                    setCountDownTimerAnimate();
                  }
                } else {
                  _this.setState({
                    animateHeight: true
                  });
                }
              }, 500);
              setTimeout(function () {
                setItemHideCountDownTimer("offer_".concat(active_offer), true);
              }, 1000);
            });
          } else {
            _this.setState({
              seconds: 0
            });
            if (_this.refTimer.current) {
              _this.refTimer.current.innerText = '00:00';
            }
          }
          clearInterval(_this.timer);
          return;
        }
        if (_this.state.seconds) {
          _this.state.seconds = maxTime - Math.round((new Date().getTime() - startTime) / 1000);
          var _timers4 = _this._getTimes();
          var _text4 = "".concat(_timers4.minutes_10).concat(_timers4.minutes, ":").concat(_timers4.seconds_10).concat(_timers4.seconds);
          if (_this.refTimer.current) {
            _this.refTimer.current.innerText = _text4;
          }
        }
      }, 1000);
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "_getTimes", function () {
      var minutes = Math.floor(_this.state.seconds / 60);
      var seconds = _this.state.seconds - minutes * 60;
      return {
        minutes_10: minutes >= 10 ? Math.floor(minutes / 10) : 0,
        minutes: minutes >= 10 ? minutes - Math.floor(minutes / 10) * 10 : minutes,
        seconds_10: seconds >= 10 ? Math.floor(seconds / 10) : 0,
        seconds: seconds >= 10 ? seconds - Math.floor(seconds / 10) * 10 : seconds
      };
    });
    var _startTime = props.startTime,
      _maxTime = props.maxTime,
      _isPreview = props.isPreview;
    _this.state = {
      seconds: _isPreview ? _maxTime : _maxTime - Math.round((new Date().getTime() - _startTime) / 1000) || 0,
      startTime: _startTime,
      maxTime: _maxTime,
      animateHeight: false,
      height: 0,
      containerHeight: 0,
      hideContent: false
    };
    _this.refElement = /*#__PURE__*/compat_module["default"].createRef();
    _this.refTimer = /*#__PURE__*/compat_module["default"].createRef();
    _this.timer = null;
    _this.animateTimer = null;
    return _this;
  }
  Object(createClass["a" /* default */])(CountdownTimer, [{
    key: "componentWillReceiveProps",
    value: function componentWillReceiveProps(nextProps) {
      var startTime = nextProps.startTime,
        maxTime = nextProps.maxTime,
        isPreview = nextProps.isPreview,
        active_offer = nextProps.active_offer,
        hideCountDownTimerItems = nextProps.hideCountDownTimerItems;
      if (isPreview) {
        // this.setState({
        //   seconds: maxTime,
        //   maxTime,
        // });
        this.state.seconds = maxTime;
        this.state.maxTime = maxTime;
        var _timers2 = this._getTimes();
        var _text2 = "".concat(_timers2.minutes_10).concat(_timers2.minutes, ":").concat(_timers2.seconds_10).concat(_timers2.seconds);
        if (this.refTimer.current) {
          this.refTimer.current.innerText = _text2;
        }
        return null;
      }
      if (!hideCountDownTimerItems["offer_".concat(active_offer)]) {
        this.state.seconds = maxTime - Math.round((new Date().getTime() - startTime) / 1000) || 0;
        this.state.startTime = startTime;
        this.state.maxTime = maxTime;
        var _timers3 = this._getTimes();
        var _text3 = "".concat(_timers3.minutes_10).concat(_timers3.minutes, ":").concat(_timers3.seconds_10).concat(_timers3.seconds);
        if (this.refTimer.current) {
          this.refTimer.current.innerText = _text3;
        }
        this.startInterval();
      }
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;
      var _this$props2 = this.props,
        isPreview = _this$props2.isPreview,
        active_offer = _this$props2.active_offer,
        hideCountDownTimerItems = _this$props2.hideCountDownTimerItems,
        containerHeight = _this$props2.containerHeight;
      if (this.refElement.current) {
        this.state.height = this.refElement.current.clientHeight;
      }
      if (containerHeight === 0) {
        setTimeout(function () {
          var containerHeight = _this2.props.containerHeight;
          if (containerHeight !== 0) {
            _this2.state.containerHeight = containerHeight;
          }
        }, 1000);
      } else {
        this.state.containerHeight = containerHeight;
      }
      if (isPreview || hideCountDownTimerItems["offer_".concat(active_offer)]) {
        return null;
      }
      this.startInterval();
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      clearInterval(this.timer);
      clearInterval(this.animateTimer);
    }
  }, {
    key: "render",
    value: function render() {
      var _this$props3 = this.props,
        countdown_timer = _this$props3.settings_theme.countdown_timer,
        hideCountDownTimerItems = _this$props3.hideCountDownTimerItems,
        active_offer = _this$props3.active_offer,
        minimized = _this$props3.minimized,
        isDesktopView = _this$props3.isDesktopView;
      if (hideCountDownTimerItems["offer_".concat(active_offer)]) {
        return null;
      }
      var background_color = 'linear-gradient(180deg, #4200FF 0%, #AD00FF 100%)';
      if (countdown_timer.background_color) {
        background_color = countdown_timer.background_color;
        if (countdown_timer.background_color.indexOf('gradient_') > -1) {
          var _index = lodash_findindex_default()(CountdownTimer_colors.gradients, ['name', countdown_timer.background_color]);
          if (_index > -1) {
            background_color = CountdownTimer_colors.gradients[_index].style;
          }
        }
      }
      var timers = this._getTimes();
      return CountdownTimer_jsx(CountdownTimer_Container, {
        isDesktopView: isDesktopView,
        height: this.state.height,
        containerHeight: this.state.containerHeight,
        animateHeight: this.state.animateHeight,
        className: classnames_default()({
          fadeDownColor: this.state.animate,
          fadeDownHeight: this.state.animateHeight
        }, 'countdown-timer'),
        background_color: background_color,
        id: "count-down-timer",
        minimized: minimized,
        ref: this.refElement
      }, !this.state.hideContent ? CountdownTimer_jsx(components_NextOfferMobile, this.props) : null, !this.state.hideContent && isDesktopView ? CountdownTimer_jsx(ContainerTextCartPage, {
        isDesktopView: isDesktopView,
        countdown_timer: countdown_timer
      }, CountdownTimer_jsx(Text, {
        countdown_timer: countdown_timer
      }, countdown_timer.bar_text), CountdownTimer_jsx(Timer, {
        ref: this.refTimer
      }, this.refTimer && this.refTimer.current && this.refTimer.current.innerText !== '' ? '' : "".concat(timers.minutes_10).concat(timers.minutes, ":").concat(timers.seconds_10).concat(timers.seconds))) : CountdownTimer_jsx(ContainerText, {
        countdown_timer: countdown_timer
      }, countdown_timer.bar_text, " ", CountdownTimer_jsx("span", {
        ref: this.refTimer
      }, this.refTimer && this.refTimer.current && this.refTimer.current.innerText !== '' ? '' : "".concat(timers.minutes_10).concat(timers.minutes, ":").concat(timers.seconds_10).concat(timers.seconds))));
    }
  }]);
  return CountdownTimer;
}(compat_module["Component"]);
/* harmony default export */ var components_CountdownTimer = (CountdownTimer_CountdownTimer);
// EXTERNAL MODULE: ./lib/formatPrice.js
var formatPrice = __webpack_require__(23);

// CONCATENATED MODULE: ./lib/formatDiscount.js

var formatDiscount_formatDiscount = function formatDiscount(price, compare_at_price, discountFormat, currencyFormat) {
  return discountFormat.replace("{{discount-amount}}", Object(formatPrice["a" /* default */])({
    priceAmount: parseFloat(compare_at_price - price).toFixed(2),
    currencyFormat: currencyFormat
  }));
};
/* harmony default export */ var lib_formatDiscount = (formatDiscount_formatDiscount);
// EXTERNAL MODULE: ./node_modules/pluralize/pluralize.js
var pluralize = __webpack_require__(64);
var pluralize_default = /*#__PURE__*/__webpack_require__.n(pluralize);

// CONCATENATED MODULE: ./components/WidgetComponent/components/ProductTitle.js
var ProductTitle_jsx = compat_module["default"].createElement;




var ProductTitle_ProductTitle = function ProductTitle(_ref) {
  var product = _ref.product,
    settings_theme = _ref.settings_theme,
    className = _ref.className,
    isDesktopView = _ref.isDesktopView,
    campaign = _ref.campaign,
    offer = _ref.offer;
  var Container = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "ProductTitle__Container",
    componentId: "sc-1dl5paf-0"
  })(["font-weight:bold;font-size:1.2rem;justify-content:center;text-align:center;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;", " color:", ";font-family:", ";line-height:", ";"], function (_ref2) {
    var isDesktopView = _ref2.isDesktopView;
    return isDesktopView ? "\n        overflow: hidden;\n        text-overflow: ellipsis;\n        display: -webkit-box;\n        -webkit-line-clamp: 3;\n        -webkit-box-orient: vertical;\n        margin: 0;\n        text-align: left;\n        word-break: break-word;\n    " : "margin: 0 1rem;";
  }, settings_theme.product.text_color || "#212B36", settings_theme.product.font, settings_theme.product.font === "Pacifico" ? 1.8 : 1.3);
  var title = product.title;
  if (title) {
    title = title.replace(/<[^>]*>/g, "");
  }
  if (campaign.offer_type === "upsell" && campaign.upsell_offer_type === "variant") {
    var _upsellVariantId = offer.variant_upsell[0];
    var _properties = _upsellVariantId && utils_getVariantParamsFromId(_upsellVariantId);
    if (_properties !== null && _properties !== void 0 && _properties.shipping_interval_frequency) {
      var frequency = _properties.shipping_interval_frequency,
        unit = _properties.shipping_interval_unit_type;
      title += " (every ".concat(frequency, " ").concat(pluralize_default()(unit, frequency), ")");
    }
  }
  return ProductTitle_jsx(Container, {
    className: className,
    isDesktopView: isDesktopView
  }, " ", title, " ");
};
/* harmony default export */ var components_ProductTitle = (ProductTitle_ProductTitle);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Description.js
var Description_jsx = compat_module["default"].createElement;


var Description_Description = function Description(_ref) {
  var product = _ref.product,
    settings_theme = _ref.settings_theme,
    offer = _ref.offer,
    isDesktopView = _ref.isDesktopView;
  var Container = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Description__Container",
    componentId: "sc-227cue-0"
  })(["height:100%;font-size:1.6rem;line-height:normal;word-break:break-word;padding:", ";font-family:", ";color:", ";background:", ";img,iframe{max-width:100%;height:auto;}h1,h2,h3,h4,h5{line-height:normal;}"], isDesktopView ? '1rem 0 0 0;' : '1rem;', settings_theme.price.font, settings_theme.product.description_text_color || '#212B36', isDesktopView ? settings_theme.upsell_page.background_color || 'white' : settings_theme.product.description_bg_color || 'white');
  if (offer && offer.show_offer_description && offer.offer_description) {
    return offer.offer_description && Description_jsx(Container, {
      className: "product-description",
      dangerouslySetInnerHTML: {
        __html: offer.offer_description
      }
    });
  }
  if (!settings_theme.product.show_description) {
    return null;
  }
  return product.body_html && Description_jsx(Container, {
    className: "product-description",
    dangerouslySetInnerHTML: {
      __html: product.body_html
    }
  });
};
/* harmony default export */ var components_Description = (Description_Description);
// CONCATENATED MODULE: ./components/WidgetComponent/components/icons/IconShipping.js

var IconShipping_jsx = compat_module["default"].createElement;


// const IconShipping = (props) => {
//   return (
//     <svg width="22" height="10" viewBox="0 0 22 10" {...props} xmlns="http://www.w3.org/2000/svg">
//       <path fillRule="evenodd" clipRule="evenodd" d="M18.125 2.5H20L21.875 5V8.125H20.625C20.625 9.1625 19.7875 10 18.75 10C17.7125 10 16.875 9.1625 16.875 8.125H13.125C13.125 9.1625 12.2875 10 11.25 10C10.2125 10 9.375 9.1625 9.375 8.125H8.125V1.25C8.125 0.5625 8.6875 0 9.375 0H18.125V2.5ZM10.3125 8.125C10.3125 8.64375 10.7312 9.0625 11.25 9.0625C11.7688 9.0625 12.1875 8.64375 12.1875 8.125C12.1875 7.60625 11.7688 7.1875 11.25 7.1875C10.7312 7.1875 10.3125 7.60625 10.3125 8.125ZM20.9125 5L19.6875 3.4375H18.125V5H20.9125ZM17.8125 8.125C17.8125 8.64375 18.2313 9.0625 18.75 9.0625C19.2687 9.0625 19.6875 8.64375 19.6875 8.125C19.6875 7.60625 19.2687 7.1875 18.75 7.1875C18.2313 7.1875 17.8125 7.60625 17.8125 8.125ZM6.25 3.125H0V3.75H6.25V3.125ZM1.25 5H6.25V5.625H1.25V5ZM6.25 6.875H2.5V7.5H6.25V6.875Z"/>
//     </svg>
//   );
// };

var IconShipping_IconShipping = function IconShipping(props) {
  return IconShipping_jsx("svg", Object(esm_extends["a" /* default */])({
    width: "24",
    height: "11",
    viewBox: "0 0 24 11"
  }, props, {
    xmlns: "http://www.w3.org/2000/svg"
  }), IconShipping_jsx("path", {
    fillRule: "evenodd",
    clipRule: "evenodd",
    d: "M19.8857 2.74286H21.9429L24 5.48571V8.91429H22.6286C22.6286 10.0526 21.7097 10.9714 20.5714 10.9714C19.4332 10.9714 18.5143 10.0526 18.5143 8.91429H14.4C14.4 10.0526 13.4812 10.9714 12.3429 10.9714C11.2046 10.9714 10.2857 10.0526 10.2857 8.91429H8.91431V1.37143C8.91431 0.617143 9.53145 0 10.2857 0H19.8857V2.74286ZM11.3143 8.91429C11.3143 9.48343 11.7737 9.94286 12.3429 9.94286C12.912 9.94286 13.3714 9.48343 13.3714 8.91429C13.3714 8.34514 12.912 7.88571 12.3429 7.88571C11.7737 7.88571 11.3143 8.34514 11.3143 8.91429ZM22.944 5.48571L21.6 3.77143H19.8857V5.48571H22.944ZM19.5429 8.91429C19.5429 9.48343 20.0023 9.94286 20.5714 9.94286C21.1406 9.94286 21.6 9.48343 21.6 8.91429C21.6 8.34514 21.1406 7.88571 20.5714 7.88571C20.0023 7.88571 19.5429 8.34514 19.5429 8.91429ZM6.85714 3.42857H0V4.11429H6.85714V3.42857ZM1.37146 5.48572H6.85717V6.17143H1.37146V5.48572ZM6.85715 7.54286H2.74287V8.22857H6.85715V7.54286Z"
  }));
};
/* harmony default export */ var icons_IconShipping = (IconShipping_IconShipping);
// CONCATENATED MODULE: ./components/WidgetComponent/components/ArrowDown.js

var ArrowDown_jsx = compat_module["default"].createElement;

var ArrowDown_icon = function icon(props) {
  return ArrowDown_jsx("svg", Object(esm_extends["a" /* default */])({
    width: "11",
    "aria-hidden": "true",
    focusable: "false",
    "data-prefix": "fas",
    "data-icon": "chevron-down",
    className: "svg-inline--fa fa-chevron-down fa-w-14",
    role: "img",
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 448 512"
  }, props), ArrowDown_jsx("path", {
    fill: "currentColor",
    d: "M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"
  }));
};
/* harmony default export */ var ArrowDown = (ArrowDown_icon);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Select.js
var Select_jsx = compat_module["default"].createElement;





var Select_colors = redux_config.colors;
var Select_Select = function Select(_ref) {
  var name = _ref.name,
    value = _ref.value,
    onChange = _ref.onChange,
    style = _ref.style,
    options = _ref.options,
    label = _ref.label,
    settings = _ref.settings,
    _ref$displayOneOption = _ref.displayOneOption,
    displayOneOption = _ref$displayOneOption === void 0 ? false : _ref$displayOneOption;
  var styles = {
    select: {},
    div: {}
  };
  if (settings.product.variants_text_color) {
    styles.div.color = settings.product.variants_text_color;
    styles.select.color = settings.product.variants_text_color;
  }
  if (settings.product.vartiants_bg_color) {
    styles.select.background = settings.product.vartiants_bg_color;
    if (settings.product.vartiants_bg_color.indexOf("gradient_") > -1) {
      var _index = lodash_findindex_default()(Select_colors.gradients, ["name", settings.product.vartiants_bg_color]);
      if (_index > -1) {
        styles.select.background = Select_colors.gradients[_index].style;
      }
    }
  }
  if (settings.product.font) {
    styles.select.fontFamily = "'".concat(settings.product.font, "', sans-serif");
  }
  if (options.length <= 1 && !displayOneOption) {
    return null;
  }
  var SelectInput = styled_components_browser_esm["c" /* default */].select.withConfig({
    displayName: "Select__SelectInput",
    componentId: "sc-erdrr6-0"
  })(["color:", ";background:", ";font-family:", ";border-radius:0.5rem;border:0.1rem solid #c6c9cc;height:3.8rem;appearance:none;-webkit-appearance:none;-moz-appearance:none;padding:0 1.2rem;padding-right:2.3rem;width:100%;font-size:1.6rem;line-height:1.9rem;text-overflow:ellipsis;"], styles.select.color ? styles.select.color : "black", styles.select.background ? styles.select.background : "white", styles.select.fontFamily ? styles.select.fontFamily : "");
  var SelectDiv = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Select__SelectDiv",
    componentId: "sc-erdrr6-1"
  })(["color:", ";position:relative;display:flex;align-items:center;flex:auto;"], styles.div.color ? styles.div.color : "black");
  var Label = styled_components_browser_esm["c" /* default */].label.withConfig({
    displayName: "Select__Label",
    componentId: "sc-erdrr6-2"
  })(["position:absolute;right:1.5rem;pointer-events:none;display:flex;justify-content:center;align-items:center;"]);
  var Container = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Select__Container",
    componentId: "sc-erdrr6-3"
  })(["display:flex;width:50%;flex:auto;flex-direction:column;"]);
  var Title = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Select__Title",
    componentId: "sc-erdrr6-4"
  })(["font-size:1.4rem;color:", ";font-family:", ";line-height:1.7rem;margin-bottom:0.6rem;"], styles.div.color ? styles.div.color : "black", styles.select.fontFamily ? styles.select.fontFamily : "");
  return Select_jsx(Container, {
    style: style
  }, Select_jsx(Title, null, label), Select_jsx(SelectDiv, null, Select_jsx(SelectInput, {
    name: name,
    value: value,
    onChange: onChange,
    id: "id-select-".concat(name)
  }, options.map(function (item, index) {
    return Select_jsx("option", {
      key: "".concat(name, "-item-").concat(value, "-").concat(index),
      value: item.value
    }, item.title);
  })), Select_jsx(Label, {
    htmlFor: "id-select-".concat(name)
  }, Select_jsx(ArrowDown, {
    fill: styles.select.color
  }))));
};
/* harmony default export */ var components_Select = (Select_Select);
// CONCATENATED MODULE: ./components/WidgetComponent/components/icons/IconMinus.js

var IconMinus_jsx = compat_module["default"].createElement;

var IconMinus_IconMinus = function IconMinus(props) {
  return IconMinus_jsx("svg", Object(esm_extends["a" /* default */])({
    width: "12",
    height: "2",
    viewBox: "0 0 12 2"
  }, props, {
    xmlns: "http://www.w3.org/2000/svg"
  }), IconMinus_jsx("path", {
    d: "M11 0H1C0.447 0 0 0.448 0 1C0 1.552 0.447 2 1 2H11C11.553 2 12 1.552 12 1C12 0.448 11.553 0 11 0Z"
  }));
};
/* harmony default export */ var icons_IconMinus = (IconMinus_IconMinus);
// CONCATENATED MODULE: ./components/WidgetComponent/components/icons/IconPlus.js

var IconPlus_jsx = compat_module["default"].createElement;

var IconPlus_IconPlus = function IconPlus(props) {
  return IconPlus_jsx("svg", Object(esm_extends["a" /* default */])({
    width: "12",
    height: "12",
    viewBox: "0 0 12 12"
  }, props, {
    xmlns: "http://www.w3.org/2000/svg"
  }), IconPlus_jsx("path", {
    d: "M5 5V1C5 0.447021 5.44727 0 6 0C6.55273 0 7 0.447021 7 1V5H11C11.5527 5 12 5.448 12 6C12 6.552 11.5527 7 11 7H7V11C7 11.553 6.55273 12 6 12C5.44727 12 5 11.553 5 11V7H1C0.447266 7 0 6.552 0 6C0 5.448 0.447266 5 1 5H5Z"
  }));
};
/* harmony default export */ var icons_IconPlus = (IconPlus_IconPlus);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Quantity.js

var Quantity_jsx = compat_module["default"].createElement;
function Quantity_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function Quantity_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Quantity_ownKeys(Object(t), !0).forEach(function (r) { Object(defineProperty["a" /* default */])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Quantity_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }






var Quantity_colors = redux_config.colors;
var Quantity_Quantity = function Quantity(_ref) {
  var quantity = _ref.quantity,
    settings = _ref.settings,
    style = _ref.style,
    onChange = _ref.onChange,
    _ref$label = _ref.label,
    label = _ref$label === void 0 ? "Quantity" : _ref$label;
  var styles = {
    div: {
      color: "#212B36",
      background: "#FFFFFF"
    },
    separator: {
      background: "#212B36"
    },
    bt: {
      color: "#212B36"
    }
  };
  if (settings.product.variants_text_color) {
    styles.div.color = settings.product.variants_text_color;
    styles.bt.color = settings.product.variants_text_color;
  }
  if (settings.product.vartiants_bg_color) {
    styles.div.background = settings.product.vartiants_bg_color;
    if (settings.product.vartiants_bg_color.indexOf("gradient_") > -1) {
      var _index = lodash_findindex_default()(Quantity_colors.gradients, ["name", settings.product.vartiants_bg_color]);
      if (_index > -1) {
        styles.div.background = Quantity_colors.gradients[_index].style;
      }
    }
  }
  var styleMinus = Quantity_objectSpread({}, styles.bt);
  var QuantityDiv = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Quantity__QuantityDiv",
    componentId: "sc-1i4iala-0"
  })(["color:", ";background:", ";border-radius:0.5rem;border:1px solid #c6c9cc;font-size:1.6rem;line-height:1.9rem;display:flex;flex-direction:row;height:3.8rem;align-items:center;"], styles.div.color || "black", styles.div.background ? styles.div.background : "white");
  var CountDiv = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Quantity__CountDiv",
    componentId: "sc-1i4iala-1"
  })(["min-width:\"3.6rem\";text-align:center;color:", ";flex:auto;font-family:", ";"], styles.div.color || "black", settings.product.font);
  var Separator = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Quantity__Separator",
    componentId: "sc-1i4iala-2"
  })(["height:3.8rem;width:1px;background:#c6c9cc;"]);
  var Button = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Quantity__Button",
    componentId: "sc-1i4iala-3"
  })(["min-width:3.8rem;height:3.8rem;text-align:center;display:flex;align-items:center;justify-content:center;cursor:pointer;color:", ";-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;"], styles.bt.color || "black");
  var Container = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Quantity__Container",
    componentId: "sc-1i4iala-4"
  })(["display:flex;width:50%;flex-direction:column;font-size:1.6rem;"]);
  var Title = styled_components_browser_esm["c" /* default */].div.withConfig({
    displayName: "Quantity__Title",
    componentId: "sc-1i4iala-5"
  })(["font-size:1.4rem;font-family:", ";line-height:1.7rem;color:", ";margin-bottom:0.6rem;overflow:hidden;text-overflow:ellipsis;"], settings.product.font ? settings.product.font : "", styles.div.color ? styles.div.color : "black");
  return Quantity_jsx(Container, {
    style: style
  }, Quantity_jsx(Title, null, label), Quantity_jsx(QuantityDiv, null, Quantity_jsx(Button, {
    style: styleMinus,
    onClick: function onClick() {
      if (quantity > 1 && onChange) {
        onChange(parseInt(quantity, 10) - 1);
      }
    }
  }, Quantity_jsx(icons_IconMinus, {
    style: {
      width: "1.2rem",
      height: "0.2rem",
      fill: styles.div.color ? styles.div.color : "black"
    }
  })), Quantity_jsx(Separator, null), Quantity_jsx(CountDiv, null, quantity), Quantity_jsx(Separator, null), Quantity_jsx(Button, {
    onClick: function onClick() {
      if (onChange) {
        onChange(parseInt(quantity, 10) + 1);
      }
    }
  }, Quantity_jsx(icons_IconPlus, {
    style: {
      width: "1.2rem",
      height: "1.2rem",
      fill: styles.div.color ? styles.div.color : "black"
    }
  }))));
};
/* harmony default export */ var components_Quantity = (Quantity_Quantity);
// CONCATENATED MODULE: ./hooks/useDebounce.js


function useDebounce(value, delay) {
  var _React$useState = compat_module["default"].useState(value),
    _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2),
    debouncedValue = _React$useState2[0],
    setDebouncedValue = _React$useState2[1];
  compat_module["default"].useEffect(function () {
    var handler = setTimeout(function () {
      return setDebouncedValue(value);
    }, delay);
    return function () {
      return clearTimeout(handler);
    };
  }, [value, delay]);
  return debouncedValue;
}
// CONCATENATED MODULE: ./components/WidgetComponent/components/CustomField.js
var CustomField_jsx = compat_module["default"].createElement;





var CustomField_colors = redux_config.colors;
var CustomField_styles = {
  div: {
    color: "#212B36",
    background: "#FFFFFF"
  },
  separator: {
    background: "#212B36"
  },
  bt: {
    color: "#212B36"
  }
};
var CustomField_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CustomField__Container",
  componentId: "sc-8d2h9f-0"
})(["display:flex;justify-content:flex-end;flex-direction:column;width:", ";font-size:1.6rem;"], function (_ref) {
  var isDesktopView = _ref.isDesktopView;
  return isDesktopView ? "100%" : "calc(50% - 0.4rem)";
});
var CustomField_Title = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CustomField__Title",
  componentId: "sc-8d2h9f-1"
})(["font-size:1.4rem;font-family:", ";line-height:1.7rem;color:", ";margin-bottom:0.6rem;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;word-break:break-all;-webkit-box-orient:vertical;-webkit-line-clamp:2;"], function (_ref2) {
  var settings = _ref2.settings;
  return settings.product.font ? settings.product.font : "";
}, function (_ref3) {
  var error = _ref3.error;
  return error ? "#FF0000" : CustomField_styles.div.color ? CustomField_styles.div.color : "black";
});
var InputDiv = styled_components_browser_esm["c" /* default */].input.withConfig({
  displayName: "CustomField__InputDiv",
  componentId: "sc-8d2h9f-2"
})(["color:", ";background:", ";border-radius:0.5rem;border:", ";font-size:1.6rem;line-height:1.9rem;display:flex;flex-direction:row;height:3.8rem;align-items:center;padding:0 1rem;"], CustomField_styles.div.color || "black", CustomField_styles.div.background ? CustomField_styles.div.background : "white", function (_ref4) {
  var error = _ref4.error;
  return error ? "2px solid #FF0000" : "1px solid #C6C9CC";
});
var CustomField_CustomField = function CustomField(_ref5) {
  var field = _ref5.field,
    settings = _ref5.settings,
    onChangeProperties = _ref5.onChangeProperties,
    customFieldErrors = _ref5.customFieldErrors,
    properties = _ref5.properties,
    isDesktopView = _ref5.isDesktopView,
    elementScroll = _ref5.elementScroll,
    isPreview = _ref5.isPreview,
    setWidgetHeight = _ref5.setWidgetHeight,
    offer = _ref5.offer,
    key = _ref5.key;
  var currentValue = properties && properties[field.field_name] ? properties[field.field_name].value : false;
  var _useState = Object(compat_module["useState"])(field.has_default_value ? currentValue === false || currentValue === null ? field.default_value : currentValue : currentValue || ''),
    value = _useState[0],
    setValue = _useState[1];
  var _useState2 = Object(compat_module["useState"])(false),
    error = _useState2[0],
    setError = _useState2[1];
  var element = Object(compat_module["useRef"])(null);
  var debouncedValue = useDebounce(value, 25);
  Object(compat_module["useEffect"])(function () {
    if (isPreview) {
      setValue(field.default_value);
    }
  }, [field.default_value, isPreview]);
  Object(compat_module["useEffect"])(function () {
    if (Object.keys(customFieldErrors).length && customFieldErrors[field.field_name]) {
      if (element.current && elementScroll.current) {
        elementScroll.current.scrollTo({
          top: element.current.offsetTop,
          left: 0,
          behavior: "smooth"
        });
      }
      setError(true);
    }
  }, [customFieldErrors, elementScroll, field.field_name]);
  Object(compat_module["useEffect"])(function () {
    if (field.has_default_value) {
      onChangeProperties(debouncedValue === false ? field.default_value : debouncedValue, field.field_name);
    } else {
      onChangeProperties(debouncedValue === false ? "" : debouncedValue, field.field_name);
    }
  }, [debouncedValue, field.default_value, field.field_name, field.has_default_value, onChangeProperties, offer]);
  if (settings.product.variants_text_color) {
    CustomField_styles.div.color = settings.product.variants_text_color;
    CustomField_styles.bt.color = settings.product.variants_text_color;
  }
  if (settings.product.vartiants_bg_color) {
    CustomField_styles.div.background = settings.product.vartiants_bg_color;
    if (settings.product.vartiants_bg_color.indexOf("gradient_") > -1) {
      var _index = lodash_findindex_default()(CustomField_colors.gradients, ["name", settings.product.vartiants_bg_color]);
      if (_index > -1) {
        CustomField_styles.div.background = CustomField_colors.gradients[_index].style;
      }
    }
  }
  return CustomField_jsx(CustomField_Container, {
    isDesktopView: isDesktopView,
    ref: element
  }, CustomField_jsx(CustomField_Title, {
    error: error,
    settings: settings
  }, field.label), CustomField_jsx(InputDiv, {
    key: key,
    error: error,
    value: value,
    onFocus: function onFocus() {
      setError(false);
    },
    onChange: function onChange(event) {
      setValue(event.target.value);
      setError(false);
      onChangeProperties(event.target.value, field.field_name);
    },
    onBlur: function onBlur() {
      if (typeof setWidgetHeight === 'function') {
        setWidgetHeight();
      }
    },
    placeholder: field.has_placeholder_text ? field.placeholder_text : '',
    maxLength: field.has_character_limit ? field.character_limit : 99999
  }));
};
/* harmony default export */ var components_CustomField = (CustomField_CustomField);
// EXTERNAL MODULE: ./components/WidgetComponent/components/WidgetParams.js + 3 modules
var WidgetParams = __webpack_require__(25);

// CONCATENATED MODULE: ./components/WidgetComponent/components/CustomFieldSelect.js
var CustomFieldSelect_jsx = compat_module["default"].createElement;






var CustomFieldSelect_colors = redux_config.colors;
var CustomFieldSelect_stylesFromTheme = function stylesFromTheme(theme) {
  var styles = {
    select: {},
    div: {},
    radio: {}
  };
  if (theme.product.variants_text_color) {
    styles.div.color = theme.product.variants_text_color;
    styles.select.color = theme.product.variants_text_color;
  }
  if (theme.product.vartiants_bg_color) {
    styles.select.background = theme.product.vartiants_bg_color;
    if (theme.product.vartiants_bg_color.indexOf("gradient_") > -1) {
      var _index = lodash_findindex_default()(CustomFieldSelect_colors.gradients, ["name", theme.product.vartiants_bg_color]);
      if (_index > -1) {
        styles.select.background = CustomFieldSelect_colors.gradients[_index].style;
      }
    }
  }
  if (theme.product.font) {
    styles.select.fontFamily = "'".concat(theme.product.font, "', sans-serif");
  }
  if (theme.product.button_color) {
    styles.radio.background = theme.product.button_color;
  }
  if (theme.product.variants_text_color) {
    styles.radio.border = theme.product.variants_text_color;
  }
  return styles;
};
var CustomFieldSelect_SelectInput = styled_components_browser_esm["c" /* default */].select.withConfig({
  displayName: "CustomFieldSelect__SelectInput",
  componentId: "sc-tnhd5s-0"
})(["", " border-radius:0.5rem;border:0.1rem solid #c6c9cc;height:3.8rem;appearance:none;-webkit-appearance:none;-moz-appearance:none;padding:0 1.2rem;padding-right:2.3rem;width:100%;font-size:1.6rem;line-height:1.9rem;text-overflow:ellipsis;"], function (_ref) {
  var styles = _ref.styles;
  return "\n      color: ".concat(styles.select.color ? styles.select.color : "black", ";\n      background: ").concat(styles.select.background ? styles.select.background : "white", ";\n      font-family: ").concat(styles.select.fontFamily ? styles.select.fontFamily : "", ";\n    ");
});
var CustomFieldSelect_SelectDiv = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CustomFieldSelect__SelectDiv",
  componentId: "sc-tnhd5s-1"
})(["", " position:relative;display:flex;align-items:center;flex:auto;"], function (_ref2) {
  var styles = _ref2.styles;
  return "\n       color: ".concat(styles.div.color ? styles.div.color : "black", ";\n    ");
});
var CustomFieldSelect_Label = styled_components_browser_esm["c" /* default */].label.withConfig({
  displayName: "CustomFieldSelect__Label",
  componentId: "sc-tnhd5s-2"
})(["position:absolute;right:1.5rem;pointer-events:none;display:flex;justify-content:center;align-items:center;"]);
var CustomFieldSelect_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CustomFieldSelect__Container",
  componentId: "sc-tnhd5s-3"
})(["display:flex;width:", ";flex:auto;flex-direction:column;align-self:flex-end;"], function (_ref3) {
  var isDesktopView = _ref3.isDesktopView;
  return isDesktopView ? "100%" : "calc(50% - 0.4rem)";
});
var CustomFieldSelect_Title = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CustomFieldSelect__Title",
  componentId: "sc-tnhd5s-4"
})(["", " font-size:1.4rem;line-height:1.7rem;margin-bottom:0.6rem;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;word-break:break-all;-webkit-box-orient:vertical;-webkit-line-clamp:2;"], function (_ref4) {
  var styles = _ref4.styles;
  return "\n       color: ".concat(styles.div.color ? styles.div.color : "black", ";\n       font-family: ").concat(styles.select.fontFamily ? styles.select.fontFamily : "", ";\n    ");
});
var CustomFieldSelect_CustomFieldSelect = function CustomFieldSelect(_ref5) {
  var properties = _ref5.properties,
    onChangeProperties = _ref5.onChangeProperties,
    options = _ref5.options,
    label = _ref5.label,
    field = _ref5.field;
  var theme = Object(WidgetParams["e" /* useTheme */])();
  var isDesktopView = Object(WidgetParams["c" /* useIsDesktopView */])();
  var selectEl = Object(compat_module["useRef"])(null);
  var _useState = Object(compat_module["useState"])(200),
    countLetters = _useState[0],
    setCountLetters = _useState[1];
  var hasOptions = options.filter(Boolean).length > 0;
  Object(compat_module["useEffect"])(function () {
    if (hasOptions && !(properties && properties[field.field_name] && properties[field.field_name].value)) {
      onChangeProperties(options[0], field.field_name);
    }
  }, [field.field_name, hasOptions, onChangeProperties, options, properties]);
  Object(compat_module["useEffect"])(function () {
    if (selectEl.current && selectEl.current.clientWidth) {
      setCountLetters(Math.floor(selectEl.current.clientWidth / 7 - 2));
    }
  }, [selectEl]);
  var styles = CustomFieldSelect_stylesFromTheme(theme);
  return CustomFieldSelect_jsx(CustomFieldSelect_Container, {
    ref: selectEl,
    isDesktopView: isDesktopView
  }, CustomFieldSelect_jsx(CustomFieldSelect_Title, {
    styles: styles
  }, label), CustomFieldSelect_jsx(CustomFieldSelect_SelectDiv, {
    styles: styles
  }, CustomFieldSelect_jsx(CustomFieldSelect_SelectInput, {
    styles: styles,
    value: properties && properties[field.field_name] && properties[field.field_name].value ? properties[field.field_name].value : options[0],
    onChange: function onChange(event) {
      onChangeProperties(event.target.value, field.field_name);
    },
    id: "id-select-".concat(field.field_name)
  }, options.map(function (item, index) {
    return CustomFieldSelect_jsx("option", {
      key: index,
      value: item
    }, item && item.length > countLetters ? "".concat(item.slice(0, countLetters), "...") : item);
  })), CustomFieldSelect_jsx(CustomFieldSelect_Label, {
    htmlFor: "id-select-".concat(field.field_name)
  }, CustomFieldSelect_jsx(ArrowDown, {
    fill: styles.select.color
  }))));
};
/* harmony default export */ var components_CustomFieldSelect = (CustomFieldSelect_CustomFieldSelect);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Options.js



var Options_jsx = compat_module["default"].createElement;
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function Options_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function Options_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Options_ownKeys(Object(t), !0).forEach(function (r) { Object(defineProperty["a" /* default */])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Options_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }







var Options_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Options__Container",
  componentId: "sc-15zauvg-0"
})(["display:flex;flex-direction:column;", ""], function (_ref) {
  var isDesktopView = _ref.isDesktopView;
  return isDesktopView ? " padding: 1rem 0 0 0;" : "padding: 1rem;";
});
var Row = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Options__Row",
  componentId: "sc-15zauvg-1"
})(["display:flex;", ""], function (_ref2) {
  var isDesktopView = _ref2.isDesktopView,
    lastFullWidth = _ref2.lastFullWidth,
    inputCount = _ref2.inputCount,
    upsellVariantWithCustomFields = _ref2.upsellVariantWithCustomFields;
  return isDesktopView ? "\n    flex-direction: column;\n    margin-bottom: 0rem;\n    & > div {\n     margin-bottom: 1rem;\n    }\n  " : "\n    flex-direction: row;\n    flex-wrap: wrap;\n    gap: 0.8rem;\n    & > div:last-child{\n      ".concat(lastFullWidth && inputCount !== 2 && !upsellVariantWithCustomFields && "width: 100% !important", "\n    }\n  ");
});
var Options_Options = function Options(props) {
  var _properties$shipping_;
  var settings_theme = props.settings_theme,
    campaign = props.campaign,
    variant = props.variant,
    onChangeQuantity = props.onChangeQuantity,
    quantity = props.quantity,
    offer = props.offer,
    product = props.product,
    isDesktopView = props.isDesktopView,
    onChangeProperties = props.onChangeProperties,
    customFieldErrors = props.customFieldErrors,
    properties = props.properties,
    elementScroll = props.elementScroll,
    isPreview = props.isPreview,
    onChangeVariant = props.onChangeVariant,
    setWidgetHeight = props.setWidgetHeight;
  var getInputCount = function getInputCount(props, options) {
    var settings_theme = props.settings_theme,
      campaign = props.campaign,
      variant = props.variant,
      offer = props.offer;
    var isPersonalizedProduct = Boolean(offer.is_personalized_product && offer.custom_fields && offer.custom_fields.length);
    if (campaign.offer_type === "upsell" && campaign.upsell_offer_type === "variant") {
      return 1;
    } else {
      var _optionsLength = options.length === 1 && Array.isArray(options[0].values) && options[0].values.length === 1 ? 0 : options.length;
      var _customFieldsLength = isPersonalizedProduct ? offer.custom_fields.filter(function (field) {
        return field.show_on_specific_variant ? field.specific_variant_ids.includes(Number(variant.id)) : true;
      }).length : 0;
      var _quantity2 = settings_theme.product.show_quantity && (offer.limit_products && offer.limit_products_amount > 1 || !offer.limit_products) ? 1 : 0;
      return _optionsLength + _customFieldsLength + _quantity2;
    }
  };
  var supportsSubscription = Boolean(product.subscription_defaults);
  var isSubscription = Boolean(properties === null || properties === void 0 || (_properties$shipping_ = properties.shipping_interval_frequency) === null || _properties$shipping_ === void 0 ? void 0 : _properties$shipping_.value);
  var _React$useState = compat_module["default"].useState(isSubscription),
    _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2),
    prevIsSubscription = _React$useState2[0],
    setPrevIsSubscription = _React$useState2[1];
  var isUpsellVariant = campaign.offer_type === "upsell" && campaign.upsell_offer_type === "variant";
  var availableVariants = getAvailableVariants(offer, isSubscription);
  var options = isUpsellVariant ? [] : getAvailableOptions(product, variant, availableVariants);
  var isPersonalizedProduct = !supportsSubscription && Boolean(offer.is_personalized_product && offer.custom_fields && offer.custom_fields.length);
  var inputCount = getInputCount(props, options);
  var changeVariant = compat_module["default"].useCallback(function (options) {
    var variant = {};
    if (!availableVariants.some(function (item) {
      var isValidVariant = true;
      Object.keys(options).forEach(function (key) {
        if (options[key] !== item[key]) {
          isValidVariant = false;
        }
      });
      if (isValidVariant) {
        variant = item;
        return true;
      }
      return false;
    })) {
      variant = Options_objectSpread(Options_objectSpread({}, options), {}, {
        isUnavailable: true
      });
    }
    if (onChangeVariant) {
      onChangeVariant(variant);
    }
  }, [onChangeVariant, availableVariants]);
  var handleChange = compat_module["default"].useCallback(function (event) {
    var options = Options_objectSpread({
      option1: variant.option1 || null,
      option2: variant.option2 || null,
      option3: variant.option3 || null
    }, Object(defineProperty["a" /* default */])({}, event.target.name, event.target.value));
    changeVariant(options);
  }, [changeVariant, variant.option1, variant.option2, variant.option3]);
  compat_module["default"].useEffect(function () {
    var variants = Object(toConsumableArray["a" /* default */])(availableVariants);
    var newVariant = {
      option1: variant.option1 || null,
      option2: variant.option2 || null,
      option3: variant.option3 || null
    };
    var isVariantChanged = isSubscription !== prevIsSubscription;
    product.options.forEach(function (option, index) {
      var key = "option".concat(index + 1);
      if (!variants.some(function (item) {
        return item[key] === newVariant[key];
      })) {
        var _iterator = _createForOfIteratorHelper(option.values),
          _step;
        try {
          var _loop = function _loop() {
            var value = _step.value;
            if (variants.some(function (item) {
              return item[key] === value;
            })) {
              newVariant[key] = value;
              isVariantChanged = true;
              return 1; // break
            }
          };
          for (_iterator.s(); !(_step = _iterator.n()).done;) {
            if (_loop()) break;
          }
        } catch (err) {
          _iterator.e(err);
        } finally {
          _iterator.f();
        }
      }
      variants = variants.filter(function (item) {
        return item[key] === newVariant[key];
      });
    });
    if (isVariantChanged) {
      changeVariant(newVariant);
      setPrevIsSubscription(isSubscription);
    }
  }, [changeVariant, product.options, variant.option1, variant.option2, variant.option3, availableVariants, isSubscription, prevIsSubscription]);
  if (options.length === 1 && Array.isArray(options[0].values) && options[0].values.length === 1 && !settings_theme.product.show_quantity && !(offer.limit_products && offer.limit_products_amount > 1)) {
    if (!(offer && offer.custom_fields && offer.custom_fields.length)) {
      return null;
    }
  }
  var canChangeQuantity = !isSubscription && settings_theme.product.show_quantity && (offer.limit_products && offer.limit_products_amount > 1 || !offer.limit_products);
  return Options_jsx(Options_Container, {
    isDesktopView: isDesktopView,
    className: "product-options-container"
  }, Options_jsx(Row, {
    upsellVariantWithCustomFields: Boolean(campaign.offer_type === "upsell" && campaign.upsell_offer_type === "variant" && offer.custom_fields && offer.custom_fields.length),
    isDesktopView: isDesktopView,
    isPersonalizedProduct: isPersonalizedProduct,
    lastFullWidth: inputCount % 2,
    inputCount: inputCount > 2
  }, options.map(function (option, index) {
    return Options_jsx(components_Select, {
      style: {
        width: isDesktopView ? "100%" : "calc(50% - 0.4rem)",
        alignSelf: isPersonalizedProduct && "flex-end"
      },
      label: option.name,
      key: "option-".concat(option.id, "-").concat(index),
      name: "option".concat(index + 1),
      value: variant["option".concat(index + 1)],
      options: option.values,
      settings: settings_theme,
      onChange: handleChange,
      displayOneOption: options.length > 1 || option.values.length > 1
    });
  }), isPersonalizedProduct && offer.custom_fields.map(function (field, index) {
    var specific_variant_ids = field.specific_variant_ids && field.specific_variant_ids.map(String);
    if (field.field_type === "text" || !field.field_type) {
      if (field.show_on_specific_variant && field.specific_variant_ids) {
        if (specific_variant_ids.includes(String(variant.id))) {
          return Options_jsx(components_CustomField, {
            isPreview: isPreview,
            key: "option-".concat(index),
            isDesktopView: isDesktopView,
            properties: properties,
            field: field,
            settings: settings_theme,
            onChangeProperties: onChangeProperties,
            customFieldErrors: customFieldErrors,
            elementScroll: elementScroll,
            setWidgetHeight: setWidgetHeight,
            offer: offer
          });
        } else {
          if (properties && properties[field.field_name] && properties[field.field_name].value !== null) {
            onChangeProperties(null, field.field_name);
          }
          return null;
        }
      }
      return Options_jsx(components_CustomField, {
        isPreview: isPreview,
        key: "option-".concat(index),
        isDesktopView: isDesktopView,
        properties: properties,
        field: field,
        settings: settings_theme,
        onChangeProperties: onChangeProperties,
        customFieldErrors: customFieldErrors,
        elementScroll: elementScroll,
        setWidgetHeight: setWidgetHeight,
        offer: offer
      });
    } else {
      if (field.show_on_specific_variant && specific_variant_ids) {
        if (specific_variant_ids.includes(String(variant.id))) {
          return Options_jsx(components_CustomFieldSelect, {
            label: field.label,
            properties: properties,
            key: "option-".concat(index),
            name: "option".concat(index + 1),
            onChangeProperties: onChangeProperties,
            field: field,
            settings: settings_theme,
            options: field.options,
            isDesktopView: isDesktopView
          });
        } else {
          if (properties && properties[field.field_name] && properties[field.field_name].value !== null) {
            onChangeProperties(null, field.field_name);
          }
          return null;
        }
      }
      return Options_jsx(components_CustomFieldSelect, {
        label: field.label,
        properties: properties,
        key: "option-".concat(index),
        name: "option".concat(index + 1),
        onChangeProperties: onChangeProperties,
        field: field,
        settings: settings_theme,
        options: field.options,
        isDesktopView: isDesktopView
      });
    }
  }), canChangeQuantity ? product && product.options[0].length === 1 && Array.isArray(product.options[0].values) && product.options[0].values.length === 1 ? Options_jsx(components_Quantity, {
    style: {
      width: isDesktopView ? "100%" : "calc(50% - 0.4rem)",
      justifyContent: isPersonalizedProduct && "flex-end"
    },
    quantity: quantity,
    onChange: onChangeQuantity,
    settings: settings_theme,
    label: settings_theme.product.quantity_text
  }) : Options_jsx(components_Quantity, {
    style: {
      width: isDesktopView ? "100%" : "calc(50% - 0.4rem)",
      justifyContent: isPersonalizedProduct && "flex-end"
    },
    quantity: quantity,
    onChange: onChangeQuantity,
    settings: settings_theme,
    label: settings_theme.product.quantity_text
  }) : null));
};
/* harmony default export */ var components_Options = (Options_Options);
// EXTERNAL MODULE: ./node_modules/react-responsive-carousel/lib/js/index.js
var js = __webpack_require__(86);

// EXTERNAL MODULE: ./node_modules/react-player/lib/index.js
var react_player_lib = __webpack_require__(65);
var react_player_lib_default = /*#__PURE__*/__webpack_require__.n(react_player_lib);

// CONCATENATED MODULE: ./lib/requestShopifyImageBySize.js
function requestShopifyImageBySize(originalImageUrl, desiredSize) {
  var imageQuery = "x500";
  var imageUrlWithFilter = originalImageUrl;
  if (desiredSize) {
    switch (desiredSize) {
      case "small":
        imageQuery = "x100";
        break;
      case "medium":
        imageQuery = "x500";
        break;
      case "large":
        imageQuery = "x1000";
        break;
      default:
        break;
    }
    if (originalImageUrl && originalImageUrl.includes('cdn.shopify.com/s/files') && !originalImageUrl.includes('.gif') && !originalImageUrl.includes('_x500')) {
      var _matchedArray = originalImageUrl.match(/^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$/);
      if (_matchedArray && _matchedArray.length && _matchedArray[6] && _matchedArray[6].length > 0) {
        if (_matchedArray[6].search(/\.png$|\.jpg$|\.jpeg$/i) > -1) {
          var _prefix = _matchedArray[6].substring(0, _matchedArray[6].search(/\.png$|\.jpg$|\.jpeg$/i));
          var _postfix = _matchedArray[6].substring(_matchedArray[6].search(/\.png$|\.jpg$|\.jpeg$/i), _matchedArray[6].length);
          var _filterdPath = _prefix + "_".concat(imageQuery) + _postfix;
          imageUrlWithFilter = originalImageUrl.replace(_matchedArray[6], _filterdPath);
        }
      }
    }
  }
  return imageUrlWithFilter || originalImageUrl;
}
// CONCATENATED MODULE: ./components/WidgetComponent/components/icons/RotatingArrow.js

var RotatingArrow_jsx = compat_module["default"].createElement;

var RotatingArrow_RotatingArrow = function RotatingArrow(props) {
  return RotatingArrow_jsx("svg", Object(esm_extends["a" /* default */])({
    width: "34",
    height: "54",
    viewBox: "0 0 34 54"
  }, props, {
    xmlns: "http://www.w3.org/2000/svg"
  }), RotatingArrow_jsx("path", {
    d: "M24.6481 42.2855L24.5293 43.2784L24.6481 42.2855ZM32.962 43.9923C33.3961 43.651 33.4713 43.0223 33.13 42.5881L27.5671 35.5132C27.2257 35.0791 26.597 35.0038 26.1629 35.3452C25.7287 35.6866 25.6535 36.3153 25.9949 36.7494L30.9397 43.0382L24.6509 47.983C24.2167 48.3244 24.1415 48.9531 24.4829 49.3872C24.8242 49.8214 25.4529 49.8966 25.8871 49.5552L32.962 43.9923ZM24.5293 43.2784L32.2251 44.1991L32.4627 42.2133L24.7669 41.2926L24.5293 43.2784ZM6.97482 0.392136C-6.01062 16.626 3.88807 40.8088 24.5293 43.2784L24.7669 41.2926C5.68273 39.0093 -3.46925 16.6507 8.53664 1.64143L6.97482 0.392136Z"
  }));
};
/* harmony default export */ var icons_RotatingArrow = (RotatingArrow_RotatingArrow);
// CONCATENATED MODULE: ./components/WidgetComponent/components/SliderImages.js






var SliderImages_jsx = compat_module["default"].createElement;
function SliderImages_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, SliderImages_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function SliderImages_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (SliderImages_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }






var UpsellDiv = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "SliderImages__UpsellDiv",
  componentId: "sc-1qqne05-0"
})(["", " ", ""], function (props) {
  return props.is_desktop_view ? "margin-top:0;" : "margin-top: 1rem;";
}, function (props) {
  return props.is_desktop_view ? "padding: 0 10px 0 40px;" : "padding: 0 1rem;";
});
var ViewUpsellTriggerImage = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "SliderImages__ViewUpsellTriggerImage",
  componentId: "sc-1qqne05-1"
})(["", " ", " ", " ", " margin:0px auto;box-sizing:border-box;border-radius:0.5rem;background-image:url(\"", "\");background-size:cover;background-position:center;opacity:1;animation:unset;z-index:1;position:relative;"], function (props) {
  return props.is_desktop_view ? "height: 60px;" : props.is_preview ? "height: 3.45rem;" : "height: 6.6rem;";
}, function (props) {
  return props.is_desktop_view ? "width: 60px;" : props.is_preview ? "width: 3.45rem;" : "width: 6.6rem;";
}, function (props) {
  return props.is_desktop_view ? "left: -85px;" : props.is_preview ? "left: -4.89rem;" : "left: -9.34rem;";
}, function (props) {
  return "border: 2px solid ".concat(props.borderColor, ";");
}, function (props) {
  return requestShopifyImageBySize(props.image, "medium");
});
var StyledRotatingArrow = Object(styled_components_browser_esm["c" /* default */])(icons_RotatingArrow).withConfig({
  displayName: "SliderImages__StyledRotatingArrow",
  componentId: "sc-1qqne05-2"
})(["", " ", " ", " ", " ", " margin:auto;opacity:1;position:relative;display:block;"], function (props) {
  return props.is_desktop_view ? "height: 54px;" : props.is_preview ? "height: 3.1rem;" : "height: 5.94rem;";
}, function (props) {
  return props.is_desktop_view ? "width: 34px;" : props.is_preview ? "width: 1.95rem;" : "width: 3.74rem;";
}, function (props) {
  return props.is_desktop_view ? "top: 4px;" : props.is_preview ? "top: 0.23rem;" : "top: 0.44rem;";
}, function (props) {
  return props.is_desktop_view ? "left: -113px;" : props.is_preview ? "left: -6.49rem;" : "left: -12.43rem;";
}, function (props) {
  return "fill: ".concat(props.fill_color, ";");
});
var ViewUpsellOfferImage = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "SliderImages__ViewUpsellOfferImage",
  componentId: "sc-1qqne05-3"
})(["", " ", " ", " border:1px solid #ECECEC;box-sizing:border-box;border-radius:0.5rem;background-image:url(\"", "\");background-size:cover;background-position:center;opacity:1;animation:unset;position:relative;"], function (props) {
  return props.is_desktop_view ? "height: 175px;" : props.is_preview ? "height: 10.06rem;" : "height: 19.24rem;";
}, function (props) {
  return props.is_desktop_view ? "width: 175px;" : props.is_preview ? "width: 10.06rem;" : "width: 19.24rem;";
}, function (props) {
  return props.is_desktop_view ? "margin: -89px auto 0 auto;" : props.is_preview ? "margin: -5.11rem auto 0 auto;" : "margin: -9.79rem auto 0 auto;";
}, function (props) {
  return requestShopifyImageBySize(props.image, "large");
});
var ViewImage = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "SliderImages__ViewImage",
  componentId: "sc-1qqne05-4"
})(["", " ", " ", " ", " ", " ", " margin:0px auto;border:1px solid #ececec;box-sizing:border-box;border-radius:0.5rem;background-image:url(\"", "\");background-size:cover;background-position:center;opacity:1;animation:unset;& > li{display:flex;align-items:center;justify-content:center;}"], function (props) {
  return props.image_layout === "horizontal" && (props.isDesktopView ? "height: 160px;" : props.isPreview ? "height: 150px;" : "height: 200px;");
}, function (props) {
  return props.image_layout === "horizontal" && (props.isDesktopView ? "width: 200px;" : props.isPreview ? "width: 225px;" : "width: 300px;");
}, function (props) {
  return (props.image_layout === "sqaure" || props.image_layout === "square") && (props.isPreview && props.isDesktopView ? "height: 100px;" : props.isDesktopView ? "height: 200px;" : props.isPreview ? "height: 11.5rem;" : "height: 15.4rem;");
}, function (props) {
  return (props.image_layout === "sqaure" || props.image_layout === "square") && (props.isPreview && props.isDesktopView ? "width: 100px;" : props.isDesktopView ? "width: 200px;" : props.isPreview ? "width: 11.5rem;" : "width: 15.4rem;");
}, function (props) {
  return props.image_layout === "vertical" && (props.isDesktopView ? "height: 260px;" : props.isPreview ? "height: 280px;" : "height: 375px;");
}, function (props) {
  return props.image_layout === "vertical" && (props.isDesktopView ? "width: 200px;" : props.isPreview ? "width: 187.5px;" : "width: 250px;");
}, function (props) {
  return requestShopifyImageBySize(props.image, "large");
});
var SliderWrap = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "SliderImages__SliderWrap",
  componentId: "sc-1qqne05-5"
})(["", ""], function (_ref) {
  var isDesktopView = _ref.isDesktopView,
    image_layout = _ref.image_layout;
  return isDesktopView ? "\n      margin: 0;\n      height: ".concat(image_layout === "horizontal" ? 160 : image_layout === "vertical" ? 260 : 200, "px;\n      width: ").concat(image_layout === "horizontal" ? 200 : image_layout === "vertical" ? 200 : 200, "px;\n  ") : "\n    margin: 0px auto;\n    margin-top: 1rem;";
});
var SliderImage = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "SliderImages__SliderImage",
  componentId: "sc-1qqne05-6"
})(["", " ", " ", " background-image:url('", "');background-position:center;background-size:cover;margin:0 0.5rem;border:1px solid #ececec;box-sizing:border-box;border-radius:5px;opacity:1;animation:unset;"], function (props) {
  return props.image_layout === "horizontal" && (props.isDesktopView ? "height: 160px;" : props.isMobile ? "height: 15.4rem;" : "height: 15.4rem;");
}, function (props) {
  return (props.image_layout === "sqaure" || props.image_layout === "square") && (props.isDesktopView && props.isPreview ? "height: 100px;" : props.isDesktopView ? "height: 200px;" : props.isMobile ? "height: 15.4rem;" : "height: 28rem;");
}, function (props) {
  return props.image_layout === "vertical" && (props.isDesktopView ? "height: 260px;" : props.isMobile ? "height: 32rem;" : "height: 38rem;");
}, function (props) {
  return requestShopifyImageBySize(props.image, "medium");
});
var VideoWrapper = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "SliderImages__VideoWrapper",
  componentId: "sc-1qqne05-7"
})(["border-radius:5px;overflow:hidden;height:100%;display:flex;align-items:center;justify-content:center;"]);
var EnvelopeSlide = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "SliderImages__EnvelopeSlide",
  componentId: "sc-1qqne05-8"
})(["width:100%;height:100%;position:absolute;z-index:999999;", ""], function (_ref2) {
  var isActive = _ref2.isActive;
  return isActive ? "display: none;" : "display: block;";
});
var SliderImages_SliderImages = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(SliderImages, _Component);
  function SliderImages(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, SliderImages);
    _this = SliderImages_callSuper(this, SliderImages, [props]);
    _this.state = {
      selectedItem: 0
    };
    _this.accordionContent = [];
    return _this;
  }
  Object(createClass["a" /* default */])(SliderImages, [{
    key: "componentWillReceiveProps",
    value: function componentWillReceiveProps(nextProps) {
      if (nextProps.active_offer !== this.props.active_offer) {
        this.setState({
          selectedItem: 0
        });
      }
      if (nextProps.variant !== this.props.variant) {
        this.setState({
          selectedItem: 0
        });
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this2 = this;
      var _this$props = this.props,
        images = _this$props.images,
        isMobile = _this$props.isMobile,
        variant = _this$props.variant,
        pageToShow = _this$props.pageToShow,
        settings_theme = _this$props.settings_theme,
        isPreview = _this$props.isPreview,
        isDesktopView = _this$props.isDesktopView,
        videos = _this$props.videos,
        product_id = _this$props.product_id,
        offer_type = _this$props.offer_type,
        upsell_offer_type = _this$props.upsell_offer_type,
        trigger_product_images = _this$props.trigger_product_images,
        trigger_variant_images = _this$props.trigger_variant_images;
      var _this$state = this.state,
        selectedItem = _this$state.selectedItem,
        currentVideo = _this$state.currentVideo,
        currentVideoIndex = _this$state.currentVideoIndex;
      var _ref3 = settings_theme.product || "square",
        image_layout = _ref3.image_layout;
      var background_color = settings_theme.upsell_page.background_color,
        text_color = settings_theme.product.text_color;
      var relevantImagesArray = images.filter(function (image) {
        if (variant && image.variant_ids && image.variant_ids.length > 0) {
          return image.variant_ids.includes(variant.id);
        } else {
          return true;
        }
      });
      var filteredImages = relevantImagesArray;
      var slideHeight;
      switch (image_layout) {
        case "horizontal":
          slideHeight = isDesktopView ? "160px" : isMobile ? "200px" : "150px";
          break;
        case "sqaure":
        case "square":
          slideHeight = isDesktopView ? "200px" : isMobile ? "15.4rem" : "11.5rem";
          break;
        case "vertical":
          slideHeight = isDesktopView ? "260px" : isMobile ? "375px" : "280px";
          break;
      }
      var slideWidth;
      switch (image_layout) {
        case "horizontal":
          slideWidth = isDesktopView ? "200px" : isMobile ? "300px" : "225px";
          break;
        case "sqaure":
        case "square":
          slideWidth = isDesktopView ? "200px" : isMobile ? "15.4rem" : "11.5rem";
          break;
        case "vertical":
          slideWidth = isDesktopView ? "200px" : isMobile ? "250px" : "187.5px";
          break;
      }
      if (offer_type === "upsell") {
        var _offerImage;
        if (!relevantImagesArray.length && images.length && images[0].src) {
          _offerImage = typeof images[0] === "string" ? images[0] : images[0].src;
        } else if (relevantImagesArray.length > 1 && upsell_offer_type === "variant") {
          var _relevantImagesArray$;
          _offerImage = (_relevantImagesArray$ = relevantImagesArray.find(function (element) {
            var _element$variant_ids;
            return (_element$variant_ids = element.variant_ids) === null || _element$variant_ids === void 0 ? void 0 : _element$variant_ids.includes(variant.id);
          })) === null || _relevantImagesArray$ === void 0 ? void 0 : _relevantImagesArray$.src;
        } else if (relevantImagesArray.length > 0 && relevantImagesArray[0].src) {
          _offerImage = relevantImagesArray[0].src;
        }
        var _triggerImage;
        if (upsell_offer_type === "product" && trigger_product_images) {
          var _triggerProductImage = trigger_product_images.find(function (p) {
            return p.offer_id == product_id;
          });
          if (_triggerProductImage && _triggerProductImage.src) {
            _triggerImage = _triggerProductImage.src;
          }
        } else if (upsell_offer_type === "variant" && trigger_variant_images) {
          var _triggerVariantImage = trigger_variant_images.find(function (v) {
            return v.offer_id == variant.id;
          });
          if (_triggerVariantImage && _triggerVariantImage.src) {
            _triggerImage = _triggerVariantImage.src;
          }
        }
        if (_offerImage && _triggerImage) {
          return SliderImages_jsx(UpsellDiv, {
            className: "upsellImageViewDiv",
            is_desktop_view: isDesktopView
          }, SliderImages_jsx(ViewUpsellTriggerImage, {
            className: "upsellImageViewImage",
            image: _triggerImage,
            is_desktop_view: isDesktopView,
            is_preview: isPreview,
            borderColor: background_color
          }), SliderImages_jsx(StyledRotatingArrow, {
            className: "upsellImageViewRotatingArrow",
            image_layout: image_layout,
            is_desktop_view: isDesktopView,
            is_preview: isPreview,
            fill_color: text_color
          }), SliderImages_jsx(ViewUpsellOfferImage, {
            className: "upsellImageViewUpsellImage",
            image: _offerImage,
            is_desktop_view: isDesktopView,
            is_preview: isPreview,
            offer_type: offer_type
          }));
        }
      }
      if (!relevantImagesArray.length && images.length && images[0].src && Boolean(!this.props.videos || !this.props.videos.length)) {
        return SliderImages_jsx("div", {
          style: {
            marginTop: isDesktopView ? "" : "1rem",
            padding: "0 1rem"
          }
        }, SliderImages_jsx(ViewImage, {
          image: typeof images[0] === "string" ? images[0] : images[0].src,
          image_layout: image_layout,
          isDesktopView: isDesktopView,
          className: "singleImageView",
          isPreview: isPreview
        }));
      }
      if (relevantImagesArray.length == 1 && relevantImagesArray[0].src && Boolean(!this.props.videos || !this.props.videos.length)) {
        return SliderImages_jsx("div", {
          style: {
            marginTop: isDesktopView ? "" : "1rem",
            padding: "0 1rem"
          }
        }, SliderImages_jsx(ViewImage, {
          image: relevantImagesArray[0].src,
          image_layout: image_layout,
          isDesktopView: isDesktopView,
          className: "singleImageView",
          isPreview: isPreview
        }));
      }
      if (this.props.videos && this.props.videos.length === 1 && Boolean(!relevantImagesArray || !relevantImagesArray.length)) {
        return SliderImages_jsx("div", {
          style: {
            marginTop: isDesktopView ? "" : "1rem",
            padding: "0 1rem"
          }
        }, SliderImages_jsx(VideoWrapper, {
          key: 0
        }, SliderImages_jsx(react_player_lib_default.a, {
          url: videos[0].url,
          width: slideWidth,
          controls: true,
          height: slideHeight
        })));
      }
      relevantImagesArray.sort(function (a, b) {
        if (a.variant_ids && a.variant_ids[0]) {
          return -1;
        } else if (b.variant_ids && b.variant_ids[0]) {
          return 1;
        } else {
          return 0;
        }
      });
      relevantImagesArray = relevantImagesArray.map(function (image) {
        return SliderImages_jsx(SliderImage, {
          className: "carouselImage",
          key: "img- + ".concat(typeof image === "string" ? image : image.src),
          image: typeof image === "string" ? image : image.src,
          image_layout: image_layout,
          isMobile: isMobile,
          isDesktopView: isDesktopView,
          isPreview: isPreview
        });
      });
      var widthProcent = image_layout === "square" || image_layout === "sqaure" ? 50 : 70;
      if (image_layout === "horizonal" && isMobile) {
        widthProcent = 65;
      }
      if (!isMobile && pageToShow == "cart_page") {
        var _iframeDocument = document.getElementById("widget").contentWindow.document;
        if (image_layout != "horizontal") {
          if (_iframeDocument) {
            var _clientWidth = _iframeDocument.body.clientWidth;
            widthProcent = 100 / _clientWidth * (218.64 + 10);
          }
        } else {
          if (_iframeDocument) {
            var _clientWidth2 = _iframeDocument.body.clientWidth;
            widthProcent = 100 / _clientWidth2 * (254 + 10);
          }
        }
      }
      var singleImage = settings_theme.product.show_single_image ? relevantImagesArray && relevantImagesArray.length ? SliderImages_jsx(ViewImage, {
        style: {
          width: isPreview && image_layout !== "square" ? "100%" : ""
        },
        image: filteredImages[0].src,
        image_layout: image_layout,
        isDesktopView: isDesktopView,
        className: "singleImageView",
        isPreview: isPreview
      }) : videos && videos.length ? SliderImages_jsx(VideoWrapper, {
        key: 0,
        ref: function ref(accordionContent) {
          return _this2.accordionContent[0] = accordionContent;
        }
      }, SliderImages_jsx(react_player_lib_default.a, {
        url: videos[0].url,
        width: slideWidth,
        controls: false,
        height: slideHeight
      })) : null : null;
      if (singleImage) {
        return SliderImages_jsx("div", {
          style: {
            marginTop: isDesktopView ? "" : "1rem",
            padding: "0 1rem"
          }
        }, singleImage);
      }
      return SliderImages_jsx(SliderWrap, {
        image_layout: image_layout,
        isDesktopView: isDesktopView
      }, SliderImages_jsx(js["Carousel"], {
        onChange: function onChange(data) {
          _this2.accordionContent.forEach(function (video, index) {
            if (video) {
              var _videoTags3 = video.getElementsByTagName("video");
              if (_videoTags3 && _videoTags3[0]) {
                if (index === data - relevantImagesArray.length) {
                  setTimeout(function () {
                    _videoTags3[0].setAttribute("controls", true);
                  }, 300);
                } else {
                  _videoTags3[0].removeAttribute("controls");
                }
                _videoTags3[0].pause();
              } else {
                var _iframeTag3 = video.querySelector("iframe");
                if (_iframeTag3 && _iframeTag3.contentWindow) {
                  _iframeTag3.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', "*");
                }
              }
            }
          });
          _this2.setState({
            selectedItem: data,
            currentVideo: _this2.accordionContent[data - relevantImagesArray.length],
            currentVideoIndex: data - relevantImagesArray.length
          });
        },
        onClickItem: function onClickItem(data) {
          _this2.setState({
            selectedItem: data
          });
        },
        selectedItem: selectedItem,
        showArrows: !isMobile,
        swipeable: true,
        centerMode: !isDesktopView,
        infiniteLoop: images.length !== 1,
        centerSlidePercentage: !relevantImagesArray.length && videos && videos.length || Boolean(currentVideo && RegExp("selected").test(currentVideo.parentElement.getAttribute("class"))) ? "70" : widthProcent,
        showStatus: false,
        showIndicators: false,
        showThumbs: false,
        className: "carousel"
      }, [].concat(Object(toConsumableArray["a" /* default */])(relevantImagesArray), Object(toConsumableArray["a" /* default */])(videos && videos.length ? videos.map(function (video, index) {
        return SliderImages_jsx(VideoWrapper, {
          key: index,
          ref: function ref(accordionContent) {
            return _this2.accordionContent[index] = accordionContent;
          }
        }, SliderImages_jsx(EnvelopeSlide, {
          isActive: (currentVideoIndex || 0) === index
        }), SliderImages_jsx(react_player_lib_default.a, {
          url: video.url,
          width: slideWidth,
          controls: false,
          height: slideHeight
        }));
      }) : []))));
    }
  }]);
  return SliderImages;
}(compat_module["Component"]);
/* harmony default export */ var components_SliderImages = (SliderImages_SliderImages);
// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__(34);

// CONCATENATED MODULE: ./components/WidgetComponent/components/Radio.js


var _excluded = ["label"];
var Radio_jsx = compat_module["default"].createElement;


var Radio_Label = styled_components_browser_esm["c" /* default */].label.withConfig({
  displayName: "Radio__Label",
  componentId: "sc-112o5ha-0"
})(["", " font-size:1.4rem;line-height:19px;margin-bottom:1.7rem;overflow:hidden;text-overflow:ellipsis;display:block;position:relative;padding-left:30px;margin-bottom:12px;cursor:pointer;font-size:1.4rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;input{position:absolute;opacity:0;cursor:pointer;}.checkmark{position:absolute;top:0;left:0;height:19px;width:19px;border-radius:50%;border:1px;border-style:solid;", "}input:checked ~ .checkmark{", "}.checkmark:after{content:\"\";position:absolute;display:none;}input:checked ~ .checkmark:after{display:block;", "}.checkmark:after{top:4px;left:4px;width:9px;height:9px;border-radius:50%;background:white;}"], function (_ref) {
  var _styles$div, _styles$select;
  var styles = _ref.styles;
  return "\n       color: ".concat(((_styles$div = styles.div) === null || _styles$div === void 0 ? void 0 : _styles$div.color) || "black", ";\n       font-family: ").concat(((_styles$select = styles.select) === null || _styles$select === void 0 ? void 0 : _styles$select.fontFamily) || "", ";\n    ");
}, function (_ref2) {
  var _styles$radio;
  var styles = _ref2.styles;
  return "\n      border-color: ".concat(((_styles$radio = styles.radio) === null || _styles$radio === void 0 ? void 0 : _styles$radio.border) || "#c6c9cc", ";\n    ");
}, function (_ref3) {
  var _styles$radio2;
  var styles = _ref3.styles;
  return "\n      background-color: ".concat(((_styles$radio2 = styles.radio) === null || _styles$radio2 === void 0 ? void 0 : _styles$radio2.background) || "transparent", ";\n    ");
}, function (_ref4) {
  var _styles$radio3;
  var styles = _ref4.styles;
  return "\n      background-color: ".concat(((_styles$radio3 = styles.radio) === null || _styles$radio3 === void 0 ? void 0 : _styles$radio3.border) || "#c6c9cc", ";\n    ");
});
var Radio_Radio = function Radio(_ref5) {
  var label = _ref5.label,
    props = Object(objectWithoutProperties["a" /* default */])(_ref5, _excluded);
  var id = props.id,
    _props$styles = props.styles,
    styles = _props$styles === void 0 ? {} : _props$styles;
  return Radio_jsx(Radio_Label, {
    htmlFor: id,
    styles: styles
  }, label, Radio_jsx("input", Object(esm_extends["a" /* default */])({
    type: "radio"
  }, props)), Radio_jsx("span", {
    className: "checkmark"
  }));
};
/* harmony default export */ var components_Radio = (Radio_Radio);
// CONCATENATED MODULE: ./components/WidgetComponent/components/SubscriptionOptions.js

var SubscriptionOptions_jsx = compat_module["default"].createElement;









var SubscriptionContainer = Object(styled_components_browser_esm["c" /* default */])(CustomFieldSelect_Container).withConfig({
  displayName: "SubscriptionOptions__SubscriptionContainer",
  componentId: "sc-1tt76vm-0"
})(["", ";width:100%;margin-top:10px;"], function (_ref) {
  var isDesktopView = _ref.isDesktopView;
  return isDesktopView ? " padding: 0;" : "padding: 0.5rem 1rem;";
});
var SubscriptionSelectInput = Object(styled_components_browser_esm["c" /* default */])(CustomFieldSelect_SelectInput).withConfig({
  displayName: "SubscriptionOptions__SubscriptionSelectInput",
  componentId: "sc-1tt76vm-1"
})(["text-transform:capitalize;"]);
var SubscriptionOptions_SubscriptionOptions = function SubscriptionOptions(props) {
  var _offer$variant_upsell;
  var campaign = props.campaign,
    offer = props.offer,
    onChangeProperties = props.onChangeProperties,
    selectedVariant = props.variant;
  var subscriptionType = campaign.trigger_subscription_type;
  var product = offer.product;
  var subscription_defaults = product.subscription_defaults;
  var order_interval_frequency_options = subscription_defaults.order_interval_frequency_options,
    order_interval_unit = subscription_defaults.order_interval_unit,
    storefront_purchase_options = subscription_defaults.storefront_purchase_options;
  var isDesktopView = Object(WidgetParams["c" /* useIsDesktopView */])();
  var theme = Object(WidgetParams["e" /* useTheme */])();
  var settings = Object(WidgetParams["d" /* useSettings */])();
  var _settings$design$them = settings.design.theme.subscriptions_settings,
    oneTimePurchaseText = _settings$design$them.one_time_purchase_text,
    subscribeAndSaveText = _settings$design$them.subscribe_and_save_text;
  var styles = CustomFieldSelect_stylesFromTheme(theme);
  var variants = getAvailableVariants(offer, true);
  var variant = selectedVariant.subscription ? selectedVariant : variants.find(function (variant) {
    return compareVariantOptions(variant, selectedVariant);
  });
  var price = Object(formatPrice["b" /* parsePrice */])(variant === null || variant === void 0 ? void 0 : variant.price);
  var compare_at_price = Object(formatPrice["b" /* parsePrice */])(variant === null || variant === void 0 ? void 0 : variant.compare_at_price);
  var hasUpsellVariant = ((_offer$variant_upsell = offer.variant_upsell) === null || _offer$variant_upsell === void 0 ? void 0 : _offer$variant_upsell.length) > 0;
  var upsellVariantParams = utils_getVariantParamsFromId(hasUpsellVariant && offer.variant_upsell[0]);
  var supportsSubscription = ["subscription_and_onetime", "subscription_only"].includes(storefront_purchase_options);
  var supportsOneTime = !hasUpsellVariant && subscriptionType !== "replace_with_subscription" && ["onetime", "subscription_and_onetime"].includes(storefront_purchase_options);
  var purchaseTypeOptions = [];
  if (supportsOneTime) {
    purchaseTypeOptions.push({
      value: "one-time",
      label: oneTimePurchaseText
    });
  }
  if (supportsSubscription) {
    purchaseTypeOptions.push({
      value: "auto_deliver",
      label: subscribeAndSaveText.replace("{{discount}}", compare_at_price ? "".concat((100 * (1 - price / compare_at_price)).toFixed(), "%") : "")
    });
  }
  var defaultPurchaseType = upsellVariantParams !== null && upsellVariantParams !== void 0 && upsellVariantParams.purchase_type || purchaseTypeOptions.length ? purchaseTypeOptions[0].value : null;
  var excludedFrequencies = offer.exclude_variant_ids.filter(function (id) {
    return compareVariantIds(id, variant === null || variant === void 0 ? void 0 : variant.id);
  }).map(utils_getVariantParamsFromId).filter(Boolean).map(function (_ref2) {
    var shipping_interval_frequency = _ref2.shipping_interval_frequency;
    return parseInt(shipping_interval_frequency, 10);
  }).filter(Boolean);
  var frequencies = Object.values(order_interval_frequency_options).map(function (value) {
    return parseInt(value, 10);
  }).filter(function (frequency) {
    return !excludedFrequencies.includes(frequency);
  });
  var defaultFrequency = (upsellVariantParams === null || upsellVariantParams === void 0 ? void 0 : upsellVariantParams.shipping_interval_frequency) || frequencies[0];
  var _React$useState = compat_module["default"].useState(defaultFrequency),
    _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2),
    frequency = _React$useState2[0],
    setFrequency = _React$useState2[1];
  var _React$useState3 = compat_module["default"].useState(defaultPurchaseType),
    _React$useState4 = Object(slicedToArray["a" /* default */])(_React$useState3, 2),
    purchaseType = _React$useState4[0],
    setPurchaseType = _React$useState4[1];
  var options = frequencies.map(function (frequency) {
    return {
      value: frequency,
      label: "".concat(frequency, " ").concat(pluralize_default()(order_interval_unit, frequency))
    };
  });
  var handleChangeFrequency = compat_module["default"].useCallback(function (_ref3) {
    var value = _ref3.target.value;
    return setFrequency(parseInt(value, 10));
  }, []);
  var handleChangeSubscriptionType = compat_module["default"].useCallback(function (_ref4) {
    var value = _ref4.target.value;
    return setPurchaseType(value);
  }, []);
  var hasSubscriptionOption = variant && options.length > 0;
  compat_module["default"].useEffect(function () {
    if (hasSubscriptionOption && frequency && !frequencies.includes(frequency)) {
      setFrequency(frequencies[0]);
    }
  }, [frequencies, frequency, hasSubscriptionOption]);
  compat_module["default"].useEffect(function () {
    if (hasSubscriptionOption && purchaseType === "auto_deliver") {
      onChangeProperties(order_interval_unit, "shipping_interval_unit_type");
      onChangeProperties(frequency, "shipping_interval_frequency");
    } else {
      onChangeProperties(null, "shipping_interval_unit_type");
      onChangeProperties(null, "shipping_interval_frequency");
    }
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [frequency, order_interval_unit, purchaseType, hasSubscriptionOption]);
  compat_module["default"].useEffect(function () {
    if (supportsSubscription && !supportsOneTime && purchaseType !== "auto_deliver") {
      setPurchaseType("auto_deliver");
    }
    if (!supportsSubscription && supportsOneTime && purchaseType !== "one-time") {
      setPurchaseType("one-time");
    }
  }, [purchaseType, supportsOneTime, supportsSubscription]);
  return hasSubscriptionOption && SubscriptionOptions_jsx(SubscriptionContainer, {
    isDesktopView: isDesktopView
  }, purchaseTypeOptions.length > 1 && purchaseTypeOptions.map(function (_ref5) {
    var value = _ref5.value,
      label = _ref5.label;
    return SubscriptionOptions_jsx(components_Radio, {
      styles: styles,
      key: value,
      id: value,
      value: value,
      name: "offer-type",
      onChange: handleChangeSubscriptionType,
      checked: value === purchaseType,
      label: label
    });
  }), purchaseType === "auto_deliver" && !hasUpsellVariant && SubscriptionOptions_jsx(compat_module["default"].Fragment, null, SubscriptionOptions_jsx(CustomFieldSelect_Title, {
    styles: styles
  }, "Deliver every"), SubscriptionOptions_jsx(CustomFieldSelect_SelectDiv, {
    styles: styles
  }, SubscriptionOptions_jsx(SubscriptionSelectInput, {
    styles: styles,
    value: frequency,
    onChange: handleChangeFrequency
  }, options.map(function (_ref6) {
    var value = _ref6.value,
      label = _ref6.label;
    return SubscriptionOptions_jsx("option", {
      key: value,
      value: value
    }, label);
  })), SubscriptionOptions_jsx(CustomFieldSelect_Label, {
    htmlFor: "id-select-delivery"
  }, SubscriptionOptions_jsx(ArrowDown, {
    fill: styles.select.color
  })))));
};
/* harmony default export */ var components_SubscriptionOptions = (SubscriptionOptions_SubscriptionOptions);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Product.js
var Product_jsx = compat_module["default"].createElement;












var Product_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__Container",
  componentId: "sc-o1hzod-0"
})(["height:auto;display:flex;font-size:1rem;", ""], function (_ref) {
  var isDesktopView = _ref.isDesktopView;
  return isDesktopView ? "\n     justify-content: center;\n     padding: 2rem 0;\n    " : "flex-direction: column;";
});
var DivText = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__DivText",
  componentId: "sc-o1hzod-1"
})(["font-size:1rem;position:relative;display:flex;flex-direction:column;", ""], function (_ref2) {
  var isDesktopView = _ref2.isDesktopView;
  return isDesktopView ? "\n    padding: 0 1rem 2rem 1rem;\n    height: auto;\n  " : " height: inherit;";
});
var ContainerDivText = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__ContainerDivText",
  componentId: "sc-o1hzod-2"
})(["position:relative;display:flex;flex-direction:column;height:auto;", ""], function (_ref3) {
  var isDesktopView = _ref3.isDesktopView;
  return isDesktopView ? "\n      align-items: flex-start;\n      justify-content: center;\n      width: max-content;\n      max-width: 247px;\n  " : "";
});
var OldPrice = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__OldPrice",
  componentId: "sc-o1hzod-3"
})(["font-size:1.8rem;line-height:2.2rem;margin:0rem 0.25rem;color:", ";display:inline-block;font-family:", ";text-align:center;text-decoration:line-through;"], function (props) {
  return props.settings_theme.price.old_price_color || "#DE3618";
}, function (props) {
  return props.settings_theme.price.font;
});
var Price = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__Price",
  componentId: "sc-o1hzod-4"
})(["font-weight:bold;font-size:1.8rem;line-height:2.2rem;margin:0rem 0.25rem;color:", ";font-family:", ";text-align:center;"], function (props) {
  return props.settings_theme.price.new_price_color || "#50B83C";
}, function (props) {
  return props.settings_theme.price.font;
});
var YouSave = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__YouSave",
  componentId: "sc-o1hzod-5"
})(["font-size:1.4rem;line-height:", ";color:", ";font-family:", ";text-align:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;", ""], function (props) {
  return props.settings_theme.product.font == "Pacifico" ? 1.8 : 1.3;
}, function (props) {
  return props.settings_theme.price.new_price_color || "#50B83C";
}, function (props) {
  return props.settings_theme.price.font;
}, function (_ref4) {
  var isDesktopView = _ref4.isDesktopView;
  return isDesktopView ? "\n       max-width: 247px;\n       overflow: hidden;\n       text-overflow: ellipsis;\n       display: -webkit-box;\n       -webkit-line-clamp: 1;\n       -webkit-box-orient: vertical;\n       padding: 0;\n       display: flex;\n  " : "\n      padding: 0 1rem;\n      margin-top: 0.3rem;\n  ";
});
var BlockShipping = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__BlockShipping",
  componentId: "sc-o1hzod-6"
})(["display:flex;justify-content:center;", ""], function (_ref5) {
  var isDesktopView = _ref5.isDesktopView;
  return isDesktopView ? "margin-top: 0.5rem;" : " margin-top: 0.6rem;";
});
var PriceContainer = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__PriceContainer",
  componentId: "sc-o1hzod-7"
})(["display:flex;flex-direction:row;align-items:center;", ""], function (_ref6) {
  var isDesktopView = _ref6.isDesktopView;
  return isDesktopView ? "margin: 0.5rem 0;" : "margin: 0.6rem auto;";
});
var FreeShipping = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__FreeShipping",
  componentId: "sc-o1hzod-8"
})(["border:0.1rem solid ", ";box-sizing:border-box;border-radius:0.5rem;padding:0.4rem 1.2rem 0.4rem 0.7rem;display:flex;align-items:center;font-weight:600;font-size:1.2rem;line-height:1.2rem;color:", ";font-family:", ";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;", ""], function (props) {
  return props.settings_theme.price.text_color || "#DE3618";
}, function (props) {
  return props.settings_theme.price.text_color || "#DE3618";
}, function (props) {
  return props.settings_theme.price.font;
}, function (_ref7) {
  var isDesktopView = _ref7.isDesktopView;
  return isDesktopView ? "\n    font-size: 1.5rem;\n    line-height: 2.3rem;\n    border-radius: 2px;\n    max-width: 247px;\n    display: block;\n    padding: 4px 6px;\n   " : "";
});
var ProductDetailsWrap = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__ProductDetailsWrap",
  componentId: "sc-o1hzod-9"
})(["", ""], function (_ref8) {
  var isDesktopView = _ref8.isDesktopView,
    image_layout = _ref8.image_layout,
    isPreview = _ref8.isPreview;
  return isDesktopView ? "\n     height: 100%;\n     max-width: 247px;\n     ".concat(!(isPreview && isDesktopView) && "min-width: 200px;", "\n     width: min-content;\n     margin-left: 20px;\n     display: flex;\n     flex-direction: column;\n     justify-content: center;\n     height: fit-content;\n     ").concat(!(isPreview && isDesktopView) && "min-height: ".concat(image_layout === "horizontal" ? 160 : image_layout === "vertical" ? 260 : 200, "px;"), "\n    ") : "height: 100%;";
});
var SaveText = styled_components_browser_esm["c" /* default */].span.withConfig({
  displayName: "Product__SaveText",
  componentId: "sc-o1hzod-10"
})(["margin-right:2px;text-overflow:ellipsis;display:block;overflow:hidden;white-space:nowrap;"]);
var SliderImagesBox = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Product__SliderImagesBox",
  componentId: "sc-o1hzod-11"
})(["", ""], function (props) {
  return props.isPreview && props.isDesktopView && "\nwidth: 100px;\n  & > div {\n    width: 100px;\n  }\n\n";
});
var Product_Product = function Product(props) {
  var settings_theme = props.settings_theme,
    settings = props.settings,
    offer = props.offer,
    variant = props.variant,
    quantity = props.quantity,
    onChangeVariant = props.onChangeVariant,
    onChangeQuantity = props.onChangeQuantity,
    active_offer = props.active_offer,
    isMobile = props.isMobile,
    pageToShow = props.pageToShow,
    isPreview = props.isPreview,
    isDesktopView = props.isDesktopView,
    onChangeProperties = props.onChangeProperties,
    customFieldErrors = props.customFieldErrors,
    properties = props.properties,
    campaign = props.campaign,
    elementScroll = props.elementScroll,
    setWidgetHeight = props.setWidgetHeight;
  var free_shipping = offer.free_shipping;
  var show_reviews = settings.advanced.reviewsio.enabled;
  var _ref9 = settings_theme.product || "square",
    image_layout = _ref9.image_layout;
  var product = offer.product;
  var price = Object(formatPrice["b" /* parsePrice */])(variant.price);
  var compare_at_price = Object(formatPrice["b" /* parsePrice */])(variant.compare_at_price);
  var currencyFormat = Object(WidgetParams["b" /* useCurrencyFormat */])();
  var discount_text = lib_formatDiscount(price, compare_at_price, settings_theme.price.discount_text, currencyFormat);
  var descriptionBlock = Product_jsx(DivText, {
    isDesktopView: isDesktopView
  }, Product_jsx(components_Description, {
    className: "product-description",
    product: product,
    settings_theme: settings_theme,
    offer: offer,
    isDesktopView: isDesktopView
  }));
  var targetProduct = campaign.offer_type === "upsell" && campaign.upsell_offer_type === "variant" ? variant : product;
  return Product_jsx(compat_module["default"].Fragment, null, Product_jsx(Product_Container, {
    className: "product",
    isDesktopView: isDesktopView
  }, isDesktopView && Product_jsx(SliderImagesBox, {
    isPreview: isPreview,
    isDesktopView: isDesktopView
  }, Product_jsx(components_SliderImages, {
    elementScroll: elementScroll,
    pageToShow: pageToShow,
    images: product.images,
    videos: product.videos,
    isMobile: isMobile,
    isDesktopView: isDesktopView,
    active_offer: active_offer,
    variant: variant,
    settings_theme: settings_theme,
    isPreview: isPreview,
    product_id: product.id,
    offer_type: campaign.offer_type,
    upsell_offer_type: campaign.upsell_offer_type,
    trigger_product_images: campaign.trigger_product_images,
    trigger_variant_images: campaign.trigger_variant_images
  })), Product_jsx(ProductDetailsWrap, {
    isDesktopView: isDesktopView,
    image_layout: image_layout,
    isPreview: isPreview
  }, Product_jsx(ContainerDivText, {
    isDesktopView: isDesktopView
  }, Product_jsx(components_NextOfferMobile, props), Product_jsx(components_ProductTitle, {
    className: "product-title",
    isDesktopView: isDesktopView,
    campaign: campaign,
    offer: offer,
    product: targetProduct,
    settings_theme: settings_theme
  }), Product_jsx(PriceContainer, {
    className: "product-price_container",
    isDesktopView: isDesktopView
  }, price < compare_at_price && Product_jsx(OldPrice, {
    className: "product-old_price",
    settings_theme: settings_theme
  }, Object(formatPrice["a" /* default */])({
    priceAmount: parseFloat(variant.compare_at_price).toFixed(2),
    currencyFormat: currencyFormat
  })), Product_jsx(Price, {
    className: "product-price",
    settings_theme: settings_theme
  }, Object(formatPrice["a" /* default */])({
    priceAmount: parseFloat(variant.price).toFixed(2),
    currencyFormat: currencyFormat
  }))), price < compare_at_price && settings_theme.price.discount_text && Product_jsx(YouSave, {
    className: "product-subprices_section",
    isDesktopView: isDesktopView,
    settings_theme: settings_theme
  }, isDesktopView ? Product_jsx(SaveText, null, discount_text) : discount_text), free_shipping && Product_jsx(BlockShipping, {
    isDesktopView: isDesktopView,
    className: "product-shipping",
    settings_theme: settings_theme
  }, Product_jsx(FreeShipping, {
    isDesktopView: isDesktopView,
    settings_theme: settings_theme,
    className: "product-free-shipping"
  }, Product_jsx(icons_IconShipping, {
    className: "product-shipping-icon",
    style: {
      marginRight: isDesktopView ? "6px" : "0.8rem",
      fill: settings_theme.price.text_color
    },
    fill: settings_theme.price.text_color
  }), " ", settings_theme.price.text)), show_reviews && Product_jsx("div", {
    className: "reviews-container"
  }, Product_jsx("div", {
    className: "ruk_rating_snippet",
    "data-sku": product.variants.map(function (variant) {
      return variant.sku;
    }).join(";")
  }), Product_jsx("style", null, "\n                    .reviews-container {\n                      display: flex;\n                      flex-direction: column;\n                      align-items: center;\n                      margin-top: 5px;\n                    }\n                  "))), !isDesktopView && Product_jsx(components_SliderImages, {
    elementScroll: elementScroll,
    pageToShow: pageToShow,
    images: product.images,
    videos: product.videos,
    isMobile: isMobile,
    active_offer: active_offer,
    variant: variant,
    settings_theme: settings_theme,
    isPreview: isPreview,
    product_id: product.id,
    offer_type: campaign.offer_type,
    upsell_offer_type: campaign.upsell_offer_type,
    trigger_product_images: campaign.trigger_product_images,
    trigger_variant_images: campaign.trigger_variant_images
  }), product.subscription_defaults && Product_jsx(components_SubscriptionOptions, {
    campaign: campaign,
    offer: offer,
    variant: variant,
    properties: properties,
    onChangeProperties: onChangeProperties
  }), Product_jsx(components_Options, {
    className: "product-options",
    variant: variant,
    quantity: quantity,
    product: product,
    settings_theme: settings_theme,
    onChangeVariant: onChangeVariant,
    onChangeQuantity: onChangeQuantity,
    offer: offer,
    isDesktopView: isDesktopView,
    onChangeProperties: onChangeProperties,
    customFieldErrors: customFieldErrors,
    properties: properties,
    elementScroll: elementScroll,
    campaign: campaign,
    isPreview: isPreview,
    setWidgetHeight: setWidgetHeight
  }), !isDesktopView && descriptionBlock)), isDesktopView && descriptionBlock);
};
/* harmony default export */ var components_Product = (Product_Product);
// EXTERNAL MODULE: ./lib/isOutOfStock.js
var isOutOfStock = __webpack_require__(20);

// CONCATENATED MODULE: ./components/WidgetComponent/components/Button.js





var Button_jsx = compat_module["default"].createElement;
function Button_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, Button_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function Button_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (Button_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }





var Button_colors = redux_config.colors;
var RedirectText = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Button__RedirectText",
  componentId: "sc-3wcjan-0"
})(["margin-left:1rem;text-decoration-line:none;"]);
var Button_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Button__Container",
  componentId: "sc-3wcjan-1"
})(["display:flex;background:", ";width:100%;padding:", ";font-size:1.8rem;line-height:2.2rem;text-align:center;justify-content:center;align-items:center;cursor:", ";color:", ";font-family:", ";-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;"], function (props) {
  return props.isUnavailable ? props.text_color : props.background_color;
}, function (props) {
  return props.spiner ? "1rem" : "1.4rem";
}, function (props) {
  return props.spiner ? "wait" : "pointer";
}, function (props) {
  return props.isUnavailable ? props.background_color : props.text_color;
}, function (props) {
  return props.settings_theme.product.font;
});
var Button_Text = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Button__Text",
  componentId: "sc-3wcjan-2"
})(["overflow:hidden;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);
var Button_Spiner = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Button__Spiner",
  componentId: "sc-3wcjan-3"
})(["@keyframes spin{from{transform:rotate(0);}to{transform:rotate(359deg);}}&.spinner-box{width:3rem;height:3rem;display:flex;justify-content:center;align-items:center;background-color:transparent;}.smt-spinner-circle{width:3rem;height:3rem;position:relative;border-radius:50%;}.smt-spinner{height:100%;width:100%;border-radius:50%;border-right:2px solid rgba(255,255,255,0);border-top:2px solid rgba(255,255,255,0);border-left:2px solid ", ";border-bottom:2px solid ", ";animation:spin 0.8s linear 0s infinite;}"], function (props) {
  return props.settings_theme.product.button_text_color || "#FFFFFF";
}, function (props) {
  return props.settings_theme.product.button_text_color || "#FFFFFF";
});
var Button_Button = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(Button, _Component);
  function Button(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, Button);
    _this = Button_callSuper(this, Button, [props]);
    _this.state = {
      spiner: false
    };
    return _this;
  }
  Object(createClass["a" /* default */])(Button, [{
    key: "render",
    value: function render() {
      var _this2 = this;
      var _this$props = this.props,
        _onClick = _this$props.onClick,
        pageToShow = _this$props.pageToShow,
        variant = _this$props.variant,
        settings_theme = _this$props.settings_theme,
        minimized = _this$props.minimized,
        active_offer = _this$props.active_offer,
        campaign = _this$props.campaign,
        typeButton = _this$props.typeButton,
        data = _this$props.data,
        isPreview = _this$props.isPreview,
        loadingButton = _this$props.loadingButton;
      var spiner = this.state.spiner;
      var background_color = "#212B36";
      if (settings_theme.product.button_color) {
        background_color = settings_theme.product.button_color;
        if (settings_theme.product.button_color.indexOf("gradient_") > -1) {
          var _index = lodash_findindex_default()(Button_colors.gradients, ["name", settings_theme.product.button_color]);
          if (_index > -1) {
            background_color = Button_colors.gradients[_index].style;
          }
        }
      }
      var text_button = "";
      switch (pageToShow) {
        case "product_page":
          text_button = settings_theme.product.product_page_button_text;
          break;
        case "blog_page":
          text_button = settings_theme.product.blog_page_button_text;
          break;
        case "cart_page":
          text_button = settings_theme.product.cart_page_button_text;
          break;
        default:
          text_button = settings_theme.product.thank_you_page_button_text;
          break;
      }
      text_button = minimized ? settings_theme.minimized_view.minimized_button_text : text_button;
      var text_color = settings_theme.product.button_text_color || "#FFFFFF";
      var isUnavailable = Object(isOutOfStock["a" /* default */])(variant) || variant.isUnavailable;
      var hasRedirectToCheckoutState = !(pageToShow == "product_page" && campaign.action_accept_offer == "stay_on_page");
      if (isUnavailable) {
        text_button = settings_theme.product.out_of_stock_text;
      }
      return Button_jsx(Button_Container, {
        id: "button-send",
        settings_theme: settings_theme,
        background_color: background_color,
        spiner: spiner || loadingButton,
        isUnavailable: isUnavailable,
        text_color: text_color,
        onClick: function onClick() {
          var hasError;
          if (isUnavailable || isPreview) {
            return null;
          }
          if (_onClick) {
            hasError = _onClick();
          }
          if (typeButton === "addOffer" && active_offer === campaign.offers.length - 1 && !campaign.allow_coupon_code && !hasError) {
            _this2.setState({
              spiner: true
            });
            if (!data.offers.length) {
              _this2.props.setHideGoToCheckout(true);
            }
          }
        }
      }, spiner || loadingButton ? Button_jsx(compat_module["default"].Fragment, null, Button_jsx(Button_Spiner, {
        id: "button-minor",
        background_color: background_color,
        settings_theme: settings_theme,
        className: "spinner-box"
      }, Button_jsx("div", {
        className: "smt-spinner-circle"
      }, Button_jsx("div", {
        className: "smt-spinner"
      }))), hasRedirectToCheckoutState && Button_jsx(RedirectText, null, settings_theme.product.redirection_text)) : Button_jsx(Button_Text, null, text_button));
    }
  }]);
  return Button;
}(compat_module["Component"]);
/* harmony default export */ var components_Button = (Button_Button);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Link.js





var Link_jsx = compat_module["default"].createElement;
function Link_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, Link_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function Link_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (Link_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }




var Link_colors = redux_config.colors;
var Link_RedirectText = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Link__RedirectText",
  componentId: "sc-1vzj1lg-0"
})(["margin-left:1rem;text-decoration-line:none;text-decoration:none;cursor:default;"]);
var CTAText = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Link__CTAText",
  componentId: "sc-1vzj1lg-1"
})(["text-decoration:underline;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word;"]);
var Link_Link = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(Link, _Component);
  function Link(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, Link);
    _this = Link_callSuper(this, Link, [props]);
    _this.state = {
      spiner: false
    };
    return _this;
  }
  Object(createClass["a" /* default */])(Link, [{
    key: "render",
    value: function render() {
      var _this2 = this;
      var _this$props = this.props,
        settings_theme = _this$props.settings_theme,
        data = _this$props.data,
        pageToShow = _this$props.pageToShow,
        goToCheckout = _this$props.goToCheckout,
        campaign = _this$props.campaign,
        hideGoToCheckout = _this$props.hideGoToCheckout,
        nextOffer = _this$props.nextOffer,
        active_offer = _this$props.active_offer;
      var background_color;
      if (settings_theme.product.go_to_checkout_bg_color) {
        background_color = settings_theme.product.go_to_checkout_bg_color;
        if (settings_theme.product.go_to_checkout_bg_color.indexOf("gradient_") > -1) {
          var _index = lodash_findindex_default()(Link_colors.gradients, ["name", settings_theme.product.go_to_checkout_bg_color]);
          if (_index > -1) {
            background_color = Link_colors.gradients[_index].style;
          }
        }
      }
      if (pageToShow === "thankyou_page" && active_offer === 2 && !data.offers.length) {
        return;
      }
      var has_condition = campaign.has_condition && (active_offer === 2 ? campaign.offers[active_offer] && campaign.offers[active_offer].has_condition : true);
      var spiner = this.state.spiner;
      if (!data.offers.length && !has_condition && (pageToShow === "thankyou_page" || pageToShow === "blog_page")) {
        return null;
      }
      if (campaign.offers.length === 1 && (pageToShow === "thankyou_page" || pageToShow === "blog_page")) {
        return null;
      }

      // 1. haven't accepted any offers yet AND
      // 2. the shown offer is the 2nd offer and there are 2 offers ---OR--- there's only one offer that is not oos and this is not a downsell funnel
      // 3. This is a TY PAGE/ blog page funnel - meanging there's no skip and continue to checkout
      if (!data.offers.length && (campaign.offers.length === 2 && active_offer === 1 || campaign.offers.filter(function (offer) {
        return !offer.outOfStock;
      }).length === 1 && !has_condition) && (pageToShow === "thankyou_page" || pageToShow === "blog_page")) {
        return null;
      }
      if (hideGoToCheckout) {
        return null;
      }
      var Container = styled_components_browser_esm["c" /* default */].div.withConfig({
        displayName: "Link__Container",
        componentId: "sc-1vzj1lg-2"
      })(["width:100%;font-size:1.8rem;line-height:2.2rem;display:flex;align-items:center;text-align:center;justify-content:center;cursor:", ";background:", ";color:", ";font-family:", ";padding:", ";"], function (props) {
        return props.spiner ? "wait" : "pointer";
      }, background_color || "#FFFFFF", settings_theme.product.go_to_checkout_text_color || "#212B36", settings_theme.product.font, function (props) {
        return props.spiner ? "1.4rem" : "1.4rem";
      });
      var Spiner = styled_components_browser_esm["c" /* default */].div.withConfig({
        displayName: "Link__Spiner",
        componentId: "sc-1vzj1lg-3"
      })(["@keyframes spin{from{transform:rotate(0);}to{transform:rotate(359deg);}}&.spinner-box{width:3rem;height:3rem;display:flex;justify-content:center;align-items:center;background-color:transparent;}.smt-spinner-circle{width:3rem;height:3rem;position:relative;border-radius:50%;}.smt-spinner{height:100%;width:100%;border-radius:50%;border-right:2px solid rgba(255,255,255,0);border-top:2px solid rgba(255,255,255,0);border-left:2px solid ", ";border-bottom:2px solid ", ";animation:spin 0.8s linear 0s infinite;}"], settings_theme.product.go_to_checkout_text_color || "#212B36", settings_theme.product.go_to_checkout_text_color || "#212B36");
      var text_link = "";
      switch (pageToShow) {
        case "product_page":
          text_link = settings_theme.product.product_page_text;
          break;
        case "blog_page":
          text_link = settings_theme.product.blog_page_text;
          break;
        case "cart_page":
          text_link = settings_theme.product.cart_page_text;
          break;
        default:
          text_link = settings_theme.product.thank_you_page_text;
          break;
      }
      var hasRedirectToCheckoutState = !(pageToShow == "product_page" && (campaign === null || campaign === void 0 ? void 0 : campaign.action_accept_offer) == "stay_on_page");
      return Link_jsx(Container, {
        className: "secondary-action-button",
        spiner: spiner,
        onClick: function onClick() {
          if (campaign.has_condition && active_offer !== 2) {
            nextOffer(true);
            return;
          }
          if (hasRedirectToCheckoutState) {
            _this2.setState({
              spiner: true
            });
          }
          if (goToCheckout) {
            goToCheckout();
          }
        }
      }, spiner ? Link_jsx(compat_module["default"].Fragment, null, Link_jsx(Spiner, {
        className: "spinner-box"
      }, Link_jsx("div", {
        className: "smt-spinner-circle"
      }, Link_jsx("div", {
        className: "smt-spinner"
      }))), Link_jsx(Link_RedirectText, {
        spiner: spiner
      }, settings_theme.product.redirection_text)) : campaign.has_condition && active_offer !== campaign.offers.length - 1 ? Link_jsx(CTAText, null, settings_theme.product.downsell_text) : Link_jsx(CTAText, null, "".concat(text_link).concat(pageToShow === "thankyou_page" || pageToShow === "blog_page" ? " (".concat(data.offers.length, ")") : "")));
    }
  }]);
  return Link;
}(compat_module["Component"]);
/* harmony default export */ var components_Link = (Link_Link);
// CONCATENATED MODULE: ./lib/color.js
/* eslint-disable no-param-reassign */
/* eslint-disable prefer-template */
/* eslint-disable id-length */

function RGBtoHEX(r, g, b) {
  if (arguments.length === 1) {
    g = r.g;
    b = r.b;
    r = r.r;
  }
  return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
}
function HEXToRGB(hex) {
  var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  return result ? {
    r: parseInt(result[1], 16),
    g: parseInt(result[2], 16),
    b: parseInt(result[3], 16)
  } : null;
}
function HSVtoRGB(h, s, v) {
  if (arguments.length === 1) {
    s = h.s;
    v = h.v;
    h = h.h;
  }
  var i = Math.floor(h * 6);
  var f = h * 6 - i;
  var p = v * (1 - s);
  var q = v * (1 - f * s);
  var t = v * (1 - (1 - f) * s);
  var r;
  var g;
  var b;
  switch (i % 6) {
    case 0:
      r = v;
      g = t;
      b = p;
      break;
    case 1:
      r = q;
      g = v;
      b = p;
      break;
    case 2:
      r = p;
      g = v;
      b = t;
      break;
    case 3:
      r = p;
      g = q;
      b = v;
      break;
    case 4:
      r = t;
      g = p;
      b = v;
      break;
    case 5:
      r = v;
      g = p;
      b = q;
      break;
  }
  return {
    r: Math.round(r * 255),
    g: Math.round(g * 255),
    b: Math.round(b * 255)
  };
}
function RGBtoHSV(r, g, b) {
  if (arguments.length === 1) {
    g = r.g;
    b = r.b;
    r = r.r;
  }
  var max = Math.max(r, g, b);
  var min = Math.min(r, g, b);
  var d = max - min;
  var s = max === 0 ? 0 : d / max;
  var v = max / 255;
  var h;
  switch (max) {
    case min:
      h = 0;
      break;
    case r:
      h = g - b + d * (g < b ? 6 : 0);
      h /= 6 * d;
      break;
    case g:
      h = b - r + d * 2;
      h /= 6 * d;
      break;
    case b:
      h = r - g + d * 4;
      h /= 6 * d;
      break;
  }
  return {
    h: h,
    s: s,
    v: v
  };
}
function RGBToHSL(r, g, b) {
  if (arguments.length === 1) {
    g = r.g;
    b = r.b;
    r = r.r;
  }

  // Make r, g, and b fractions of 1
  r /= 255;
  g /= 255;
  b /= 255;

  // Find greatest and smallest channel values
  var cmin = Math.min(r, g, b);
  var cmax = Math.max(r, g, b);
  var delta = cmax - cmin;
  var h = 0;
  var s = 0;
  var l = 0;

  // Calculate hue
  // No difference
  if (delta === 0) {
    h = 0;
  } else if (cmax === r) {
    // Red is max
    h = (g - b) / delta % 6;
  } else if (cmax === g) {
    // Green is max
    h = (b - r) / delta + 2;
  } else {
    // Blue is max
    h = (r - g) / delta + 4;
  }
  h = Math.round(h * 60);

  // Make negative hues positive behind 360°
  if (h < 0) {
    h += 360;
  }

  // Calculate lightness
  l = (cmax + cmin) / 2;

  // Calculate saturation
  s = delta === 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));

  // Multiply l and s by 100
  s = Number((s * 100).toFixed(1));
  l = Number((l * 100).toFixed(1));
  return {
    h: h,
    s: s,
    l: l
  };
}
// CONCATENATED MODULE: ./components/WidgetComponent/components/ProgressItems.js





var ProgressItems_jsx = compat_module["default"].createElement;
function ProgressItems_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, ProgressItems_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function ProgressItems_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (ProgressItems_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }




var DivProgres = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "ProgressItems__DivProgres",
  componentId: "sc-1obui2e-0"
})(["display:flex;flex:1;margin:0 0.4rem;background:rgba(", ",", ",", ",0.6);height:0.4rem;-webkit-clip-path:inset(15% 10% 15% 10% round 2px);clip-path:inset(0% 0% 0% 0% round 2px);"], function (props) {
  return props.rgb.r;
}, function (props) {
  return props.rgb.g;
}, function (props) {
  return props.rgb.b;
});
var ProgresItems = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "ProgressItems__ProgresItems",
  componentId: "sc-1obui2e-1"
})(["display:flex;min-height:2rem;justify-content:space-evenly;align-items:center;padding:0 0.4rem;background:", ";"], function (props) {
  return props.top_background_color;
});
var progressBar = Object(styled_components_browser_esm["d" /* keyframes */])(["{0%{width:", ";}100%{width:100%;}}"], function (props) {
  return props.progress ? "".concat(props.progress, "%") : '0%';
});
var Indicator = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "ProgressItems__Indicator",
  componentId: "sc-1obui2e-2"
})(["width:", ";height:0.4rem;background:", ";-webkit-clip-path:inset(15% 10% 15% 10% round 2px);clip-path:inset(0% 0% 0% 0% round 2px);&.animation{animation-timing-function:linear;animation-duration:", "s;animation-name:", ";-webkit-animation-name:", ";-webkit-animation-duration:", "s;}"], function (props) {
  return props.progress ? "".concat(props.progress, "%") : '0%';
}, function (props) {
  return props.text_color;
}, function (props) {
  return props.seconds;
}, progressBar, progressBar, function (props) {
  return props.seconds;
});
var ProgressItems_ProgresItem = function ProgresItem(_ref) {
  var progress = _ref.progress,
    onClick = _ref.onClick,
    className = _ref.className,
    seconds = _ref.seconds,
    text_color = _ref.text_color;
  return ProgressItems_jsx(DivProgres, {
    onClick: onClick,
    text_color: text_color,
    rgb: HEXToRGB(text_color) || {
      r: 1,
      g: 1,
      b: 1
    }
  }, ProgressItems_jsx(Indicator, {
    progress: progress,
    className: className,
    text_color: text_color,
    seconds: seconds
  }));
};
var ProgressItems_ProgressItems = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(ProgressItems, _Component);
  function ProgressItems(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, ProgressItems);
    _this = ProgressItems_callSuper(this, ProgressItems, [props]);
    var maxTime = props.maxTime,
      startTime = props.startTime,
      settings_theme = props.settings_theme;
    _this.state = {
      progress: settings_theme.countdown_timer.show ? (new Date().getTime() - startTime) * 100 / (maxTime * 1000) : 100,
      seconds: maxTime - Math.round((new Date().getTime() - startTime) / 1000) || 0
    };
    return _this;
  }
  Object(createClass["a" /* default */])(ProgressItems, [{
    key: "componentWillReceiveProps",
    value: function componentWillReceiveProps(nextProps) {
      var settings_theme = nextProps.settings_theme,
        maxTime = nextProps.maxTime,
        startTime = nextProps.startTime;
      this.setState({
        progress: settings_theme.countdown_timer.show ? (new Date().getTime() - startTime) * 100 / (maxTime * 1000) : 100,
        seconds: maxTime - Math.round((new Date().getTime() - startTime) / 1000) || 0
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this$props = this.props,
        campaign = _this$props.campaign,
        active_offer = _this$props.active_offer,
        history_offer = _this$props.history_offer,
        goToOffer = _this$props.goToOffer,
        isMobile = _this$props.isMobile,
        isPreview = _this$props.isPreview,
        settings_theme = _this$props.settings_theme;
      var _this$state = this.state,
        progress = _this$state.progress,
        seconds = _this$state.seconds;
      return ProgressItems_jsx(ProgresItems, {
        id: "progress-items",
        top_background_color: settings_theme.upsell_page.top_background_color
      }, campaign.offers.map(function (item, index) {
        return ProgressItems_jsx(ProgressItems_ProgresItem, {
          key: "progres-".concat((item._id ? item._id : '') + index),
          className: classnames_default()({
            animation: function () {
              if (isPreview) {
                return false;
              }
              if (index < active_offer) {
                return false;
              }
              if (index > active_offer) {
                return false;
              }
              if (history_offer === index) {
                return true;
              }
              return false;
            }()
          }),
          seconds: seconds,
          text_color: settings_theme.upsell_page.text_color,
          progress: function () {
            if (isPreview && index == 0) {
              return 100;
            }
            if (index < active_offer) {
              return 100;
            }
            if (index > active_offer) {
              return 0;
            }
            return history_offer === index ? progress : 100;
          }(),
          onClick: function onClick() {
            if (isMobile) {
              goToOffer(index);
            }
          }
        });
      }));
    }
  }]);
  return ProgressItems;
}(compat_module["Component"]);
/* harmony default export */ var components_ProgressItems = (ProgressItems_ProgressItems);
// CONCATENATED MODULE: ./components/WidgetComponent/components/ProgressItemsNav.js





var ProgressItemsNav_jsx = compat_module["default"].createElement;
function ProgressItemsNav_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, ProgressItemsNav_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function ProgressItemsNav_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (ProgressItemsNav_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }


var ProgressItemsNav_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "ProgressItemsNav__Container",
  componentId: "sc-w164lq-0"
})(["position:absolute;display:flex;flex-direction:row;width:100%;z-index:2;"]);
var Item = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "ProgressItemsNav__Item",
  componentId: "sc-w164lq-1"
})(["padding:1rem;width:100%;"]);
var ProgressItemsNav_ProgressItemsNav = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(ProgressItemsNav, _Component);
  function ProgressItemsNav(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, ProgressItemsNav);
    _this = ProgressItemsNav_callSuper(this, ProgressItemsNav, [props]);
    _this.state = {};
    return _this;
  }
  Object(createClass["a" /* default */])(ProgressItemsNav, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
        campaign = _this$props.campaign,
        goToOffer = _this$props.goToOffer,
        isMobile = _this$props.isMobile;
      if (!isMobile) {
        return null;
      }
      return ProgressItemsNav_jsx(ProgressItemsNav_Container, null, campaign.offers.map(function (item, index) {
        return ProgressItemsNav_jsx(Item, {
          key: "nav-click-offer-".concat(index),
          onClick: function onClick() {
            console.log('click', index);
            goToOffer(index);
          }
        });
      }));
    }
  }]);
  return ProgressItemsNav;
}(compat_module["Component"]);
/* harmony default export */ var components_ProgressItemsNav = (ProgressItemsNav_ProgressItemsNav);
// CONCATENATED MODULE: ./components/WidgetComponent/components/BrandIcon.js
var BrandIcon_jsx = compat_module["default"].createElement;

function Icon(_ref) {
  var isPreview = _ref.isPreview;
  return BrandIcon_jsx("svg", {
    width: isPreview ? "10" : "14",
    height: "14",
    viewBox: "0 0 14 14",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg"
  }, BrandIcon_jsx("rect", {
    width: "14",
    height: "14",
    rx: "1",
    fill: "#212B36"
  }), BrandIcon_jsx("path", {
    d: "M7 12.8036C6.93707 12.8036 6.87413 12.7848 6.81999 12.7473L2.41637 9.69613C2.33104 9.63701 2.28013 9.53975 2.28013 9.4359V5.7067C2.28013 5.67269 2.28561 5.63888 2.29636 5.60662L2.57329 4.77515L2.37258 4.57429C1.87581 4.07709 1.87581 3.26811 2.37258 2.77094C2.37308 2.77043 2.37361 2.76992 2.37412 2.7694C2.86854 2.27581 3.67402 2.26937 4.17477 2.7706L4.3198 2.91573C4.47348 2.80041 5.46938 2 6.99983 2C8.53053 2 9.5266 2.80035 9.68026 2.91567L9.82523 2.77056C10.319 2.27636 11.1245 2.26882 11.6259 2.76937C11.6264 2.76988 11.6269 2.77039 11.6274 2.77091C12.1242 3.26811 12.1242 4.07707 11.6274 4.57425L11.4267 4.77513L11.7036 5.6066C11.7144 5.63886 11.7199 5.67267 11.7199 5.70668V9.4359C11.7199 9.53975 11.669 9.63701 11.5836 9.69613L7.18001 12.7473C7.12587 12.7848 7.06293 12.8036 7 12.8036V12.8036Z",
    fill: "url(#paint0_linear)"
  }), BrandIcon_jsx("path", {
    d: "M6.99656 10.1217C5.7574 10.1217 4.62319 9.20937 4.62319 7.91521V7.08699C4.62319 6.54882 4.83447 6.04285 5.2181 5.66227L6.28657 4.6023C6.67805 4.21394 7.31504 4.21396 7.70654 4.60228L8.77501 5.66227C9.15864 6.04285 9.36992 6.54882 9.36992 7.08699V7.91521C9.36992 9.20688 8.23723 10.1217 6.99656 10.1217Z",
    fill: "url(#paint1_linear)"
  }), BrandIcon_jsx("path", {
    d: "M6.99656 8.74741C6.37666 8.74741 5.87233 8.29896 5.87233 7.74774C5.87233 7.1965 6.37664 6.74805 6.99656 6.74805C7.61648 6.74805 8.12078 7.1965 8.12078 7.74774C8.12078 8.29896 7.61646 8.74741 6.99656 8.74741Z",
    fill: "#212B36"
  }), BrandIcon_jsx("path", {
    d: "M6.9965 9.52246C6.9965 9.52246 6.27873 9.77006 5.60577 9.55004C5.62382 10.4688 6.23933 11.2745 6.9965 11.2745C7.75381 11.2745 8.36932 10.4688 8.38737 9.55004C7.71426 9.77006 6.9965 9.52246 6.9965 9.52246V9.52246Z",
    fill: "#ED435C"
  }), BrandIcon_jsx("path", {
    d: "M6.20339 10.3408C6.51182 10.3629 6.78762 10.3049 6.9177 10.2708C6.96943 10.2573 7.02356 10.2573 7.07529 10.2708C7.20537 10.3049 7.48117 10.3629 7.7896 10.3408C7.93848 10.33 8.06044 10.4263 8.09653 10.5531C8.27263 10.2681 8.37985 9.91803 8.38737 9.54952C7.71426 9.76556 6.9965 9.52246 6.9965 9.52246C6.9965 9.52246 6.27873 9.76556 5.60577 9.54952C5.61314 9.91817 5.72051 10.2681 5.89646 10.5531C5.93255 10.4263 6.05451 10.33 6.20339 10.3408V10.3408Z",
    fill: "url(#paint2_linear)"
  }), BrandIcon_jsx("path", {
    d: "M4.62835 5.03626C4.82867 5.03626 4.99107 4.8738 4.99107 4.6734C4.99107 4.473 4.82867 4.31055 4.62835 4.31055C4.42802 4.31055 4.26562 4.473 4.26562 4.6734C4.26562 4.8738 4.42802 5.03626 4.62835 5.03626Z",
    fill: "#212B36"
  }), BrandIcon_jsx("path", {
    d: "M9.36049 5.03626C9.56082 5.03626 9.72322 4.8738 9.72322 4.6734C9.72322 4.473 9.56082 4.31055 9.36049 4.31055C9.16017 4.31055 8.99777 4.473 8.99777 4.6734C8.99777 4.8738 9.16017 5.03626 9.36049 5.03626Z",
    fill: "#212B36"
  }), BrandIcon_jsx("defs", null, BrandIcon_jsx("linearGradient", {
    id: "paint0_linear",
    x1: "7.0043",
    y1: "2",
    x2: "7.0043",
    y2: "7.02162",
    gradientUnits: "userSpaceOnUse"
  }, BrandIcon_jsx("stop", {
    stopColor: "#F9FAFB"
  }), BrandIcon_jsx("stop", {
    offset: "1",
    stopColor: "white"
  })), BrandIcon_jsx("linearGradient", {
    id: "paint1_linear",
    x1: "6.99785",
    y1: "5.14777",
    x2: "6.99785",
    y2: "10.5069",
    gradientUnits: "userSpaceOnUse"
  }, BrandIcon_jsx("stop", {
    stopColor: "#C4CDD5"
  }), BrandIcon_jsx("stop", {
    offset: "1",
    stopColor: "#F9FAFB"
  })), BrandIcon_jsx("linearGradient", {
    id: "paint2_linear",
    x1: "6.99657",
    y1: "9.52246",
    x2: "7.00087",
    y2: "10.0378",
    gradientUnits: "userSpaceOnUse"
  }, BrandIcon_jsx("stop", {
    stopColor: "#DA2F3C"
  }), BrandIcon_jsx("stop", {
    offset: "1",
    stopColor: "#ED435C"
  }))));
}
/* harmony default export */ var BrandIcon = (Icon);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Brand.js
var Brand_jsx = compat_module["default"].createElement;



var Brand_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Brand__Container",
  componentId: "sc-1i0flfd-0"
})(["", " background:#FFFFFF;display:flex;align-items:center;justify-content:center;position:absolute;z-index:9999999;width:100%;bottom:0px;border-top:1px solid #c6c9cc5e;", ""], function (_ref) {
  var isPreview = _ref.isPreview;
  return isPreview ? "height: 18px;" : "height: 26px;";
}, function (_ref2) {
  var isDesktopView = _ref2.isDesktopView;
  return isDesktopView ? "right: auto;" : "";
});
var Brand_Link = styled_components_browser_esm["c" /* default */].a.withConfig({
  displayName: "Brand__Link",
  componentId: "sc-1i0flfd-1"
})(["cursor:pointer;color:#919eab;font-size:1.4rem;font-family:sans-serif;line-height:14px;margin-left:5px;text-decoration:none;&:hover{color:#919eab !important;}&:focus{color:#919eab;}"]);
function Brand(props) {
  var isDesktopView = props.isDesktopView,
    isPreview = props.isPreview;
  return Brand_jsx(Brand_Container, {
    isPreview: isPreview,
    isDesktopView: isDesktopView
  }, Brand_jsx(BrandIcon, {
    isPreview: isPreview
  }), Brand_jsx(Brand_Link, {
    href: "https://www.conversionbear.com/powered-by-conversion-bear",
    target: "_blank"
  }, "Powered by Conversion Bear"));
}
/* harmony default export */ var components_Brand = (Brand);
// EXTERNAL MODULE: ./node_modules/lodash.clonedeep/index.js
var lodash_clonedeep = __webpack_require__(21);
var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);

// EXTERNAL MODULE: ./lib/autoDiscountCheck.js
var autoDiscountCheck = __webpack_require__(37);

// EXTERNAL MODULE: ./lib/getUpsellCartSum.js
var getUpsellCartSum = __webpack_require__(30);

// CONCATENATED MODULE: ./components/WidgetComponent/components/icons/IconDone.js

var IconDone_jsx = compat_module["default"].createElement;

var IconDone_IconDone = function IconDone(props) {
  return IconDone_jsx("svg", Object(esm_extends["a" /* default */])({}, props, {
    width: "18",
    height: "14",
    viewBox: "0 0 18 14",
    xmlns: "http://www.w3.org/2000/svg"
  }), IconDone_jsx("path", {
    d: "M6.42855 13.0242L0 6.89456L1.81283 5.16597L6.42855 9.55484L16.1872 0.25L18 1.99083L6.42855 13.0242Z",
    fill: props.fill
  }));
};
/* harmony default export */ var icons_IconDone = (IconDone_IconDone);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Discount/DiscountCodeBlock.js


var DiscountCodeBlock_jsx = compat_module["default"].createElement;
function DiscountCodeBlock_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ DiscountCodeBlock_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == Object(esm_typeof["a" /* default */])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(Object(esm_typeof["a" /* default */])(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }







var DiscountCodeBlock_colors = redux_config.colors;
var DiscountCodeBlock_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "DiscountCodeBlock__Container",
  componentId: "sc-1uj3dp6-0"
})(["display:flex;background:", ";width:100%;padding:1rem 0;justify-content:center;align-items:center;flex-direction:column;"], function (_ref) {
  var settings_theme = _ref.settings_theme;
  return settings_theme.product.description_bg_color || "white";
});
var DiscountCodeBlock_Text = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "DiscountCodeBlock__Text",
  componentId: "sc-1uj3dp6-1"
})(["overflow:hidden;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:1.6rem;line-height:1.9rem;color:", ";cursor:pointer;text-decoration-line:underline;font-family:", ";"], function (_ref2) {
  var settings_theme = _ref2.settings_theme;
  return settings_theme.discount_code_texts.text_color;
}, function (_ref3) {
  var settings_theme = _ref3.settings_theme;
  return settings_theme.product.font;
});
var Apply = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "DiscountCodeBlock__Apply",
  componentId: "sc-1uj3dp6-2"
})(["font-size:1.8rem;line-height:2.2rem;color:", ";font-family:", ";margin-left:1rem;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:", ";"], function (_ref4) {
  var settings_theme = _ref4.settings_theme;
  return settings_theme.product.button_color;
}, function (_ref5) {
  var settings_theme = _ref5.settings_theme;
  return settings_theme.product.font;
}, function (_ref6) {
  var isDesktopView = _ref6.isDesktopView;
  return isDesktopView ? "300px" : "170px";
});
var Spinner = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "DiscountCodeBlock__Spinner",
  componentId: "sc-1uj3dp6-3"
})(["@keyframes spin{from{transform:rotate(0);}to{transform:rotate(359deg);}}&.spinner-box{width:2.6rem;height:2.6rem;display:flex;justify-content:center;align-items:center;background-color:transparent;margin-left:1rem;}.smt-spinner-circle{width:2.6rem;height:2.6rem;position:relative;border-radius:50%;}.smt-spinner{height:100%;width:100%;border-radius:50%;border-right:2px solid rgba(255,255,255,0);border-top:2px solid rgba(255,255,255,0);border-left:2px solid ", ";border-bottom:2px solid ", ";animation:spin 0.8s linear 0s infinite;}"], function (_ref7) {
  var settings_theme = _ref7.settings_theme,
    background_color = _ref7.background_color;
  return background_color ? "#000000" : settings_theme.product.button_color;
}, function (_ref8) {
  var settings_theme = _ref8.settings_theme,
    background_color = _ref8.background_color;
  return background_color ? "#000000" : settings_theme.product.button_color;
});
var InputError = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "DiscountCodeBlock__InputError",
  componentId: "sc-1uj3dp6-4"
})(["font-size:1.6rem;line-height:1.9rem;font-family:Lato;color:#df2626;top:4.5rem;width:100%;margin-top:1rem;display:", ";overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical;word-break:break-word;"], function (_ref9) {
  var error = _ref9.error;
  return error ? " -webkit-box" : "none";
});
var InputWrap = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "DiscountCodeBlock__InputWrap",
  componentId: "sc-1uj3dp6-5"
})(["display:flex;align-items:center;"]);
var ApplyBlock = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "DiscountCodeBlock__ApplyBlock",
  componentId: "sc-1uj3dp6-6"
})(["display:flex;align-items:center;flex-direction:column;width:min-content;"]);
var Total = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "DiscountCodeBlock__Total",
  componentId: "sc-1uj3dp6-7"
})(["font-size:1.6rem;line-height:normal;text-align:center;margin:0 0 1rem 0;font-family:", ";color:", ";white-space:nowrap;max-width:24.7rem;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:flex;overflow:hidden;"], function (_ref10) {
  var settings_theme = _ref10.settings_theme;
  return settings_theme.price.font;
}, function (_ref11) {
  var settings_theme = _ref11.settings_theme;
  return settings_theme.product.description_text_color || "#212B36";
});
var TotalText = styled_components_browser_esm["c" /* default */].span.withConfig({
  displayName: "DiscountCodeBlock__TotalText",
  componentId: "sc-1uj3dp6-8"
})(["margin-right:0.4rem;text-overflow:ellipsis;display:block;white-space:nowrap;overflow:hidden;"]);
var Wrap = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "DiscountCodeBlock__Wrap",
  componentId: "sc-1uj3dp6-9"
})(["display:flex;flex-direction:column;justify-content:center;max-width:95%;text-overflow:ellipsis;overflow:hidden;"]);
var Input = styled_components_browser_esm["c" /* default */].input.withConfig({
  displayName: "DiscountCodeBlock__Input",
  componentId: "sc-1uj3dp6-10"
})(["border:", ";box-sizing:border-box;border-radius:2px;width:16.2rem;height:3.6rem;padding:0 1rem;color:", ";font-family:", ";font-size:1.8rem;line-height:2.2rem;&::placeholder{opacity:0.6;}"], function (_ref12) {
  var error = _ref12.error,
    settings_theme = _ref12.settings_theme;
  return error ? "2px solid #DF2626;" : "2px solid ".concat(settings_theme.product.button_color);
}, function (_ref13) {
  var settings_theme = _ref13.settings_theme;
  return settings_theme.discount_code_texts.text_color || "#2D2D2D";
}, function (_ref14) {
  var settings_theme = _ref14.settings_theme;
  return settings_theme.product.font;
});
var DiscountCodeBlock_DiscountCodeBlock = function DiscountCodeBlock(_ref15) {
  var _settings_theme$disco;
  var settings_theme = _ref15.settings_theme,
    isDesktopView = _ref15.isDesktopView,
    currency_format = _ref15.currency_format,
    handleChangeCode = _ref15.handleChangeCode,
    done = _ref15.done,
    error = _ref15.error,
    spinner = _ref15.spinner,
    applyCouponCode = _ref15.applyCouponCode,
    handleInputClick = _ref15.handleInputClick,
    funnelTotalPrice = _ref15.funnelTotalPrice,
    setTotalPrice = _ref15.setTotalPrice,
    totalPrice = _ref15.totalPrice,
    hasAutomaticDiscount = _ref15.hasAutomaticDiscount,
    designDiscount = _ref15.designDiscount,
    data = _ref15.data,
    active_offer = _ref15.active_offer,
    campaign = _ref15.campaign,
    isPreview = _ref15.isPreview;
  // in case apply_code string is empty do not render the enter discount code cta step
  var _useState = Object(compat_module["useState"])(!isPreview && ((_settings_theme$disco = settings_theme.discount_code_texts) === null || _settings_theme$disco === void 0 || (_settings_theme$disco = _settings_theme$disco.apply_code) === null || _settings_theme$disco === void 0 ? void 0 : _settings_theme$disco.length) == 0),
    isOpenInput = _useState[0],
    setIsOpenInput = _useState[1];
  var inputEl = Object(compat_module["useRef"])(null);
  var currencyChange = function currencyChange(amount) {
    try {
      var _result = amount;
      if (window && window.conversionBearAutoCurrencyConverter && window.conversionBearAutoCurrencyConverter.convert) {
        var _data2 = window.conversionBearAutoCurrencyConverter.convert(amount, "{{amount_no_formatting}}");
        _result = _data2.amount;
      }
      return _result;
    } catch (e) {
      return amount;
    }
  };
  var fetchTotalPrice = /*#__PURE__*/function () {
    var _ref16 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/DiscountCodeBlock_regeneratorRuntime().mark(function _callee() {
      var _productsFromFunnel, _yield$window$bundles, totalWithDiscount;
      return DiscountCodeBlock_regeneratorRuntime().wrap(function _callee$(_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              if (!isPreview) {
                _context.next = 3;
                break;
              }
              setTotalPrice(funnelTotalPrice);
              return _context.abrupt("return");
            case 3:
              if (!(window.bundlesBear && window.bundlesBear.discountStatus === "exists")) {
                _context.next = 17;
                break;
              }
              _context.prev = 4;
              _productsFromFunnel = data.offers.map(function (offer) {
                var currentOffer = offer.condition ? campaign.offers[offer.active_offer].declinedOffer : campaign.offers[offer.active_offer];
                var _currentOffer$product = currentOffer.product.variants.find(function (variant) {
                    return variant.id === offer.variant_id;
                  }),
                  price = _currentOffer$product.price;
                return {
                  product_id: offer.product_id,
                  quantity: offer.quantity,
                  discount: offer.condition ? campaign.offers[offer.active_offer].declinedOffer.discount : campaign.offers[offer.active_offer].discount,
                  price: price
                };
              });
              _context.next = 8;
              return window.bundlesBear.getDiscountInformation(_productsFromFunnel);
            case 8:
              _yield$window$bundles = _context.sent;
              totalWithDiscount = _yield$window$bundles.totalWithDiscount;
              setTotalPrice(totalWithDiscount);
              return _context.abrupt("return");
            case 14:
              _context.prev = 14;
              _context.t0 = _context["catch"](4);
              console.log("fetch total price bundlesBear Error:", _context.t0);
            case 17:
              fetch("/cart.js", {
                method: "GET"
              }).then(function (res) {
                return res.json();
              }).then(function (result) {
                var sum = Object(getUpsellCartSum["a" /* default */])(data.offers, campaign, active_offer, result);
                setTotalPrice((campaign.offer_type === "upsell" ? sum : result.total_price) / 100 + funnelTotalPrice);
              })["catch"](function (e) {
                console.log("fetchTotalPrice -> e", e);
                // no cart
                setTotalPrice(funnelTotalPrice);
              });
            case 18:
            case "end":
              return _context.stop();
          }
        }
      }, _callee, null, [[4, 14]]);
    }));
    return function fetchTotalPrice() {
      return _ref16.apply(this, arguments);
    };
  }();
  Object(compat_module["useEffect"])(function () {
    if (isOpenInput) {
      inputEl.current.focus();
    }
  }, [isOpenInput]);
  Object(compat_module["useEffect"])(function () {
    fetchTotalPrice();
  }, []);
  var openInput = function openInput() {
    setIsOpenInput(true);
  };
  var handleChangeInput = function handleChangeInput(event) {
    handleChangeCode(event.target.value);
  };
  var background_color;
  if (settings_theme.product.button_color) {
    if (settings_theme.product.button_color.indexOf("gradient_") > -1) {
      var _index = lodash_findindex_default()(DiscountCodeBlock_colors.gradients, ["name", settings_theme.product.button_color]);
      if (_index > -1) {
        background_color = DiscountCodeBlock_colors.gradients[_index].style;
      }
    }
  }
  return DiscountCodeBlock_jsx(DiscountCodeBlock_Container, {
    id: "button-send",
    settings_theme: settings_theme,
    isDesktopView: isDesktopView
  }, DiscountCodeBlock_jsx(Total, {
    settings_theme: settings_theme,
    isDesktopView: isDesktopView
  }, DiscountCodeBlock_jsx(TotalText, null, settings_theme.discount_code_texts.discount_total), DiscountCodeBlock_jsx("span", null, Object(formatPrice["a" /* default */])({
    priceAmount: parseFloat(currencyChange(totalPrice)).toFixed(2),
    currencyFormat: currency_format
  }))), isOpenInput || designDiscount && designDiscount.inputIsOpen ? DiscountCodeBlock_jsx(compat_module["default"].Fragment, null, DiscountCodeBlock_jsx(Wrap, null, DiscountCodeBlock_jsx(ApplyBlock, null, DiscountCodeBlock_jsx(InputWrap, null, DiscountCodeBlock_jsx(Input, {
    ref: inputEl,
    onClick: handleInputClick,
    error: error || designDiscount && designDiscount.error,
    settings_theme: settings_theme,
    type: "text",
    onChange: handleChangeInput,
    placeholder: settings_theme.discount_code_texts.discount_code
  }), done ? DiscountCodeBlock_jsx(icons_IconDone, {
    style: {
      marginLeft: 10
    },
    fill: settings_theme.product.button_color
  }) : DiscountCodeBlock_jsx(compat_module["default"].Fragment, null, spinner ? DiscountCodeBlock_jsx(Spinner, {
    id: "button-minor",
    settings_theme: settings_theme,
    background_color: background_color,
    className: "spinner-box"
  }, DiscountCodeBlock_jsx("div", {
    className: "smt-spinner-circle"
  }, DiscountCodeBlock_jsx("div", {
    className: "smt-spinner"
  }))) : DiscountCodeBlock_jsx(Apply, {
    isDesktopView: isDesktopView,
    settings_theme: settings_theme,
    onClick: applyCouponCode
  }, settings_theme.discount_code_texts.apply_discount))), DiscountCodeBlock_jsx(InputError, {
    error: error || designDiscount && designDiscount.error
  }, hasAutomaticDiscount ? "A discount has been applied to this order. You can\u2019t add another discount." : settings_theme.discount_code_texts.discount_error)))) : DiscountCodeBlock_jsx(Wrap, null, DiscountCodeBlock_jsx(DiscountCodeBlock_Text, {
    settings_theme: settings_theme,
    onClick: openInput
  }, settings_theme.discount_code_texts.apply_code)));
};
/* harmony default export */ var Discount_DiscountCodeBlock = (DiscountCodeBlock_DiscountCodeBlock);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Discount/CompleteYourPurchase.js
var CompleteYourPurchase_jsx = compat_module["default"].createElement;




var CompleteYourPurchase_colors = redux_config.colors;
var CompleteYourPurchase_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CompleteYourPurchase__Container",
  componentId: "sc-6uopqj-0"
})(["display:flex;background:", ";width:100%;padding:", ";font-size:1.8rem;line-height:2.2rem;text-align:center;justify-content:center;align-items:center;cursor:pointer;color:", ";font-family:", ";overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word;"], function (_ref) {
  var settings_theme = _ref.settings_theme,
    background_color = _ref.background_color;
  return background_color || settings_theme.product.button_color;
}, function (_ref2) {
  var settings_theme = _ref2.settings_theme;
  return settings_theme.spiner ? '1rem' : '1.4rem';
}, function (_ref3) {
  var settings_theme = _ref3.settings_theme;
  return settings_theme.product.button_text_color || '#FFFFFF';
}, function (_ref4) {
  var settings_theme = _ref4.settings_theme;
  return settings_theme.product.font;
});
var CompleteYourPurchase_Spinner = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "CompleteYourPurchase__Spinner",
  componentId: "sc-6uopqj-1"
})(["@keyframes spin{from{transform:rotate(0);}to{transform:rotate(359deg);}}&.spinner-box{width:3rem;height:3rem;display:flex;justify-content:center;align-items:center;background-color:transparent;margin-left:1rem;}.smt-spinner-circle{width:3rem;height:3rem;position:relative;border-radius:50%;}.smt-spinner{height:100%;width:100%;border-radius:50%;border-right:2px solid rgba(255,255,255,0);border-top:2px solid rgba(255,255,255,0);border-left:2px solid ", ";border-bottom:2px solid ", ";animation:spin .8s linear 0s infinite;}"], function (_ref5) {
  var settings_theme = _ref5.settings_theme;
  return settings_theme.product.button_text_color || '#FFFFFF';
}, function (_ref6) {
  var settings_theme = _ref6.settings_theme;
  return settings_theme.product.button_text_color || '#FFFFFF';
});
var CompleteYourPurchase_CompleteYourPurchase = function CompleteYourPurchase(_ref7) {
  var settings_theme = _ref7.settings_theme,
    goToCheckout = _ref7.goToCheckout,
    totalPrice = _ref7.totalPrice;
  var _useState = Object(compat_module["useState"])(false),
    spinner = _useState[0],
    setSpinner = _useState[1];
  var handleClick = function handleClick() {
    goToCheckout(true, totalPrice);
    setSpinner(true);
    return null;
  };
  var background_color;
  if (settings_theme.product.button_color) {
    background_color = settings_theme.product.button_color;
    if (settings_theme.product.button_color.indexOf('gradient_') > -1) {
      var _index = lodash_findindex_default()(CompleteYourPurchase_colors.gradients, ['name', settings_theme.product.button_color]);
      if (_index > -1) {
        background_color = CompleteYourPurchase_colors.gradients[_index].style;
      }
    }
  }
  return CompleteYourPurchase_jsx(CompleteYourPurchase_Container, {
    onClick: handleClick,
    settings_theme: settings_theme,
    background_color: background_color,
    className: "primary-button complete-purchase-button"
  }, spinner ? settings_theme.product.redirection_text : settings_theme.discount_code_texts.button_text, spinner && CompleteYourPurchase_jsx(CompleteYourPurchase_Spinner, {
    settings_theme: settings_theme,
    className: "spinner-box"
  }, CompleteYourPurchase_jsx("div", {
    className: "smt-spinner-circle"
  }, CompleteYourPurchase_jsx("div", {
    className: "smt-spinner"
  }))));
};
/* harmony default export */ var Discount_CompleteYourPurchase = (CompleteYourPurchase_CompleteYourPurchase);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Discount/Discout.js



var Discout_jsx = compat_module["default"].createElement;
function Discout_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ Discout_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == Object(esm_typeof["a" /* default */])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(Object(esm_typeof["a" /* default */])(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function Discout_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function Discout_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Discout_ownKeys(Object(t), !0).forEach(function (r) { Object(defineProperty["a" /* default */])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Discout_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }







var DiscountWrap = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Discout__DiscountWrap",
  componentId: "sc-rtr9v4-0"
})(["width:100%;height:100%;position:absolute;z-index:10;display:flex;flex-direction:column;background:rgba(0,0,0,0.6);justify-content:flex-end;", ""], function (_ref) {
  var isPreview = _ref.isPreview,
    isShowBrand = _ref.isShowBrand;
  return isShowBrand && (isPreview ? "padding-bottom: 18px;" : "padding-bottom: 26px;");
});
var BackgroundDiscount = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Discout__BackgroundDiscount",
  componentId: "sc-rtr9v4-1"
})(["height:100%;"]);
var Discout_Discount = function Discount(_ref2) {
  var isShowBrand = _ref2.isShowBrand,
    isPreview = _ref2.isPreview,
    settings_theme = _ref2.settings_theme,
    currency_format = _ref2.currency_format,
    isDesktopView = _ref2.isDesktopView,
    goToCheckout = _ref2.goToCheckout,
    url = _ref2.url,
    shop = _ref2.shop,
    setAdditionalDiscount = _ref2.setAdditionalDiscount,
    funnelTotalPrice = _ref2.funnelTotalPrice,
    data = _ref2.data,
    funnelTotalPriceWithoutDiscount = _ref2.funnelTotalPriceWithoutDiscount,
    closeDiscountBlock = _ref2.closeDiscountBlock,
    designDiscount = _ref2.designDiscount,
    active_offer = _ref2.active_offer,
    campaign = _ref2.campaign,
    setUpsellAmount = _ref2.setUpsellAmount;
  var _useState = Object(compat_module["useState"])({
      code: "",
      done: false,
      spinner: false,
      error: false,
      hasAutomaticDiscount: false
    }),
    state = _useState[0],
    setState = _useState[1];
  var _useState2 = Object(compat_module["useState"])(0),
    totalPrice = _useState2[0],
    setTotalPrice = _useState2[1];
  var handleChangeCode = function handleChangeCode(value) {
    setState(Discout_objectSpread(Discout_objectSpread({}, state), {}, {
      code: value
    }));
  };
  var getCart = /*#__PURE__*/function () {
    var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Discout_regeneratorRuntime().mark(function _callee() {
      var _response;
      return Discout_regeneratorRuntime().wrap(function _callee$(_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              _context.prev = 0;
              _context.next = 3;
              return fetch("/cart.js", {
                method: "GET"
              });
            case 3:
              _response = _context.sent;
              _context.next = 6;
              return _response.json();
            case 6:
              return _context.abrupt("return", _context.sent);
            case 9:
              _context.prev = 9;
              _context.t0 = _context["catch"](0);
              return _context.abrupt("return", null);
            case 12:
            case "end":
              return _context.stop();
          }
        }
      }, _callee, null, [[0, 9]]);
    }));
    return function getCart() {
      return _ref3.apply(this, arguments);
    };
  }();
  var applyCouponCode = /*#__PURE__*/function () {
    var _ref4 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Discout_regeneratorRuntime().mark(function _callee2() {
      var cart, newData, body, codeWithEscapedPercentageSign;
      return Discout_regeneratorRuntime().wrap(function _callee2$(_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              setState(Discout_objectSpread(Discout_objectSpread({}, state), {}, {
                spinner: true
              }));
              if (state.code) {
                _context2.next = 4;
                break;
              }
              setState(Discout_objectSpread(Discout_objectSpread({}, state), {}, {
                spinner: false,
                error: true,
                done: false,
                hasAutomaticDiscount: false
              }));
              return _context2.abrupt("return");
            case 4:
              _context2.next = 6;
              return getCart();
            case 6:
              cart = _context2.sent;
              _context2.next = 9;
              return Object(autoDiscountCheck["a" /* default */])(lodash_clonedeep_default()(data), url, shop, lodash_clonedeep_default()(cart), getCart);
            case 9:
              newData = _context2.sent;
              body = Discout_objectSpread(Discout_objectSpread({}, newData), {}, {
                cart: cart,
                totalPrice: totalPrice,
                campaign: campaign
              });
              codeWithEscapedPercentageSign = state.code.replace(/%/g, '~~pct~~25').replace(/&/g, '~~amp~~');
              _context2.next = 14;
              return fetch("".concat(url, "default/check_discount_code?shop=").concat(shop, "&code=").concat(encodeURIComponent(codeWithEscapedPercentageSign)), {
                method: "POST",
                headers: {
                  "Content-Type": "application/json"
                },
                body: JSON.stringify(body)
              }).then(function (resp) {
                return resp.json();
              }).then(function (result) {
                var sum = Object(getUpsellCartSum["a" /* default */])(data.offers, campaign, active_offer, cart);
                var upsell_amount = 0;
                if (result.line_items && result.line_items.length && !result.hasAutomaticDiscount) {
                  var _totalDiscount = result.line_items.reduce(function (acc, item) {
                    if (item.type === "offer" && item.applied_discount) {
                      upsell_amount += item.compare_at_price * (item.quantity || 1) - item.applied_discount.amount;
                    }
                    if (item.applied_discount) {
                      return acc + (item.type === "cart" && item.applied_discount.value_type === "percentage" ? item.applied_discount.amount / 100 : item.applied_discount.amount);
                    }
                    return acc;
                  }, 0);
                  var _total = (campaign.offer_type === "upsell" ? sum : cart.total_price) / 100 + funnelTotalPrice - _totalDiscount + funnelTotalPriceWithoutDiscount - funnelTotalPrice;
                  setTotalPrice(_total < 0 ? 0 : _total);
                  setAdditionalDiscount(result);
                  setState(Discout_objectSpread(Discout_objectSpread({}, state), {}, {
                    spinner: false,
                    error: false,
                    done: true,
                    hasAutomaticDiscount: false
                  }));
                } else if (result.order_discount && !result.hasAutomaticDiscount) {
                  if (result.order_discount.value_type === "percentage") {
                    upsell_amount = funnelTotalPrice - funnelTotalPrice / 100 * result.order_discount.amount;
                  } else {
                    var _cart_items_count = cart.item_count;
                    var _offer_items_count = data.offers.reduce(function (acc, item) {
                      return acc + item.quantity;
                    }, 0);
                    upsell_amount = funnelTotalPrice - result.order_discount.amount / (_cart_items_count + _offer_items_count) * _offer_items_count;
                    upsell_amount = upsell_amount > 0 ? upsell_amount : 0;
                  }
                  var _discount = result.order_discount.value_type === "percentage" ? ((campaign.offer_type === "upsell" ? sum : cart.total_price) / 100 + funnelTotalPrice) / 100 * result.order_discount.value : result.order_discount.value;
                  var _total2 = (campaign.offer_type === "upsell" ? sum : cart.total_price) / 100 + funnelTotalPrice - _discount;
                  setTotalPrice(_total2 < 0 ? 0 : _total2);
                  setAdditionalDiscount(result);
                  setState(Discout_objectSpread(Discout_objectSpread({}, state), {}, {
                    spinner: false,
                    error: false,
                    done: true,
                    hasAutomaticDiscount: false
                  }));
                } else {
                  setState(Discout_objectSpread(Discout_objectSpread({}, state), {}, {
                    spinner: false,
                    error: true,
                    done: false,
                    hasAutomaticDiscount: result.hasAutomaticDiscount
                  }));
                }
                setUpsellAmount(upsell_amount);
              })["catch"](function (e) {
                console.log(e);
                setState(Discout_objectSpread(Discout_objectSpread({}, state), {}, {
                  spinner: false,
                  error: true,
                  done: false,
                  hasAutomaticDiscount: false
                }));
              });
            case 14:
            case "end":
              return _context2.stop();
          }
        }
      }, _callee2);
    }));
    return function applyCouponCode() {
      return _ref4.apply(this, arguments);
    };
  }();
  var handleInputClick = function handleInputClick() {
    setState(Discout_objectSpread(Discout_objectSpread({}, state), {}, {
      spinner: false,
      error: false,
      done: false
    }));
  };
  var code = state.code,
    done = state.done,
    spinner = state.spinner,
    error = state.error,
    hasAutomaticDiscount = state.hasAutomaticDiscount;
  return Discout_jsx(DiscountWrap, {
    isShowBrand: isShowBrand,
    isPreview: isPreview
  }, Discout_jsx(BackgroundDiscount, {
    onClick: closeDiscountBlock
  }), Discout_jsx(Discount_DiscountCodeBlock, {
    isPreview: isPreview,
    settings_theme: settings_theme,
    isDesktopView: isDesktopView,
    currency_format: currency_format,
    done: done,
    code: code,
    handleChangeCode: handleChangeCode,
    applyCouponCode: applyCouponCode,
    spinner: spinner,
    error: error,
    handleInputClick: handleInputClick,
    funnelTotalPrice: funnelTotalPrice,
    setTotalPrice: setTotalPrice,
    totalPrice: totalPrice,
    hasAutomaticDiscount: hasAutomaticDiscount,
    designDiscount: designDiscount,
    active_offer: active_offer,
    data: data,
    campaign: campaign
  }), Discout_jsx(Discount_CompleteYourPurchase, {
    settings_theme: settings_theme,
    goToCheckout: goToCheckout,
    totalPrice: totalPrice
  }));
};
/* harmony default export */ var Discout = (Discout_Discount);
// CONCATENATED MODULE: ./components/WidgetComponent/components/Mobile.js






var Mobile_jsx = compat_module["default"].createElement;
function Mobile_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, Mobile_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function Mobile_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (Mobile_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }














var Mobile_colors = redux_config.colors;
var Mobile_Container = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Mobile__Container",
  componentId: "sc-1raf9mv-0"
})(["display:flex;flex:1;position:relative;", " flex-direction:column;background:", ";", ";"], function (_ref) {
  var isDesktopView = _ref.isDesktopView;
  return isDesktopView ? "\n    height: fit-content;\n    max-height: 100%;\n    border-radius: 0 0 6px 6px;\n    overflow: hidden;\n    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);\n   " : " height: 100%;";
}, function (props) {
  return props.background_color;
}, function (_ref2) {
  var isShowBrand = _ref2.isShowBrand,
    isPreview = _ref2.isPreview;
  return isShowBrand && (isPreview ? "padding-bottom: 18px;" : "padding-bottom: 26px;");
});
var Scroll = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Mobile__Scroll",
  componentId: "sc-1raf9mv-1"
})(["position:relative;display:flex;flex-direction:column;height:auto;flex:auto;overflow:hidden;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]);
var ContainerMinimized = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Mobile__ContainerMinimized",
  componentId: "sc-1raf9mv-2"
})(["display:flex;flex:1;position:absolute;bottom:0;width:100%;flex-direction:column;justify-content:flex-end;background:", ";"], function (props) {
  return props.background_color;
});
var AnimateOffer = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "Mobile__AnimateOffer",
  componentId: "sc-1raf9mv-3"
})(["position:absolute;width:100%;height:100%;background:black;z-index:9;&.fade-in-out{opacity:0;animation-name:fadeInOpacity;animation-timing-function:ease-in;animation-duration:0.5s;}@keyframes fadeInOpacity{0%{opacity:1;}100%{opacity:0;}}&.fade-down{opacity:1;animation-name:fadeDownOpacity;animation-timing-function:ease-in;animation-duration:0.5s;}@keyframes fadeDownOpacity{0%{opacity:0;}100%{opacity:1;}}"]);
var Mobile_Mobile = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(Mobile, _Component);
  function Mobile(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, Mobile);
    _this = Mobile_callSuper(this, Mobile, [props]);
    _this.elementRef = /*#__PURE__*/compat_module["default"].createRef();
    _this.scrollPosition = 0;
    _this.state = {
      showAnimation: false,
      fadeInOpacity: false,
      fadeDownOpacity: false
    };
    return _this;
  }
  Object(createClass["a" /* default */])(Mobile, [{
    key: "componentWillReceiveProps",
    value: function componentWillReceiveProps(nextProps) {
      var _this2 = this;
      if (nextProps.active_offer !== this.props.active_offer) {
        this.setState({
          showAnimation: true
        }, function () {
          setTimeout(function () {
            // this.state.showAnimation = false;
            _this2.setState({
              showAnimation: false
            });
          }, 600);
        });
        this.scrollPosition = 0;
      } else if (this.elementRef.current) {
        this.scrollPosition = this.elementRef.current.scrollTop;
      }
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate() {
      if (this.elementRef.current) {
        this.elementRef.current.scrollTop = this.scrollPosition;
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this$props = this.props,
        settings_theme = _this$props.settings_theme,
        campaign = _this$props.campaign,
        pageToShow = _this$props.pageToShow,
        data = _this$props.data,
        goToCheckout = _this$props.goToCheckout,
        addOffer = _this$props.addOffer,
        minimized = _this$props.minimized,
        setMinimized = _this$props.setMinimized,
        variant = _this$props.variant,
        isDesktopView = _this$props.isDesktopView,
        isShowBrand = _this$props.isShowBrand,
        isPreview = _this$props.isPreview,
        showDiscountCode = _this$props.showDiscountCode,
        currency_format = _this$props.currency_format,
        url = _this$props.url,
        shop = _this$props.shop,
        setAdditionalDiscount = _this$props.setAdditionalDiscount,
        funnelTotalPrice = _this$props.funnelTotalPrice,
        funnelTotalPriceWithoutDiscount = _this$props.funnelTotalPriceWithoutDiscount,
        closeDiscountBlock = _this$props.closeDiscountBlock,
        designDiscount = _this$props.designDiscount,
        active_offer = _this$props.active_offer,
        setUpsellAmount = _this$props.setUpsellAmount;
      var showAnimation = this.state.showAnimation;
      var showCountdown = settings_theme.countdown_timer.show;
      var background_color = "#FFFFFF";
      if (settings_theme.upsell_page.background_color) {
        background_color = settings_theme.upsell_page.background_color;
        if (settings_theme.upsell_page.background_color.indexOf("gradient_") > -1) {
          var _index = lodash_findindex_default()(Mobile_colors.gradients, ["name", settings_theme.upsell_page.background_color]);
          if (_index > -1) {
            background_color = Mobile_colors.gradients[_index].style;
          }
        }
      }
      if (minimized) {
        return Mobile_jsx(ContainerMinimized, {
          id: "minimize-container",
          background_color: background_color
        }, Mobile_jsx("div", {
          style: {
            position: "relative"
          }
        }, Mobile_jsx(components_ProgressItemsNav, this.props), Mobile_jsx(components_ProgressItems, this.props)), Mobile_jsx(components_TopBar, this.props), Mobile_jsx(components_Button, {
          pageToShow: pageToShow,
          settings_theme: settings_theme,
          minimized: minimized,
          variant: variant,
          onClick: function onClick() {
            setMinimized(false);
          }
        }));
      }
      return Mobile_jsx(Mobile_Container, {
        isDesktopView: isDesktopView,
        background_color: background_color,
        isShowBrand: isShowBrand,
        isPreview: isPreview
      }, !(campaign.offer_type === "upsell" || campaign.has_condition) && Mobile_jsx("div", {
        style: {
          display: "block"
        },
        id: "block-progress-wrap"
      }, Mobile_jsx(components_TopNavigation, this.props), Mobile_jsx("div", {
        style: {
          position: "relative"
        }
      }, Mobile_jsx(components_ProgressItemsNav, this.props), Mobile_jsx(components_ProgressItems, this.props))), Mobile_jsx(Scroll, {
        ref: this.elementRef
      }, Mobile_jsx("div", {
        style: {
          display: "block"
        },
        id: "block-product-wrap"
      }, showAnimation ? Mobile_jsx(AnimateOffer, {
        className: "fade-in-out"
      }) : null, Mobile_jsx(components_TopBar, this.props), Mobile_jsx(components_Product, Object(esm_extends["a" /* default */])({}, this.props, {
        elementScroll: this.elementRef
      })))), Mobile_jsx("div", {
        style: {
          display: "block"
        },
        id: "block-actions"
      }, Mobile_jsx(components_Button, Object(esm_extends["a" /* default */])({}, this.props, {
        settings_theme: settings_theme,
        typeButton: "addOffer",
        variant: variant,
        onClick: function onClick() {
          return addOffer();
        }
      })), Mobile_jsx(components_Link, Object(esm_extends["a" /* default */])({}, this.props, {
        settings_theme: settings_theme,
        campaign: campaign,
        data: data,
        goToCheckout: goToCheckout
      }))), isShowBrand && Mobile_jsx(components_Brand, {
        isPreview: isPreview,
        isDesktopView: isDesktopView
      }), (showDiscountCode || designDiscount && designDiscount.isOpen) && Mobile_jsx(Discout, {
        settings_theme: settings_theme,
        isPreview: isPreview,
        isShowBrand: isShowBrand,
        currency_format: currency_format,
        goToCheckout: goToCheckout,
        isDesktopView: isDesktopView,
        url: url,
        shop: shop,
        data: data,
        setAdditionalDiscount: setAdditionalDiscount,
        funnelTotalPrice: funnelTotalPrice,
        funnelTotalPriceWithoutDiscount: funnelTotalPriceWithoutDiscount,
        closeDiscountBlock: closeDiscountBlock,
        designDiscount: designDiscount,
        active_offer: active_offer,
        campaign: campaign,
        setUpsellAmount: setUpsellAmount
      }));
    }
  }]);
  return Mobile;
}(compat_module["Component"]);
/* harmony default export */ var components_Mobile = (Mobile_Mobile);
// CONCATENATED MODULE: ./widget/WidgetContainer.js










var WidgetContainer_jsx = compat_module["default"].createElement;
function WidgetContainer_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ WidgetContainer_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == Object(esm_typeof["a" /* default */])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(Object(esm_typeof["a" /* default */])(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function WidgetContainer_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function WidgetContainer_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? WidgetContainer_ownKeys(Object(t), !0).forEach(function (r) { Object(defineProperty["a" /* default */])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : WidgetContainer_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function WidgetContainer_callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, WidgetContainer_isNativeReflectConstruct() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
function WidgetContainer_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (WidgetContainer_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }







var Bg = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "WidgetContainer__Bg",
  componentId: "sc-y58ku8-0"
})(["position:fixed;top:0;left:0;z-index:99999999998;&.not-minimized{width:100vw;height:100vh;background-color:rgba(0,0,0,0.7);display:block;&.fadeInColorBlack{animation-name:fadeInOpacity;animation-timing-function:linear;animation-duration:0.5s;&.isMobile{border-radius:8px;}}&.fadeDownColorBlack{animation-name:fadeDownColorBlack;animation-timing-function:linear;animation-duration:0.5s;background-color:rgba(0,0,0,0);}}"]);
var WrapContent = styled_components_browser_esm["c" /* default */].div.withConfig({
  displayName: "WidgetContainer__WrapContent",
  componentId: "sc-y58ku8-1"
})(["position:relative;", " .cb-widget-component{box-sizing:border-box;display:flex;width:100%;position:fixed;z-index:99999999999;", " ", " flex-direction:column;overflow:hidden;border-radius:5px;.cb-widget-header{height:26px;min-height:26px;background:white;display:flex;justify-content:flex-end;align-items:center;svg{cursor:pointer;height:12px;width:12px;}}.cb-widget-content{display:flex;height:100%;}}&.minimized{.cb-widget-component{height:", "px;&.fadeInOpacity{opacity:1;animation-name:fadeInOpacity;animation-timing-function:linear;animation-duration:0.5s;}&.countDownTimerAnimate{transition:height 0.5s linear;-moz-transition:height 0.5s linear;-webkit-transition:height 0.5s linear;height:", "px;}}}&.not-minimized{.cb-widget-component{height:", ";", " &.fadeInOpacity{opacity:1;animation-name:fadeInOpacity;animation-timing-function:linear;animation-duration:0.5s;}&.fadeDownCB{height:", "px;animation-name:fadeDownCB;animation-timing-function:linear;animation-duration:0.5s;}&.fadeUpCB{height:", ";animation-name:fadeUpCB;animation-timing-function:linear;animation-duration:0.5s;}.cb-widget-content{", "}}}&.isMobile{.cb-widget-component{margin:0px;width:100vw;border-radius:5px 5px 0 0;box-shadow:0px -2px 4px rgba(0,0,0,0.12);}}"], function (_ref) {
  var isDesktopView = _ref.isDesktopView;
  return isDesktopView ? "display: flex; align-items: center; justify-content: center; position: absolute; top: 0; height: 100vh; width: 100%;" : "";
}, function (_ref2) {
  var isDesktopView = _ref2.isDesktopView;
  return isDesktopView ? "\n      min-height: 200px;\n      width: 514px;\n      margin: 0px;\n    " : "\n      width: 414px;\n      margin: 20px;\n      box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);\n    ";
}, function (_ref3) {
  var isDesktopView = _ref3.isDesktopView,
    isShowBrand = _ref3.isShowBrand;
  return isDesktopView ? isShowBrand && "padding-bottom: 26px;" : window.cbUpsellShowPostPurcahseFunnelLeft ? "left: 0; bottom: 0;" : "right: 0; bottom: 0;";
}, function (props) {
  return props.height;
}, function (props) {
  return props.height - props.countDownTimerHeight;
}, function (props) {
  return props.widgetHeight;
}, function (_ref4) {
  var isDesktopView = _ref4.isDesktopView;
  return isDesktopView ? "max-height: 614px;" : "";
}, function (props) {
  return props.height;
}, function (props) {
  return props.widgetHeight;
}, function (_ref5) {
  var isCartPage = _ref5.isCartPage;
  return isCartPage ? "" : "min-height: ".concat(function (props) {
    return props.widgetHeightContent;
  }, ";");
});
var WidgetContainer_WidgetContainer = /*#__PURE__*/function (_Component) {
  Object(inherits["a" /* default */])(WidgetContainer, _Component);
  function WidgetContainer(props) {
    var _this;
    Object(classCallCheck["a" /* default */])(this, WidgetContainer);
    _this = WidgetContainer_callSuper(this, WidgetContainer, [props]);
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "getScrollPercent", function () {
      var html = document.documentElement;
      var body = document.body;
      var st = "scrollTop";
      var sh = "scrollHeight";
      var scrollPercentage = (html[st] || body[st]) / ((html[sh] || body[sh]) - html.clientHeight) * 100;
      if (isNaN(scrollPercentage) || !isFinite(scrollPercentage)) {
        scrollPercentage = 50;
      }
      return scrollPercentage;
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "scroll", function () {
      var campaign = _this.props.campaign;
      var scrollPosition = _this.getScrollPercent();
      if (scrollPosition >= campaign.show_after_scroll) {
        _this.setState({
          delayFunnel: false
        });
        window.removeEventListener("scroll", _this.scroll);
      }
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setWidgetHeightOnInputBlur", function () {
      if (_this.isMobile) {
        var _isShowBrand3 = _this.props.settings.showBranding;
        //The timeout is here to make sure the keyboard was closed and window.innerHeight was updated
        setTimeout(function () {
          _this.setState({
            widgetHeight: "".concat(window.innerHeight, "px"),
            widgetHeightContent: _isShowBrand3 ? window.innerHeight - 52 + "px" : window.innerHeight - 26 + "px"
          });
        }, 500);
      }
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setMinimized", /*#__PURE__*/function () {
      var _ref6 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/WidgetContainer_regeneratorRuntime().mark(function _callee(status) {
        var animations, _elements, _elements2;
        return WidgetContainer_regeneratorRuntime().wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                animations = _this.state.animations;
                if (!_this.props.isProductPage) {
                  _context.next = 7;
                  break;
                }
                if (document.querySelector("#cb-upsell")) {
                  document.querySelector("#cb-upsell").remove();
                }
                if (!(window.bundlesBear && window.bundlesBear.discountStatus === "exists")) {
                  _context.next = 6;
                  break;
                }
                _context.next = 6;
                return window.bundlesBear.applyDiscount(null, false, true);
              case 6:
                if (window.conversionBearUpsellSettings && window.conversionBearUpsellSettings.getDemoCheckoutData) {
                  window.conversionBearUpsellSettings.getDemoCheckoutData();
                  document.getElementById("go-to-page-title").innerText = "Product Page";
                }
              case 7:
                if (status) {
                  document.documentElement.style.overflow = "auto";
                  _elements = document.getElementsByClassName("content");
                  Array.from(_elements).forEach(function (el) {
                    el.style.overflow = "auto";
                    el.style.maxHeight = "100%";
                  });
                  _this.setState({
                    animations: WidgetContainer_objectSpread(WidgetContainer_objectSpread({}, animations), {}, {
                      fadeDownCB: true,
                      fadeDownColorBlack: true
                    })
                  }, function () {
                    _this.getHeight(true);
                    setTimeout(function () {
                      _this.getHeight(true);
                      _this.setState({
                        minimized: true,
                        hidden: _this.props.settings.cbUpsellHideWidgetOnMinimize,
                        animations: WidgetContainer_objectSpread(WidgetContainer_objectSpread({}, animations), {}, {
                          fadeDownCB: false,
                          fadeDownColorBlack: false
                        })
                      }, function () {
                        _this.getHeight(true);
                      });
                    }, 500);
                  });
                  if (window.cbUpsellHideWidgetOnClose && window.conversionBearUpsell) {
                    conversionBearUpsell.closeApp();
                  }
                } else {
                  document.documentElement.style.overflow = "hidden";
                  _elements2 = document.getElementsByClassName("content");
                  Array.from(_elements2).forEach(function (el) {
                    el.style.overflow = "hidden";
                    el.style.maxHeight = "100vh";
                  });
                  _this.setState({
                    minimized: status,
                    animations: WidgetContainer_objectSpread(WidgetContainer_objectSpread({}, animations), {}, {
                      fadeUpCB: true,
                      fadeInColorBlack: true
                    })
                  }, function () {
                    _this.getHeight(true);
                    setTimeout(function () {
                      _this.state.animations.fadeUpCB = false;
                      _this.state.animations.fadeInColorBlack = false;
                      _this.getHeight(true);
                    }, 500);
                  });
                }
              case 8:
              case "end":
                return _context.stop();
            }
          }
        }, _callee);
      }));
      return function (_x) {
        return _ref6.apply(this, arguments);
      };
    }());
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "getHeight", function () {
      var notRerender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      var heightComponent = 0;
      var maxHeightContent = 0;
      var block_progress_wrap = _this.frameContext.document.getElementById("block-progress-wrap");
      var block_product_wrap = _this.frameContext.document.getElementById("block-product-wrap");
      var block_actions = _this.frameContext.document.getElementById("block-actions");
      if (block_progress_wrap) {
        maxHeightContent += block_progress_wrap.clientHeight;
      }
      if (block_product_wrap) {
        maxHeightContent += block_product_wrap.clientHeight;
      }
      if (block_actions) {
        maxHeightContent += block_actions.clientHeight;
      }
      var countDownTimerHeight = 0;
      var countDownTimer = _this.frameContext.document.getElementById("count-down-timer");
      if (countDownTimer) {
        countDownTimerHeight = countDownTimer.clientHeight;
      }
      heightComponent = 0;
      var progressItems = _this.frameContext.document.getElementById("progress-items");
      var topBar = _this.frameContext.document.getElementById("top-bar");
      var buttonSend = _this.frameContext.document.getElementById("button-send");
      if (progressItems) {
        heightComponent += progressItems.clientHeight;
      }
      if (topBar) {
        heightComponent += topBar.clientHeight;
      }
      if (countDownTimer) {
        heightComponent += countDownTimer.clientHeight + 10;
      }
      if (buttonSend) {
        heightComponent += buttonSend.clientHeight;
      }
      var isShowBrand = _this.props.settings.pricingPlan === "Free";
      if (_this.isMobile) {
        _this.state.widgetHeight = "".concat(window.innerHeight, "px");
        _this.state.widgetHeightContent = isShowBrand ? window.innerHeight - 52 + "px" : window.innerHeight - 26 + "px";
      }
      if (heightComponent !== 0) {
        if (notRerender) {
          _this.state.countDownTimerHeight = countDownTimerHeight;
          _this.state.height = heightComponent;
          _this.state.maxHeightContent = maxHeightContent;
        } else {
          _this.setState({
            height: heightComponent,
            maxHeightContent: maxHeightContent,
            countDownTimerHeight: countDownTimerHeight
          });
        }
      } else {
        if (countDownTimerHeight) {
          _this.state.countDownTimerHeight = countDownTimerHeight;
        }
        setTimeout(function () {
          _this.getHeight();
        }, 1000);
      }
    });
    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setCountDownTimerAnimate", function () {
      _this.setState({
        countDownTimerAnimate: true
      }, function () {
        setTimeout(function () {
          _this.state.countDownTimerAnimate = false;
        }, 500);
      });
    });
    var settings_theme = props.settings && props.settings.design && props.settings.design.theme || {};
    var minimized = settings_theme.minimized_view && settings_theme.minimized_view.hasOwnProperty("start_minimized") ? settings_theme.minimized_view.start_minimized : true;
    if (props.isCartPage || props.isProductPage) {
      minimized = false;
    }
    if (props.isBlogPage && !window.cbUpsellCustomDesignSettingsOverride) {
      minimized = true;
    }
    var _isShowBrand = props.settings.showBranding;
    var deltaHeightBrand = _isShowBrand ? "16px" : "0px";
    _this.isMobile = window.innerWidth <= 767;
    _this.isDesktopView = !_this.isMobile && (_this.props.isCartPage || _this.props.isProductPage);
    _this.state = {
      height: 0,
      maxHeightContent: 824,
      countDownTimerHeight: 0,
      countDownTimerAnimate: false,
      widgetHeight: props.isCartPage && !_this.isMobile ? "calc(100vh - 60px - ".concat(deltaHeightBrand, ")") : props.isCartPage ? "calc(100vh - 140px - ".concat(deltaHeightBrand, ")") : "calc(100vh - 40px - ".concat(deltaHeightBrand, ")"),
      widgetHeightContent: props.isCartPage ? "calc(100vh - 140px)" : "calc(100vh - 66px)",
      minimized: true,
      animations: {
        fadeInOpacity: true,
        fadeUpCB: false,
        fadeDownCB: false,
        fadeInColorBlack: false,
        fadeDownColorBlack: false
      },
      delayFunnel: props.campaign.page_to_show === "blog_page" && props.campaign.show_after_type === "scroll" && props.campaign.has_funnel_delay
    };
    _this.resizeTimeout = null;
    _this.widgetRef = /*#__PURE__*/compat_module["default"].createRef();
    _this.frameContext = null;
    if (_this.isMobile) {
      var _getOrientation = function _getOrientation() {
        return window.matchMedia("(orientation: portrait)").matches ? "portrait" : "landscape";
      };
      var _isMobileDevice = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
      var _isAndroid = /Android/i.test(navigator.userAgent);
      _this.state.orientation = _getOrientation();
      _this.state.widgetHeight = "".concat(window.innerHeight, "px");
      _this.state.widgetHeightContent = _isShowBrand ? window.innerHeight - 52 + "px" : window.innerHeight - 26 + "px";
      window.addEventListener("resize", function (e) {
        if (_isMobileDevice && !_isAndroid || _isAndroid && _this.state.orientation !== _getOrientation()) {
          _this.setState({
            widgetHeight: "".concat(window.innerHeight, "px"),
            widgetHeightContent: _isShowBrand ? window.innerHeight - 52 + "px" : window.innerHeight - 26 + "px"
          });
        }
      });
    }
    if (!minimized) {
      document.documentElement.style.overflow = "hidden";
      _this.state.minimized = false;
      if (props.isCartPage && !_this.isMobile) {
        _this.state.animations.fadeUpCB = false;
        _this.state.animations.fadeInColorBlack = true;
        _this.state.animations.fadeInOpacity = true;
        setTimeout(function () {
          _this.state.animations.fadeInOpacity = false;
          _this.state.animations.fadeInColorBlack = false;
        }, 500);
      } else {
        _this.state.animations.fadeUpCB = true;
        _this.state.animations.fadeInColorBlack = true;
        _this.state.animations.fadeInOpacity = false;
        setTimeout(function () {
          _this.state.animations.fadeUpCB = false;
          _this.state.animations.fadeInColorBlack = false;
        }, 500);
      }
    }
    setTimeout(function () {
      _this.state.animations.fadeInOpacity = false;
    }, 2000);
    _this.widgetComponentRef = /*#__PURE__*/compat_module["default"].createRef();
    return _this;
  }
  Object(createClass["a" /* default */])(WidgetContainer, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var campaign = this.props.campaign;
      if (!this.props.isDemo) {
        console.log("%c 🍯 Honeycomb by Conversion Bear: displayed", "background: #FBCE10; color: white");
        console.log("%c Showing ".concat(campaign.name, " | ").concat(campaign.page_to_show, " - ").concat(campaign._id), "background: #FBCE10; color: white");
      }
      if (campaign.page_to_show === "blog_page" && campaign.show_after_type === "scroll" && campaign.has_funnel_delay) {
        window.addEventListener("scroll", this.scroll);
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this2 = this,
        _settings$advanced$re,
        _settings$design$them;
      var _this$state = this.state,
        minimized = _this$state.minimized,
        _this$state$animation = _this$state.animations,
        fadeInOpacity = _this$state$animation.fadeInOpacity,
        fadeUpCB = _this$state$animation.fadeUpCB,
        fadeDownCB = _this$state$animation.fadeDownCB,
        fadeDownColorBlack = _this$state$animation.fadeDownColorBlack,
        fadeInColorBlack = _this$state$animation.fadeInColorBlack,
        widgetHeightContent = _this$state.widgetHeightContent,
        maxHeightContent = _this$state.maxHeightContent,
        height = _this$state.height,
        countDownTimerAnimate = _this$state.countDownTimerAnimate,
        countDownTimerHeight = _this$state.countDownTimerHeight,
        widgetHeight = _this$state.widgetHeight,
        hidden = _this$state.hidden,
        delayFunnel = _this$state.delayFunnel;
      var _this$props = this.props,
        forceIsMobile = _this$props.forceIsMobile,
        isDemo = _this$props.isDemo,
        settings = _this$props.settings,
        isCartPage = _this$props.isCartPage,
        isSkeleton = _this$props.isSkeleton,
        isProductPage = _this$props.isProductPage;
      var isMobile = typeof forceIsMobile !== "undefined" ? forceIsMobile : this.isMobile;
      var isShowBrand = settings.showBranding && !isSkeleton;
      if (delayFunnel) {
        return null;
      }
      var hasRedirectToCheckoutState = !(this.props.campaign.page_to_show == "product_page" && this.props.campaign.action_accept_offer == "stay_on_page");
      return WidgetContainer_jsx(compat_module["default"].Fragment, null, WidgetContainer_jsx(Bg, {
        className: classnames_default()({
          minimized: minimized,
          isMobile: isMobile,
          "not-minimized": !minimized,
          fadeInColorBlack: fadeInColorBlack,
          fadeDownColorBlack: fadeDownColorBlack
        }),
        isMobile: isMobile,
        onClick: function onClick(event) {
          event.stopPropagation();
          if (!isCartPage) {
            _this2.getHeight();
            _this2.setMinimized(true);
          }
          if (!hasRedirectToCheckoutState) {
            var _this2$widgetComponen;
            (_this2$widgetComponen = _this2.widgetComponentRef.current) === null || _this2$widgetComponen === void 0 || _this2$widgetComponen.goToCheckout();
          }
        }
      }), WidgetContainer_jsx(WrapContent, {
        isDesktopView: this.isDesktopView,
        height: height,
        isCartPage: isCartPage,
        isProductPage: isProductPage,
        isMobile: isMobile,
        widgetHeight: widgetHeight,
        maxHeightContent: maxHeightContent,
        widgetHeightContent: widgetHeightContent,
        countDownTimerHeight: countDownTimerHeight,
        isShowBrand: isShowBrand,
        className: classnames_default()({
          minimized: minimized,
          isMobile: isMobile,
          "not-minimized": !minimized,
          fadeInColorBlack: fadeInColorBlack,
          fadeDownColorBlack: fadeDownColorBlack
        })
      }, !hidden && WidgetContainer_jsx("div", {
        className: classnames_default()("cb-widget-component", {
          fadeInOpacity: fadeInOpacity,
          fadeUpCB: fadeUpCB,
          fadeDownCB: fadeDownCB,
          countDownTimerAnimate: countDownTimerAnimate
        })
      }, !minimized && !isCartPage ? WidgetContainer_jsx(Head, {
        isMobile: isMobile,
        isDemo: isDemo,
        setMinimized: function setMinimized(status) {
          _this2.getHeight();
          _this2.setMinimized(status);
          if (!hasRedirectToCheckoutState) {
            if (!hasRedirectToCheckoutState) {
              var _this2$widgetComponen2;
              (_this2$widgetComponen2 = _this2.widgetComponentRef.current) === null || _this2$widgetComponen2 === void 0 || _this2$widgetComponen2.goToCheckout();
            }
          }
        }
      }) : null, WidgetContainer_jsx("div", {
        className: "cb-widget-content"
      }, WidgetContainer_jsx(lib_default.a, {
        title: "widget",
        id: "widget",
        frameBorder: "0",
        border: "0",
        width: "100%",
        height: "100%",
        cellSpacing: "0",
        scrolling: "no",
        style: {
          pointerEvents: "all",
          padding: "unset"
        },
        contentDidMount: function contentDidMount() {
          _this2.getHeight();
          if (settings.advanced && settings.advanced.custom_js) {
            var _script5 = document.createElement("script");
            _script5.type = "text/javascript";
            _script5.innerHTML = settings.advanced.custom_js;
            if (document.body) {
              document.body.appendChild(_script5);
            }
          }
        },
        initialContent: "<!DOCTYPE html><html>\n                  <head>\n                    <link href=\"https://fonts.googleapis.com/css?family=Acme|Bitter|Josefin+Slab|Lato|Montserrat|Noto+Sans|Open+Sans|Pacifico|Raleway|Roboto|Ubuntu&display=swap\" rel=\"stylesheet\" >\n                    <link href=\"https://fonts.googleapis.com/css?family=Archivo|Asap|Barlow|Cabin|Catamaran|Didact+Gothic|Fjalla+One|Fredoka+One|Hammersmith+One|Josefin+Sans|Kalam|Lexend+Zetta|Lora|Manjari|Mansalva|Neuton|Notable|Oswald|Overpass|Ultra|Vidaloka|Vollkorn&display=swap\" rel=\"stylesheet\" >\n                    <link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Poppins|Playfair+Display|Work+Sans|Work+Sans|Nunito|Roboto+Condensed|Cardo|Heebo&display=swap\">\n                  </head>\n                  <body>\n                    <div class=\"frame-root\"></div>\n                  </body>\n                </html>",
        head: [WidgetContainer_jsx("style", {
          key: "default_css"
        }, "\n                    \n                    body,.frame-root,.frame-content{\n                      margin: 0;\n                      width: 100%;\n                      height: 100%;\n                    }\n                    html {\n                      box-sizing: border-box;\n                      width: 100%;\n                      height: 100%;\n                      font-size: 10px;\n                    }\n                    *, *:before, *:after {\n                      box-sizing: inherit;\n                    }\n                    @-moz-document url-prefix() {\n                      select {\n                        text-indent: -2px\n                      }\n                    }\n                    .control-arrow {\n                      top: calc(50% - 1.5rem) !important;\n                      opacity: 1 !important;\n                      width: 29px;\n                      height: 40px;\n                      background: rgba(0, 0, 0, 0.2) !important;\n                    }\n                    .control-prev:before{\n                        border: none !important;\n                        content: '' !important;\n                        display: block !important;\n                        height: 10px !important;\n                        position: absolute !important;\n                        background: url(\"data:image/svg+xml,%3Csvg width='6' height='10' viewBox='0 0 6 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.00068452 5C0.000684529 4.78668 0.0823477 4.57335 0.244841 4.41086L4.41134 0.244365C4.73716 -0.081455 5.2638 -0.081455 5.58962 0.244365C5.91544 0.570185 5.91544 1.09683 5.58962 1.42265L2.01227 5L5.58962 8.57735C5.91544 8.90317 5.91544 9.42982 5.58962 9.75564C5.2638 10.0815 4.73715 10.0815 4.41133 9.75564L0.244841 5.58914C0.0823476 5.42665 0.00068451 5.21332 0.00068452 5Z' fill='white'/%3E%3C/svg%3E\") no-repeat;\n                        top: calc(50% - 5px) !important;  \n                        width: 6px !important;\n                        left: 6px;\n                        margin: 0 !important;\n                    }\n                    .control-next:before{\n                        border: none !important;\n                        content: '' !important;\n                        display: block !important;\n                        height: 10px !important;\n                        position: absolute !important;\n                        background: url(\"data:image/svg+xml,%3Csvg width='6' height='10' viewBox='0 0 6 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.8333 5C5.8333 5.21332 5.75164 5.42665 5.58914 5.58914L1.42265 9.75564C1.09683 10.0815 0.570185 10.0815 0.244365 9.75564C-0.081455 9.42982 -0.081455 8.90317 0.244365 8.57735L3.82172 5L0.244364 1.42265C-0.0814554 1.09683 -0.0814554 0.570185 0.244364 0.244365C0.570184 -0.0814553 1.09683 -0.0814553 1.42265 0.244365L5.58914 4.41086C5.75164 4.57335 5.8333 4.78668 5.8333 5Z' fill='white'/%3E%3C/svg%3E%0A\") no-repeat;\n                        top: calc(50% - 5px) !important;  \n                        width: 6px !important;\n                        right: 6px;\n                        margin: 0 !important;\n                    }\n                    .slide {\n                        padding: ".concat(this.isDesktopView ? "0" : "0 5px !important", ";\n                        background: none !important;\n                    }\n\n                    .slider div{\n                      margin: 0 !important;\n                    }\n\n                    .slide:first-child {\n                      padding-left: 1rem !important;\n                    }\n\n                    // .slide:last-child {\n                    //   padding-right: 1rem !important;\n                    // }\n    \n                    .control-arrow:hover {\n                      opacity: 1 !important;\n                    }\n\n                    @keyframes fadeDownColor {\n                      0% {\n                        opacity: 1;\n                      }\n                      100% {\n                        opacity: 0;\n                      }\n                    }\n                  "), settings.advanced && settings.advanced.custom_css ? settings.advanced.custom_css : ""), WidgetContainer_jsx("script", {
          id: "custom_js_inside_iframe"
        }, settings.advanced && settings.advanced.custom_js_inside_iframe ? settings.advanced.custom_js_inside_iframe : ""), settings.advanced.reviewsio && settings.advanced.reviewsio.enabled && WidgetContainer_jsx(compat_module["default"].Fragment, null, WidgetContainer_jsx("script", {
          src: "https://widget.reviews.co.uk/rating-snippet/dist.js"
        }), WidgetContainer_jsx("link", {
          rel: "stylesheet",
          href: "https://widget.reviews.co.uk/rating-snippet/dist.css"
        }), WidgetContainer_jsx("script", null, "\n                            setTimeout(function() {\n                              ratingSnippet(\"ruk_rating_snippet\", {\n                                store: \"".concat((_settings$advanced$re = settings.advanced.reviewsio.store_id) !== null && _settings$advanced$re !== void 0 ? _settings$advanced$re : "", "\",\n                                mode: \"default\",\n                                color: \"").concat((_settings$design$them = settings.design.theme.product.reviewsio_color) !== null && _settings$design$them !== void 0 ? _settings$design$them : "#0E1311", "\",\n                                linebreak: false,\n                                text: \"Reviews\",\n                                singularText: \"Review\",\n                                lang: \"en\",\n                                usePolaris: false,\n                                showEmptyStars: false,\n                              });\n                              console.log(\"Reviews.io widget loaded\");\n                            }, 500);\n                          ")))]
      }, WidgetContainer_jsx(lib["FrameContextConsumer"], null, function (frameContext) {
        _this2.frameContext = frameContext;
        return WidgetContainer_jsx(styled_components_browser_esm["a" /* StyleSheetManager */], {
          target: frameContext.document.head
        }, WidgetContainer_jsx(WidgetComponent["a" /* default */], Object(esm_extends["a" /* default */])({}, _this2.props, {
          ref: _this2.widgetComponentRef,
          isDesktopView: _this2.isDesktopView,
          minimized: minimized,
          setMinimized: _this2.setMinimized,
          isMobile: isMobile,
          getHeight: _this2.getHeight,
          setCountDownTimerAnimate: _this2.setCountDownTimerAnimate,
          isShowBrand: isShowBrand,
          containerHeight: height,
          appEvent: _this2.props.appEvent,
          setWidgetHeightOnInputBlur: _this2.setWidgetHeightOnInputBlur,
          Widget: components_Mobile
        })));
      }))))));
    }
  }]);
  return WidgetContainer;
}(compat_module["Component"]);
/* harmony default export */ var widget_WidgetContainer = (WidgetContainer_WidgetContainer);
// CONCATENATED MODULE: ./lib/listenToCartAjaxUpdatesAndUpdateCampaignCache.js


function listenToCartAjaxUpdatesAndUpdateCampaignCache_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ listenToCartAjaxUpdatesAndUpdateCampaignCache_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == Object(esm_typeof["a" /* default */])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(Object(esm_typeof["a" /* default */])(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var listenToCartAjaxUpdatesAndUpdateCampaignCache = /*#__PURE__*/function () {
  var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/listenToCartAjaxUpdatesAndUpdateCampaignCache_regeneratorRuntime().mark(function _callee() {
    var _origOpen;
    return listenToCartAjaxUpdatesAndUpdateCampaignCache_regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            try {
              _origOpen = XMLHttpRequest.prototype.open;
              XMLHttpRequest.prototype.open = function () {
                this.addEventListener('load', function () {
                  if (this && this._url && this._url.search(/cart.*js/) >= 0 && this._method && this._method != 'GET') {
                    conversionBearUpsell.setCachedCampaign();
                  }
                });
                _origOpen.apply(this, arguments);
              };
            } catch (e) {
              console.log('listenToCartUpdatesAndUpdateCampaignCache -> e', e);
            }
          case 1:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return function listenToCartAjaxUpdatesAndUpdateCampaignCache() {
    return _ref.apply(this, arguments);
  };
}();
/* harmony default export */ var lib_listenToCartAjaxUpdatesAndUpdateCampaignCache = (listenToCartAjaxUpdatesAndUpdateCampaignCache);
// EXTERNAL MODULE: ./lib/utils.js
var utils = __webpack_require__(27);
var utils_default = /*#__PURE__*/__webpack_require__.n(utils);

// CONCATENATED MODULE: ./lib/setCookie.js
function setCookie(name, value, days) {
  var expires = "";
  if (days) {
    var date = new Date();
    date.setTime(date.getTime() + days_24_60_60_1000);
    expires = "; expires=" + date.toUTCString();
  }
  document.cookie = name + "=" + (value || "") + expires + "; path=/; domain=".concat(location.host, "; SameSite=Lax");
}
// CONCATENATED MODULE: ./lib/shop.js


var appUrl = "https://upsell.conversionbear.com/";
var shop_getWindowKey = function getWindowKey(key) {
  return (typeof window === "undefined" ? "undefined" : Object(esm_typeof["a" /* default */])(window)) && key in window ? window[key] : undefined;
};
var shop_getWidgetScriptTagSrc = function getWidgetScriptTagSrc() {
  return Object(toConsumableArray["a" /* default */])(document.querySelectorAll("script")).map(function (_ref) {
    var src = _ref.src;
    return src;
  }).filter(Boolean).find(function (src) {
    return src.includes(appUrl) && src.includes("shop=");
  });
};
var getWidgetFromScriptTag = function getWidgetFromScriptTag() {
  var src = shop_getWidgetScriptTagSrc();
  return src === null || src === void 0 ? void 0 : src.replace(/^.*\?shop=/, "");
};
var getShopDomain = function getShopDomain() {
  var Shopify = shop_getWindowKey("Shopify");
  return (Shopify === null || Shopify === void 0 ? void 0 : Shopify.shop) || getWidgetFromScriptTag() || window.location.hostname;
};
var getProductHandle = function getProductHandle() {
  /*
  if(!Shopify.designMode){
    return null;
  }
  */

  var handle = window.location.pathname.split("/products/").pop();
  // console.log(`handle1: ${handle}`)

  if (handle.match(/.*\/pages\/.*/i)) {
    //stop in case this is not a product page.
    return;
  }
  // Bug fix for cases when collection name is 'products' like in:
  // .../products/products/1pcs-knee-protector-pad-nylon-neoprene-adjustable-breathable-patella-knee-sport-strap-knee-pads-protector

  if (handle.match(/.*\/$/)) {
    handle = handle.replace(/\/$/gi, "");
  }
  if (handle.match(/^\/.*/)) {
    handle = handle.split("/").pop();
  }
  if (handle.includes("products/")) {
    handle = handle.split("products/").pop();
  }
  return handle;
};
// CONCATENATED MODULE: ./widget/index.js





var _checkoutButton$paren;
var widget_jsx = compat_module["default"].createElement;
function widget_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = widget_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function widget_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return widget_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return widget_arrayLikeToArray(o, minLen); }
function widget_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function widget_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ widget_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == Object(esm_typeof["a" /* default */])(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) return next.value = e[o], next.done = !1, next; } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(Object(esm_typeof["a" /* default */])(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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 i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function widget_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function widget_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? widget_ownKeys(Object(t), !0).forEach(function (r) { Object(defineProperty["a" /* default */])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : widget_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/* global Shopify */




















var widget_url = "https://upsell.conversionbear.com/";
var widget_shop = getShopDomain();
var elementId = "cb-upsell";
var widget_searchOrderId = "";
var searchCampaignId = null;
var shopSettings = {};
var widget_isCartPage = false;
var isBlogPage = false;
var widget_isProductPage = false;
var widget_isCustomTrigger = false;
var campaignStatus = "not_exists";
var cacheCart = null;
var cacheCampaign = null;
var cacheSettings = null;
var currency = utils_default.a.getCookie("cart_currency");
var shopifyExchangeRate;
var activatedFunnels = [];
var shopLocale = null;
var isSafari;
var isIE;
var isGoogleSearchApp;
try {
  isSafari = /constructor/i.test(window.HTMLElement) || function (p) {
    return p.toString() === "[object SafariRemoteNotification]";
  }(!window.safari || typeof safari !== "undefined" && window.safari.pushNotification);
  isIE = Boolean(document.documentMode);
  isGoogleSearchApp = window.navigator.userAgent.indexOf(" GSA/") !== -1 && window.navigator.userAgent.indexOf("iPhone") !== -1;
} catch (e) {
  console.log("e");
}
if (!currency && typeof Shopify !== "undefined" && Shopify && Shopify.currency && Shopify.currency.active && Shopify.currency.rate) {
  currency = Shopify.currency.active;
  shopifyExchangeRate = parseFloat(Shopify.currency.rate);
}
if (window && window.Shopify && window.Shopify.locale) {
  shopLocale = Shopify.locale;
}
var appEvent = new MyEventListenerApp("conversionBearUpsell");
var widget_genWidget = function genWidget() {
  return null;
};
lib_submitterPolyfill();
var defaultSettings = widget_objectSpread({
  isDemo: false,
  onLoaded: function onLoaded() {
    return null;
  },
  getDemoCheckoutData: function getDemoCheckoutData() {
    return null;
  },
  show: function show() {
    return null;
  }
}, window.conversionBearUpsellSettings ? window.conversionBearUpsellSettings : {});
var widget_conversionBearUpsell = {
  closeApp: function closeApp() {
    var _document$getElementB;
    (_document$getElementB = document.getElementById(elementId)) === null || _document$getElementB === void 0 || _document$getElementB.remove();
  },
  onLoaded: defaultSettings.onLoaded,
  getDemoCheckoutData: defaultSettings.getDemoCheckoutData
};
Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/widget_regeneratorRuntime().mark(function _callee8() {
  var fetchSettings, _fetchSettings, getCart, getCampaign, _getCampaign, translateCampaign, translateSettings, getLocale, filterCampaignImages, createOrderView, isSubscriptionOrder, isRegularCheckoutOrder, getUpsellReplaceCartItemId, createSubscriptionOrder, createRegularNonDraftOrder, createOrder, getRechargeCheckoutPath, goToCheckout, _goToCheckout, handleError, setCacheSettings, mountCustomOnLoadScript, setCacheCampaign, _setCacheCampaign, addSubmitListener, attachCustomFunnelTriggers, addClickListeners, _parsedUrl, _tmp_arr, _index_blogs, _cacheSettings2, _cacheSettings3, _shouldAttachClickListeners, _shouldAttachSubmitListeners;
  return widget_regeneratorRuntime().wrap(function _callee8$(_context9) {
    while (1) {
      switch (_context9.prev = _context9.next) {
        case 0:
          addClickListeners = function _addClickListeners() {
            var _window$Zapiet$Widget2;
            if (window.Zapiet && !((_window$Zapiet$Widget2 = window.Zapiet.Widget) !== null && _window$Zapiet$Widget2 !== void 0 && _window$Zapiet$Widget2.checkoutEnabled()) && window.location.href.includes("/cart")) {
              return;
            }

            // eslint-disable-next-line shopify/prefer-early-return
            document.addEventListener("click", function (event) {
              if (window.conversionBearUpsellDisabled) {
                console.log("cb: widget is disabled");
                return;
              }
              var targetNode = event.target;
              if (targetNode && targetNode.className && typeof targetNode.className.indexOf === "function" && targetNode.className.indexOf("cb-upsell-prevent") > -1) {
                return;
              }
              if (!(targetNode instanceof HTMLButtonElement || targetNode instanceof HTMLAnchorElement || targetNode instanceof HTMLDivElement || targetNode instanceof HTMLInputElement)) {
                targetNode = targetNode.closest("button, a, input, div");
              }
              if (targetNode && targetNode.className && typeof targetNode.className.indexOf === "function" && targetNode.className.indexOf("cb-upsell-prevent") > -1) {
                return;
              }

              // atc button clicked
              if (targetNode && cacheSettings && addToCartSelectors.some(function (selector) {
                return targetNode.matches(selector);
              })) {
                setCacheCampaign();
                if (cacheSettings.has_active_product_page_funnels) {
                  var _originVariantId3;
                  var _originProductId3;
                  try {
                    _originVariantId3 = event.target.closest("[originVariantId]").getAttribute("originVariantId");
                    _originVariantId3 = parseInt(_originVariantId3);
                  } catch (e) {
                    // console.log('Can\'t find "originVariantId" attribute',e);
                  }
                  try {
                    _originProductId3 = event.target.closest("[originProductId]").getAttribute("originProductId");
                    _originProductId3 = parseInt(_originProductId3);
                  } catch (e) {
                    // console.log('Can\'t find "originVariantId" attribute',e);
                  }
                  if (targetNode.matches(".cb-stop-propagation")) {
                    event.preventDefault();
                    event.stopPropagation();
                    event.stopImmediatePropagation();
                  }
                  showFunnel("isProduct", {
                    originVariantId: _originVariantId3,
                    originProductId: _originProductId3
                  });
                }
              }

              // go to checkout click
              if (targetNode && goToCheckoutSelectors.some(function (selector) {
                return targetNode.matches(selector);
              })) {
                //because this is dangerous for old store only apply this rule for new stores
                if (cacheSettings && cacheSettings.createdAt && new Date(cacheSettings.createdAt) >= new Date("07-24-2021")) {
                  event.preventDefault();
                }
                showFunnel("isCart");
                return false;
              }
            });
            var customCartPageSelectors = document.querySelectorAll(".cb-upsell-show-cart-page-widget");
            if (customCartPageSelectors) {
              customCartPageSelectors.forEach(function (customSelector) {
                customSelector.addEventListener("click", function (event) {
                  event.preventDefault();
                  if (event.target.className && typeof event.target.className === "string" && event.target.className.indexOf("cb-stop-propagation") > -1) {
                    console.log("Honeycomb - stopping propagation");
                    event.stopImmediatePropagation();
                    event.stopPropagation();
                  }
                  showFunnel("isCart");
                });
              });
            }
            var customProductPageSelectors = document.querySelectorAll(".cb-upsell-show-product-page-widget");
            if (customProductPageSelectors) {
              customProductPageSelectors.forEach(function (customSelector) {
                customSelector.addEventListener("click", function (event) {
                  if (window.conversionBearUpsellDisabled) {
                    console.log("cb: widget is disabled");
                    return;
                  }
                  event.preventDefault();
                  setInterval(function () {
                    setCacheCampaign();
                  }, 2000);
                  if (event.target.className && typeof event.target.className === "string" && event.target.className.indexOf("cb-stop-propagation") > -1) {
                    console.log("stopping propagation");
                    event.stopImmediatePropagation();
                    event.stopPropagation();
                  }
                  var originVariantId;
                  var originProductId;
                  try {
                    originVariantId = event.target.closest("[originVariantId]").getAttribute("originVariantId");
                  } catch (e) {
                    // console.log('Can\'t find "originVariantId" attribute',e);
                  }
                  try {
                    originProductId = event.target.closest("[originProductId]").getAttribute("originProductId");
                    originProductId = parseInt(originProductId, 10);
                  } catch (e) {
                    // console.log('Can\'t find "originProductId" attribute',e);
                  }
                  showFunnel("isProduct", {
                    originVariantId: originVariantId,
                    originProductId: originProductId
                  });
                });
              });
            }
          };
          attachCustomFunnelTriggers = function _attachCustomFunnelTr() {
            try {
              if (!cacheSettings || !cacheSettings.advanced || !cacheSettings.advanced.custom_funnel_triggers_selectors || !Array.isArray(cacheSettings.advanced.custom_funnel_triggers_selectors) || !cacheSettings.advanced.custom_funnel_triggers_selectors[0]) {
                return;
              } else {
                var _customSelectorsArray2 = cacheSettings.advanced.custom_funnel_triggers_selectors;
                _customSelectorsArray2.forEach(function (customSelectorProps) {
                  var matchingSelectorsFromDOM = document.querySelectorAll(customSelectorProps.selector);
                  if (matchingSelectorsFromDOM) {
                    var _classNameToBeAttached3 = "";
                    switch (customSelectorProps.type) {
                      case "product_page":
                        _classNameToBeAttached3 = "cb-upsell-show-product-page-widget";
                        break;
                      case "cart_page":
                        _classNameToBeAttached3 = "cb-upsell-show-cart-page-widget";
                        break;
                      default:
                        break;
                    }
                    matchingSelectorsFromDOM.forEach(function (element) {
                      element.classList.add(_classNameToBeAttached3);
                      if (customSelectorProps.stopPropagation) {
                        element.classList.add("cb-stop-propagation");
                      }
                    });
                  }
                });
              }
            } catch (e) {
              console.log("attachCustomFunnelTriggers -> e", e);
            }
          };
          addSubmitListener = function _addSubmitListener() {
            var _window$ReCharge, _cacheSettings;
            //check if recharge integration is enabled
            if ((_window$ReCharge = window.ReCharge) !== null && _window$ReCharge !== void 0 && _window$ReCharge.cart_options && (_cacheSettings = cacheSettings) !== null && _cacheSettings !== void 0 && (_cacheSettings = _cacheSettings.advanced) !== null && _cacheSettings !== void 0 && (_cacheSettings = _cacheSettings.recharge) !== null && _cacheSettings !== void 0 && _cacheSettings.enabled) {
              window.ReCharge.cart_options.disable = true;
            }
            document.addEventListener("submit", function (event) {
              var _window$Zapiet$Widget;
              if (window.conversionBearUpsellDisabled) {
                console.log("cb: widget is disabled");
                return;
              }
              if (window.Zapiet && !((_window$Zapiet$Widget = window.Zapiet.Widget) !== null && _window$Zapiet$Widget !== void 0 && _window$Zapiet$Widget.checkoutEnabled()) && window.location.href.includes("/cart")) {
                return;
              }
              switch (typeof event.target.action === "string") {
                case event.target.action.slice(-5) === "/cart" || event.target.action.slice(-9) === "/checkout":
                  if (window.conversionBearUpsellDebugMode) {
                    console.log(event);
                    window.eventParam = event;
                  }

                  // don't trigger if the button clicked is an update button
                  if (event && event.submitter && event.submitter.getAttribute("name") === "update") {
                    return;
                  }

                  // don't trigger if the button clicked is a view cart button
                  if (event && event.submitter && event.submitter.getAttribute("value") === "View cart") {
                    return;
                  }

                  // don't trigger if the button has a class of dont trigger
                  if (event.target.className.indexOf("cb-upsell-prevent-cart-page-widget") > -1 || event.target.className.indexOf("cb-upsell-prevent") > -1) {
                    return;
                  }
                  event.stopPropagation();
                  event.stopImmediatePropagation();
                  event.preventDefault();
                  showFunnel("isCart");
                  break;
              }
            });

            // init custom event handlers to trigger the widget pre-checkout
            if (window && window.Shopify && window.Shopify.theme) {
              var _themeId2 = window.Shopify.theme.id;
              switch (_themeId2) {
                case 89030557831:
                  // KIVO Code
                  document.querySelector("#add-to-cart").addEventListener("click", function (e) {
                    setTimeout(function () {
                      document.querySelectorAll(".checkout-link.button").forEach(function (element) {
                        element.addEventListener("click", function (e) {
                          if (window.conversionBearUpsellDisabled) {
                            console.log("cb: widget is disabled");
                            return;
                          }
                          e.preventDefault();
                          widget_isCartPage = true;
                          widget_genWidget({
                            campaign_id: searchCampaignId,
                            isCart: widget_isCartPage
                          });
                        });
                      });
                    }, 1000);
                  });
                  break;
                case 88979406981:
                  // KIBO Code V2
                  document.querySelector("#add-to-cart").addEventListener("click", function (e) {
                    setTimeout(function () {
                      document.querySelectorAll(".checkout-link.button").forEach(function (element) {
                        element.addEventListener("click", function (e) {
                          if (window.conversionBearUpsellDisabled) {
                            console.log("cb: widget is disabled");
                            return;
                          }
                          e.preventDefault();
                          widget_isCartPage = true;
                          widget_genWidget({
                            campaign_id: searchCampaignId,
                            isCart: widget_isCartPage
                          });
                        });
                        element.setAttribute("onclick", "");
                        if (window.screen.width > 500) {
                          var _style3 = document.createElement("style");
                          _style3.innerHTML = ".cb-widget-component {" + "left: 50% !important;" + "}";
                          // Get the first script tag
                          var _ref20 = document.querySelector("script");
                          // Insert our new styles before the first script tag
                          _ref20.parentNode.insertBefore(_style3, _ref20);
                        }
                      });
                    }, 1000);
                  });
                  break;
                default:
                  break;
              }
              if (window.theme && window.theme.name && window.theme.name.toLowerCase.includes("debutify")) {
                document.querySelector("#AddToCart--product-template").addEventListener("click", function (e) {
                  setTimeout(function () {
                    document.querySelectorAll(".ajaxcart-checkout.cart__checkout").forEach(function (element) {
                      element.addEventListener("click", function (e) {
                        if (window.conversionBearUpsellDisabled) {
                          console.log("cb: widget is disabled");
                          return;
                        }
                        e.preventDefault();
                        widget_isCartPage = true;
                        widget_genWidget({
                          campaign_id: searchCampaignId,
                          isCart: widget_isCartPage
                        });
                      });
                    });
                  }, 500);
                });
                document.querySelectorAll(".ajaxcart-checkout.cart__checkout").forEach(function (element) {
                  element.addEventListener("click", function (e) {
                    if (window.conversionBearUpsellDisabled) {
                      console.log("cb: widget is disabled");
                      return;
                    }
                    e.preventDefault();
                    widget_isCartPage = true;
                    widget_genWidget({
                      campaign_id: searchCampaignId,
                      isCart: widget_isCartPage
                    });
                  });
                });
              }
            }

            // IE & safari cart page funnel automatic setup click listener
            if (isSafari || isIE) {
              document.addEventListener("click", function (event) {
                var targetNode = event.target;
                if ((isSafari || isIE) && targetNode && goToCheckoutSelectors.some(function (selector) {
                  return targetNode.matches(selector);
                }) && !targetNode.matches(".cb-upsell-prevent")) {
                  event.stopPropagation();
                  event.stopImmediatePropagation();
                  event.preventDefault();
                  console.log("IE/Safari click listener triggered");
                  showFunnel("isCart");
                  return false;
                }
              });
            }
          };
          _setCacheCampaign = function _setCacheCampaign3() {
            _setCacheCampaign = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/widget_regeneratorRuntime().mark(function _callee7() {
              var _cart3;
              return widget_regeneratorRuntime().wrap(function _callee7$(_context8) {
                while (1) {
                  switch (_context8.prev = _context8.next) {
                    case 0:
                      _context8.prev = 0;
                      _context8.next = 3;
                      return getCart();
                    case 3:
                      _cart3 = _context8.sent;
                      if (lodash_isequal_default()(_cart3, cacheCart)) {
                        _context8.next = 10;
                        break;
                      }
                      cacheCart = _cart3;
                      _context8.next = 8;
                      return getCampaign({
                        campaign_id: null,
                        isCart: true,
                        forceUpdate: true
                      });
                    case 8:
                      cacheCampaign = _context8.sent;
                      if (cacheCampaign) {
                        campaignStatus = "exists";
                      }
                    case 10:
                      _context8.next = 14;
                      break;
                    case 12:
                      _context8.prev = 12;
                      _context8.t0 = _context8["catch"](0);
                    case 14:
                    case "end":
                      return _context8.stop();
                  }
                }
              }, _callee7, null, [[0, 12]]);
            }));
            return _setCacheCampaign.apply(this, arguments);
          };
          setCacheCampaign = function _setCacheCampaign2() {
            return _setCacheCampaign.apply(this, arguments);
          };
          mountCustomOnLoadScript = function _mountCustomOnLoadScr(settings) {
            if (settings.advanced && settings.advanced.custom_js_on_page_load) {
              var _onLoadScript2 = document.createElement("script");
              _onLoadScript2.type = "text/javascript";
              _onLoadScript2.id = "honeycomb_pre_load_script";
              _onLoadScript2.innerHTML = settings.advanced.custom_js_on_page_load;
              if (document.body) {
                document.body.appendChild(_onLoadScript2);
              }
            }
          };
          setCacheSettings = function _setCacheSettings() {
            return fetchSettings().then(function (settings) {
              cacheSettings = settings;
              mountCustomOnLoadScript(cacheSettings);
            });
          };
          handleError = function _handleError() {
            console.log("handleError -> handleError");
            if (window.location.pathname.indexOf("thank_you") > -1 || window.location.pathname.indexOf("orders") > -1) {
              return null;
            } else if (widget_isCartPage) {
              goToCheckout();
            } else {
              return null;
            }
          };
          _goToCheckout = function _goToCheckout3() {
            _goToCheckout = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/widget_regeneratorRuntime().mark(function _callee6(data) {
              var _data$offers, _document2, _isPrePurcahse, _isThankYouPage, _hasPendinguUpsellOffers, _isUsingDepreactedRechargeIntegration, _window$bundlesBear, _code2;
              return widget_regeneratorRuntime().wrap(function _callee6$(_context7) {
                while (1) {
                  switch (_context7.prev = _context7.next) {
                    case 0:
                      _context7.prev = 0;
                      _isPrePurcahse = widget_isCartPage || isBlogPage || widget_isProductPage;
                      _isThankYouPage = Boolean(widget_searchOrderId);
                      _hasPendinguUpsellOffers = Boolean((data === null || data === void 0 || (_data$offers = data.offers) === null || _data$offers === void 0 ? void 0 : _data$offers.length) > 0);
                      _isUsingDepreactedRechargeIntegration = Boolean(window.conversionBearUpsell.RECHARGE_PRODUCTS);
                      if (((_document2 = document) === null || _document2 === void 0 || (_document2 = _document2.documentElement) === null || _document2 === void 0 || (_document2 = _document2.style) === null || _document2 === void 0 ? void 0 : _document2.overflow) === "hidden") {
                        document.documentElement.style.overflow = "auto";
                      }
                      if (!_hasPendinguUpsellOffers) {
                        _context7.next = 10;
                        break;
                      }
                      _context7.next = 9;
                      return getCart();
                    case 9:
                      data.cart = _context7.sent;
                    case 10:
                      if (!defaultSettings.isDemo) {
                        _context7.next = 16;
                        break;
                      }
                      widget_conversionBearUpsell.getDemoCheckoutData(data);
                      widget_conversionBearUpsell.closeApp();
                      return _context7.abrupt("return", null);
                    case 16:
                      if (!(_isUsingDepreactedRechargeIntegration && _hasPendinguUpsellOffers)) {
                        _context7.next = 20;
                        break;
                      }
                      integrations_initRechargeIntegration(data.offers);
                      _context7.next = 52;
                      break;
                    case 20:
                      if (!_isPrePurcahse) {
                        _context7.next = 46;
                        break;
                      }
                      if (!(isRegularCheckoutOrder(data) && !_hasPendinguUpsellOffers)) {
                        _context7.next = 24;
                        break;
                      }
                      widget_conversionBearUpsell.closeApp();
                      return _context7.abrupt("return", null);
                    case 24:
                      if (!_hasPendinguUpsellOffers) {
                        _context7.next = 28;
                        break;
                      }
                      return _context7.abrupt("return", createOrder(widget_searchOrderId, data));
                    case 28:
                      if (!(((_window$bundlesBear = window.bundlesBear) === null || _window$bundlesBear === void 0 ? void 0 : _window$bundlesBear.discountStatus) === "exists")) {
                        _context7.next = 40;
                        break;
                      }
                      _context7.next = 31;
                      return window.bundlesBear.applyDiscount();
                    case 31:
                      _code2 = _context7.sent;
                      utils_default.a.preventBfCache();
                      setCookie("discount_code", _code2);
                      window.location.href = "/checkout?discount=".concat(_code2);
                      widget_conversionBearUpsell.closeApp();
                      activatedFunnels.pop();
                      return _context7.abrupt("return", null);
                    case 40:
                      utils_default.a.preventBfCache();
                      activatedFunnels.pop();
                      window.location.href = isSubscriptionOrder(data) ? getRechargeCheckoutPath() : utils_default.a.getDefaultCheckoutUrl(shopLocale);
                      return _context7.abrupt("return", null);
                    case 44:
                      _context7.next = 52;
                      break;
                    case 46:
                      if (!_isThankYouPage) {
                        _context7.next = 52;
                        break;
                      }
                      if (!widget_isCustomTrigger) {
                        _context7.next = 51;
                        break;
                      }
                      _context7.next = 50;
                      return getCart();
                    case 50:
                      data.cart = _context7.sent;
                    case 51:
                      return _context7.abrupt("return", createOrder(widget_searchOrderId, data));
                    case 52:
                      return _context7.abrupt("return", null);
                    case 55:
                      _context7.prev = 55;
                      _context7.t0 = _context7["catch"](0);
                      console.log("goTocheckout error -->", _context7.t0);
                      return _context7.abrupt("return", null);
                    case 59:
                    case "end":
                      return _context7.stop();
                  }
                }
              }, _callee6, null, [[0, 55]]);
            }));
            return _goToCheckout.apply(this, arguments);
          };
          goToCheckout = function _goToCheckout2(_x7) {
            return _goToCheckout.apply(this, arguments);
          };
          getRechargeCheckoutPath = function _getRechargeCheckoutP() {
            var _window$Shopify2;
            var paramCart = "&cart_token=".concat((document.cookie.match("(^|; )cart=([^;]*)") || 0)[2]);
            var paramDomain = "myshopify_domain=".concat((_window$Shopify2 = window.Shopify) === null || _window$Shopify2 === void 0 ? void 0 : _window$Shopify2.shop);
            return "https://checkout.rechargeapps.com/r/checkout?".concat(paramDomain).concat(paramCart);
          };
          createOrder = function _createOrder(searchOrderId, body) {
            var _window$Shopify;
            if (isSubscriptionOrder(body)) {
              return createSubscriptionOrder(searchOrderId, body);
            }
            if (isRegularCheckoutOrder(body)) {
              return createRegularNonDraftOrder(searchOrderId, body);
            }
            return fetch("".concat(widget_url, "default/order?shop=").concat(widget_shop, "&orderId=").concat(searchOrderId, "&currency=").concat(currency, "&rate=").concat((_window$Shopify = window.Shopify) === null || _window$Shopify === void 0 || (_window$Shopify = _window$Shopify.currency) === null || _window$Shopify === void 0 ? void 0 : _window$Shopify.rate), {
              method: "POST",
              headers: {
                "Content-Type": "application/json"
              },
              body: JSON.stringify(body)
            }).then(function (resp) {
              if (resp.status != 200) {
                throw new Error("Not create order");
              }
              return resp.json();
            }).then(function (result) {
              utils_default.a.preventBfCache();
              if (result.invoice_url) {
                // if(window.sessionStorage){
                //   window.sessionStorage.isDraftOrderGeneratedByHoneycomb = true;
                // }
                setTimeout(function () {
                  var draftOrderLink = result.invoice_url;
                  if (shopLocale && !result.invoice_url.includes("?")) {
                    draftOrderLink = "".concat(result.invoice_url).concat(utils_default.a.getCheckoutQueryParams(shopLocale)); // TODO add utm params?
                  }
                  console.log("draftOrderLink", draftOrderLink);
                  window.location.href = draftOrderLink;
                  activatedFunnels.pop();
                }, 1000);
              } else if (result.updatedOffer) {
                if (result.additionalPaymentCollectionUrl) {
                  window.location.assign(result.additionalPaymentCollectionUrl);
                } else {
                  window.location.reload();
                }
              } else {
                window.location.href = utils_default.a.getDefaultCheckoutUrl(shopLocale);
                activatedFunnels.pop();
              }
            })["catch"](function (err) {
              window.location.href = utils_default.a.getDefaultCheckoutUrl(shopLocale);
              activatedFunnels.pop();
            });
          };
          createOrderView = function _createOrderView(campaign_id) {
            var isSplitTest = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
            var campaign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
            fetch("".concat(widget_url, "default/campaign_order_view?currency=").concat(currency), {
              method: "POST",
              headers: {
                "Content-Type": "application/json"
              },
              body: JSON.stringify({
                shopOrigin: widget_shop,
                campaign_id: campaign_id,
                tmpOrderId: localStorage.getItem("tmpOrderId"),
                isSplitTest: isSplitTest
              })
            }).then(function (resp) {
              if (resp.status != 200) {
                throw new Error("Not create order view");
              }
              return resp.json();
            }).then(function (result) {
              if (result.tmpOrderId) {
                widget_searchOrderId = result.tmpOrderId;
                localStorage.setItem("tmpOrderId", result.tmpOrderId);
              }
              appEvent === null || appEvent === void 0 || appEvent.trigger("conversionbearupsell:funnel_view", widget_objectSpread({}, campaign));
            })["catch"](function (err) {
              console.log("createOrderView -> err", err);
            });
          };
          filterCampaignImages = function _filterCampaignImages(campaign, cart) {
            if (!cart || !cart.items || cart.items.length === 0) {
              return;
            }
            var cartProductIds = cart.items.map(function (i) {
              return i.product_id;
            });
            var cartVariantIds = cart.items.map(function (i) {
              return i.variant_id;
            });
            if (campaign.trigger_product_images) {
              campaign.trigger_product_images = campaign.trigger_product_images.filter(function (product) {
                return cartProductIds.includes(product.trigger_id);
              });
            }
            if (campaign.trigger_variant_images) {
              campaign.trigger_variant_images = campaign.trigger_variant_images.filter(function (variant) {
                return cartVariantIds.includes(variant.trigger_id);
              });
            }
          };
          getLocale = function _getLocale() {
            if (window && window.Shopify && window.Shopify.locale) {
              return window.Shopify.locale;
            }
          };
          translateSettings = function _translateSettings(settings) {
            var locale = getLocale();
            if (!locale) {
              return;
            }
            var _settings$design$them = settings.design.theme,
              upsell_page = _settings$design$them.upsell_page,
              countdown_timer = _settings$design$them.countdown_timer,
              price = _settings$design$them.price,
              product = _settings$design$them.product,
              minimized_view = _settings$design$them.minimized_view,
              subscriptions_settings = _settings$design$them.subscriptions_settings,
              discount_code_texts = _settings$design$them.discount_code_texts,
              texts = _settings$design$them.texts;
            if (texts && texts.multi_language && texts.language_list && texts.language_list.length > 0) {
              var _languageTexts4 = texts.language_list.find(function (x) {
                return locale.startsWith(x.isoCode);
              });
              if (!_languageTexts4) {
                return;
              }
              upsell_page.next_offer_text = _languageTexts4.next_offer_text;
              upsell_page.previous_offer_text = _languageTexts4.previous_offer_text;
              countdown_timer.bar_text = _languageTexts4.countdown_text;
              price.discount_text = _languageTexts4.discount_text;
              price.text = _languageTexts4.free_shipping_text;
              product.quantity_text = _languageTexts4.quantity_text;
              product.out_of_stock_text = _languageTexts4.out_of_stock_text;
              product.product_page_button_text = _languageTexts4.product_page_main_text;
              product.product_page_text = _languageTexts4.product_page_secondary_text;
              product.cart_page_button_text = _languageTexts4.cart_page_main_text;
              product.cart_page_text = _languageTexts4.cart_page_secondary_text;
              product.checkout_page_button_text = _languageTexts4.checkout_page_text;
              product.thank_you_page_button_text = _languageTexts4.thank_you_page_main_text;
              product.thank_you_page_text = _languageTexts4.thank_you_page_secondary_text;
              product.blog_page_button_text = _languageTexts4.blog_page_main_text;
              product.blog_page_text = _languageTexts4.blog_page_secondary_text;
              product.downsell_text = _languageTexts4.downsell_text;
              product.redirection_text = _languageTexts4.redirection_text;
              minimized_view.minimized_button_text = _languageTexts4.minimized_button_text;
              subscriptions_settings.one_time_purchase_text = _languageTexts4.one_time_purchase_text;
              subscriptions_settings.subscribe_and_save_text = _languageTexts4.subscribe_and_save_text;
              discount_code_texts.discount_total = _languageTexts4.discount_total_text;
              discount_code_texts.apply_code = _languageTexts4.apply_code_text;
              discount_code_texts.discount_code = _languageTexts4.discount_code_text;
              discount_code_texts.apply_discount = _languageTexts4.apply_discount_text;
              discount_code_texts.discount_error = _languageTexts4.discount_error_text;
              discount_code_texts.button_text = _languageTexts4.button_text;
            }
          };
          translateCampaign = function _translateCampaign(campaign) {
            var locale = getLocale();
            if (!locale || !campaign || !campaign.offers || campaign.offers.length === 0) {
              return;
            }
            var _iterator = widget_createForOfIteratorHelper(campaign.offers),
              _step;
            try {
              for (_iterator.s(); !(_step = _iterator.n()).done;) {
                var _offer3 = _step.value;
                if (_offer3.multi_language && _offer3.language_list && _offer3.language_list.length > 0) {
                  var _languageTexts3 = _offer3.language_list.find(function (x) {
                    return locale.startsWith(x.isoCode);
                  });
                  if (!_languageTexts3) {
                    continue;
                  }
                  _offer3.offer_text = _languageTexts3.offer_text;
                  _offer3.show_offer_description = _languageTexts3.show_offer_description;
                  _offer3.offer_description = _languageTexts3.offer_description;
                }
              }
            } catch (err) {
              _iterator.e(err);
            } finally {
              _iterator.f();
            }
          };
          _getCampaign = function _getCampaign3() {
            _getCampaign = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/widget_regeneratorRuntime().mark(function _callee5(_ref6) {
              var _ref6$campaign_id, campaign_id, _ref6$isCart, isCart, _ref6$forceUpdate, forceUpdate, _ref6$isBlog, isBlog, _ref6$isProduct, isProduct, _ref6$isCustomTrigger, isCustomTrigger, _ref6$originVariantId, originVariantId, _ref6$originProductId, originProductId, _ref6$handle_post, handle_post, _currentCampaign, _response, _campaign, _text, _result2, _productQuantityCountInOrder, _tmpCheckoutOrderId, _locale, _urlRequest, _product_ids, _variant_ids, _sellingPlanCount, _variantListByProduct, _current_product, _total_price, _page_to_show, _current_variant, _cart, _cart2, _tmp_arr2, _index_blogs2, _window2, _window3, _cacheSettings4, _document$querySelect, _window4, _product, _variant, _product$elements, _product$elements$, shipping_interval_frequency, shipping_interval_unit_type, _atcProductQuantity, _locale2, _excludeCampaigns, _requestController, _signal, _result, _pageList, _store, _store2, _excludeCampaigns2;
              return widget_regeneratorRuntime().wrap(function _callee5$(_context6) {
                while (1) {
                  switch (_context6.prev = _context6.next) {
                    case 0:
                      _ref6$campaign_id = _ref6.campaign_id, campaign_id = _ref6$campaign_id === void 0 ? null : _ref6$campaign_id, _ref6$isCart = _ref6.isCart, isCart = _ref6$isCart === void 0 ? false : _ref6$isCart, _ref6$forceUpdate = _ref6.forceUpdate, forceUpdate = _ref6$forceUpdate === void 0 ? false : _ref6$forceUpdate, _ref6$isBlog = _ref6.isBlog, isBlog = _ref6$isBlog === void 0 ? false : _ref6$isBlog, _ref6$isProduct = _ref6.isProduct, isProduct = _ref6$isProduct === void 0 ? false : _ref6$isProduct, _ref6$isCustomTrigger = _ref6.isCustomTrigger, isCustomTrigger = _ref6$isCustomTrigger === void 0 ? false : _ref6$isCustomTrigger, _ref6$originVariantId = _ref6.originVariantId, originVariantId = _ref6$originVariantId === void 0 ? null : _ref6$originVariantId, _ref6$originProductId = _ref6.originProductId, originProductId = _ref6$originProductId === void 0 ? null : _ref6$originProductId, _ref6$handle_post = _ref6.handle_post, handle_post = _ref6$handle_post === void 0 ? "" : _ref6$handle_post;
                      _context6.prev = 1;
                      if (!defaultSettings.isDemo) {
                        _context6.next = 37;
                        break;
                      }
                      if (!localStorage.getItem("upsellCampaign")) {
                        _context6.next = 30;
                        break;
                      }
                      if (localStorage.getItem("upsellCampaignSplitTest") && JSON.parse(localStorage.getItem("upsellCampaignSplitTest"))) {
                        _currentCampaign = JSON.parse(localStorage.getItem("upsellCampaign"));
                        _currentCampaign.offers = _currentCampaign.offers.reduce(function (acc, offer, index) {
                          return offer.version === localStorage.getItem("upsellCampaignVersion") ? [].concat(Object(toConsumableArray["a" /* default */])(acc), [widget_objectSpread(widget_objectSpread({}, offer), {}, {
                            index: index
                          })]) : acc;
                        }, []);
                      } else {
                        _currentCampaign = JSON.parse(localStorage.getItem("upsellCampaign"));
                      }
                      _context6.next = 7;
                      return fetch("".concat(widget_url, "default/demo_campaign?shop=").concat(widget_shop), {
                        headers: {
                          Accept: "application/json",
                          "Content-Type": "application/json"
                        },
                        method: "post",
                        body: JSON.stringify(_currentCampaign)
                      });
                    case 7:
                      _response = _context6.sent;
                      if (_response.ok) {
                        _context6.next = 10;
                        break;
                      }
                      throw new Error("HTTP error! status: ".concat(_response.status));
                    case 10:
                      _context6.prev = 10;
                      _context6.next = 13;
                      return _response.text();
                    case 13:
                      _text = _context6.sent;
                      _context6.prev = 14;
                      _campaign = JSON.parse(_text);
                      _context6.next = 22;
                      break;
                    case 18:
                      _context6.prev = 18;
                      _context6.t0 = _context6["catch"](14);
                      console.error("Response was not valid JSON:", _text);
                      throw _context6.t0;
                    case 22:
                      _context6.next = 27;
                      break;
                    case 24:
                      _context6.prev = 24;
                      _context6.t1 = _context6["catch"](10);
                      console.error("Error reading response:", _context6.t1);
                    case 27:
                      return _context6.abrupt("return", _campaign);
                    case 30:
                      _context6.next = 32;
                      return fetch("".concat(widget_url, "static/campaign.json"));
                    case 32:
                      _context6.next = 34;
                      return _context6.sent.json();
                    case 34:
                      return _context6.abrupt("return", _context6.sent);
                    case 35:
                      _context6.next = 101;
                      break;
                    case 37:
                      if (!(widget_searchOrderId || campaign_id || isCart || isBlog || isProduct || isCustomTrigger)) {
                        _context6.next = 101;
                        break;
                      }
                      if (!(cacheCampaign && !forceUpdate && !campaign_id && !isProduct)) {
                        _context6.next = 40;
                        break;
                      }
                      return _context6.abrupt("return", cacheCampaign);
                    case 40:
                      _productQuantityCountInOrder = 0;
                      _tmpCheckoutOrderId = localStorage.getItem("upsell-checkout-order");
                      _locale = getLocale();
                      _urlRequest = "".concat(widget_url, "default/campaign?&shop=").concat(widget_shop, "&orderId=").concat(widget_searchOrderId, "&isMobile=").concat(window.innerWidth <= 767, "&currency=").concat(currency, "&locale=").concat(_locale, "&isOrderConfirmationPage=").concat(window.location.pathname.indexOf("orders") > -1);
                      if (_tmpCheckoutOrderId) {
                        _urlRequest += "&tmpCheckoutOrderId=".concat(_tmpCheckoutOrderId);
                        localStorage.removeItem("upsell-checkout-order");
                      }
                      if (campaign_id) {
                        _urlRequest = "".concat(widget_url, "default/campaign?campaignId=").concat(campaign_id, "&shop=").concat(widget_shop, "&isMobile=").concat(window.innerWidth <= 767, "&currency=").concat(currency, "&locale=").concat(_locale);
                      }
                      _product_ids = [];
                      _variant_ids = [];
                      _sellingPlanCount = 0;
                      _variantListByProduct = {};
                      _total_price = 0;
                      _page_to_show = "thankyou_page";
                      if (!(isCart || isBlog || isProduct)) {
                        _context6.next = 68;
                        break;
                      }
                      _context6.next = 55;
                      return getCart();
                    case 55:
                      _cart = _context6.sent;
                      if (_cart) {
                        _cart.items.forEach(function (item) {
                          var variantId = getVariantIdFromProps(item);
                          _product_ids.push(item.product_id);
                          _variant_ids.push(variantId);
                          _variantListByProduct[item.product_id] = [].concat(Object(toConsumableArray["a" /* default */])(_variantListByProduct[item.product_id] ? _variantListByProduct[item.product_id] : []), [variantId]);
                          if ("selling_plan_allocation" in item) {
                            ++_sellingPlanCount;
                          }
                          if ("quantity" in item) {
                            _productQuantityCountInOrder += item.quantity;
                          }
                        });
                      }
                      if (!isCart) {
                        _context6.next = 63;
                        break;
                      }
                      _page_to_show = "cart_page";
                      if (!(((_cart2 = _cart) === null || _cart2 === void 0 ? void 0 : _cart2.item_count) < 1)) {
                        _context6.next = 62;
                        break;
                      }
                      cacheCampaign = null;
                      return _context6.abrupt("return", null);
                    case 62:
                      _total_price = _cart.total_price ? _cart.total_price / 100 : 0;
                    case 63:
                      if (isBlog) {
                        _tmp_arr2 = window.location.pathname.split("/");
                        _index_blogs2 = _tmp_arr2.indexOf("blogs");
                        if (_index_blogs2 + 2 === _tmp_arr2.length - 1 && _tmp_arr2[_index_blogs2 + 2] && handle_post === "") {
                          handle_post = _tmp_arr2[_index_blogs2 + 2];
                        }
                        _page_to_show = "blog_page";
                      }
                      if (isProduct) {
                        try {
                          _current_product = [originProductId];
                          _current_variant = originVariantId;
                          if (!_current_variant && window.location.search) {
                            _current_variant = window.location.search.split(/variant=(.*)/)[1];
                          }
                          if (!_current_variant && (_window2 = window) !== null && _window2 !== void 0 && (_window2 = _window2.meta) !== null && _window2 !== void 0 && (_window2 = _window2.product) !== null && _window2 !== void 0 && _window2.variants[0]) {
                            _current_variant = window.meta.product.variants[0].id;
                          }
                          if ((_window3 = window) !== null && _window3 !== void 0 && (_window3 = _window3.ReCharge) !== null && _window3 !== void 0 && (_window3 = _window3.options) !== null && _window3 !== void 0 && _window3.active && (_cacheSettings4 = cacheSettings) !== null && _cacheSettings4 !== void 0 && (_cacheSettings4 = _cacheSettings4.advanced) !== null && _cacheSettings4 !== void 0 && (_cacheSettings4 = _cacheSettings4.recharge) !== null && _cacheSettings4 !== void 0 && _cacheSettings4.enabled) {
                            _product = window.ReCharge.products.find(function (_ref18) {
                              var _ref18$options = _ref18.options,
                                active = _ref18$options.active,
                                purchaseType = _ref18$options.purchaseType;
                              return active && purchaseType === "autodeliver";
                            });
                            _variant = _product && _product.variant_to_duplicate[_current_variant];
                            if (_product && _variant) {
                              _product$elements = Object(slicedToArray["a" /* default */])(_product.elements, 1), _product$elements$ = _product$elements[0], shipping_interval_frequency = _product$elements$.shippingIntervalFrequency.value, shipping_interval_unit_type = _product$elements$.subscriptionIntervalType.value;
                              _current_product = [_product.id];
                              _current_variant = getVariantIdFromProps({
                                id: _variant,
                                properties: {
                                  shipping_interval_unit_type: shipping_interval_unit_type,
                                  shipping_interval_frequency: shipping_interval_frequency
                                }
                              });
                            }
                          }
                          _page_to_show = "product_page";
                          if (!originProductId && window.meta && window.meta.product && window.meta.product.id) {
                            _current_product = [window.meta.product.id];
                          }
                          _product_ids = [].concat(Object(toConsumableArray["a" /* default */])(_product_ids), Object(toConsumableArray["a" /* default */])(_current_product));
                          _variant_ids = [].concat(Object(toConsumableArray["a" /* default */])(_variant_ids), [_current_variant]);

                          // TODO: add new added product price
                          _atcProductQuantity = parseInt((_document$querySelect = document.querySelector('[name="quantity"]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.value) || 1;
                          _total_price = _cart.total_price ? _cart.total_price / 100 : 0;
                          if ((_window4 = window) !== null && _window4 !== void 0 && (_window4 = _window4.meta) !== null && _window4 !== void 0 && (_window4 = _window4.product) !== null && _window4 !== void 0 && (_window4 = _window4.variants[0]) !== null && _window4 !== void 0 && _window4.price) {
                            _total_price += window.meta.product.variants[0].price * _atcProductQuantity / 100;
                          }
                        } catch (e) {
                          console.log("getCampaign, isProduct -> e", e);
                        }
                      }
                      _locale2 = getLocale();
                      _urlRequest = "".concat(widget_url, "default/campaign_page?shop=").concat(widget_shop, "&isMobile=").concat(window.innerWidth <= 767, "&currency=").concat(currency, "&locale=").concat(_locale2);
                      if (localStorage.getItem("tmpOrderId")) {
                        _urlRequest += "&tmpOrderId=".concat(localStorage.getItem("tmpOrderId"));
                      }
                    case 68:
                      if (localStorage.getItem("excludeCampaigns")) {
                        try {
                          _excludeCampaigns = JSON.parse(localStorage.getItem("excludeCampaigns"));
                          if (Array.isArray(_excludeCampaigns)) {
                            _urlRequest += "&excludeIds=".concat(_excludeCampaigns.join(","));
                          }
                        } catch (error) {
                          console.log("getCampaign -> error", error);
                        }
                      }
                      if (localStorage.getItem("".concat(_page_to_show, "SelectedSplitTestVersion"))) {
                        _urlRequest += "&selectedVersion=".concat(localStorage.getItem("".concat(_page_to_show, "SelectedSplitTestVersion")));
                      }
                      if (_page_to_show === "thankyou_page" && window.Shopify && window.Shopify.currency && window.Shopify.currency.rate) {
                        _urlRequest += "&rate=".concat(Shopify.currency.rate);
                      }
                      if (_page_to_show === "thankyou_page" && window.Shopify && window.Shopify.checkout && window.Shopify.checkout.line_items) {
                        _urlRequest += "&product_ids=".concat(window.Shopify.checkout.line_items.map(function (item) {
                          return item.product_id;
                        }));
                      }
                      _requestController = new AbortController();
                      _signal = _requestController.signal;
                      _context6.next = 76;
                      return utils_default.a.promisifiedTimeout(6000, fetch(_urlRequest, {
                        headers: {
                          "Content-Type": "application/json",
                          common: document.cookie
                        },
                        method: isCart || isBlog || isProduct ? "POST" : "GET",
                        signal: _signal,
                        body: isCart || isBlog || isProduct ? JSON.stringify({
                          product_ids: _product_ids,
                          total_price: _total_price,
                          handle_post: handle_post,
                          page_to_show: _page_to_show,
                          variant_ids: _variant_ids,
                          current_product: _current_product,
                          current_variant: _current_variant,
                          variantListByProduct: _variantListByProduct,
                          productQuantityCountInOrder: _productQuantityCountInOrder,
                          rate: window.Shopify && window.Shopify.currency && window.Shopify.currency.rate
                        }) : undefined
                      }))["catch"](function (e) {
                        console.error("getCampaign --> request", e);
                        _requestController.abort();
                        return null;
                      });
                    case 76:
                      _result = _context6.sent;
                      if (!(!_result || _result.status !== 200)) {
                        _context6.next = 82;
                        break;
                      }
                      _pageList = {
                        cart_page: "isCart",
                        product_page: "isProduct",
                        blog_page: "isBlog"
                      };
                      activatedFunnels = activatedFunnels.filter(function (item) {
                        return item !== _pageList[_page_to_show];
                      });
                      campaignStatus = "not_exists";
                      return _context6.abrupt("return", null);
                    case 82:
                      _context6.next = 84;
                      return _result.json();
                    case 84:
                      _result = _context6.sent;
                      if (!(_sellingPlanCount > 0 && (_result2 = _result) !== null && _result2 !== void 0 && _result2.offers.some(function (offer) {
                        return offer.upsell_type !== "none";
                      }))) {
                        _context6.next = 87;
                        break;
                      }
                      return _context6.abrupt("return", null);
                    case 87:
                      translateCampaign(_result);
                      filterCampaignImages(_result, _cart);
                      if (_result.completedOrder && _result.completedOrder.campaign_id && sessionStorage) {
                        _store = sessionStorage.getItem("accepted_campaigns");
                        sessionStorage.setItem("accepted_campaigns", "".concat(_store, ", ").concat(_result.completedOrder.campaign_id));
                      }
                      if (sessionStorage && (window.location.pathname.indexOf("orders") > -1 || window.location.pathname.indexOf("thank_you") > -1)) {
                        _store2 = sessionStorage.getItem("accepted_campaigns");
                        if (_store2) {
                          _store2.split(", ").forEach(function (id) {
                            if (_result._id === id) {
                              throw "This campaign has already been accepted";
                            }
                          });
                        }
                      }
                      if (!(!_result.offers || !_result.offers.length || !_result.offers.filter(function (offer) {
                        return !offer.outOfStock;
                      }).length)) {
                        _context6.next = 93;
                        break;
                      }
                      return _context6.abrupt("return", null);
                    case 93:
                      if (_result.split_test) {
                        localStorage.setItem("".concat(_page_to_show, "SelectedSplitTestVersion"), _result._id);
                      }
                      if (_result.hasOwnProperty("tmpOrderId")) {
                        widget_searchOrderId = _result.tmpOrderId;
                        localStorage.setItem("tmpOrderId", _result.tmpOrderId);
                      }
                      if (_result.hasOwnProperty("campaign_id_exclude") && _result.campaign_id_exclude) {
                        try {
                          if (localStorage.getItem("excludeCampaigns")) {
                            _excludeCampaigns2 = JSON.parse(localStorage.getItem("excludeCampaigns"));
                            localStorage.setItem("excludeCampaigns", JSON.stringify([].concat(Object(toConsumableArray["a" /* default */])(_excludeCampaigns2), [_result.campaign_id_exclude])));
                          } else {
                            localStorage.setItem("excludeCampaigns", JSON.stringify([_result.campaign_id_exclude]));
                          }
                        } catch (error) {
                          console.log("getCampaign -> error", error);
                        }
                      }
                      if (!(_result.page_to_show === "blog_page" && _result.has_funnel_delay)) {
                        _context6.next = 100;
                        break;
                      }
                      if (!(_result.show_after_type === "seconds")) {
                        _context6.next = 100;
                        break;
                      }
                      _context6.next = 100;
                      return utils_default.a.sleep(_result.show_after_seconds * 1000);
                    case 100:
                      return _context6.abrupt("return", _result._id ? _result : null);
                    case 101:
                      return _context6.abrupt("return", null);
                    case 104:
                      _context6.prev = 104;
                      _context6.t2 = _context6["catch"](1);
                      console.log("getCampaign error", _context6.t2);
                      return _context6.abrupt("return", null);
                    case 108:
                    case "end":
                      return _context6.stop();
                  }
                }
              }, _callee5, null, [[1, 104], [10, 24], [14, 18]]);
            }));
            return _getCampaign.apply(this, arguments);
          };
          getCampaign = function _getCampaign2(_x2) {
            return _getCampaign.apply(this, arguments);
          };
          getCart = function _getCart() {
            return fetch("/cart.js", {
              method: "GET",
              headers: {
                pragma: "no-cache",
                "cache-control": "no-cache"
              }
            }).then(function (res) {
              return res.json();
            }).then(function (data) {
              window.conversionBearUpsell.cart = data;
              return data;
            })["catch"](function (err) {
              return null;
            });
          };
          _fetchSettings = function _fetchSettings3() {
            _fetchSettings = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/widget_regeneratorRuntime().mark(function _callee4() {
              var resp, settings;
              return widget_regeneratorRuntime().wrap(function _callee4$(_context5) {
                while (1) {
                  switch (_context5.prev = _context5.next) {
                    case 0:
                      if (!(defaultSettings.isDemo && localStorage.getItem("upsellShopSettings"))) {
                        _context5.next = 7;
                        break;
                      }
                      _context5.prev = 1;
                      return _context5.abrupt("return", JSON.parse(localStorage.getItem("upsellShopSettings")));
                    case 5:
                      _context5.prev = 5;
                      _context5.t0 = _context5["catch"](1);
                    case 7:
                      if (!cacheSettings) {
                        _context5.next = 9;
                        break;
                      }
                      return _context5.abrupt("return", cacheSettings);
                    case 9:
                      _context5.next = 11;
                      return fetch("".concat(widget_url, "settings?shop=").concat(widget_shop));
                    case 11:
                      resp = _context5.sent;
                      if (!(resp.status !== 200)) {
                        _context5.next = 14;
                        break;
                      }
                      return _context5.abrupt("return", null);
                    case 14:
                      _context5.next = 16;
                      return resp.json();
                    case 16:
                      settings = _context5.sent;
                      translateSettings(settings);
                      return _context5.abrupt("return", settings);
                    case 19:
                    case "end":
                      return _context5.stop();
                  }
                }
              }, _callee4, null, [[1, 5]]);
            }));
            return _fetchSettings.apply(this, arguments);
          };
          fetchSettings = function _fetchSettings2() {
            return _fetchSettings.apply(this, arguments);
          };
          widget_genWidget = function genWidget(_ref2) {
            var _ref2$campaign_id = _ref2.campaign_id,
              campaign_id = _ref2$campaign_id === void 0 ? null : _ref2$campaign_id,
              _ref2$dontTriggerOnLo = _ref2.dontTriggerOnLoaded,
              dontTriggerOnLoaded = _ref2$dontTriggerOnLo === void 0 ? false : _ref2$dontTriggerOnLo,
              _ref2$isCart = _ref2.isCart,
              isCart = _ref2$isCart === void 0 ? false : _ref2$isCart,
              _ref2$isBlog = _ref2.isBlog,
              isBlog = _ref2$isBlog === void 0 ? false : _ref2$isBlog,
              _ref2$isProduct = _ref2.isProduct,
              isProduct = _ref2$isProduct === void 0 ? false : _ref2$isProduct,
              _ref2$isCustomTrigger = _ref2.isCustomTrigger,
              isCustomTrigger = _ref2$isCustomTrigger === void 0 ? false : _ref2$isCustomTrigger,
              _ref2$redirectToCart = _ref2.redirectToCart,
              redirectToCart = _ref2$redirectToCart === void 0 ? false : _ref2$redirectToCart,
              originVariantId = _ref2.originVariantId,
              originProductId = _ref2.originProductId,
              _ref2$forceSideWidget = _ref2.forceSideWidgetLayout,
              forceSideWidgetLayout = _ref2$forceSideWidget === void 0 ? false : _ref2$forceSideWidget,
              _ref2$isManuallyTrigg = _ref2.isManuallyTriggeredFunnel,
              isManuallyTriggeredFunnel = _ref2$isManuallyTrigg === void 0 ? false : _ref2$isManuallyTrigg,
              _ref2$handle_post = _ref2.handle_post,
              handle_post = _ref2$handle_post === void 0 ? "" : _ref2$handle_post,
              _ref2$fromBundlesBear = _ref2.fromBundlesBear,
              fromBundlesBear = _ref2$fromBundlesBear === void 0 ? false : _ref2$fromBundlesBear;
            if (window.conversionBearUpsellDisabled) {
              console.log("cb: widget is disabled");
              return;
            }
            widget_isCartPage = isCart;
            isBlogPage = isBlog;
            widget_isProductPage = isProduct;
            isCustomTrigger = isCustomTrigger;
            return Promise.all([fetchSettings(), getCampaign({
              campaign_id: campaign_id,
              isCart: isCart,
              isBlog: isBlog,
              isProduct: isProduct,
              isCustomTrigger: isCustomTrigger,
              originVariantId: originVariantId,
              originProductId: originProductId,
              handle_post: handle_post
            })]).then( /*#__PURE__*/function () {
              var _ref4 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/widget_regeneratorRuntime().mark(function _callee(_ref3) {
                var _ref5, settingsData, campaign, _paramCart, _paramDomain, _code, _i, _Object$keys, _key, _i2, _Object$keys2, _keyTag, div, _widgetHeight;
                return widget_regeneratorRuntime().wrap(function _callee$(_context) {
                  while (1) {
                    switch (_context.prev = _context.next) {
                      case 0:
                        _ref5 = Object(slicedToArray["a" /* default */])(_ref3, 2), settingsData = _ref5[0], campaign = _ref5[1];
                        if (dontTriggerOnLoaded) {
                          widget_conversionBearUpsell.onLoaded = function () {};
                        }
                        if (isCart && window.Shopify) {
                          updateCartNote();
                        }
                        if (!(!settingsData || !campaign)) {
                          _context.next = 37;
                          break;
                        }
                        campaignStatus = "not_exists";
                        if (!(window.bundlesBear && window.bundlesBear.discountStatus === "exists" && (fromBundlesBear || !widget_isProductPage))) {
                          _context.next = 11;
                          break;
                        }
                        _context.next = 8;
                        return window.bundlesBear.applyDiscount(false, false, widget_isProductPage);
                      case 8:
                        return _context.abrupt("return", false);
                      case 11:
                        if (fromBundlesBear && widget_isProductPage) {
                          window.location.href = "/cart";
                        }
                      case 12:
                        widget_conversionBearUpsell.onLoaded();
                        if (!(isCart && !campaign && !isManuallyTriggeredFunnel)) {
                          _context.next = 35;
                          break;
                        }
                        activatedFunnels.pop();
                        if (!(widget_conversionBearUpsell.onProceedToCheckoutWithNoMatchingFunnel && typeof widget_conversionBearUpsell.onProceedToCheckoutWithNoMatchingFunnel === "function")) {
                          _context.next = 19;
                          break;
                        }
                        widget_conversionBearUpsell.onProceedToCheckoutWithNoMatchingFunnel();
                        _context.next = 35;
                        break;
                      case 19:
                        if (!(window.ReCharge && window.ReCharge.cart)) {
                          _context.next = 25;
                          break;
                        }
                        _paramCart = "&cart_token=".concat((document.cookie.match("(^|; )cart=([^;]*)") || 0)[2]);
                        _paramDomain = "myshopify_domain=".concat(window.Shopify.shop);
                        window.location = "https://checkout.rechargeapps.com/r/checkout?".concat(_paramDomain).concat(_paramCart);
                        _context.next = 35;
                        break;
                      case 25:
                        if (!(window.bundlesBear && window.bundlesBear.discountStatus === "exists")) {
                          _context.next = 34;
                          break;
                        }
                        _context.next = 28;
                        return window.bundlesBear.applyDiscount();
                      case 28:
                        _code = _context.sent;
                        setCookie("discount_code", _code);
                        window.location.href = "/checkout?discount=".concat(_code);
                        return _context.abrupt("return", false);
                      case 34:
                        window.location.href = "/checkout".concat(utils_default.a.getCheckoutQueryParams(shopLocale));
                      case 35:
                        if (isProduct && !campaign && redirectToCart && !isManuallyTriggeredFunnel) {
                          activatedFunnels.pop();
                          window.location.href = "/cart";
                        }
                        return _context.abrupt("return", false);
                      case 37:
                        if (defaultSettings.isDemo) {
                          isCart = campaign.page_to_show === "cart_page";
                          isBlog = campaign.page_to_show === "blog_page";
                          isProduct = campaign.page_to_show === "product_page";
                        }
                        shopSettings = settingsData;
                        if (settingsData.advanced && settingsData.advanced.facebook_pixel_id && settingsData.advanced.facebook_pixel_id !== "" && !window.fbq) {
                          fb_pixel_default.a.init(settingsData.advanced.facebook_pixel_id, {}, {
                            debug: false,
                            autoConfig: false
                          });
                          if (window.fbq) {
                            fbq("track", "PageView");
                          } else {
                            fb_pixel_default.a.pageView();
                          }
                        }
                        if (settingsData.advanced && settingsData.advanced.pinterest_tag_id && settingsData.advanced.pinterest_tag_id !== "") {
                          Pinterest["a" /* default */].init(settingsData.advanced.pinterest_tag_id);
                        }
                        if (settingsData.advanced && settingsData.advanced.snapchat_pixel_id && settingsData.advanced.snapchat_pixel_id !== "") {
                          snapchat_pixel_default.a.init(settingsData.advanced.snapchat_pixel_id, {}, {
                            debug: false
                          });
                        }
                        if (settingsData.advanced && settingsData.advanced.google_analytics_id && settingsData.advanced.google_analytics_id !== "") {
                          esm["a" /* default */].initialize(settingsData.advanced.google_analytics_id, {
                            debug: false
                          });
                        }

                        // settings override - USAGE EXAMPLE
                        //     <script>
                        //     window.cbUpsellCustomDesignSettingsOverride = {
                        //       countdown_timer:{ show: false }
                        //     };
                        // </script>
                        if (window.cbUpsellCustomDesignSettingsOverride && Object(esm_typeof["a" /* default */])(window.cbUpsellCustomDesignSettingsOverride) === "object" && settingsData && settingsData.design && settingsData.design.theme) {
                          for (_i = 0, _Object$keys = Object.keys(window.cbUpsellCustomDesignSettingsOverride); _i < _Object$keys.length; _i++) {
                            _key = _Object$keys[_i];
                            if (settingsData.design.theme.hasOwnProperty(_key)) {
                              if (Object(esm_typeof["a" /* default */])(window.cbUpsellCustomDesignSettingsOverride[_key]) === "object") {
                                for (_i2 = 0, _Object$keys2 = Object.keys(window.cbUpsellCustomDesignSettingsOverride[_key]); _i2 < _Object$keys2.length; _i2++) {
                                  _keyTag = _Object$keys2[_i2];
                                  settingsData.design.theme[_key][_keyTag] = window.cbUpsellCustomDesignSettingsOverride[_key][_keyTag];
                                }
                              } else {
                                settingsData.design.theme[_key] = window.cbUpsellCustomDesignSettingsOverride[_key];
                              }
                            }
                          }
                        }
                        div = document.createElement("div");
                        div.setAttribute("id", elementId);
                        document.body.appendChild(div);

                        // add bottom page padding for the mobile widget so the bottom part is reachable
                        if (window.innerWidth <= 767) {
                          try {
                            _widgetHeight = "170px";
                            if (document.getElementsByClassName("main")[0] && document.getElementsByClassName("main").length === 1) {
                              document.getElementsByClassName("main")[0].style.marginBottom = _widgetHeight;
                            } else if (document.getElementsByTagName("body")[0].style.marginBottom === "") {
                              document.getElementsByTagName("body")[0].style.marginBottom = _widgetHeight;
                            }
                          } catch (error) {
                            console.log("cb: couldn't increase window height");
                          }
                        }
                        if (isCart || isBlog || isProduct) {
                          createOrderView(campaign._id, campaign.split_test, campaign);
                        }
                        campaignStatus = "exists";
                        compat_module["default"].render(widget_jsx(ErrorBoundary["a" /* default */], {
                          handleError: handleError
                        }, widget_jsx(widget_WidgetContainer, {
                          campaign: campaign,
                          settings: settingsData,
                          isDemo: defaultSettings.isDemo,
                          forceIsMobile: defaultSettings.forceIsMobile,
                          goToCheckout: goToCheckout,
                          conversionBearUpsell: widget_conversionBearUpsell,
                          url: widget_url,
                          ReactPixel: fb_pixel_default.a,
                          ReactSnapchat: snapchat_pixel_default.a,
                          ReactGA: esm["a" /* default */],
                          ReactPinterest: Pinterest["a" /* default */],
                          appEvent: appEvent,
                          isCartPage: isCart && !forceSideWidgetLayout,
                          isBlogPage: isBlog,
                          isProductPage: isProduct,
                          isCustomTrigger: isCustomTrigger,
                          currency: currency,
                          shop: widget_shop,
                          isGoogleSearchApp: isGoogleSearchApp
                        })), document.getElementById(elementId));
                        return _context.abrupt("return", true);
                      case 52:
                      case "end":
                        return _context.stop();
                    }
                  }
                }, _callee);
              }));
              return function (_x) {
                return _ref4.apply(this, arguments);
              };
            }())["catch"](function (err) {
              console.error(err);
              return false;
            });
          };
          isSubscriptionOrder = function isSubscriptionOrder(body) {
            var _body$offers, _body$cart, _window;
            var hasOfferWithSubscription = body === null || body === void 0 || (_body$offers = body.offers) === null || _body$offers === void 0 ? void 0 : _body$offers.some(function (offer) {
              return offer.properties.some(function (_ref7) {
                var name = _ref7.name;
                return name === "shipping_interval_frequency";
              });
            });
            var hasCartItemWithSubscription = (body === null || body === void 0 || (_body$cart = body.cart) === null || _body$cart === void 0 ? void 0 : _body$cart.items.some(function (_ref8) {
              var properties = _ref8.properties;
              return properties === null || properties === void 0 ? void 0 : properties.shipping_interval_frequency;
            })) || ((_window = window) === null || _window === void 0 || (_window = _window.conversionBearUpsell) === null || _window === void 0 || (_window = _window.cart) === null || _window === void 0 ? void 0 : _window.items.some(function (_ref9) {
              var properties = _ref9.properties;
              return properties === null || properties === void 0 ? void 0 : properties.shipping_interval_frequency;
            }));
            return hasOfferWithSubscription || hasCartItemWithSubscription;
          };
          isRegularCheckoutOrder = function isRegularCheckoutOrder(body) {
            var _body$campaign;
            return (body === null || body === void 0 ? void 0 : body.campaign.page_to_show) == "product_page" && ["go_to_cart", "stay_on_page"].includes(body === null || body === void 0 || (_body$campaign = body.campaign) === null || _body$campaign === void 0 ? void 0 : _body$campaign.action_accept_offer);
          };
          getUpsellReplaceCartItemId = function getUpsellReplaceCartItemId(cart, trigger_products) {
            var _iterator2 = widget_createForOfIteratorHelper(trigger_products),
              _step2;
            try {
              var _loop = function _loop() {
                  var _step2$value = _step2.value,
                    id = _step2$value.id,
                    subscriptionDiscountProduct = _step2$value.subscriptionDiscountProduct;
                  var lineItem = cart.items.find(function (_ref10) {
                    var product_id = _ref10.product_id;
                    return String(id) === String(product_id) || subscriptionDiscountProduct && String(subscriptionDiscountProduct.id) === String(product_id);
                  });
                  if (lineItem) {
                    return {
                      v: lineItem.id
                    };
                  }
                },
                _ret;
              for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
                _ret = _loop();
                if (_ret) return _ret.v;
              }
            } catch (err) {
              _iterator2.e(err);
            } finally {
              _iterator2.f();
            }
          };
          createSubscriptionOrder = /*#__PURE__*/function () {
            var _ref11 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/widget_regeneratorRuntime().mark(function _callee2(searchOrderId, body) {
              var campaign, campaign_id, offers, offer_type, cart, _offerIndex, _offer2, variant_id, properties, _cartItemId;
              return widget_regeneratorRuntime().wrap(function _callee2$(_context2) {
                while (1) {
                  switch (_context2.prev = _context2.next) {
                    case 0:
                      campaign = body.campaign, campaign_id = body.campaign_id, offers = body.offers;
                      offer_type = campaign.offer_type;
                      cart = body.cart;
                      _offerIndex = 0;
                    case 4:
                      if (!(_offerIndex < offers.length)) {
                        _context2.next = 16;
                        break;
                      }
                      _offer2 = offers[_offerIndex];
                      variant_id = _offer2.variant_id, properties = _offer2.properties;
                      if (!(offer_type === "upsell")) {
                        _context2.next = 11;
                        break;
                      }
                      _cartItemId = getUpsellReplaceCartItemId(cart, campaign.trigger_products);
                      _context2.next = 11;
                      return fetch("/cart/update.js", {
                        method: "POST",
                        headers: {
                          "content-type": "application/json"
                        },
                        body: JSON.stringify({
                          updates: Object(defineProperty["a" /* default */])({}, _cartItemId, 0)
                        })
                      });
                    case 11:
                      _context2.next = 13;
                      return fetch("/cart/add.js", {
                        method: "POST",
                        headers: {
                          "content-type": "application/json"
                        },
                        body: JSON.stringify({
                          items: [{
                            quantity: 1,
                            id: variant_id,
                            properties: properties.reduce(function (acc, _ref12) {
                              var name = _ref12.name,
                                value = _ref12.value;
                              return Object.assign(acc, Object(defineProperty["a" /* default */])({}, name, value));
                            }, {
                              _honeycomb_campaign_id: campaign_id,
                              _honeycomb_order_id: searchOrderId,
                              _honeycomb_offer_index: _offerIndex
                            })
                          }]
                        })
                      });
                    case 13:
                      _offerIndex++;
                      _context2.next = 4;
                      break;
                    case 16:
                      _context2.next = 18;
                      return fetch("/cart.js");
                    case 18:
                      _context2.next = 20;
                      return _context2.sent.json();
                    case 20:
                      cart = _context2.sent;
                      return _context2.abrupt("return", fetch("".concat(widget_url, "default/subscription_order?shop=").concat(widget_shop, "&orderId=").concat(searchOrderId, "&currency=").concat(currency), {
                        method: "POST",
                        headers: {
                          "Content-Type": "application/json"
                        },
                        body: JSON.stringify({
                          offers: offers,
                          cart: cart,
                          campaign_id: campaign_id
                        })
                      }).then(function (resp) {
                        if (resp.status !== 200) {
                          throw new Error("Could not create order");
                        }
                        return resp.json();
                      }).then(function (_ref13) {
                        var rechargeDiscountCode = _ref13.rechargeDiscountCode;
                        localStorage.removeItem("tmpOrderId");
                        window.location = "https://checkout.rechargeapps.com/r/checkout?myshopify_domain=".concat(widget_shop, "&cart_token=").concat(cart.token, "&discount=").concat(rechargeDiscountCode);
                      })["catch"](console.error));
                    case 22:
                    case "end":
                      return _context2.stop();
                  }
                }
              }, _callee2);
            }));
            return function createSubscriptionOrder(_x3, _x4) {
              return _ref11.apply(this, arguments);
            };
          }();
          createRegularNonDraftOrder = /*#__PURE__*/function () {
            var _ref14 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/widget_regeneratorRuntime().mark(function _callee3(searchOrderId, body) {
              var campaign, campaign_id, offers, offer_type, cart, lineItems, _stopFlow, _document, _loop2, offerIndex;
              return widget_regeneratorRuntime().wrap(function _callee3$(_context4) {
                while (1) {
                  switch (_context4.prev = _context4.next) {
                    case 0:
                      campaign = body.campaign, campaign_id = body.campaign_id, offers = body.offers;
                      offer_type = campaign.offer_type;
                      cart = body.cart;
                      lineItems = [];
                      _context4.prev = 4;
                      if (!(widget_conversionBearUpsell && widget_conversionBearUpsell.customGoToCheckout && typeof widget_conversionBearUpsell.customGoToCheckout === "function")) {
                        _context4.next = 11;
                        break;
                      }
                      _stopFlow = widget_conversionBearUpsell.customGoToCheckout(widget_objectSpread({}, body));
                      if (!_stopFlow) {
                        _context4.next = 11;
                        break;
                      }
                      if (((_document = document) === null || _document === void 0 || (_document = _document.documentElement) === null || _document === void 0 || (_document = _document.style) === null || _document === void 0 ? void 0 : _document.overflow) === "hidden") {
                        document.documentElement.style.overflow = "auto";
                      }
                      console.log("custom go to checkout stopped add to cart flow");
                      return _context4.abrupt("return");
                    case 11:
                      _context4.next = 16;
                      break;
                    case 13:
                      _context4.prev = 13;
                      _context4.t0 = _context4["catch"](4);
                      console.log("1042 ~ createRegularNonDraftOrder ~ e", _context4.t0);
                    case 16:
                      _loop2 = /*#__PURE__*/widget_regeneratorRuntime().mark(function _loop2() {
                        var offer, variant_id, properties, product_title, quantity, _cartItemId2;
                        return widget_regeneratorRuntime().wrap(function _loop2$(_context3) {
                          while (1) {
                            switch (_context3.prev = _context3.next) {
                              case 0:
                                offer = offers[offerIndex];
                                variant_id = offer.variant_id, properties = offer.properties, product_title = offer.product_title, quantity = offer.quantity;
                                if (!(offer_type === "upsell")) {
                                  _context3.next = 6;
                                  break;
                                }
                                _cartItemId2 = getUpsellReplaceCartItemId(cart, campaign.trigger_products);
                                _context3.next = 6;
                                return fetch("/cart/update.js", {
                                  method: "POST",
                                  headers: {
                                    "content-type": "application/json"
                                  },
                                  body: JSON.stringify({
                                    updates: Object(defineProperty["a" /* default */])({}, _cartItemId2, 0)
                                  })
                                });
                              case 6:
                                _context3.next = 8;
                                return fetch("/cart/add.js", {
                                  method: "POST",
                                  headers: {
                                    "content-type": "application/json"
                                  },
                                  body: JSON.stringify({
                                    items: [{
                                      quantity: quantity,
                                      id: variant_id,
                                      properties: properties.reduce(function (acc, _ref15) {
                                        var name = _ref15.name,
                                          value = _ref15.value;
                                        return Object.assign(acc, Object(defineProperty["a" /* default */])({}, name, value));
                                      }, {
                                        _honeycomb_campaign_id: campaign_id,
                                        _honeycomb_order_id: searchOrderId,
                                        _honeycomb_offer_index: offerIndex
                                      })
                                    }]
                                  })
                                }).then(function (response) {
                                  return response.status === 200 ? response.json() : Promise.reject(new Error("Failed to add to cart"));
                                }).then(function (_ref16) {
                                  var items = _ref16.items;
                                  lineItems.push(Object.assign(items[0], {
                                    product_title: product_title,
                                    properties: properties
                                  }));
                                });
                              case 8:
                              case "end":
                                return _context3.stop();
                            }
                          }
                        }, _loop2);
                      });
                      offerIndex = 0;
                    case 18:
                      if (!(offerIndex < offers.length)) {
                        _context4.next = 23;
                        break;
                      }
                      return _context4.delegateYield(_loop2(), "t1", 20);
                    case 20:
                      offerIndex++;
                      _context4.next = 18;
                      break;
                    case 23:
                      _context4.next = 25;
                      return fetch("/cart.js");
                    case 25:
                      _context4.next = 27;
                      return _context4.sent.json();
                    case 27:
                      cart = _context4.sent;
                      return _context4.abrupt("return", fetch("".concat(widget_url, "default/checkout_order?shop=").concat(widget_shop, "&orderId=").concat(searchOrderId, "&currency=").concat(currency), {
                        method: "POST",
                        headers: {
                          "Content-Type": "application/json"
                        },
                        body: JSON.stringify({
                          offers: offers,
                          cart: cart,
                          campaign_id: campaign_id,
                          items: lineItems
                        })
                      }).then(function (resp) {
                        if (resp.status !== 200) {
                          throw new Error("Could not create order");
                        }
                        return resp.json();
                      }).then(function () {
                        if (campaign.action_accept_offer == "go_to_cart") {
                          window.location = "/cart";
                        } else if (campaign.action_accept_offer == "stay_on_page") {
                          console.log("stay on page and execute an update function / trigger an event");
                          widget_conversionBearUpsell.closeApp();
                          appEvent.trigger("conversionbearupsell:add_to_cart", {
                            campaign: campaign,
                            campaign_id: campaign_id,
                            offers: offers
                          });
                          activatedFunnels.pop();
                          return null;
                        }
                      })["catch"](console.error));
                    case 29:
                    case "end":
                      return _context4.stop();
                  }
                }
              }, _callee3, null, [[4, 13]]);
            }));
            return function createRegularNonDraftOrder(_x5, _x6) {
              return _ref14.apply(this, arguments);
            };
          }();
          widget_conversionBearUpsell.setCacheCampaign = setCacheCampaign;
          if (defaultSettings.isDemo) {
            _context9.next = 75;
            break;
          }
          if (!isGoogleSearchApp) {
            _context9.next = 33;
            break;
          }
          console.log("this is a GSA browser - shut down Honeycomb");
          return _context9.abrupt("return", null);
        case 33:
          if (!((window.location.pathname.indexOf("thank_you") > -1 || window.location.pathname.indexOf("orders") > -1) && Shopify.checkout && Shopify.checkout.order_id)) {
            _context9.next = 38;
            break;
          }
          widget_searchOrderId = Shopify.checkout.order_id;
          console.log("%c 🍯 Honeycomb by Conversion Bear: loaded post purchase", "background: #FBCE10; color: white");
          _context9.next = 75;
          break;
        case 38:
          _parsedUrl = new URL(window.location);
          if (!_parsedUrl.searchParams.has("cb_campaign")) {
            _context9.next = 45;
            break;
          }
          searchCampaignId = _parsedUrl.searchParams.get("cb_campaign");
          widget_isCustomTrigger = true;
          window.cbUpsellCustomDesignSettingsOverride = {
            minimized_view: {
              start_minimized: true
            }
          };
          _context9.next = 75;
          break;
        case 45:
          if (!(window && window.customHoneycombCampaignId)) {
            _context9.next = 50;
            break;
          }
          searchCampaignId = window.customHoneycombCampaignId;
          widget_isCustomTrigger = true;
          _context9.next = 75;
          break;
        case 50:
          if (!(window.location.pathname.indexOf("/blogs/") > -1)) {
            _context9.next = 56;
            break;
          }
          _tmp_arr = window.location.pathname.split("/");
          _index_blogs = _tmp_arr.indexOf("blogs");
          if (_index_blogs + 2 == _tmp_arr.length - 1 && _tmp_arr[_index_blogs + 2]) {
            isBlogPage = true;
          }
          _context9.next = 75;
          break;
        case 56:
          if (searchCampaignId) {
            _context9.next = 75;
            break;
          }
          _context9.next = 59;
          return setCacheSettings();
        case 59:
          if (!(!cacheSettings || !((_cacheSettings2 = cacheSettings) !== null && _cacheSettings2 !== void 0 && _cacheSettings2.has_active_pre_purchase_funnels))) {
            _context9.next = 61;
            break;
          }
          return _context9.abrupt("return");
        case 61:
          if (!(((_cacheSettings3 = cacheSettings) === null || _cacheSettings3 === void 0 ? void 0 : _cacheSettings3.overLimit) == true)) {
            _context9.next = 64;
            break;
          }
          console.log("%c 🍯 Honeycomb Upsell Funnels by Conversion Bear: Over limit", "background: #FBCE10; color: white");
          return _context9.abrupt("return", null);
        case 64:
          attachCustomFunnelTriggers();
          _shouldAttachClickListeners = !cacheSettings.overrideSettings || cacheSettings.overrideSettings && (typeof cacheSettings.overrideSettings.doNotAttachClickListeners === "undefined" || !cacheSettings.overrideSettings.doNotAttachClickListeners);
          if (_shouldAttachClickListeners) {
            addClickListeners();
          }
          _shouldAttachSubmitListeners = !cacheSettings.overrideSettings || cacheSettings.overrideSettings && (typeof cacheSettings.overrideSettings.doNotAttachSubmitListeners === "undefined" || !cacheSettings.overrideSettings.doNotAttachSubmitListeners); // special setting for themes that don't play well with the submit listeners
          if (_shouldAttachSubmitListeners) {
            addSubmitListener();
          }
          setCacheCampaign();
          if (cacheSettings.FT_use_cart_updates_ajax_listener) {
            lib_listenToCartAjaxUpdatesAndUpdateCampaignCache();
          } else if (window.location.pathname.indexOf("cart") > -1) {
            //TODO remove if no issues for new customers after 1.8.21
            // on cart page
            setInterval(function () {
              setCacheCampaign();
            }, 3000);
          }
          campaignStatus = "exists";
          console.log("%c 🍯 Honeycomb Upsell Funnels by Conversion Bear: ready", "background: #FBCE10; color: white");
          setTimeout(function () {
            widget_conversionBearUpsell.onLoaded();
          }, 50);
          return _context9.abrupt("return");
        case 75:
          widget_genWidget({
            campaign_id: searchCampaignId,
            isBlog: isBlogPage
          });
        case 76:
        case "end":
          return _context9.stop();
      }
    }
  }, _callee8);
}))();
function closeApp() {
  return widget_conversionBearUpsell.closeApp();
}
function show() {
  var campaign_id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "first";
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  return widget_genWidget(widget_objectSpread({
    campaign_id: searchCampaignId || campaign_id,
    isManuallyTriggeredFunnel: true,
    dontTriggerOnLoaded: true
  }, options));
}
function showCartPageWidget() {
  return showFunnel("isCart");
}
function showFunnel(type) {
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  if (activatedFunnels.indexOf(type) > -1) {
    // console.log('funnel already activated');
    return;
  }
  var whiteList = ["isCart", "isProduct", "isBlog"];
  if (whiteList.includes(type)) {
    activatedFunnels.push(type);
    return widget_genWidget(widget_objectSpread(Object(defineProperty["a" /* default */])({
      campaign_id: searchCampaignId
    }, type, true), options));
  } else {
    console.log("".concat(type, " type funnel doesn't exist!"));
    return false;
  }
}
var checkoutButton = document.querySelector("#checkout") || document.querySelector("[name='checkout']");
checkoutButton === null || checkoutButton === void 0 || (_checkoutButton$paren = checkoutButton.parentElement) === null || _checkoutButton$paren === void 0 || _checkoutButton$paren.addEventListener("click", function (e) {
  var _window5;
  if ((e.target.id === "checkout" || e.target.name === "checkout") && window.Zapiet && (_window5 = window) !== null && _window5 !== void 0 && (_window5 = _window5.Zapiet) !== null && _window5 !== void 0 && (_window5 = _window5.Widget) !== null && _window5 !== void 0 && _window5.checkoutEnabled()) {
    if (window.conversionBearUpsellDisabled) {
      console.log("cb: widget is disabled");
      return;
    }
    e.preventDefault();
    e.stopImmediatePropagation();
    e.stopPropagation();
    showFunnel("isCart");
  }
}, true);

// will execute when customers proceed to checkout.
// The function accepts the funnel data. You could access the funnel id with: data.campaign_id
// This way you can trigget functionality based on the funnel id
// --> return true to use the app default redirect flow after the funciton is executes
function setCustomGoToCheckout(customFunction) {
  widget_conversionBearUpsell.customGoToCheckout = customFunction;
}

// will execute when customers proceed to checkout
// The function accepts the funnel data as an input. You could access the funnel id with: data.campaign_id
function onAcceptOffer(customFunction) {
  widget_conversionBearUpsell.onAcceptOffer = customFunction;
}
// will execute when customers proceed to checkout
// The function accepts the funnel data as an input. You could access the funnel id with: data.campaign_id
function onProceedToCheckout(customFunction) {
  widget_conversionBearUpsell.onProceedToCheckout = customFunction;
}
function getCampaignStatus() {
  return campaignStatus;
}
// will execute when no funnel is returned from backend
function onProceedToCheckoutWithNoMatchingFunnel(customFunction) {
  widget_conversionBearUpsell.onProceedToCheckoutWithNoMatchingFunnel = customFunction;
}

//calls setCachCampaign - updates the pending campaign
function setCachedCampaign() {
  widget_conversionBearUpsell.setCacheCampaign();
}

//sets an additional discount code in cache
function setCachedAdditionalDiscountCode(code) {
  localStorage.setItem("cbUpsellAdditonalDiscountCode", code);
  setCookie("discount_code", code);
}

/***/ })
/******/ ]);