will be ignored') : invariant(false) : void 0;\n return _this;\n }\n\n var _proto = FastFieldInner.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(props) {\n if (this.props.shouldUpdate) {\n return this.props.shouldUpdate(props, this.props);\n } else if (props.name !== this.props.name || getIn(props.formik.values, this.props.name) !== getIn(this.props.formik.values, this.props.name) || getIn(props.formik.errors, this.props.name) !== getIn(this.props.formik.errors, this.props.name) || getIn(props.formik.touched, this.props.name) !== getIn(this.props.formik.touched, this.props.name) || Object.keys(this.props).length !== Object.keys(props).length || props.formik.isSubmitting !== this.props.formik.isSubmitting) {\n return true;\n } else {\n return false;\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n // Register the Field with the parent Formik. Parent will cycle through\n // registered Field's validate fns right prior to submit\n this.props.formik.registerField(this.props.name, {\n validate: this.props.validate\n });\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this.props.name !== prevProps.name) {\n this.props.formik.unregisterField(prevProps.name);\n this.props.formik.registerField(this.props.name, {\n validate: this.props.validate\n });\n }\n\n if (this.props.validate !== prevProps.validate) {\n this.props.formik.registerField(this.props.name, {\n validate: this.props.validate\n });\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.props.formik.unregisterField(this.props.name);\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n name = _this$props.name,\n render = _this$props.render,\n is = _this$props.as,\n children = _this$props.children,\n component = _this$props.component,\n formik = _this$props.formik,\n props = _objectWithoutPropertiesLoose(_this$props, [\"validate\", \"name\", \"render\", \"as\", \"children\", \"component\", \"shouldUpdate\", \"formik\"]);\n\n var restOfFormik = _objectWithoutPropertiesLoose(formik, [\"validate\", \"validationSchema\"]);\n\n var field = formik.getFieldProps(_extends({\n name: name\n }, props));\n var meta = {\n value: getIn(formik.values, name),\n error: getIn(formik.errors, name),\n touched: !!getIn(formik.touched, name),\n initialValue: getIn(formik.initialValues, name),\n initialTouched: !!getIn(formik.initialTouched, name),\n initialError: getIn(formik.initialErrors, name)\n };\n var bag = {\n field: field,\n meta: meta,\n form: restOfFormik\n };\n\n if (render) {\n return render(bag);\n }\n\n if (isFunction(children)) {\n return children(bag);\n }\n\n if (component) {\n // This behavior is backwards compat with earlier Formik 0.9 to 1.x\n if (typeof component === 'string') {\n var innerRef = props.innerRef,\n rest = _objectWithoutPropertiesLoose(props, [\"innerRef\"]);\n\n return /*#__PURE__*/createElement(component, _extends({\n ref: innerRef\n }, field, rest), children);\n } // We don't pass `meta` for backwards compat\n\n\n return /*#__PURE__*/createElement(component, _extends({\n field: field,\n form: formik\n }, props), children);\n } // default to input here so we can check for both `as` and `children` above\n\n\n var asElement = is || 'input';\n\n if (typeof asElement === 'string') {\n var _innerRef = props.innerRef,\n _rest = _objectWithoutPropertiesLoose(props, [\"innerRef\"]);\n\n return /*#__PURE__*/createElement(asElement, _extends({\n ref: _innerRef\n }, field, _rest), children);\n }\n\n return /*#__PURE__*/createElement(asElement, _extends({}, field, props), children);\n };\n\n return FastFieldInner;\n}(Component);\n\nvar FastField = /*#__PURE__*/connect(FastFieldInner);\nexport { ErrorMessage, FastField, Field, FieldArray, Form, Formik, FormikConsumer, FormikContext, FormikProvider, connect, getActiveElement, getIn, insert, isEmptyArray, isEmptyChildren, isFunction, isInputEvent, isInteger, isNaN$1 as isNaN, isObject, isPromise, isString, move, prepareDataForValidation, replace, setIn, setNestedObjectValues, swap, useField, useFormik, useFormikContext, validateYupSchema, withFormik, yupToFormErrors };","/* Web Font Loader v1.6.28 - (c) Adobe Systems, Google. License: Apache 2.0 */\n(function () {\n function aa(a, b, c) {\n return a.call.apply(a.bind, arguments);\n }\n\n function ba(a, b, c) {\n if (!a) throw Error();\n\n if (2 < arguments.length) {\n var d = Array.prototype.slice.call(arguments, 2);\n return function () {\n var c = Array.prototype.slice.call(arguments);\n Array.prototype.unshift.apply(c, d);\n return a.apply(b, c);\n };\n }\n\n return function () {\n return a.apply(b, arguments);\n };\n }\n\n function p(a, b, c) {\n p = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf(\"native code\") ? aa : ba;\n return p.apply(null, arguments);\n }\n\n var q = Date.now || function () {\n return +new Date();\n };\n\n function ca(a, b) {\n this.a = a;\n this.o = b || a;\n this.c = this.o.document;\n }\n\n var da = !!window.FontFace;\n\n function t(a, b, c, d) {\n b = a.c.createElement(b);\n if (c) for (var e in c) {\n c.hasOwnProperty(e) && (\"style\" == e ? b.style.cssText = c[e] : b.setAttribute(e, c[e]));\n }\n d && b.appendChild(a.c.createTextNode(d));\n return b;\n }\n\n function u(a, b, c) {\n a = a.c.getElementsByTagName(b)[0];\n a || (a = document.documentElement);\n a.insertBefore(c, a.lastChild);\n }\n\n function v(a) {\n a.parentNode && a.parentNode.removeChild(a);\n }\n\n function w(a, b, c) {\n b = b || [];\n c = c || [];\n\n for (var d = a.className.split(/\\s+/), e = 0; e < b.length; e += 1) {\n for (var f = !1, g = 0; g < d.length; g += 1) {\n if (b[e] === d[g]) {\n f = !0;\n break;\n }\n }\n\n f || d.push(b[e]);\n }\n\n b = [];\n\n for (e = 0; e < d.length; e += 1) {\n f = !1;\n\n for (g = 0; g < c.length; g += 1) {\n if (d[e] === c[g]) {\n f = !0;\n break;\n }\n }\n\n f || b.push(d[e]);\n }\n\n a.className = b.join(\" \").replace(/\\s+/g, \" \").replace(/^\\s+|\\s+$/, \"\");\n }\n\n function y(a, b) {\n for (var c = a.className.split(/\\s+/), d = 0, e = c.length; d < e; d++) {\n if (c[d] == b) return !0;\n }\n\n return !1;\n }\n\n function ea(a) {\n return a.o.location.hostname || a.a.location.hostname;\n }\n\n function z(a, b, c) {\n function d() {\n m && e && f && (m(g), m = null);\n }\n\n b = t(a, \"link\", {\n rel: \"stylesheet\",\n href: b,\n media: \"all\"\n });\n var e = !1,\n f = !0,\n g = null,\n m = c || null;\n da ? (b.onload = function () {\n e = !0;\n d();\n }, b.onerror = function () {\n e = !0;\n g = Error(\"Stylesheet failed to load\");\n d();\n }) : setTimeout(function () {\n e = !0;\n d();\n }, 0);\n u(a, \"head\", b);\n }\n\n function A(a, b, c, d) {\n var e = a.c.getElementsByTagName(\"head\")[0];\n\n if (e) {\n var f = t(a, \"script\", {\n src: b\n }),\n g = !1;\n\n f.onload = f.onreadystatechange = function () {\n g || this.readyState && \"loaded\" != this.readyState && \"complete\" != this.readyState || (g = !0, c && c(null), f.onload = f.onreadystatechange = null, \"HEAD\" == f.parentNode.tagName && e.removeChild(f));\n };\n\n e.appendChild(f);\n setTimeout(function () {\n g || (g = !0, c && c(Error(\"Script load timeout\")));\n }, d || 5E3);\n return f;\n }\n\n return null;\n }\n\n ;\n\n function B() {\n this.a = 0;\n this.c = null;\n }\n\n function C(a) {\n a.a++;\n return function () {\n a.a--;\n D(a);\n };\n }\n\n function E(a, b) {\n a.c = b;\n D(a);\n }\n\n function D(a) {\n 0 == a.a && a.c && (a.c(), a.c = null);\n }\n\n ;\n\n function F(a) {\n this.a = a || \"-\";\n }\n\n F.prototype.c = function (a) {\n for (var b = [], c = 0; c < arguments.length; c++) {\n b.push(arguments[c].replace(/[\\W_]+/g, \"\").toLowerCase());\n }\n\n return b.join(this.a);\n };\n\n function G(a, b) {\n this.c = a;\n this.f = 4;\n this.a = \"n\";\n var c = (b || \"n4\").match(/^([nio])([1-9])$/i);\n c && (this.a = c[1], this.f = parseInt(c[2], 10));\n }\n\n function fa(a) {\n return H(a) + \" \" + (a.f + \"00\") + \" 300px \" + I(a.c);\n }\n\n function I(a) {\n var b = [];\n a = a.split(/,\\s*/);\n\n for (var c = 0; c < a.length; c++) {\n var d = a[c].replace(/['\"]/g, \"\");\n -1 != d.indexOf(\" \") || /^\\d/.test(d) ? b.push(\"'\" + d + \"'\") : b.push(d);\n }\n\n return b.join(\",\");\n }\n\n function J(a) {\n return a.a + a.f;\n }\n\n function H(a) {\n var b = \"normal\";\n \"o\" === a.a ? b = \"oblique\" : \"i\" === a.a && (b = \"italic\");\n return b;\n }\n\n function ga(a) {\n var b = 4,\n c = \"n\",\n d = null;\n a && ((d = a.match(/(normal|oblique|italic)/i)) && d[1] && (c = d[1].substr(0, 1).toLowerCase()), (d = a.match(/([1-9]00|normal|bold)/i)) && d[1] && (/bold/i.test(d[1]) ? b = 7 : /[1-9]00/.test(d[1]) && (b = parseInt(d[1].substr(0, 1), 10))));\n return c + b;\n }\n\n ;\n\n function ha(a, b) {\n this.c = a;\n this.f = a.o.document.documentElement;\n this.h = b;\n this.a = new F(\"-\");\n this.j = !1 !== b.events;\n this.g = !1 !== b.classes;\n }\n\n function ia(a) {\n a.g && w(a.f, [a.a.c(\"wf\", \"loading\")]);\n K(a, \"loading\");\n }\n\n function L(a) {\n if (a.g) {\n var b = y(a.f, a.a.c(\"wf\", \"active\")),\n c = [],\n d = [a.a.c(\"wf\", \"loading\")];\n b || c.push(a.a.c(\"wf\", \"inactive\"));\n w(a.f, c, d);\n }\n\n K(a, \"inactive\");\n }\n\n function K(a, b, c) {\n if (a.j && a.h[b]) if (c) a.h[b](c.c, J(c));else a.h[b]();\n }\n\n ;\n\n function ja() {\n this.c = {};\n }\n\n function ka(a, b, c) {\n var d = [],\n e;\n\n for (e in b) {\n if (b.hasOwnProperty(e)) {\n var f = a.c[e];\n f && d.push(f(b[e], c));\n }\n }\n\n return d;\n }\n\n ;\n\n function M(a, b) {\n this.c = a;\n this.f = b;\n this.a = t(this.c, \"span\", {\n \"aria-hidden\": \"true\"\n }, this.f);\n }\n\n function N(a) {\n u(a.c, \"body\", a.a);\n }\n\n function O(a) {\n return \"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:\" + I(a.c) + \";\" + (\"font-style:\" + H(a) + \";font-weight:\" + (a.f + \"00\") + \";\");\n }\n\n ;\n\n function P(a, b, c, d, e, f) {\n this.g = a;\n this.j = b;\n this.a = d;\n this.c = c;\n this.f = e || 3E3;\n this.h = f || void 0;\n }\n\n P.prototype.start = function () {\n var a = this.c.o.document,\n b = this,\n c = q(),\n d = new Promise(function (d, e) {\n function f() {\n q() - c >= b.f ? e() : a.fonts.load(fa(b.a), b.h).then(function (a) {\n 1 <= a.length ? d() : setTimeout(f, 25);\n }, function () {\n e();\n });\n }\n\n f();\n }),\n e = null,\n f = new Promise(function (a, d) {\n e = setTimeout(d, b.f);\n });\n Promise.race([f, d]).then(function () {\n e && (clearTimeout(e), e = null);\n b.g(b.a);\n }, function () {\n b.j(b.a);\n });\n };\n\n function Q(a, b, c, d, e, f, g) {\n this.v = a;\n this.B = b;\n this.c = c;\n this.a = d;\n this.s = g || \"BESbswy\";\n this.f = {};\n this.w = e || 3E3;\n this.u = f || null;\n this.m = this.j = this.h = this.g = null;\n this.g = new M(this.c, this.s);\n this.h = new M(this.c, this.s);\n this.j = new M(this.c, this.s);\n this.m = new M(this.c, this.s);\n a = new G(this.a.c + \",serif\", J(this.a));\n a = O(a);\n this.g.a.style.cssText = a;\n a = new G(this.a.c + \",sans-serif\", J(this.a));\n a = O(a);\n this.h.a.style.cssText = a;\n a = new G(\"serif\", J(this.a));\n a = O(a);\n this.j.a.style.cssText = a;\n a = new G(\"sans-serif\", J(this.a));\n a = O(a);\n this.m.a.style.cssText = a;\n N(this.g);\n N(this.h);\n N(this.j);\n N(this.m);\n }\n\n var R = {\n D: \"serif\",\n C: \"sans-serif\"\n },\n S = null;\n\n function T() {\n if (null === S) {\n var a = /AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))/.exec(window.navigator.userAgent);\n S = !!a && (536 > parseInt(a[1], 10) || 536 === parseInt(a[1], 10) && 11 >= parseInt(a[2], 10));\n }\n\n return S;\n }\n\n Q.prototype.start = function () {\n this.f.serif = this.j.a.offsetWidth;\n this.f[\"sans-serif\"] = this.m.a.offsetWidth;\n this.A = q();\n U(this);\n };\n\n function la(a, b, c) {\n for (var d in R) {\n if (R.hasOwnProperty(d) && b === a.f[R[d]] && c === a.f[R[d]]) return !0;\n }\n\n return !1;\n }\n\n function U(a) {\n var b = a.g.a.offsetWidth,\n c = a.h.a.offsetWidth,\n d;\n (d = b === a.f.serif && c === a.f[\"sans-serif\"]) || (d = T() && la(a, b, c));\n d ? q() - a.A >= a.w ? T() && la(a, b, c) && (null === a.u || a.u.hasOwnProperty(a.a.c)) ? V(a, a.v) : V(a, a.B) : ma(a) : V(a, a.v);\n }\n\n function ma(a) {\n setTimeout(p(function () {\n U(this);\n }, a), 50);\n }\n\n function V(a, b) {\n setTimeout(p(function () {\n v(this.g.a);\n v(this.h.a);\n v(this.j.a);\n v(this.m.a);\n b(this.a);\n }, a), 0);\n }\n\n ;\n\n function W(a, b, c) {\n this.c = a;\n this.a = b;\n this.f = 0;\n this.m = this.j = !1;\n this.s = c;\n }\n\n var X = null;\n\n W.prototype.g = function (a) {\n var b = this.a;\n b.g && w(b.f, [b.a.c(\"wf\", a.c, J(a).toString(), \"active\")], [b.a.c(\"wf\", a.c, J(a).toString(), \"loading\"), b.a.c(\"wf\", a.c, J(a).toString(), \"inactive\")]);\n K(b, \"fontactive\", a);\n this.m = !0;\n na(this);\n };\n\n W.prototype.h = function (a) {\n var b = this.a;\n\n if (b.g) {\n var c = y(b.f, b.a.c(\"wf\", a.c, J(a).toString(), \"active\")),\n d = [],\n e = [b.a.c(\"wf\", a.c, J(a).toString(), \"loading\")];\n c || d.push(b.a.c(\"wf\", a.c, J(a).toString(), \"inactive\"));\n w(b.f, d, e);\n }\n\n K(b, \"fontinactive\", a);\n na(this);\n };\n\n function na(a) {\n 0 == --a.f && a.j && (a.m ? (a = a.a, a.g && w(a.f, [a.a.c(\"wf\", \"active\")], [a.a.c(\"wf\", \"loading\"), a.a.c(\"wf\", \"inactive\")]), K(a, \"active\")) : L(a.a));\n }\n\n ;\n\n function oa(a) {\n this.j = a;\n this.a = new ja();\n this.h = 0;\n this.f = this.g = !0;\n }\n\n oa.prototype.load = function (a) {\n this.c = new ca(this.j, a.context || this.j);\n this.g = !1 !== a.events;\n this.f = !1 !== a.classes;\n pa(this, new ha(this.c, a), a);\n };\n\n function qa(a, b, c, d, e) {\n var f = 0 == --a.h;\n (a.f || a.g) && setTimeout(function () {\n var a = e || null,\n m = d || null || {};\n if (0 === c.length && f) L(b.a);else {\n b.f += c.length;\n f && (b.j = f);\n var h,\n l = [];\n\n for (h = 0; h < c.length; h++) {\n var k = c[h],\n n = m[k.c],\n r = b.a,\n x = k;\n r.g && w(r.f, [r.a.c(\"wf\", x.c, J(x).toString(), \"loading\")]);\n K(r, \"fontloading\", x);\n r = null;\n if (null === X) if (window.FontFace) {\n var x = /Gecko.*Firefox\\/(\\d+)/.exec(window.navigator.userAgent),\n xa = /OS X.*Version\\/10\\..*Safari/.exec(window.navigator.userAgent) && /Apple/.exec(window.navigator.vendor);\n X = x ? 42 < parseInt(x[1], 10) : xa ? !1 : !0;\n } else X = !1;\n X ? r = new P(p(b.g, b), p(b.h, b), b.c, k, b.s, n) : r = new Q(p(b.g, b), p(b.h, b), b.c, k, b.s, a, n);\n l.push(r);\n }\n\n for (h = 0; h < l.length; h++) {\n l[h].start();\n }\n }\n }, 0);\n }\n\n function pa(a, b, c) {\n var d = [],\n e = c.timeout;\n ia(b);\n var d = ka(a.a, c, a.c),\n f = new W(a.c, b, e);\n a.h = d.length;\n b = 0;\n\n for (c = d.length; b < c; b++) {\n d[b].load(function (b, d, c) {\n qa(a, f, b, d, c);\n });\n }\n }\n\n ;\n\n function ra(a, b) {\n this.c = a;\n this.a = b;\n }\n\n ra.prototype.load = function (a) {\n function b() {\n if (f[\"__mti_fntLst\" + d]) {\n var c = f[\"__mti_fntLst\" + d](),\n e = [],\n h;\n if (c) for (var l = 0; l < c.length; l++) {\n var k = c[l].fontfamily;\n void 0 != c[l].fontStyle && void 0 != c[l].fontWeight ? (h = c[l].fontStyle + c[l].fontWeight, e.push(new G(k, h))) : e.push(new G(k));\n }\n a(e);\n } else setTimeout(function () {\n b();\n }, 50);\n }\n\n var c = this,\n d = c.a.projectId,\n e = c.a.version;\n\n if (d) {\n var f = c.c.o;\n A(this.c, (c.a.api || \"https://fast.fonts.net/jsapi\") + \"/\" + d + \".js\" + (e ? \"?v=\" + e : \"\"), function (e) {\n e ? a([]) : (f[\"__MonotypeConfiguration__\" + d] = function () {\n return c.a;\n }, b());\n }).id = \"__MonotypeAPIScript__\" + d;\n } else a([]);\n };\n\n function sa(a, b) {\n this.c = a;\n this.a = b;\n }\n\n sa.prototype.load = function (a) {\n var b,\n c,\n d = this.a.urls || [],\n e = this.a.families || [],\n f = this.a.testStrings || {},\n g = new B();\n b = 0;\n\n for (c = d.length; b < c; b++) {\n z(this.c, d[b], C(g));\n }\n\n var m = [];\n b = 0;\n\n for (c = e.length; b < c; b++) {\n if (d = e[b].split(\":\"), d[1]) for (var h = d[1].split(\",\"), l = 0; l < h.length; l += 1) {\n m.push(new G(d[0], h[l]));\n } else m.push(new G(d[0]));\n }\n\n E(g, function () {\n a(m, f);\n });\n };\n\n function ta(a, b) {\n a ? this.c = a : this.c = ua;\n this.a = [];\n this.f = [];\n this.g = b || \"\";\n }\n\n var ua = \"https://fonts.googleapis.com/css\";\n\n function va(a, b) {\n for (var c = b.length, d = 0; d < c; d++) {\n var e = b[d].split(\":\");\n 3 == e.length && a.f.push(e.pop());\n var f = \"\";\n 2 == e.length && \"\" != e[1] && (f = \":\");\n a.a.push(e.join(f));\n }\n }\n\n function wa(a) {\n if (0 == a.a.length) throw Error(\"No fonts to load!\");\n if (-1 != a.c.indexOf(\"kit=\")) return a.c;\n\n for (var b = a.a.length, c = [], d = 0; d < b; d++) {\n c.push(a.a[d].replace(/ /g, \"+\"));\n }\n\n b = a.c + \"?family=\" + c.join(\"%7C\");\n 0 < a.f.length && (b += \"&subset=\" + a.f.join(\",\"));\n 0 < a.g.length && (b += \"&text=\" + encodeURIComponent(a.g));\n return b;\n }\n\n ;\n\n function ya(a) {\n this.f = a;\n this.a = [];\n this.c = {};\n }\n\n var za = {\n latin: \"BESbswy\",\n \"latin-ext\": \"\\xE7\\xF6\\xFC\\u011F\\u015F\",\n cyrillic: \"\\u0439\\u044F\\u0416\",\n greek: \"\\u03B1\\u03B2\\u03A3\",\n khmer: \"\\u1780\\u1781\\u1782\",\n Hanuman: \"\\u1780\\u1781\\u1782\"\n },\n Aa = {\n thin: \"1\",\n extralight: \"2\",\n \"extra-light\": \"2\",\n ultralight: \"2\",\n \"ultra-light\": \"2\",\n light: \"3\",\n regular: \"4\",\n book: \"4\",\n medium: \"5\",\n \"semi-bold\": \"6\",\n semibold: \"6\",\n \"demi-bold\": \"6\",\n demibold: \"6\",\n bold: \"7\",\n \"extra-bold\": \"8\",\n extrabold: \"8\",\n \"ultra-bold\": \"8\",\n ultrabold: \"8\",\n black: \"9\",\n heavy: \"9\",\n l: \"3\",\n r: \"4\",\n b: \"7\"\n },\n Ba = {\n i: \"i\",\n italic: \"i\",\n n: \"n\",\n normal: \"n\"\n },\n Ca = /^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;\n\n function Da(a) {\n for (var b = a.f.length, c = 0; c < b; c++) {\n var d = a.f[c].split(\":\"),\n e = d[0].replace(/\\+/g, \" \"),\n f = [\"n4\"];\n\n if (2 <= d.length) {\n var g;\n var m = d[1];\n g = [];\n if (m) for (var m = m.split(\",\"), h = m.length, l = 0; l < h; l++) {\n var k;\n k = m[l];\n\n if (k.match(/^[\\w-]+$/)) {\n var n = Ca.exec(k.toLowerCase());\n if (null == n) k = \"\";else {\n k = n[2];\n k = null == k || \"\" == k ? \"n\" : Ba[k];\n n = n[1];\n if (null == n || \"\" == n) n = \"4\";else var r = Aa[n],\n n = r ? r : isNaN(n) ? \"4\" : n.substr(0, 1);\n k = [k, n].join(\"\");\n }\n } else k = \"\";\n\n k && g.push(k);\n }\n 0 < g.length && (f = g);\n 3 == d.length && (d = d[2], g = [], d = d ? d.split(\",\") : g, 0 < d.length && (d = za[d[0]]) && (a.c[e] = d));\n }\n\n a.c[e] || (d = za[e]) && (a.c[e] = d);\n\n for (d = 0; d < f.length; d += 1) {\n a.a.push(new G(e, f[d]));\n }\n }\n }\n\n ;\n\n function Ea(a, b) {\n this.c = a;\n this.a = b;\n }\n\n var Fa = {\n Arimo: !0,\n Cousine: !0,\n Tinos: !0\n };\n\n Ea.prototype.load = function (a) {\n var b = new B(),\n c = this.c,\n d = new ta(this.a.api, this.a.text),\n e = this.a.families;\n va(d, e);\n var f = new ya(e);\n Da(f);\n z(c, wa(d), C(b));\n E(b, function () {\n a(f.a, f.c, Fa);\n });\n };\n\n function Ga(a, b) {\n this.c = a;\n this.a = b;\n }\n\n Ga.prototype.load = function (a) {\n var b = this.a.id,\n c = this.c.o;\n b ? A(this.c, (this.a.api || \"https://use.typekit.net\") + \"/\" + b + \".js\", function (b) {\n if (b) a([]);else if (c.Typekit && c.Typekit.config && c.Typekit.config.fn) {\n b = c.Typekit.config.fn;\n\n for (var e = [], f = 0; f < b.length; f += 2) {\n for (var g = b[f], m = b[f + 1], h = 0; h < m.length; h++) {\n e.push(new G(g, m[h]));\n }\n }\n\n try {\n c.Typekit.load({\n events: !1,\n classes: !1,\n async: !0\n });\n } catch (l) {}\n\n a(e);\n }\n }, 2E3) : a([]);\n };\n\n function Ha(a, b) {\n this.c = a;\n this.f = b;\n this.a = [];\n }\n\n Ha.prototype.load = function (a) {\n var b = this.f.id,\n c = this.c.o,\n d = this;\n b ? (c.__webfontfontdeckmodule__ || (c.__webfontfontdeckmodule__ = {}), c.__webfontfontdeckmodule__[b] = function (b, c) {\n for (var g = 0, m = c.fonts.length; g < m; ++g) {\n var h = c.fonts[g];\n d.a.push(new G(h.name, ga(\"font-weight:\" + h.weight + \";font-style:\" + h.style)));\n }\n\n a(d.a);\n }, A(this.c, (this.f.api || \"https://f.fontdeck.com/s/css/js/\") + ea(this.c) + \"/\" + b + \".js\", function (b) {\n b && a([]);\n })) : a([]);\n };\n\n var Y = new oa(window);\n\n Y.a.c.custom = function (a, b) {\n return new sa(b, a);\n };\n\n Y.a.c.fontdeck = function (a, b) {\n return new Ha(b, a);\n };\n\n Y.a.c.monotype = function (a, b) {\n return new ra(b, a);\n };\n\n Y.a.c.typekit = function (a, b) {\n return new Ga(b, a);\n };\n\n Y.a.c.google = function (a, b) {\n return new Ea(b, a);\n };\n\n var Z = {\n load: p(Y.load, Y)\n };\n \"function\" === typeof define && define.amd ? define(function () {\n return Z;\n }) : \"undefined\" !== typeof module && module.exports ? module.exports = Z : (window.WebFont = Z, window.WebFontConfig && Y.load(window.WebFontConfig));\n})();","var _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n\nvar _dispatchable = /*#__PURE__*/require(\"./internal/_dispatchable\");\n\nvar _xfind = /*#__PURE__*/require(\"./internal/_xfind\");\n/**\n * Returns the first element of the list which matches the predicate, or\n * `undefined` if no element matches.\n *\n * Dispatches to the `find` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> a | undefined\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Object} The element found, or `undefined`.\n * @see R.transduce\n * @example\n *\n * const xs = [{a: 1}, {a: 2}, {a: 3}];\n * R.find(R.propEq('a', 2))(xs); //=> {a: 2}\n * R.find(R.propEq('a', 4))(xs); //=> undefined\n */\n\n\nvar find = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['find'], _xfind, function find(fn, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (fn(list[idx])) {\n return list[idx];\n }\n\n idx += 1;\n }\n}));\n\nmodule.exports = find;","// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/es.promise.constructor');\nrequire('../modules/es.promise.all');\nrequire('../modules/es.promise.catch');\nrequire('../modules/es.promise.race');\nrequire('../modules/es.promise.reject');\nrequire('../modules/es.promise.resolve');\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var _arity = /*#__PURE__*/require(\"./internal/_arity\");\n\nvar _curry1 = /*#__PURE__*/require(\"./internal/_curry1\");\n\nvar map = /*#__PURE__*/require(\"./map\");\n\nvar max = /*#__PURE__*/require(\"./max\");\n\nvar reduce = /*#__PURE__*/require(\"./reduce\");\n/**\n * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic.\n * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments\n * to `fn` are applied to each of the predicates in turn until one returns a\n * \"truthy\" value, at which point `fn` returns the result of applying its\n * arguments to the corresponding transformer. If none of the predicates\n * matches, `fn` returns undefined.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Logic\n * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *)\n * @param {Array} pairs A list of [predicate, transformer]\n * @return {Function}\n * @see R.ifElse, R.unless, R.when\n * @example\n *\n * const fn = R.cond([\n * [R.equals(0), R.always('water freezes at 0°C')],\n * [R.equals(100), R.always('water boils at 100°C')],\n * [R.T, temp => 'nothing special happens at ' + temp + '°C']\n * ]);\n * fn(0); //=> 'water freezes at 0°C'\n * fn(50); //=> 'nothing special happens at 50°C'\n * fn(100); //=> 'water boils at 100°C'\n */\n\n\nvar cond = /*#__PURE__*/_curry1(function cond(pairs) {\n var arity = reduce(max, 0, map(function (pair) {\n return pair[0].length;\n }, pairs));\n return _arity(arity, function () {\n var idx = 0;\n\n while (idx < pairs.length) {\n if (pairs[idx][0].apply(this, arguments)) {\n return pairs[idx][1].apply(this, arguments);\n }\n\n idx += 1;\n }\n });\n});\n\nmodule.exports = cond;","var _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n\nvar path = /*#__PURE__*/require(\"./path\");\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig Idx -> {s: a} -> a | Undefined\n * @param {String|Number} p The property name or array index\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path, R.nth\n * @example\n *\n * R.prop('x', {x: 100}); //=> 100\n * R.prop('x', {}); //=> undefined\n * R.prop(0, [100]); //=> 100\n * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4\n */\n\n\nvar prop = /*#__PURE__*/_curry2(function prop(p, obj) {\n return path([p], obj);\n});\n\nmodule.exports = prop;","/**\n * A function that always returns `true`. Any passed in parameters are ignored.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Function\n * @sig * -> Boolean\n * @param {*}\n * @return {Boolean}\n * @see R.F\n * @example\n *\n * R.T(); //=> true\n */\nvar T = function T() {\n return true;\n};\n\nmodule.exports = T;","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _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 } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _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); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { Slice, Fragment, Mark, Node } from 'prosemirror-model';\nimport { ReplaceStep, ReplaceAroundStep, Transform } from 'prosemirror-transform';\nvar classesById = Object.create(null);\n/**\nSuperclass for editor selections. Every selection type should\nextend this. Should not be instantiated directly.\n*/\n\nvar Selection = /*#__PURE__*/function () {\n /**\n Initialize a selection with the head and anchor and ranges. If no\n ranges are given, constructs a single range across `$anchor` and\n `$head`.\n */\n function Selection(\n /**\n The resolved anchor of the selection (the side that stays in\n place when the selection is modified).\n */\n $anchor,\n /**\n The resolved head of the selection (the side that moves when\n the selection is modified).\n */\n $head, ranges) {\n _classCallCheck(this, Selection);\n\n this.$anchor = $anchor;\n this.$head = $head;\n this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))];\n }\n /**\n The selection's anchor, as an unresolved position.\n */\n\n\n _createClass(Selection, [{\n key: \"anchor\",\n get: function get() {\n return this.$anchor.pos;\n }\n /**\n The selection's head.\n */\n\n }, {\n key: \"head\",\n get: function get() {\n return this.$head.pos;\n }\n /**\n The lower bound of the selection's main range.\n */\n\n }, {\n key: \"from\",\n get: function get() {\n return this.$from.pos;\n }\n /**\n The upper bound of the selection's main range.\n */\n\n }, {\n key: \"to\",\n get: function get() {\n return this.$to.pos;\n }\n /**\n The resolved lower bound of the selection's main range.\n */\n\n }, {\n key: \"$from\",\n get: function get() {\n return this.ranges[0].$from;\n }\n /**\n The resolved upper bound of the selection's main range.\n */\n\n }, {\n key: \"$to\",\n get: function get() {\n return this.ranges[0].$to;\n }\n /**\n Indicates whether the selection contains any content.\n */\n\n }, {\n key: \"empty\",\n get: function get() {\n var ranges = this.ranges;\n\n for (var i = 0; i < ranges.length; i++) {\n if (ranges[i].$from.pos != ranges[i].$to.pos) return false;\n }\n\n return true;\n }\n /**\n Get the content of this selection as a slice.\n */\n\n }, {\n key: \"content\",\n value: function content() {\n return this.$from.doc.slice(this.from, this.to, true);\n }\n /**\n Replace the selection with a slice or, if no slice is given,\n delete the selection. Will append to the given transaction.\n */\n\n }, {\n key: \"replace\",\n value: function replace(tr) {\n var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Slice.empty;\n // Put the new selection at the position after the inserted\n // content. When that ended in an inline node, search backwards,\n // to get the position after that node. If not, search forward.\n var lastNode = content.content.lastChild,\n lastParent = null;\n\n for (var i = 0; i < content.openEnd; i++) {\n lastParent = lastNode;\n lastNode = lastNode.lastChild;\n }\n\n var mapFrom = tr.steps.length,\n ranges = this.ranges;\n\n for (var _i = 0; _i < ranges.length; _i++) {\n var _ranges$_i = ranges[_i],\n $from = _ranges$_i.$from,\n $to = _ranges$_i.$to,\n mapping = tr.mapping.slice(mapFrom);\n tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), _i ? Slice.empty : content);\n if (_i == 0) selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1);\n }\n }\n /**\n Replace the selection with the given node, appending the changes\n to the given transaction.\n */\n\n }, {\n key: \"replaceWith\",\n value: function replaceWith(tr, node) {\n var mapFrom = tr.steps.length,\n ranges = this.ranges;\n\n for (var i = 0; i < ranges.length; i++) {\n var _ranges$i = ranges[i],\n $from = _ranges$i.$from,\n $to = _ranges$i.$to,\n mapping = tr.mapping.slice(mapFrom);\n var from = mapping.map($from.pos),\n to = mapping.map($to.pos);\n\n if (i) {\n tr.deleteRange(from, to);\n } else {\n tr.replaceRangeWith(from, to, node);\n selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1);\n }\n }\n }\n /**\n Find a valid cursor or leaf node selection starting at the given\n position and searching back if `dir` is negative, and forward if\n positive. When `textOnly` is true, only consider cursor\n selections. Will return null when no valid selection position is\n found.\n */\n\n }, {\n key: \"getBookmark\",\n value:\n /**\n Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,\n which is a value that can be mapped without having access to a\n current document, and later resolved to a real selection for a\n given document again. (This is used mostly by the history to\n track and restore old selections.) The default implementation of\n this method just converts the selection to a text selection and\n returns the bookmark for that.\n */\n function getBookmark() {\n return TextSelection.between(this.$anchor, this.$head).getBookmark();\n }\n }], [{\n key: \"findFrom\",\n value: function findFrom($pos, dir) {\n var textOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var inner = $pos.parent.inlineContent ? new TextSelection($pos) : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly);\n if (inner) return inner;\n\n for (var depth = $pos.depth - 1; depth >= 0; depth--) {\n var found = dir < 0 ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly) : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly);\n if (found) return found;\n }\n\n return null;\n }\n /**\n Find a valid cursor or leaf node selection near the given\n position. Searches forward first by default, but if `bias` is\n negative, it will search backwards first.\n */\n\n }, {\n key: \"near\",\n value: function near($pos) {\n var bias = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0));\n }\n /**\n Find the cursor or leaf node selection closest to the start of\n the given document. Will return an\n [`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position\n exists.\n */\n\n }, {\n key: \"atStart\",\n value: function atStart(doc) {\n return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc);\n }\n /**\n Find the cursor or leaf node selection closest to the end of the\n given document.\n */\n\n }, {\n key: \"atEnd\",\n value: function atEnd(doc) {\n return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc);\n }\n /**\n Deserialize the JSON representation of a selection. Must be\n implemented for custom classes (as a static class method).\n */\n\n }, {\n key: \"fromJSON\",\n value: function fromJSON(doc, json) {\n if (!json || !json.type) throw new RangeError(\"Invalid input for Selection.fromJSON\");\n var cls = classesById[json.type];\n if (!cls) throw new RangeError(\"No selection type \".concat(json.type, \" defined\"));\n return cls.fromJSON(doc, json);\n }\n /**\n To be able to deserialize selections from JSON, custom selection\n classes must register themselves with an ID string, so that they\n can be disambiguated. Try to pick something that's unlikely to\n clash with classes from other modules.\n */\n\n }, {\n key: \"jsonID\",\n value: function jsonID(id, selectionClass) {\n if (id in classesById) throw new RangeError(\"Duplicate use of selection JSON ID \" + id);\n classesById[id] = selectionClass;\n selectionClass.prototype.jsonID = id;\n return selectionClass;\n }\n }]);\n\n return Selection;\n}();\n\nSelection.prototype.visible = true;\n/**\nRepresents a selected range in a document.\n*/\n\nvar SelectionRange = /*#__PURE__*/_createClass(\n/**\nCreate a range.\n*/\nfunction SelectionRange(\n/**\nThe lower bound of the range.\n*/\n$from,\n/**\nThe upper bound of the range.\n*/\n$to) {\n _classCallCheck(this, SelectionRange);\n\n this.$from = $from;\n this.$to = $to;\n});\n\nvar warnedAboutTextSelection = false;\n\nfunction checkTextSelection($pos) {\n if (!warnedAboutTextSelection && !$pos.parent.inlineContent) {\n warnedAboutTextSelection = true;\n console[\"warn\"](\"TextSelection endpoint not pointing into a node with inline content (\" + $pos.parent.type.name + \")\");\n }\n}\n/**\nA text selection represents a classical editor selection, with a\nhead (the moving side) and anchor (immobile side), both of which\npoint into textblock nodes. It can be empty (a regular cursor\nposition).\n*/\n\n\nvar TextSelection = /*#__PURE__*/function (_Selection) {\n _inherits(TextSelection, _Selection);\n\n var _super = _createSuper(TextSelection);\n\n /**\n Construct a text selection between the given points.\n */\n function TextSelection($anchor) {\n var $head = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $anchor;\n\n _classCallCheck(this, TextSelection);\n\n checkTextSelection($anchor);\n checkTextSelection($head);\n return _super.call(this, $anchor, $head);\n }\n /**\n Returns a resolved position if this is a cursor selection (an\n empty text selection), and null otherwise.\n */\n\n\n _createClass(TextSelection, [{\n key: \"$cursor\",\n get: function get() {\n return this.$anchor.pos == this.$head.pos ? this.$head : null;\n }\n }, {\n key: \"map\",\n value: function map(doc, mapping) {\n var $head = doc.resolve(mapping.map(this.head));\n if (!$head.parent.inlineContent) return Selection.near($head);\n var $anchor = doc.resolve(mapping.map(this.anchor));\n return new TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head);\n }\n }, {\n key: \"replace\",\n value: function replace(tr) {\n var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Slice.empty;\n\n _get(_getPrototypeOf(TextSelection.prototype), \"replace\", this).call(this, tr, content);\n\n if (content == Slice.empty) {\n var marks = this.$from.marksAcross(this.$to);\n if (marks) tr.ensureMarks(marks);\n }\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return other instanceof TextSelection && other.anchor == this.anchor && other.head == this.head;\n }\n }, {\n key: \"getBookmark\",\n value: function getBookmark() {\n return new TextBookmark(this.anchor, this.head);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n type: \"text\",\n anchor: this.anchor,\n head: this.head\n };\n }\n /**\n @internal\n */\n\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(doc, json) {\n if (typeof json.anchor != \"number\" || typeof json.head != \"number\") throw new RangeError(\"Invalid input for TextSelection.fromJSON\");\n return new TextSelection(doc.resolve(json.anchor), doc.resolve(json.head));\n }\n /**\n Create a text selection from non-resolved positions.\n */\n\n }, {\n key: \"create\",\n value: function create(doc, anchor) {\n var head = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : anchor;\n var $anchor = doc.resolve(anchor);\n return new this($anchor, head == anchor ? $anchor : doc.resolve(head));\n }\n /**\n Return a text selection that spans the given positions or, if\n they aren't text positions, find a text selection near them.\n `bias` determines whether the method searches forward (default)\n or backwards (negative number) first. Will fall back to calling\n [`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document\n doesn't contain a valid text position.\n */\n\n }, {\n key: \"between\",\n value: function between($anchor, $head, bias) {\n var dPos = $anchor.pos - $head.pos;\n if (!bias || dPos) bias = dPos >= 0 ? 1 : -1;\n\n if (!$head.parent.inlineContent) {\n var found = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true);\n if (found) $head = found.$head;else return Selection.near($head, bias);\n }\n\n if (!$anchor.parent.inlineContent) {\n if (dPos == 0) {\n $anchor = $head;\n } else {\n $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor;\n if ($anchor.pos < $head.pos != dPos < 0) $anchor = $head;\n }\n }\n\n return new TextSelection($anchor, $head);\n }\n }]);\n\n return TextSelection;\n}(Selection);\n\nSelection.jsonID(\"text\", TextSelection);\n\nvar TextBookmark = /*#__PURE__*/function () {\n function TextBookmark(anchor, head) {\n _classCallCheck(this, TextBookmark);\n\n this.anchor = anchor;\n this.head = head;\n }\n\n _createClass(TextBookmark, [{\n key: \"map\",\n value: function map(mapping) {\n return new TextBookmark(mapping.map(this.anchor), mapping.map(this.head));\n }\n }, {\n key: \"resolve\",\n value: function resolve(doc) {\n return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head));\n }\n }]);\n\n return TextBookmark;\n}();\n/**\nA node selection is a selection that points at a single node. All\nnodes marked [selectable](https://prosemirror.net/docs/ref/#model.NodeSpec.selectable) can be the\ntarget of a node selection. In such a selection, `from` and `to`\npoint directly before and after the selected node, `anchor` equals\n`from`, and `head` equals `to`..\n*/\n\n\nvar NodeSelection = /*#__PURE__*/function (_Selection2) {\n _inherits(NodeSelection, _Selection2);\n\n var _super2 = _createSuper(NodeSelection);\n\n /**\n Create a node selection. Does not verify the validity of its\n argument.\n */\n function NodeSelection($pos) {\n var _this;\n\n _classCallCheck(this, NodeSelection);\n\n var node = $pos.nodeAfter;\n var $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n _this = _super2.call(this, $pos, $end);\n _this.node = node;\n return _this;\n }\n\n _createClass(NodeSelection, [{\n key: \"map\",\n value: function map(doc, mapping) {\n var _mapping$mapResult = mapping.mapResult(this.anchor),\n deleted = _mapping$mapResult.deleted,\n pos = _mapping$mapResult.pos;\n\n var $pos = doc.resolve(pos);\n if (deleted) return Selection.near($pos);\n return new NodeSelection($pos);\n }\n }, {\n key: \"content\",\n value: function content() {\n return new Slice(Fragment.from(this.node), 0, 0);\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return other instanceof NodeSelection && other.anchor == this.anchor;\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n type: \"node\",\n anchor: this.anchor\n };\n }\n }, {\n key: \"getBookmark\",\n value: function getBookmark() {\n return new NodeBookmark(this.anchor);\n }\n /**\n @internal\n */\n\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(doc, json) {\n if (typeof json.anchor != \"number\") throw new RangeError(\"Invalid input for NodeSelection.fromJSON\");\n return new NodeSelection(doc.resolve(json.anchor));\n }\n /**\n Create a node selection from non-resolved positions.\n */\n\n }, {\n key: \"create\",\n value: function create(doc, from) {\n return new NodeSelection(doc.resolve(from));\n }\n /**\n Determines whether the given node may be selected as a node\n selection.\n */\n\n }, {\n key: \"isSelectable\",\n value: function isSelectable(node) {\n return !node.isText && node.type.spec.selectable !== false;\n }\n }]);\n\n return NodeSelection;\n}(Selection);\n\nNodeSelection.prototype.visible = false;\nSelection.jsonID(\"node\", NodeSelection);\n\nvar NodeBookmark = /*#__PURE__*/function () {\n function NodeBookmark(anchor) {\n _classCallCheck(this, NodeBookmark);\n\n this.anchor = anchor;\n }\n\n _createClass(NodeBookmark, [{\n key: \"map\",\n value: function map(mapping) {\n var _mapping$mapResult2 = mapping.mapResult(this.anchor),\n deleted = _mapping$mapResult2.deleted,\n pos = _mapping$mapResult2.pos;\n\n return deleted ? new TextBookmark(pos, pos) : new NodeBookmark(pos);\n }\n }, {\n key: \"resolve\",\n value: function resolve(doc) {\n var $pos = doc.resolve(this.anchor),\n node = $pos.nodeAfter;\n if (node && NodeSelection.isSelectable(node)) return new NodeSelection($pos);\n return Selection.near($pos);\n }\n }]);\n\n return NodeBookmark;\n}();\n/**\nA selection type that represents selecting the whole document\n(which can not necessarily be expressed with a text selection, when\nthere are for example leaf block nodes at the start or end of the\ndocument).\n*/\n\n\nvar AllSelection = /*#__PURE__*/function (_Selection3) {\n _inherits(AllSelection, _Selection3);\n\n var _super3 = _createSuper(AllSelection);\n\n /**\n Create an all-selection over the given document.\n */\n function AllSelection(doc) {\n _classCallCheck(this, AllSelection);\n\n return _super3.call(this, doc.resolve(0), doc.resolve(doc.content.size));\n }\n\n _createClass(AllSelection, [{\n key: \"replace\",\n value: function replace(tr) {\n var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Slice.empty;\n\n if (content == Slice.empty) {\n tr[\"delete\"](0, tr.doc.content.size);\n var sel = Selection.atStart(tr.doc);\n if (!sel.eq(tr.selection)) tr.setSelection(sel);\n } else {\n _get(_getPrototypeOf(AllSelection.prototype), \"replace\", this).call(this, tr, content);\n }\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n type: \"all\"\n };\n }\n /**\n @internal\n */\n\n }, {\n key: \"map\",\n value: function map(doc) {\n return new AllSelection(doc);\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return other instanceof AllSelection;\n }\n }, {\n key: \"getBookmark\",\n value: function getBookmark() {\n return AllBookmark;\n }\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(doc) {\n return new AllSelection(doc);\n }\n }]);\n\n return AllSelection;\n}(Selection);\n\nSelection.jsonID(\"all\", AllSelection);\nvar AllBookmark = {\n map: function map() {\n return this;\n },\n resolve: function resolve(doc) {\n return new AllSelection(doc);\n }\n}; // FIXME we'll need some awareness of text direction when scanning for selections\n// Try to find a selection inside the given node. `pos` points at the\n// position where the search starts. When `text` is true, only return\n// text selections.\n\nfunction findSelectionIn(doc, node, pos, index, dir) {\n var text = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n if (node.inlineContent) return TextSelection.create(doc, pos);\n\n for (var i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) {\n var child = node.child(i);\n\n if (!child.isAtom) {\n var inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text);\n if (inner) return inner;\n } else if (!text && NodeSelection.isSelectable(child)) {\n return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0));\n }\n\n pos += child.nodeSize * dir;\n }\n\n return null;\n}\n\nfunction selectionToInsertionEnd(tr, startLen, bias) {\n var last = tr.steps.length - 1;\n if (last < startLen) return;\n var step = tr.steps[last];\n if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) return;\n var map = tr.mapping.maps[last],\n end;\n map.forEach(function (_from, _to, _newFrom, newTo) {\n if (end == null) end = newTo;\n });\n tr.setSelection(Selection.near(tr.doc.resolve(end), bias));\n}\n\nvar UPDATED_SEL = 1,\n UPDATED_MARKS = 2,\n UPDATED_SCROLL = 4;\n/**\nAn editor state transaction, which can be applied to a state to\ncreate an updated state. Use\n[`EditorState.tr`](https://prosemirror.net/docs/ref/#state.EditorState.tr) to create an instance.\n\nTransactions track changes to the document (they are a subclass of\n[`Transform`](https://prosemirror.net/docs/ref/#transform.Transform)), but also other state changes,\nlike selection updates and adjustments of the set of [stored\nmarks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks). In addition, you can store\nmetadata properties in a transaction, which are extra pieces of\ninformation that client code or plugins can use to describe what a\ntransaction represents, so that they can update their [own\nstate](https://prosemirror.net/docs/ref/#state.StateField) accordingly.\n\nThe [editor view](https://prosemirror.net/docs/ref/#view.EditorView) uses a few metadata\nproperties: it will attach a property `\"pointer\"` with the value\n`true` to selection transactions directly caused by mouse or touch\ninput, a `\"composition\"` property holding an ID identifying the\ncomposition that caused it to transactions caused by composed DOM\ninput, and a `\"uiEvent\"` property of that may be `\"paste\"`,\n`\"cut\"`, or `\"drop\"`.\n*/\n\nvar Transaction = /*#__PURE__*/function (_Transform) {\n _inherits(Transaction, _Transform);\n\n var _super4 = _createSuper(Transaction);\n\n /**\n @internal\n */\n function Transaction(state) {\n var _this2;\n\n _classCallCheck(this, Transaction);\n\n _this2 = _super4.call(this, state.doc); // The step count for which the current selection is valid.\n\n _this2.curSelectionFor = 0; // Bitfield to track which aspects of the state were updated by\n // this transaction.\n\n _this2.updated = 0; // Object used to store metadata properties for the transaction.\n\n _this2.meta = Object.create(null);\n _this2.time = Date.now();\n _this2.curSelection = state.selection;\n _this2.storedMarks = state.storedMarks;\n return _this2;\n }\n /**\n The transaction's current selection. This defaults to the editor\n selection [mapped](https://prosemirror.net/docs/ref/#state.Selection.map) through the steps in the\n transaction, but can be overwritten with\n [`setSelection`](https://prosemirror.net/docs/ref/#state.Transaction.setSelection).\n */\n\n\n _createClass(Transaction, [{\n key: \"selection\",\n get: function get() {\n if (this.curSelectionFor < this.steps.length) {\n this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n this.curSelectionFor = this.steps.length;\n }\n\n return this.curSelection;\n }\n /**\n Update the transaction's current selection. Will determine the\n selection that the editor gets when the transaction is applied.\n */\n\n }, {\n key: \"setSelection\",\n value: function setSelection(selection) {\n if (selection.$from.doc != this.doc) throw new RangeError(\"Selection passed to setSelection must point at the current document\");\n this.curSelection = selection;\n this.curSelectionFor = this.steps.length;\n this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;\n this.storedMarks = null;\n return this;\n }\n /**\n Whether the selection was explicitly updated by this transaction.\n */\n\n }, {\n key: \"selectionSet\",\n get: function get() {\n return (this.updated & UPDATED_SEL) > 0;\n }\n /**\n Set the current stored marks.\n */\n\n }, {\n key: \"setStoredMarks\",\n value: function setStoredMarks(marks) {\n this.storedMarks = marks;\n this.updated |= UPDATED_MARKS;\n return this;\n }\n /**\n Make sure the current stored marks or, if that is null, the marks\n at the selection, match the given set of marks. Does nothing if\n this is already the case.\n */\n\n }, {\n key: \"ensureMarks\",\n value: function ensureMarks(marks) {\n if (!Mark.sameSet(this.storedMarks || this.selection.$from.marks(), marks)) this.setStoredMarks(marks);\n return this;\n }\n /**\n Add a mark to the set of stored marks.\n */\n\n }, {\n key: \"addStoredMark\",\n value: function addStoredMark(mark) {\n return this.ensureMarks(mark.addToSet(this.storedMarks || this.selection.$head.marks()));\n }\n /**\n Remove a mark or mark type from the set of stored marks.\n */\n\n }, {\n key: \"removeStoredMark\",\n value: function removeStoredMark(mark) {\n return this.ensureMarks(mark.removeFromSet(this.storedMarks || this.selection.$head.marks()));\n }\n /**\n Whether the stored marks were explicitly set for this transaction.\n */\n\n }, {\n key: \"storedMarksSet\",\n get: function get() {\n return (this.updated & UPDATED_MARKS) > 0;\n }\n /**\n @internal\n */\n\n }, {\n key: \"addStep\",\n value: function addStep(step, doc) {\n _get(_getPrototypeOf(Transaction.prototype), \"addStep\", this).call(this, step, doc);\n\n this.updated = this.updated & ~UPDATED_MARKS;\n this.storedMarks = null;\n }\n /**\n Update the timestamp for the transaction.\n */\n\n }, {\n key: \"setTime\",\n value: function setTime(time) {\n this.time = time;\n return this;\n }\n /**\n Replace the current selection with the given slice.\n */\n\n }, {\n key: \"replaceSelection\",\n value: function replaceSelection(slice) {\n this.selection.replace(this, slice);\n return this;\n }\n /**\n Replace the selection with the given node. When `inheritMarks` is\n true and the content is inline, it inherits the marks from the\n place where it is inserted.\n */\n\n }, {\n key: \"replaceSelectionWith\",\n value: function replaceSelectionWith(node) {\n var inheritMarks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var selection = this.selection;\n if (inheritMarks) node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : selection.$from.marksAcross(selection.$to) || Mark.none));\n selection.replaceWith(this, node);\n return this;\n }\n /**\n Delete the selection.\n */\n\n }, {\n key: \"deleteSelection\",\n value: function deleteSelection() {\n this.selection.replace(this);\n return this;\n }\n /**\n Replace the given range, or the selection if no range is given,\n with a text node containing the given string.\n */\n\n }, {\n key: \"insertText\",\n value: function insertText(text, from, to) {\n var schema = this.doc.type.schema;\n\n if (from == null) {\n if (!text) return this.deleteSelection();\n return this.replaceSelectionWith(schema.text(text), true);\n } else {\n if (to == null) to = from;\n to = to == null ? from : to;\n if (!text) return this.deleteRange(from, to);\n var marks = this.storedMarks;\n\n if (!marks) {\n var $from = this.doc.resolve(from);\n marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));\n }\n\n this.replaceRangeWith(from, to, schema.text(text, marks));\n if (!this.selection.empty) this.setSelection(Selection.near(this.selection.$to));\n return this;\n }\n }\n /**\n Store a metadata property in this transaction, keyed either by\n name or by plugin.\n */\n\n }, {\n key: \"setMeta\",\n value: function setMeta(key, value) {\n this.meta[typeof key == \"string\" ? key : key.key] = value;\n return this;\n }\n /**\n Retrieve a metadata property for a given name or plugin.\n */\n\n }, {\n key: \"getMeta\",\n value: function getMeta(key) {\n return this.meta[typeof key == \"string\" ? key : key.key];\n }\n /**\n Returns true if this transaction doesn't contain any metadata,\n and can thus safely be extended.\n */\n\n }, {\n key: \"isGeneric\",\n get: function get() {\n for (var _ in this.meta) {\n return false;\n }\n\n return true;\n }\n /**\n Indicate that the editor should scroll the selection into view\n when updated to the state produced by this transaction.\n */\n\n }, {\n key: \"scrollIntoView\",\n value: function scrollIntoView() {\n this.updated |= UPDATED_SCROLL;\n return this;\n }\n /**\n True when this transaction has had `scrollIntoView` called on it.\n */\n\n }, {\n key: \"scrolledIntoView\",\n get: function get() {\n return (this.updated & UPDATED_SCROLL) > 0;\n }\n }]);\n\n return Transaction;\n}(Transform);\n\nfunction bind(f, self) {\n return !self || !f ? f : f.bind(self);\n}\n\nvar FieldDesc = /*#__PURE__*/_createClass(function FieldDesc(name, desc, self) {\n _classCallCheck(this, FieldDesc);\n\n this.name = name;\n this.init = bind(desc.init, self);\n this.apply = bind(desc.apply, self);\n});\n\nvar baseFields = [new FieldDesc(\"doc\", {\n init: function init(config) {\n return config.doc || config.schema.topNodeType.createAndFill();\n },\n apply: function apply(tr) {\n return tr.doc;\n }\n}), new FieldDesc(\"selection\", {\n init: function init(config, instance) {\n return config.selection || Selection.atStart(instance.doc);\n },\n apply: function apply(tr) {\n return tr.selection;\n }\n}), new FieldDesc(\"storedMarks\", {\n init: function init(config) {\n return config.storedMarks || null;\n },\n apply: function apply(tr, _marks, _old, state) {\n return state.selection.$cursor ? tr.storedMarks : null;\n }\n}), new FieldDesc(\"scrollToSelection\", {\n init: function init() {\n return 0;\n },\n apply: function apply(tr, prev) {\n return tr.scrolledIntoView ? prev + 1 : prev;\n }\n})]; // Object wrapping the part of a state object that stays the same\n// across transactions. Stored in the state's `config` property.\n\nvar Configuration = /*#__PURE__*/_createClass(function Configuration(schema, plugins) {\n var _this3 = this;\n\n _classCallCheck(this, Configuration);\n\n this.schema = schema;\n this.plugins = [];\n this.pluginsByKey = Object.create(null);\n this.fields = baseFields.slice();\n if (plugins) plugins.forEach(function (plugin) {\n if (_this3.pluginsByKey[plugin.key]) throw new RangeError(\"Adding different instances of a keyed plugin (\" + plugin.key + \")\");\n\n _this3.plugins.push(plugin);\n\n _this3.pluginsByKey[plugin.key] = plugin;\n if (plugin.spec.state) _this3.fields.push(new FieldDesc(plugin.key, plugin.spec.state, plugin));\n });\n});\n/**\nThe state of a ProseMirror editor is represented by an object of\nthis type. A state is a persistent data structure—it isn't\nupdated, but rather a new state value is computed from an old one\nusing the [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) method.\n\nA state holds a number of built-in fields, and plugins can\n[define](https://prosemirror.net/docs/ref/#state.PluginSpec.state) additional fields.\n*/\n\n\nvar EditorState = /*#__PURE__*/function () {\n /**\n @internal\n */\n function EditorState(\n /**\n @internal\n */\n config) {\n _classCallCheck(this, EditorState);\n\n this.config = config;\n }\n /**\n The schema of the state's document.\n */\n\n\n _createClass(EditorState, [{\n key: \"schema\",\n get: function get() {\n return this.config.schema;\n }\n /**\n The plugins that are active in this state.\n */\n\n }, {\n key: \"plugins\",\n get: function get() {\n return this.config.plugins;\n }\n /**\n Apply the given transaction to produce a new state.\n */\n\n }, {\n key: \"apply\",\n value: function apply(tr) {\n return this.applyTransaction(tr).state;\n }\n /**\n @internal\n */\n\n }, {\n key: \"filterTransaction\",\n value: function filterTransaction(tr) {\n var ignore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;\n\n for (var i = 0; i < this.config.plugins.length; i++) {\n if (i != ignore) {\n var plugin = this.config.plugins[i];\n if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this)) return false;\n }\n }\n\n return true;\n }\n /**\n Verbose variant of [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) that\n returns the precise transactions that were applied (which might\n be influenced by the [transaction\n hooks](https://prosemirror.net/docs/ref/#state.PluginSpec.filterTransaction) of\n plugins) along with the new state.\n */\n\n }, {\n key: \"applyTransaction\",\n value: function applyTransaction(rootTr) {\n if (!this.filterTransaction(rootTr)) return {\n state: this,\n transactions: []\n };\n var trs = [rootTr],\n newState = this.applyInner(rootTr),\n seen = null; // This loop repeatedly gives plugins a chance to respond to\n // transactions as new transactions are added, making sure to only\n // pass the transactions the plugin did not see before.\n\n for (;;) {\n var haveNew = false;\n\n for (var i = 0; i < this.config.plugins.length; i++) {\n var plugin = this.config.plugins[i];\n\n if (plugin.spec.appendTransaction) {\n var n = seen ? seen[i].n : 0,\n oldState = seen ? seen[i].state : this;\n var tr = n < trs.length && plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);\n\n if (tr && newState.filterTransaction(tr, i)) {\n tr.setMeta(\"appendedTransaction\", rootTr);\n\n if (!seen) {\n seen = [];\n\n for (var j = 0; j < this.config.plugins.length; j++) {\n seen.push(j < i ? {\n state: newState,\n n: trs.length\n } : {\n state: this,\n n: 0\n });\n }\n }\n\n trs.push(tr);\n newState = newState.applyInner(tr);\n haveNew = true;\n }\n\n if (seen) seen[i] = {\n state: newState,\n n: trs.length\n };\n }\n }\n\n if (!haveNew) return {\n state: newState,\n transactions: trs\n };\n }\n }\n /**\n @internal\n */\n\n }, {\n key: \"applyInner\",\n value: function applyInner(tr) {\n if (!tr.before.eq(this.doc)) throw new RangeError(\"Applying a mismatched transaction\");\n var newInstance = new EditorState(this.config),\n fields = this.config.fields;\n\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n newInstance[field.name] = field.apply(tr, this[field.name], this, newInstance);\n }\n\n return newInstance;\n }\n /**\n Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.\n */\n\n }, {\n key: \"tr\",\n get: function get() {\n return new Transaction(this);\n }\n /**\n Create a new state.\n */\n\n }, {\n key: \"reconfigure\",\n value:\n /**\n Create a new state based on this one, but with an adjusted set\n of active plugins. State fields that exist in both sets of\n plugins are kept unchanged. Those that no longer exist are\n dropped, and those that are new are initialized using their\n [`init`](https://prosemirror.net/docs/ref/#state.StateField.init) method, passing in the new\n configuration object..\n */\n function reconfigure(config) {\n var $config = new Configuration(this.schema, config.plugins);\n var fields = $config.fields,\n instance = new EditorState($config);\n\n for (var i = 0; i < fields.length; i++) {\n var name = fields[i].name;\n instance[name] = this.hasOwnProperty(name) ? this[name] : fields[i].init(config, instance);\n }\n\n return instance;\n }\n /**\n Serialize this state to JSON. If you want to serialize the state\n of plugins, pass an object mapping property names to use in the\n resulting JSON object to plugin objects. The argument may also be\n a string or number, in which case it is ignored, to support the\n way `JSON.stringify` calls `toString` methods.\n */\n\n }, {\n key: \"toJSON\",\n value: function toJSON(pluginFields) {\n var result = {\n doc: this.doc.toJSON(),\n selection: this.selection.toJSON()\n };\n if (this.storedMarks) result.storedMarks = this.storedMarks.map(function (m) {\n return m.toJSON();\n });\n if (pluginFields && _typeof(pluginFields) == 'object') for (var prop in pluginFields) {\n if (prop == \"doc\" || prop == \"selection\") throw new RangeError(\"The JSON fields `doc` and `selection` are reserved\");\n var plugin = pluginFields[prop],\n state = plugin.spec.state;\n if (state && state.toJSON) result[prop] = state.toJSON.call(plugin, this[plugin.key]);\n }\n return result;\n }\n /**\n Deserialize a JSON representation of a state. `config` should\n have at least a `schema` field, and should contain array of\n plugins to initialize the state with. `pluginFields` can be used\n to deserialize the state of plugins, by associating plugin\n instances with the property names they use in the JSON object.\n */\n\n }], [{\n key: \"create\",\n value: function create(config) {\n var $config = new Configuration(config.doc ? config.doc.type.schema : config.schema, config.plugins);\n var instance = new EditorState($config);\n\n for (var i = 0; i < $config.fields.length; i++) {\n instance[$config.fields[i].name] = $config.fields[i].init(config, instance);\n }\n\n return instance;\n }\n }, {\n key: \"fromJSON\",\n value: function fromJSON(config, json, pluginFields) {\n if (!json) throw new RangeError(\"Invalid input for EditorState.fromJSON\");\n if (!config.schema) throw new RangeError(\"Required config field 'schema' missing\");\n var $config = new Configuration(config.schema, config.plugins);\n var instance = new EditorState($config);\n $config.fields.forEach(function (field) {\n if (field.name == \"doc\") {\n instance.doc = Node.fromJSON(config.schema, json.doc);\n } else if (field.name == \"selection\") {\n instance.selection = Selection.fromJSON(instance.doc, json.selection);\n } else if (field.name == \"storedMarks\") {\n if (json.storedMarks) instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON);\n } else {\n if (pluginFields) for (var prop in pluginFields) {\n var plugin = pluginFields[prop],\n state = plugin.spec.state;\n\n if (plugin.key == field.name && state && state.fromJSON && Object.prototype.hasOwnProperty.call(json, prop)) {\n instance[field.name] = state.fromJSON.call(plugin, config, json[prop], instance);\n return;\n }\n }\n instance[field.name] = field.init(config, instance);\n }\n });\n return instance;\n }\n }]);\n\n return EditorState;\n}();\n\nfunction bindProps(obj, self, target) {\n for (var prop in obj) {\n var val = obj[prop];\n if (val instanceof Function) val = val.bind(self);else if (prop == \"handleDOMEvents\") val = bindProps(val, self, {});\n target[prop] = val;\n }\n\n return target;\n}\n/**\nPlugins bundle functionality that can be added to an editor.\nThey are part of the [editor state](https://prosemirror.net/docs/ref/#state.EditorState) and\nmay influence that state and the view that contains it.\n*/\n\n\nvar Plugin = /*#__PURE__*/function () {\n /**\n Create a plugin.\n */\n function Plugin(\n /**\n The plugin's [spec object](https://prosemirror.net/docs/ref/#state.PluginSpec).\n */\n spec) {\n _classCallCheck(this, Plugin);\n\n this.spec = spec;\n /**\n The [props](https://prosemirror.net/docs/ref/#view.EditorProps) exported by this plugin.\n */\n\n this.props = {};\n if (spec.props) bindProps(spec.props, this, this.props);\n this.key = spec.key ? spec.key.key : createKey(\"plugin\");\n }\n /**\n Extract the plugin's state field from an editor state.\n */\n\n\n _createClass(Plugin, [{\n key: \"getState\",\n value: function getState(state) {\n return state[this.key];\n }\n }]);\n\n return Plugin;\n}();\n\nvar keys = Object.create(null);\n\nfunction createKey(name) {\n if (name in keys) return name + \"$\" + ++keys[name];\n keys[name] = 0;\n return name + \"$\";\n}\n/**\nA key is used to [tag](https://prosemirror.net/docs/ref/#state.PluginSpec.key) plugins in a way\nthat makes it possible to find them, given an editor state.\nAssigning a key does mean only one plugin of that type can be\nactive in a state.\n*/\n\n\nvar PluginKey = /*#__PURE__*/function () {\n /**\n Create a plugin key.\n */\n function PluginKey() {\n var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"key\";\n\n _classCallCheck(this, PluginKey);\n\n this.key = createKey(name);\n }\n /**\n Get the active plugin with this key, if any, from an editor\n state.\n */\n\n\n _createClass(PluginKey, [{\n key: \"get\",\n value: function get(state) {\n return state.config.pluginsByKey[this.key];\n }\n /**\n Get the plugin's state from an editor state.\n */\n\n }, {\n key: \"getState\",\n value: function getState(state) {\n return state[this.key];\n }\n }]);\n\n return PluginKey;\n}();\n\nexport { AllSelection, EditorState, NodeSelection, Plugin, PluginKey, Selection, SelectionRange, TextSelection, Transaction };","var add = /*#__PURE__*/require(\"./add\");\n/**\n * Increments its argument.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Math\n * @sig Number -> Number\n * @param {Number} n\n * @return {Number} n + 1\n * @see R.dec\n * @example\n *\n * R.inc(42); //=> 43\n */\n\n\nvar inc = /*#__PURE__*/add(1);\nmodule.exports = inc;","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar fails = require('../internals/fails');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// FF99+ bug\nvar BROKEN_ON_SPARSE = fails(function () {\n return !Array(1).includes();\n});\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\"; // TYPES\n// UTILS\n\nexport var isServer = typeof window === 'undefined';\nexport function noop() {\n return undefined;\n}\nexport function functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nexport function isValidTimeout(value) {\n return typeof value === 'number' && value >= 0 && value !== Infinity;\n}\nexport function ensureQueryKeyArray(value) {\n return Array.isArray(value) ? value : [value];\n}\nexport function difference(array1, array2) {\n return array1.filter(function (x) {\n return array2.indexOf(x) === -1;\n });\n}\nexport function replaceAt(array, index, value) {\n var copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nexport function timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nexport function parseQueryArgs(arg1, arg2, arg3) {\n if (!isQueryKey(arg1)) {\n return arg1;\n }\n\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n queryKey: arg1,\n queryFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n queryKey: arg1\n });\n}\nexport function parseMutationArgs(arg1, arg2, arg3) {\n if (isQueryKey(arg1)) {\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n mutationKey: arg1,\n mutationFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n mutationKey: arg1\n });\n }\n\n if (typeof arg1 === 'function') {\n return _extends({}, arg2, {\n mutationFn: arg1\n });\n }\n\n return _extends({}, arg1);\n}\nexport function parseFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [_extends({}, arg2, {\n queryKey: arg1\n }), arg3] : [arg1 || {}, arg2];\n}\nexport function parseMutationFilterArgs(arg1, arg2) {\n return isQueryKey(arg1) ? _extends({}, arg2, {\n mutationKey: arg1\n }) : arg1;\n}\nexport function mapQueryStatusFilter(active, inactive) {\n if (active === true && inactive === true || active == null && inactive == null) {\n return 'all';\n } else if (active === false && inactive === false) {\n return 'none';\n } else {\n // At this point, active|inactive can only be true|false or false|true\n // so, when only one value is provided, the missing one has to be the negated value\n var isActive = active != null ? active : !inactive;\n return isActive ? 'active' : 'inactive';\n }\n}\nexport function matchQuery(filters, query) {\n var active = filters.active,\n exact = filters.exact,\n fetching = filters.fetching,\n inactive = filters.inactive,\n predicate = filters.predicate,\n queryKey = filters.queryKey,\n stale = filters.stale;\n\n if (isQueryKey(queryKey)) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n\n var queryStatusFilter = mapQueryStatusFilter(active, inactive);\n\n if (queryStatusFilter === 'none') {\n return false;\n } else if (queryStatusFilter !== 'all') {\n var isActive = query.isActive();\n\n if (queryStatusFilter === 'active' && !isActive) {\n return false;\n }\n\n if (queryStatusFilter === 'inactive' && isActive) {\n return false;\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false;\n }\n\n if (typeof fetching === 'boolean' && query.isFetching() !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(query)) {\n return false;\n }\n\n return true;\n}\nexport function matchMutation(filters, mutation) {\n var exact = filters.exact,\n fetching = filters.fetching,\n predicate = filters.predicate,\n mutationKey = filters.mutationKey;\n\n if (isQueryKey(mutationKey)) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n\n if (exact) {\n if (hashQueryKey(mutation.options.mutationKey) !== hashQueryKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n\n if (typeof fetching === 'boolean' && mutation.state.status === 'loading' !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(mutation)) {\n return false;\n }\n\n return true;\n}\nexport function hashQueryKeyByOptions(queryKey, options) {\n var hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashQueryKey;\n return hashFn(queryKey);\n}\n/**\n * Default query keys hash function.\n */\n\nexport function hashQueryKey(queryKey) {\n var asArray = ensureQueryKeyArray(queryKey);\n return stableValueHash(asArray);\n}\n/**\n * Hashes the value into a stable hash.\n */\n\nexport function stableValueHash(value) {\n return JSON.stringify(value, function (_, val) {\n return isPlainObject(val) ? Object.keys(val).sort().reduce(function (result, key) {\n result[key] = val[key];\n return result;\n }, {}) : val;\n });\n}\n/**\n * Checks if key `b` partially matches with key `a`.\n */\n\nexport function partialMatchKey(a, b) {\n return partialDeepEqual(ensureQueryKeyArray(a), ensureQueryKeyArray(b));\n}\n/**\n * Checks if `b` partially matches with `a`.\n */\n\nexport function partialDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (_typeof(a) !== _typeof(b)) {\n return false;\n }\n\n if (a && b && _typeof(a) === 'object' && _typeof(b) === 'object') {\n return !Object.keys(b).some(function (key) {\n return !partialDeepEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\n\nexport function replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n\n var array = Array.isArray(a) && Array.isArray(b);\n\n if (array || isPlainObject(a) && isPlainObject(b)) {\n var aSize = array ? a.length : Object.keys(a).length;\n var bItems = array ? b : Object.keys(b);\n var bSize = bItems.length;\n var copy = array ? [] : {};\n var equalItems = 0;\n\n for (var i = 0; i < bSize; i++) {\n var key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n\n return b;\n}\n/**\n * Shallow compare objects. Only works with objects that always have the same properties.\n */\n\nexport function shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n\n for (var key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n\n return true;\n} // Copied from: https://github.com/jonschlinkert/is-plain-object\n\nexport function isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n } // If has modified constructor\n\n\n var ctor = o.constructor;\n\n if (typeof ctor === 'undefined') {\n return true;\n } // If has modified prototype\n\n\n var prot = ctor.prototype;\n\n if (!hasObjectPrototype(prot)) {\n return false;\n } // If constructor does not have an Object-specific method\n\n\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false;\n } // Most likely a plain Object\n\n\n return true;\n}\n\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nexport function isQueryKey(value) {\n return typeof value === 'string' || Array.isArray(value);\n}\nexport function isError(value) {\n return value instanceof Error;\n}\nexport function sleep(timeout) {\n return new Promise(function (resolve) {\n setTimeout(resolve, timeout);\n });\n}\n/**\n * Schedules a microtask.\n * This can be useful to schedule state updates after rendering.\n */\n\nexport function scheduleMicrotask(callback) {\n Promise.resolve().then(callback)[\"catch\"](function (error) {\n return setTimeout(function () {\n throw error;\n });\n });\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _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; }\n\nimport { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(function () {\n return function (node) {\n refs.forEach(function (ref) {\n return ref(node);\n });\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n} // https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\n\n\nvar canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n var elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n var _getWindow = getWindow(node),\n Document = _getWindow.Document;\n\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\n\nvar useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useInterval() {\n var intervalRef = useRef(null);\n var set = useCallback(function (listener, duration) {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n var clear = useCallback(function () {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value) {\n var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [value];\n var valueRef = useRef(value);\n useIsomorphicLayoutEffect(function () {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n var valueRef = useRef();\n return useMemo(function () {\n var newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n _toConsumableArray(dependencies));\n}\n\nfunction useNodeRef(onChange) {\n var onChangeRef = useLatestValue(onChange);\n var node = useRef(null);\n var setNodeRef = useCallback(function (element) {\n if (element !== node.current) {\n onChangeRef.current == null ? void 0 : onChangeRef.current(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nvar ids = {};\n\nfunction useUniqueId(prefix, value) {\n return useMemo(function () {\n if (value) {\n return value;\n }\n\n var id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return \"\".concat(prefix, \"-\").concat(id);\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len2 = arguments.length, adjustments = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n adjustments[_key2 - 1] = arguments[_key2];\n }\n\n return adjustments.reduce(function (accumulator, adjustment) {\n var entries = Object.entries(adjustment);\n\n for (var _i = 0, _entries = entries; _i < _entries.length; _i++) {\n var _entries$_i = _slicedToArray(_entries[_i], 2),\n key = _entries$_i[0],\n valueAdjustment = _entries$_i[1];\n\n var value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, _objectSpread({}, object));\n };\n}\n\nvar add = /*#__PURE__*/createAdjustmentFn(1);\nvar subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n var _getWindow2 = getWindow(event.target),\n KeyboardEvent = _getWindow2.KeyboardEvent;\n\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n var _getWindow3 = getWindow(event.target),\n TouchEvent = _getWindow3.TouchEvent;\n\n return TouchEvent && event instanceof TouchEvent;\n}\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n var _event$touches$ = event.touches[0],\n x = _event$touches$.clientX,\n y = _event$touches$.clientY;\n return {\n x: x,\n y: y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n var _event$changedTouches = event.changedTouches[0],\n _x = _event$changedTouches.clientX,\n _y = _event$changedTouches.clientY;\n return {\n x: _x,\n y: _y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nvar CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString: function toString(transform) {\n if (!transform) {\n return;\n }\n\n var x = transform.x,\n y = transform.y;\n return \"translate3d(\".concat(x ? Math.round(x) : 0, \"px, \").concat(y ? Math.round(y) : 0, \"px, 0)\");\n }\n },\n Scale: {\n toString: function toString(transform) {\n if (!transform) {\n return;\n }\n\n var scaleX = transform.scaleX,\n scaleY = transform.scaleY;\n return \"scaleX(\".concat(scaleX, \") scaleY(\").concat(scaleY, \")\");\n }\n },\n Transform: {\n toString: function toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n },\n Transition: {\n toString: function toString(_ref) {\n var property = _ref.property,\n duration = _ref.duration,\n easing = _ref.easing;\n return \"\".concat(property, \" \").concat(duration, \"ms \").concat(easing);\n }\n }\n});\nexport { CSS, add, canUseDOM, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, useUniqueId };","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\nvar stringIndexOf = uncurryThis(''.indexOf);\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~stringIndexOf(\n toString(requireObjectCoercible(this)),\n toString(notARegExp(searchString)),\n arguments.length > 1 ? arguments[1] : undefined\n );\n }\n});\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport assign from 'object-assign';\nexport var merge = function merge(a, b) {\n var result = assign({}, a, b);\n\n for (var key in a) {\n var _assign;\n\n if (!a[key] || _typeof(b[key]) !== 'object') continue;\n assign(result, (_assign = {}, _assign[key] = assign(a[key], b[key]), _assign));\n }\n\n return result;\n}; // sort object-value responsive styles\n\nvar sort = function sort(obj) {\n var next = {};\n Object.keys(obj).sort(function (a, b) {\n return a.localeCompare(b, undefined, {\n numeric: true,\n sensitivity: 'base'\n });\n }).forEach(function (key) {\n next[key] = obj[key];\n });\n return next;\n};\n\nvar defaults = {\n breakpoints: [40, 52, 64].map(function (n) {\n return n + 'em';\n })\n};\n\nvar createMediaQuery = function createMediaQuery(n) {\n return \"@media screen and (min-width: \" + n + \")\";\n};\n\nvar getValue = function getValue(n, scale) {\n return get(scale, n, n);\n};\n\nexport var get = function get(obj, key, def, p, undef) {\n key = key && key.split ? key.split('.') : [key];\n\n for (p = 0; p < key.length; p++) {\n obj = obj ? obj[key[p]] : undef;\n }\n\n return obj === undef ? def : obj;\n};\nexport var createParser = function createParser(config) {\n var cache = {};\n\n var parse = function parse(props) {\n var styles = {};\n var shouldSort = false;\n var isCacheDisabled = props.theme && props.theme.disableStyledSystemCache;\n\n for (var key in props) {\n if (!config[key]) continue;\n var sx = config[key];\n var raw = props[key];\n var scale = get(props.theme, sx.scale, sx.defaults);\n\n if (_typeof(raw) === 'object') {\n cache.breakpoints = !isCacheDisabled && cache.breakpoints || get(props.theme, 'breakpoints', defaults.breakpoints);\n\n if (Array.isArray(raw)) {\n cache.media = !isCacheDisabled && cache.media || [null].concat(cache.breakpoints.map(createMediaQuery));\n styles = merge(styles, parseResponsiveStyle(cache.media, sx, scale, raw, props));\n continue;\n }\n\n if (raw !== null) {\n styles = merge(styles, parseResponsiveObject(cache.breakpoints, sx, scale, raw, props));\n shouldSort = true;\n }\n\n continue;\n }\n\n assign(styles, sx(raw, scale, props));\n } // sort object-based responsive styles\n\n\n if (shouldSort) {\n styles = sort(styles);\n }\n\n return styles;\n };\n\n parse.config = config;\n parse.propNames = Object.keys(config);\n parse.cache = cache;\n var keys = Object.keys(config).filter(function (k) {\n return k !== 'config';\n });\n\n if (keys.length > 1) {\n keys.forEach(function (key) {\n var _createParser;\n\n parse[key] = createParser((_createParser = {}, _createParser[key] = config[key], _createParser));\n });\n }\n\n return parse;\n};\n\nvar parseResponsiveStyle = function parseResponsiveStyle(mediaQueries, sx, scale, raw, _props) {\n var styles = {};\n raw.slice(0, mediaQueries.length).forEach(function (value, i) {\n var media = mediaQueries[i];\n var style = sx(value, scale, _props);\n\n if (!media) {\n assign(styles, style);\n } else {\n var _assign2;\n\n assign(styles, (_assign2 = {}, _assign2[media] = assign({}, styles[media], style), _assign2));\n }\n });\n return styles;\n};\n\nvar parseResponsiveObject = function parseResponsiveObject(breakpoints, sx, scale, raw, _props) {\n var styles = {};\n\n for (var key in raw) {\n var breakpoint = breakpoints[key];\n var value = raw[key];\n var style = sx(value, scale, _props);\n\n if (!breakpoint) {\n assign(styles, style);\n } else {\n var _assign3;\n\n var media = createMediaQuery(breakpoint);\n assign(styles, (_assign3 = {}, _assign3[media] = assign({}, styles[media], style), _assign3));\n }\n }\n\n return styles;\n};\n\nexport var createStyleFunction = function createStyleFunction(_ref) {\n var properties = _ref.properties,\n property = _ref.property,\n scale = _ref.scale,\n _ref$transform = _ref.transform,\n transform = _ref$transform === void 0 ? getValue : _ref$transform,\n defaultScale = _ref.defaultScale;\n properties = properties || [property];\n\n var sx = function sx(value, scale, _props) {\n var result = {};\n var n = transform(value, scale, _props);\n if (n === null) return;\n properties.forEach(function (prop) {\n result[prop] = n;\n });\n return result;\n };\n\n sx.scale = scale;\n sx.defaults = defaultScale;\n return sx;\n}; // new v5 API\n\nexport var system = function system(args) {\n if (args === void 0) {\n args = {};\n }\n\n var config = {};\n Object.keys(args).forEach(function (key) {\n var conf = args[key];\n\n if (conf === true) {\n // shortcut definition\n config[key] = createStyleFunction({\n property: key,\n scale: key\n });\n return;\n }\n\n if (typeof conf === 'function') {\n config[key] = conf;\n return;\n }\n\n config[key] = createStyleFunction(conf);\n });\n var parser = createParser(config);\n return parser;\n};\nexport var compose = function compose() {\n var config = {};\n\n for (var _len = arguments.length, parsers = new Array(_len), _key = 0; _key < _len; _key++) {\n parsers[_key] = arguments[_key];\n }\n\n parsers.forEach(function (parser) {\n if (!parser || !parser.config) return;\n assign(config, parser.config);\n });\n var parser = createParser(config);\n return parser;\n};","import { system, get } from '@styled-system/core';\n\nvar isNumber = function isNumber(n) {\n return typeof n === 'number' && !isNaN(n);\n};\n\nvar getWidth = function getWidth(n, scale) {\n return get(scale, n, !isNumber(n) || n > 1 ? n : n * 100 + '%');\n};\n\nvar config = {\n width: {\n property: 'width',\n scale: 'sizes',\n transform: getWidth\n },\n height: {\n property: 'height',\n scale: 'sizes'\n },\n minWidth: {\n property: 'minWidth',\n scale: 'sizes'\n },\n minHeight: {\n property: 'minHeight',\n scale: 'sizes'\n },\n maxWidth: {\n property: 'maxWidth',\n scale: 'sizes'\n },\n maxHeight: {\n property: 'maxHeight',\n scale: 'sizes'\n },\n size: {\n properties: ['width', 'height'],\n scale: 'sizes'\n },\n overflow: true,\n overflowX: true,\n overflowY: true,\n display: true,\n verticalAlign: true\n};\nexport var layout = system(config);\nexport default layout;","import { system } from '@styled-system/core';\nvar config = {\n color: {\n property: 'color',\n scale: 'colors'\n },\n backgroundColor: {\n property: 'backgroundColor',\n scale: 'colors'\n },\n opacity: true\n};\nconfig.bg = config.backgroundColor;\nexport var color = system(config);\nexport default color;","import { system } from '@styled-system/core';\nvar defaults = {\n fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]\n};\nvar config = {\n fontFamily: {\n property: 'fontFamily',\n scale: 'fonts'\n },\n fontSize: {\n property: 'fontSize',\n scale: 'fontSizes',\n defaultScale: defaults.fontSizes\n },\n fontWeight: {\n property: 'fontWeight',\n scale: 'fontWeights'\n },\n lineHeight: {\n property: 'lineHeight',\n scale: 'lineHeights'\n },\n letterSpacing: {\n property: 'letterSpacing',\n scale: 'letterSpacings'\n },\n textAlign: true,\n fontStyle: true\n};\nexport var typography = system(config);\nexport default typography;","import { system } from '@styled-system/core';\nvar config = {\n alignItems: true,\n alignContent: true,\n justifyItems: true,\n justifyContent: true,\n flexWrap: true,\n flexDirection: true,\n // item\n flex: true,\n flexGrow: true,\n flexShrink: true,\n flexBasis: true,\n justifySelf: true,\n alignSelf: true,\n order: true\n};\nexport var flexbox = system(config);\nexport default flexbox;","import { system } from '@styled-system/core';\nvar defaults = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512]\n};\nvar config = {\n gridGap: {\n property: 'gridGap',\n scale: 'space',\n defaultScale: defaults.space\n },\n gridColumnGap: {\n property: 'gridColumnGap',\n scale: 'space',\n defaultScale: defaults.space\n },\n gridRowGap: {\n property: 'gridRowGap',\n scale: 'space',\n defaultScale: defaults.space\n },\n gridColumn: true,\n gridRow: true,\n gridAutoFlow: true,\n gridAutoColumns: true,\n gridAutoRows: true,\n gridTemplateColumns: true,\n gridTemplateRows: true,\n gridTemplateAreas: true,\n gridArea: true\n};\nexport var grid = system(config);\nexport default grid;","import { system } from '@styled-system/core';\nvar config = {\n border: {\n property: 'border',\n scale: 'borders'\n },\n borderWidth: {\n property: 'borderWidth',\n scale: 'borderWidths'\n },\n borderStyle: {\n property: 'borderStyle',\n scale: 'borderStyles'\n },\n borderColor: {\n property: 'borderColor',\n scale: 'colors'\n },\n borderRadius: {\n property: 'borderRadius',\n scale: 'radii'\n },\n borderTop: {\n property: 'borderTop',\n scale: 'borders'\n },\n borderTopLeftRadius: {\n property: 'borderTopLeftRadius',\n scale: 'radii'\n },\n borderTopRightRadius: {\n property: 'borderTopRightRadius',\n scale: 'radii'\n },\n borderRight: {\n property: 'borderRight',\n scale: 'borders'\n },\n borderBottom: {\n property: 'borderBottom',\n scale: 'borders'\n },\n borderBottomLeftRadius: {\n property: 'borderBottomLeftRadius',\n scale: 'radii'\n },\n borderBottomRightRadius: {\n property: 'borderBottomRightRadius',\n scale: 'radii'\n },\n borderLeft: {\n property: 'borderLeft',\n scale: 'borders'\n },\n borderX: {\n properties: ['borderLeft', 'borderRight'],\n scale: 'borders'\n },\n borderY: {\n properties: ['borderTop', 'borderBottom'],\n scale: 'borders'\n }\n};\nconfig.borderTopWidth = {\n property: 'borderTopWidth',\n scale: 'borderWidths'\n};\nconfig.borderTopColor = {\n property: 'borderTopColor',\n scale: 'colors'\n};\nconfig.borderTopStyle = {\n property: 'borderTopStyle',\n scale: 'borderStyles'\n};\nconfig.borderTopLeftRadius = {\n property: 'borderTopLeftRadius',\n scale: 'radii'\n};\nconfig.borderTopRightRadius = {\n property: 'borderTopRightRadius',\n scale: 'radii'\n};\nconfig.borderBottomWidth = {\n property: 'borderBottomWidth',\n scale: 'borderWidths'\n};\nconfig.borderBottomColor = {\n property: 'borderBottomColor',\n scale: 'colors'\n};\nconfig.borderBottomStyle = {\n property: 'borderBottomStyle',\n scale: 'borderStyles'\n};\nconfig.borderBottomLeftRadius = {\n property: 'borderBottomLeftRadius',\n scale: 'radii'\n};\nconfig.borderBottomRightRadius = {\n property: 'borderBottomRightRadius',\n scale: 'radii'\n};\nconfig.borderLeftWidth = {\n property: 'borderLeftWidth',\n scale: 'borderWidths'\n};\nconfig.borderLeftColor = {\n property: 'borderLeftColor',\n scale: 'colors'\n};\nconfig.borderLeftStyle = {\n property: 'borderLeftStyle',\n scale: 'borderStyles'\n};\nconfig.borderRightWidth = {\n property: 'borderRightWidth',\n scale: 'borderWidths'\n};\nconfig.borderRightColor = {\n property: 'borderRightColor',\n scale: 'colors'\n};\nconfig.borderRightStyle = {\n property: 'borderRightStyle',\n scale: 'borderStyles'\n};\nexport var border = system(config);\nexport default border;","import { system } from '@styled-system/core';\nvar config = {\n background: true,\n backgroundImage: true,\n backgroundSize: true,\n backgroundPosition: true,\n backgroundRepeat: true\n};\nconfig.bgImage = config.backgroundImage;\nconfig.bgSize = config.backgroundSize;\nconfig.bgPosition = config.backgroundPosition;\nconfig.bgRepeat = config.backgroundRepeat;\nexport var background = system(config);\nexport default background;","import { system } from '@styled-system/core';\nvar defaults = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512]\n};\nvar config = {\n position: true,\n zIndex: {\n property: 'zIndex',\n scale: 'zIndices'\n },\n top: {\n property: 'top',\n scale: 'space',\n defaultScale: defaults.space\n },\n right: {\n property: 'right',\n scale: 'space',\n defaultScale: defaults.space\n },\n bottom: {\n property: 'bottom',\n scale: 'space',\n defaultScale: defaults.space\n },\n left: {\n property: 'left',\n scale: 'space',\n defaultScale: defaults.space\n }\n};\nexport var position = system(config);\nexport default position;","import { get, system, compose } from '@styled-system/core';\nvar defaults = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512]\n};\n\nvar isNumber = function isNumber(n) {\n return typeof n === 'number' && !isNaN(n);\n};\n\nvar getMargin = function getMargin(n, scale) {\n if (!isNumber(n)) {\n return get(scale, n, n);\n }\n\n var isNegative = n < 0;\n var absolute = Math.abs(n);\n var value = get(scale, absolute, absolute);\n\n if (!isNumber(value)) {\n return isNegative ? '-' + value : value;\n }\n\n return value * (isNegative ? -1 : 1);\n};\n\nvar configs = {};\nconfigs.margin = {\n margin: {\n property: 'margin',\n scale: 'space',\n transform: getMargin,\n defaultScale: defaults.space\n },\n marginTop: {\n property: 'marginTop',\n scale: 'space',\n transform: getMargin,\n defaultScale: defaults.space\n },\n marginRight: {\n property: 'marginRight',\n scale: 'space',\n transform: getMargin,\n defaultScale: defaults.space\n },\n marginBottom: {\n property: 'marginBottom',\n scale: 'space',\n transform: getMargin,\n defaultScale: defaults.space\n },\n marginLeft: {\n property: 'marginLeft',\n scale: 'space',\n transform: getMargin,\n defaultScale: defaults.space\n },\n marginX: {\n properties: ['marginLeft', 'marginRight'],\n scale: 'space',\n transform: getMargin,\n defaultScale: defaults.space\n },\n marginY: {\n properties: ['marginTop', 'marginBottom'],\n scale: 'space',\n transform: getMargin,\n defaultScale: defaults.space\n }\n};\nconfigs.margin.m = configs.margin.margin;\nconfigs.margin.mt = configs.margin.marginTop;\nconfigs.margin.mr = configs.margin.marginRight;\nconfigs.margin.mb = configs.margin.marginBottom;\nconfigs.margin.ml = configs.margin.marginLeft;\nconfigs.margin.mx = configs.margin.marginX;\nconfigs.margin.my = configs.margin.marginY;\nconfigs.padding = {\n padding: {\n property: 'padding',\n scale: 'space',\n defaultScale: defaults.space\n },\n paddingTop: {\n property: 'paddingTop',\n scale: 'space',\n defaultScale: defaults.space\n },\n paddingRight: {\n property: 'paddingRight',\n scale: 'space',\n defaultScale: defaults.space\n },\n paddingBottom: {\n property: 'paddingBottom',\n scale: 'space',\n defaultScale: defaults.space\n },\n paddingLeft: {\n property: 'paddingLeft',\n scale: 'space',\n defaultScale: defaults.space\n },\n paddingX: {\n properties: ['paddingLeft', 'paddingRight'],\n scale: 'space',\n defaultScale: defaults.space\n },\n paddingY: {\n properties: ['paddingTop', 'paddingBottom'],\n scale: 'space',\n defaultScale: defaults.space\n }\n};\nconfigs.padding.p = configs.padding.padding;\nconfigs.padding.pt = configs.padding.paddingTop;\nconfigs.padding.pr = configs.padding.paddingRight;\nconfigs.padding.pb = configs.padding.paddingBottom;\nconfigs.padding.pl = configs.padding.paddingLeft;\nconfigs.padding.px = configs.padding.paddingX;\nconfigs.padding.py = configs.padding.paddingY;\nexport var margin = system(configs.margin);\nexport var padding = system(configs.padding);\nexport var space = compose(margin, padding);\nexport default space;","import { system } from '@styled-system/core';\nexport var shadow = system({\n boxShadow: {\n property: 'boxShadow',\n scale: 'shadows'\n },\n textShadow: {\n property: 'textShadow',\n scale: 'shadows'\n }\n});\nexport default shadow;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n} // based on https://github.com/developit/dlv\n\n\nexport var get = function get(obj, key, def, p, undef) {\n key = key && key.split ? key.split('.') : [key];\n\n for (p = 0; p < key.length; p++) {\n obj = obj ? obj[key[p]] : undef;\n }\n\n return obj === undef ? def : obj;\n};\nvar defaultBreakpoints = [40, 52, 64].map(function (n) {\n return n + 'em';\n});\nvar defaultTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]\n};\nvar aliases = {\n bg: 'backgroundColor',\n m: 'margin',\n mt: 'marginTop',\n mr: 'marginRight',\n mb: 'marginBottom',\n ml: 'marginLeft',\n mx: 'marginX',\n my: 'marginY',\n p: 'padding',\n pt: 'paddingTop',\n pr: 'paddingRight',\n pb: 'paddingBottom',\n pl: 'paddingLeft',\n px: 'paddingX',\n py: 'paddingY'\n};\nvar multiples = {\n marginX: ['marginLeft', 'marginRight'],\n marginY: ['marginTop', 'marginBottom'],\n paddingX: ['paddingLeft', 'paddingRight'],\n paddingY: ['paddingTop', 'paddingBottom'],\n size: ['width', 'height']\n};\nvar scales = {\n color: 'colors',\n backgroundColor: 'colors',\n borderColor: 'colors',\n margin: 'space',\n marginTop: 'space',\n marginRight: 'space',\n marginBottom: 'space',\n marginLeft: 'space',\n marginX: 'space',\n marginY: 'space',\n padding: 'space',\n paddingTop: 'space',\n paddingRight: 'space',\n paddingBottom: 'space',\n paddingLeft: 'space',\n paddingX: 'space',\n paddingY: 'space',\n top: 'space',\n right: 'space',\n bottom: 'space',\n left: 'space',\n gridGap: 'space',\n gridColumnGap: 'space',\n gridRowGap: 'space',\n gap: 'space',\n columnGap: 'space',\n rowGap: 'space',\n fontFamily: 'fonts',\n fontSize: 'fontSizes',\n fontWeight: 'fontWeights',\n lineHeight: 'lineHeights',\n letterSpacing: 'letterSpacings',\n border: 'borders',\n borderTop: 'borders',\n borderRight: 'borders',\n borderBottom: 'borders',\n borderLeft: 'borders',\n borderWidth: 'borderWidths',\n borderStyle: 'borderStyles',\n borderRadius: 'radii',\n borderTopRightRadius: 'radii',\n borderTopLeftRadius: 'radii',\n borderBottomRightRadius: 'radii',\n borderBottomLeftRadius: 'radii',\n borderTopWidth: 'borderWidths',\n borderTopColor: 'colors',\n borderTopStyle: 'borderStyles',\n borderBottomWidth: 'borderWidths',\n borderBottomColor: 'colors',\n borderBottomStyle: 'borderStyles',\n borderLeftWidth: 'borderWidths',\n borderLeftColor: 'colors',\n borderLeftStyle: 'borderStyles',\n borderRightWidth: 'borderWidths',\n borderRightColor: 'colors',\n borderRightStyle: 'borderStyles',\n outlineColor: 'colors',\n boxShadow: 'shadows',\n textShadow: 'shadows',\n zIndex: 'zIndices',\n width: 'sizes',\n minWidth: 'sizes',\n maxWidth: 'sizes',\n height: 'sizes',\n minHeight: 'sizes',\n maxHeight: 'sizes',\n flexBasis: 'sizes',\n size: 'sizes',\n // svg\n fill: 'colors',\n stroke: 'colors'\n};\n\nvar positiveOrNegative = function positiveOrNegative(scale, value) {\n if (typeof value !== 'number' || value >= 0) {\n return get(scale, value, value);\n }\n\n var absolute = Math.abs(value);\n var n = get(scale, absolute, absolute);\n if (typeof n === 'string') return '-' + n;\n return n * -1;\n};\n\nvar transforms = ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'top', 'bottom', 'left', 'right'].reduce(function (acc, curr) {\n var _extends2;\n\n return _extends({}, acc, (_extends2 = {}, _extends2[curr] = positiveOrNegative, _extends2));\n}, {});\nexport var responsive = function responsive(styles) {\n return function (theme) {\n var next = {};\n var breakpoints = get(theme, 'breakpoints', defaultBreakpoints);\n var mediaQueries = [null].concat(breakpoints.map(function (n) {\n return \"@media screen and (min-width: \" + n + \")\";\n }));\n\n for (var key in styles) {\n var value = typeof styles[key] === 'function' ? styles[key](theme) : styles[key];\n if (value == null) continue;\n\n if (!Array.isArray(value)) {\n next[key] = value;\n continue;\n }\n\n for (var i = 0; i < value.slice(0, mediaQueries.length).length; i++) {\n var media = mediaQueries[i];\n\n if (!media) {\n next[key] = value[i];\n continue;\n }\n\n next[media] = next[media] || {};\n if (value[i] == null) continue;\n next[media][key] = value[i];\n }\n }\n\n return next;\n };\n};\nexport var css = function css(args) {\n return function (props) {\n if (props === void 0) {\n props = {};\n }\n\n var theme = _extends({}, defaultTheme, {}, props.theme || props);\n\n var result = {};\n var obj = typeof args === 'function' ? args(theme) : args;\n var styles = responsive(obj)(theme);\n\n for (var key in styles) {\n var x = styles[key];\n var val = typeof x === 'function' ? x(theme) : x;\n\n if (key === 'variant') {\n var variant = css(get(theme, val))(theme);\n result = _extends({}, result, {}, variant);\n continue;\n }\n\n if (val && _typeof(val) === 'object') {\n result[key] = css(val)(theme);\n continue;\n }\n\n var prop = get(aliases, key, key);\n var scaleName = get(scales, prop);\n var scale = get(theme, scaleName, get(theme, prop, {}));\n var transform = get(transforms, prop, get);\n var value = transform(scale, val, val);\n\n if (multiples[prop]) {\n var dirs = multiples[prop];\n\n for (var i = 0; i < dirs.length; i++) {\n result[dirs[i]] = value;\n }\n } else {\n result[prop] = value;\n }\n }\n\n return result;\n };\n};\nexport default css;","import { get, createParser } from '@styled-system/core';\nimport css from '@styled-system/css';\nexport var variant = function variant(_ref) {\n var _config;\n\n var scale = _ref.scale,\n _ref$prop = _ref.prop,\n prop = _ref$prop === void 0 ? 'variant' : _ref$prop,\n _ref$variants = _ref.variants,\n variants = _ref$variants === void 0 ? {} : _ref$variants,\n key = _ref.key;\n var sx;\n\n if (Object.keys(variants).length) {\n sx = function sx(value, scale, props) {\n return css(get(scale, value, null))(props.theme);\n };\n } else {\n sx = function sx(value, scale) {\n return get(scale, value, null);\n };\n }\n\n sx.scale = scale || key;\n sx.defaults = variants;\n var config = (_config = {}, _config[prop] = sx, _config);\n var parser = createParser(config);\n return parser;\n};\nexport default variant;\nexport var buttonStyle = variant({\n key: 'buttons'\n});\nexport var textStyle = variant({\n key: 'textStyles',\n prop: 'textStyle'\n});\nexport var colorStyle = variant({\n key: 'colorStyles',\n prop: 'colors'\n});","import { createStyleFunction, createParser } from '@styled-system/core'; // v4 api shims\n\nimport layout from '@styled-system/layout';\nimport color from '@styled-system/color';\nimport typography from '@styled-system/typography';\nimport flexbox from '@styled-system/flexbox';\nimport grid from '@styled-system/grid';\nimport border from '@styled-system/border';\nimport background from '@styled-system/background';\nimport position from '@styled-system/position';\nexport { get, createParser, createStyleFunction, compose, system } from '@styled-system/core';\nexport { margin, padding, space } from '@styled-system/space';\nexport { color } from '@styled-system/color';\nexport { layout } from '@styled-system/layout';\nexport { typography } from '@styled-system/typography';\nexport { flexbox } from '@styled-system/flexbox';\nexport { border } from '@styled-system/border';\nexport { background } from '@styled-system/background';\nexport { position } from '@styled-system/position';\nexport { grid } from '@styled-system/grid';\nexport { shadow } from '@styled-system/shadow';\nexport { default as boxShadow, default as textShadow } from '@styled-system/shadow';\nexport { variant, buttonStyle, textStyle, colorStyle } from '@styled-system/variant';\nvar width = layout.width,\n height = layout.height,\n minWidth = layout.minWidth,\n minHeight = layout.minHeight,\n maxWidth = layout.maxWidth,\n maxHeight = layout.maxHeight,\n size = layout.size,\n verticalAlign = layout.verticalAlign,\n display = layout.display,\n overflow = layout.overflow,\n overflowX = layout.overflowX,\n overflowY = layout.overflowY;\nvar opacity = color.opacity;\nvar fontSize = typography.fontSize,\n fontFamily = typography.fontFamily,\n fontWeight = typography.fontWeight,\n lineHeight = typography.lineHeight,\n textAlign = typography.textAlign,\n fontStyle = typography.fontStyle,\n letterSpacing = typography.letterSpacing;\nvar alignItems = flexbox.alignItems,\n alignContent = flexbox.alignContent,\n justifyItems = flexbox.justifyItems,\n justifyContent = flexbox.justifyContent,\n flexWrap = flexbox.flexWrap,\n flexDirection = flexbox.flexDirection,\n flex = flexbox.flex,\n flexGrow = flexbox.flexGrow,\n flexShrink = flexbox.flexShrink,\n flexBasis = flexbox.flexBasis,\n justifySelf = flexbox.justifySelf,\n alignSelf = flexbox.alignSelf,\n order = flexbox.order;\nvar gridGap = grid.gridGap,\n gridColumnGap = grid.gridColumnGap,\n gridRowGap = grid.gridRowGap,\n gridColumn = grid.gridColumn,\n gridRow = grid.gridRow,\n gridAutoFlow = grid.gridAutoFlow,\n gridAutoColumns = grid.gridAutoColumns,\n gridAutoRows = grid.gridAutoRows,\n gridTemplateColumns = grid.gridTemplateColumns,\n gridTemplateRows = grid.gridTemplateRows,\n gridTemplateAreas = grid.gridTemplateAreas,\n gridArea = grid.gridArea;\nvar borderWidth = border.borderWidth,\n borderStyle = border.borderStyle,\n borderColor = border.borderColor,\n borderTop = border.borderTop,\n borderRight = border.borderRight,\n borderBottom = border.borderBottom,\n borderLeft = border.borderLeft,\n borderRadius = border.borderRadius;\nvar backgroundImage = background.backgroundImage,\n backgroundSize = background.backgroundSize,\n backgroundPosition = background.backgroundPosition,\n backgroundRepeat = background.backgroundRepeat;\nvar zIndex = position.zIndex,\n top = position.top,\n right = position.right,\n bottom = position.bottom,\n left = position.left;\nexport { default as borders } from '@styled-system/border';\nexport { width, height, minWidth, minHeight, maxWidth, maxHeight, size, verticalAlign, display, overflow, overflowX, overflowY // color\n, opacity // typography\n, fontSize, fontFamily, fontWeight, lineHeight, textAlign, fontStyle, letterSpacing // flexbox\n, alignItems, alignContent, justifyItems, justifyContent, flexWrap, flexDirection, flex, flexGrow, flexShrink, flexBasis, justifySelf, alignSelf, order // grid\n, gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea // border\n, borderWidth, borderStyle, borderColor, borderTop, borderRight, borderBottom, borderLeft, borderRadius // background\n, backgroundImage, backgroundSize, backgroundPosition, backgroundRepeat // position\n, zIndex, top, right, bottom, left }; // v4 style API shim\n\nexport var style = function style(_ref) {\n var prop = _ref.prop,\n cssProperty = _ref.cssProperty,\n alias = _ref.alias,\n key = _ref.key,\n transformValue = _ref.transformValue,\n scale = _ref.scale,\n properties = _ref.properties;\n var config = {};\n config[prop] = createStyleFunction({\n properties: properties,\n property: cssProperty || prop,\n scale: key,\n defaultScale: scale,\n transform: transformValue\n });\n if (alias) config[alias] = config[prop];\n var parse = createParser(config);\n return parse;\n};","function _typeof2(obj) { \"@babel/helpers - typeof\"; return _typeof2 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof2(obj); }\n\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport { jsx, keyframes, css as css$2, ClassNames } from '@emotion/react';\nimport _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';\nimport _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';\nimport _typeof from '@babel/runtime/helpers/esm/typeof';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\nimport _defineProperty$1 from '@babel/runtime/helpers/esm/defineProperty';\nimport { Component, createContext } from 'react';\nimport { createPortal } from 'react-dom';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof2(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nvar _excluded$3 = [\"className\", \"clearValue\", \"cx\", \"getStyles\", \"getValue\", \"hasValue\", \"isMulti\", \"isRtl\", \"options\", \"selectOption\", \"selectProps\", \"setValue\", \"theme\"]; // ==============================\n// NO OP\n// ==============================\n\nvar noop = function noop() {}; // Class Name Prefixer\n// ==============================\n\n/**\n String representation of component state for styling with class names.\n\n Expects an array of strings OR a string/object pair:\n - className(['comp', 'comp-arg', 'comp-arg-2'])\n @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2'\n - className('comp', { some: true, state: false })\n @returns 'react-select__comp react-select__comp--some'\n*/\n\n\nfunction applyPrefixToName(prefix, name) {\n if (!name) {\n return prefix;\n } else if (name[0] === '-') {\n return prefix + name;\n } else {\n return prefix + '__' + name;\n }\n}\n\nfunction classNames(prefix, state, className) {\n var arr = [className];\n\n if (state && prefix) {\n for (var key in state) {\n if (state.hasOwnProperty(key) && state[key]) {\n arr.push(\"\".concat(applyPrefixToName(prefix, key)));\n }\n }\n }\n\n return arr.filter(function (i) {\n return i;\n }).map(function (i) {\n return String(i).trim();\n }).join(' ');\n} // ==============================\n// Clean Value\n// ==============================\n\n\nvar cleanValue = function cleanValue(value) {\n if (isArray(value)) return value.filter(Boolean);\n if (_typeof(value) === 'object' && value !== null) return [value];\n return [];\n}; // ==============================\n// Clean Common Props\n// ==============================\n\n\nvar cleanCommonProps = function cleanCommonProps(props) {\n //className\n props.className;\n props.clearValue;\n props.cx;\n props.getStyles;\n props.getValue;\n props.hasValue;\n props.isMulti;\n props.isRtl;\n props.options;\n props.selectOption;\n props.selectProps;\n props.setValue;\n props.theme;\n\n var innerProps = _objectWithoutProperties(props, _excluded$3);\n\n return _objectSpread2({}, innerProps);\n}; // ==============================\n// Handle Input Change\n// ==============================\n\n\nfunction handleInputChange(inputValue, actionMeta, onInputChange) {\n if (onInputChange) {\n var _newValue = onInputChange(inputValue, actionMeta);\n\n if (typeof _newValue === 'string') return _newValue;\n }\n\n return inputValue;\n} // ==============================\n// Scroll Helpers\n// ==============================\n\n\nfunction isDocumentElement(el) {\n return [document.documentElement, document.body, window].indexOf(el) > -1;\n} // Normalized Scroll Top\n// ------------------------------\n\n\nfunction getScrollTop(el) {\n if (isDocumentElement(el)) {\n return window.pageYOffset;\n }\n\n return el.scrollTop;\n}\n\nfunction scrollTo(el, top) {\n // with a scroll distance, we perform scroll on the element\n if (isDocumentElement(el)) {\n window.scrollTo(0, top);\n return;\n }\n\n el.scrollTop = top;\n} // Get Scroll Parent\n// ------------------------------\n\n\nfunction getScrollParent(element) {\n var style = getComputedStyle(element);\n var excludeStaticParent = style.position === 'absolute';\n var overflowRx = /(auto|scroll)/;\n if (style.position === 'fixed') return document.documentElement;\n\n for (var parent = element; parent = parent.parentElement;) {\n style = getComputedStyle(parent);\n\n if (excludeStaticParent && style.position === 'static') {\n continue;\n }\n\n if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) {\n return parent;\n }\n }\n\n return document.documentElement;\n} // Animated Scroll To\n// ------------------------------\n\n/**\n @param t: time (elapsed)\n @param b: initial value\n @param c: amount of change\n @param d: duration\n*/\n\n\nfunction easeOutCubic(t, b, c, d) {\n return c * ((t = t / d - 1) * t * t + 1) + b;\n}\n\nfunction animatedScrollTo(element, to) {\n var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;\n var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;\n var start = getScrollTop(element);\n var change = to - start;\n var increment = 10;\n var currentTime = 0;\n\n function animateScroll() {\n currentTime += increment;\n var val = easeOutCubic(currentTime, start, change, duration);\n scrollTo(element, val);\n\n if (currentTime < duration) {\n window.requestAnimationFrame(animateScroll);\n } else {\n callback(element);\n }\n }\n\n animateScroll();\n} // Scroll Into View\n// ------------------------------\n\n\nfunction scrollIntoView(menuEl, focusedEl) {\n var menuRect = menuEl.getBoundingClientRect();\n var focusedRect = focusedEl.getBoundingClientRect();\n var overScroll = focusedEl.offsetHeight / 3;\n\n if (focusedRect.bottom + overScroll > menuRect.bottom) {\n scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight));\n } else if (focusedRect.top - overScroll < menuRect.top) {\n scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0));\n }\n} // ==============================\n// Get bounding client object\n// ==============================\n// cannot get keys using array notation with DOMRect\n\n\nfunction getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n} // Touch Capability Detector\n// ==============================\n\n\nfunction isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n} // ==============================\n// Mobile Device Detector\n// ==============================\n\n\nfunction isMobileDevice() {\n try {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n } catch (e) {\n return false;\n }\n} // ==============================\n// Passive Event Detector\n// ==============================\n// https://github.com/rafgraph/detect-it/blob/main/src/index.ts#L19-L36\n\n\nvar passiveOptionAccessed = false;\nvar options = {\n get passive() {\n return passiveOptionAccessed = true;\n }\n\n}; // check for SSR\n\nvar w = typeof window !== 'undefined' ? window : {};\n\nif (w.addEventListener && w.removeEventListener) {\n w.addEventListener('p', noop, options);\n w.removeEventListener('p', noop, false);\n}\n\nvar supportsPassiveEvents = passiveOptionAccessed;\n\nfunction notNullish(item) {\n return item != null;\n}\n\nfunction isArray(arg) {\n return Array.isArray(arg);\n}\n\nfunction valueTernary(isMulti, multiValue, singleValue) {\n return isMulti ? multiValue : singleValue;\n}\n\nfunction singleValueAsValue(singleValue) {\n return singleValue;\n}\n\nfunction multiValueAsValue(multiValue) {\n return multiValue;\n}\n\nfunction getMenuPlacement(_ref) {\n var maxHeight = _ref.maxHeight,\n menuEl = _ref.menuEl,\n minHeight = _ref.minHeight,\n placement = _ref.placement,\n shouldScroll = _ref.shouldScroll,\n isFixedPosition = _ref.isFixedPosition,\n theme = _ref.theme;\n var spacing = theme.spacing;\n var scrollParent = getScrollParent(menuEl);\n var defaultState = {\n placement: 'bottom',\n maxHeight: maxHeight\n }; // something went wrong, return default state\n\n if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when\n // the menu is rendered\n\n var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),\n scrollHeight = _scrollParent$getBoun.height;\n\n var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),\n menuBottom = _menuEl$getBoundingCl.bottom,\n menuHeight = _menuEl$getBoundingCl.height,\n menuTop = _menuEl$getBoundingCl.top;\n\n var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(),\n containerTop = _menuEl$offsetParent$.top;\n\n var viewHeight = window.innerHeight;\n var scrollTop = getScrollTop(scrollParent);\n var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);\n var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);\n var viewSpaceAbove = containerTop - marginTop;\n var viewSpaceBelow = viewHeight - menuTop;\n var scrollSpaceAbove = viewSpaceAbove + scrollTop;\n var scrollSpaceBelow = scrollHeight - scrollTop - menuTop;\n var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom;\n var scrollUp = scrollTop + menuTop - marginTop;\n var scrollDuration = 160;\n\n switch (placement) {\n case 'auto':\n case 'bottom':\n // 1: the menu will fit, do nothing\n if (viewSpaceBelow >= menuHeight) {\n return {\n placement: 'bottom',\n maxHeight: maxHeight\n };\n } // 2: the menu will fit, if scrolled\n\n\n if (scrollSpaceBelow >= menuHeight && !isFixedPosition) {\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollDown, scrollDuration);\n }\n\n return {\n placement: 'bottom',\n maxHeight: maxHeight\n };\n } // 3: the menu will fit, if constrained\n\n\n if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) {\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollDown, scrollDuration);\n } // we want to provide as much of the menu as possible to the user,\n // so give them whatever is available below rather than the minHeight.\n\n\n var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom;\n return {\n placement: 'bottom',\n maxHeight: constrainedHeight\n };\n } // 4. Forked beviour when there isn't enough space below\n // AUTO: flip the menu, render above\n\n\n if (placement === 'auto' || isFixedPosition) {\n // may need to be constrained after flipping\n var _constrainedHeight = maxHeight;\n var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove;\n\n if (spaceAbove >= minHeight) {\n _constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight);\n }\n\n return {\n placement: 'top',\n maxHeight: _constrainedHeight\n };\n } // BOTTOM: allow browser to increase scrollable area and immediately set scroll\n\n\n if (placement === 'bottom') {\n if (shouldScroll) {\n scrollTo(scrollParent, scrollDown);\n }\n\n return {\n placement: 'bottom',\n maxHeight: maxHeight\n };\n }\n\n break;\n\n case 'top':\n // 1: the menu will fit, do nothing\n if (viewSpaceAbove >= menuHeight) {\n return {\n placement: 'top',\n maxHeight: maxHeight\n };\n } // 2: the menu will fit, if scrolled\n\n\n if (scrollSpaceAbove >= menuHeight && !isFixedPosition) {\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollUp, scrollDuration);\n }\n\n return {\n placement: 'top',\n maxHeight: maxHeight\n };\n } // 3: the menu will fit, if constrained\n\n\n if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user,\n // so give them whatever is available below rather than the minHeight.\n\n if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop;\n }\n\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollUp, scrollDuration);\n }\n\n return {\n placement: 'top',\n maxHeight: _constrainedHeight2\n };\n } // 4. not enough space, the browser WILL NOT increase scrollable area when\n // absolutely positioned element rendered above the viewport (only below).\n // Flip the menu, render below\n\n\n return {\n placement: 'bottom',\n maxHeight: maxHeight\n };\n\n default:\n throw new Error(\"Invalid placement provided \\\"\".concat(placement, \"\\\".\"));\n }\n\n return defaultState;\n} // Menu Component\n// ------------------------------\n\n\nfunction alignToControl(placement) {\n var placementToCSSProp = {\n bottom: 'top',\n top: 'bottom'\n };\n return placement ? placementToCSSProp[placement] : 'bottom';\n}\n\nvar coercePlacement = function coercePlacement(p) {\n return p === 'auto' ? 'bottom' : p;\n};\n\nvar menuCSS = function menuCSS(_ref2) {\n var _ref3;\n\n var placement = _ref2.placement,\n _ref2$theme = _ref2.theme,\n borderRadius = _ref2$theme.borderRadius,\n spacing = _ref2$theme.spacing,\n colors = _ref2$theme.colors;\n return _ref3 = {\n label: 'menu'\n }, _defineProperty$1(_ref3, alignToControl(placement), '100%'), _defineProperty$1(_ref3, \"backgroundColor\", colors.neutral0), _defineProperty$1(_ref3, \"borderRadius\", borderRadius), _defineProperty$1(_ref3, \"boxShadow\", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty$1(_ref3, \"marginBottom\", spacing.menuGutter), _defineProperty$1(_ref3, \"marginTop\", spacing.menuGutter), _defineProperty$1(_ref3, \"position\", 'absolute'), _defineProperty$1(_ref3, \"width\", '100%'), _defineProperty$1(_ref3, \"zIndex\", 1), _ref3;\n};\n\nvar PortalPlacementContext = /*#__PURE__*/createContext({\n getPortalPlacement: null\n}); // NOTE: internal only\n\nvar MenuPlacer = /*#__PURE__*/function (_Component) {\n _inherits(MenuPlacer, _Component);\n\n var _super = _createSuper(MenuPlacer);\n\n function MenuPlacer() {\n var _this;\n\n _classCallCheck(this, MenuPlacer);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.state = {\n maxHeight: _this.props.maxMenuHeight,\n placement: null\n };\n _this.context = void 0;\n\n _this.getPlacement = function (ref) {\n var _this$props = _this.props,\n minMenuHeight = _this$props.minMenuHeight,\n maxMenuHeight = _this$props.maxMenuHeight,\n menuPlacement = _this$props.menuPlacement,\n menuPosition = _this$props.menuPosition,\n menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView,\n theme = _this$props.theme;\n if (!ref) return; // DO NOT scroll if position is fixed\n\n var isFixedPosition = menuPosition === 'fixed';\n var shouldScroll = menuShouldScrollIntoView && !isFixedPosition;\n var state = getMenuPlacement({\n maxHeight: maxMenuHeight,\n menuEl: ref,\n minHeight: minMenuHeight,\n placement: menuPlacement,\n shouldScroll: shouldScroll,\n isFixedPosition: isFixedPosition,\n theme: theme\n });\n var getPortalPlacement = _this.context.getPortalPlacement;\n if (getPortalPlacement) getPortalPlacement(state);\n\n _this.setState(state);\n };\n\n _this.getUpdatedProps = function () {\n var menuPlacement = _this.props.menuPlacement;\n var placement = _this.state.placement || coercePlacement(menuPlacement);\n return _objectSpread2(_objectSpread2({}, _this.props), {}, {\n placement: placement,\n maxHeight: _this.state.maxHeight\n });\n };\n\n return _this;\n }\n\n _createClass(MenuPlacer, [{\n key: \"render\",\n value: function render() {\n var children = this.props.children;\n return children({\n ref: this.getPlacement,\n placerProps: this.getUpdatedProps()\n });\n }\n }]);\n\n return MenuPlacer;\n}(Component);\n\nMenuPlacer.contextType = PortalPlacementContext;\n\nvar Menu = function Menu(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerRef = props.innerRef,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('menu', props),\n className: cx({\n menu: true\n }, className),\n ref: innerRef\n }, innerProps), children);\n}; // Menu List\n// ==============================\n\n\nvar menuListCSS = function menuListCSS(_ref4) {\n var maxHeight = _ref4.maxHeight,\n baseUnit = _ref4.theme.spacing.baseUnit;\n return {\n maxHeight: maxHeight,\n overflowY: 'auto',\n paddingBottom: baseUnit,\n paddingTop: baseUnit,\n position: 'relative',\n // required for offset[Height, Top] > keyboard scroll\n WebkitOverflowScrolling: 'touch'\n };\n};\n\nvar MenuList = function MenuList(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n innerRef = props.innerRef,\n isMulti = props.isMulti;\n return jsx(\"div\", _extends({\n css: getStyles('menuList', props),\n className: cx({\n 'menu-list': true,\n 'menu-list--is-multi': isMulti\n }, className),\n ref: innerRef\n }, innerProps), children);\n}; // ==============================\n// Menu Notices\n// ==============================\n\n\nvar noticeCSS = function noticeCSS(_ref5) {\n var _ref5$theme = _ref5.theme,\n baseUnit = _ref5$theme.spacing.baseUnit,\n colors = _ref5$theme.colors;\n return {\n color: colors.neutral40,\n padding: \"\".concat(baseUnit * 2, \"px \").concat(baseUnit * 3, \"px\"),\n textAlign: 'center'\n };\n};\n\nvar noOptionsMessageCSS = noticeCSS;\nvar loadingMessageCSS = noticeCSS;\n\nvar NoOptionsMessage = function NoOptionsMessage(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('noOptionsMessage', props),\n className: cx({\n 'menu-notice': true,\n 'menu-notice--no-options': true\n }, className)\n }, innerProps), children);\n};\n\nNoOptionsMessage.defaultProps = {\n children: 'No options'\n};\n\nvar LoadingMessage = function LoadingMessage(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('loadingMessage', props),\n className: cx({\n 'menu-notice': true,\n 'menu-notice--loading': true\n }, className)\n }, innerProps), children);\n};\n\nLoadingMessage.defaultProps = {\n children: 'Loading...'\n}; // ==============================\n// Menu Portal\n// ==============================\n\nvar menuPortalCSS = function menuPortalCSS(_ref6) {\n var rect = _ref6.rect,\n offset = _ref6.offset,\n position = _ref6.position;\n return {\n left: rect.left,\n position: position,\n top: offset,\n width: rect.width,\n zIndex: 1\n };\n};\n\nvar MenuPortal = /*#__PURE__*/function (_Component2) {\n _inherits(MenuPortal, _Component2);\n\n var _super2 = _createSuper(MenuPortal);\n\n function MenuPortal() {\n var _this2;\n\n _classCallCheck(this, MenuPortal);\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this2 = _super2.call.apply(_super2, [this].concat(args));\n _this2.state = {\n placement: null\n };\n\n _this2.getPortalPlacement = function (_ref7) {\n var placement = _ref7.placement;\n var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed\n\n if (placement !== initialPlacement) {\n _this2.setState({\n placement: placement\n });\n }\n };\n\n return _this2;\n }\n\n _createClass(MenuPortal, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n appendTo = _this$props2.appendTo,\n children = _this$props2.children,\n className = _this$props2.className,\n controlElement = _this$props2.controlElement,\n cx = _this$props2.cx,\n innerProps = _this$props2.innerProps,\n menuPlacement = _this$props2.menuPlacement,\n position = _this$props2.menuPosition,\n getStyles = _this$props2.getStyles;\n var isFixed = position === 'fixed'; // bail early if required elements aren't present\n\n if (!appendTo && !isFixed || !controlElement) {\n return null;\n }\n\n var placement = this.state.placement || coercePlacement(menuPlacement);\n var rect = getBoundingClientObj(controlElement);\n var scrollDistance = isFixed ? 0 : window.pageYOffset;\n var offset = rect[placement] + scrollDistance;\n var state = {\n offset: offset,\n position: position,\n rect: rect\n }; // same wrapper element whether fixed or portalled\n\n var menuWrapper = jsx(\"div\", _extends({\n css: getStyles('menuPortal', state),\n className: cx({\n 'menu-portal': true\n }, className)\n }, innerProps), children);\n return jsx(PortalPlacementContext.Provider, {\n value: {\n getPortalPlacement: this.getPortalPlacement\n }\n }, appendTo ? /*#__PURE__*/createPortal(menuWrapper, appendTo) : menuWrapper);\n }\n }]);\n\n return MenuPortal;\n}(Component);\n\nvar containerCSS = function containerCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n isRtl = _ref.isRtl;\n return {\n label: 'container',\n direction: isRtl ? 'rtl' : undefined,\n pointerEvents: isDisabled ? 'none' : undefined,\n // cancel mouse events when disabled\n position: 'relative'\n };\n};\n\nvar SelectContainer = function SelectContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n isDisabled = props.isDisabled,\n isRtl = props.isRtl;\n return jsx(\"div\", _extends({\n css: getStyles('container', props),\n className: cx({\n '--is-disabled': isDisabled,\n '--is-rtl': isRtl\n }, className)\n }, innerProps), children);\n}; // ==============================\n// Value Container\n// ==============================\n\n\nvar valueContainerCSS = function valueContainerCSS(_ref2) {\n var spacing = _ref2.theme.spacing,\n isMulti = _ref2.isMulti,\n hasValue = _ref2.hasValue,\n controlShouldRenderValue = _ref2.selectProps.controlShouldRenderValue;\n return {\n alignItems: 'center',\n display: isMulti && hasValue && controlShouldRenderValue ? 'flex' : 'grid',\n flex: 1,\n flexWrap: 'wrap',\n padding: \"\".concat(spacing.baseUnit / 2, \"px \").concat(spacing.baseUnit * 2, \"px\"),\n WebkitOverflowScrolling: 'touch',\n position: 'relative',\n overflow: 'hidden'\n };\n};\n\nvar ValueContainer = function ValueContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n innerProps = props.innerProps,\n isMulti = props.isMulti,\n getStyles = props.getStyles,\n hasValue = props.hasValue;\n return jsx(\"div\", _extends({\n css: getStyles('valueContainer', props),\n className: cx({\n 'value-container': true,\n 'value-container--is-multi': isMulti,\n 'value-container--has-value': hasValue\n }, className)\n }, innerProps), children);\n}; // ==============================\n// Indicator Container\n// ==============================\n\n\nvar indicatorsContainerCSS = function indicatorsContainerCSS() {\n return {\n alignItems: 'center',\n alignSelf: 'stretch',\n display: 'flex',\n flexShrink: 0\n };\n};\n\nvar IndicatorsContainer = function IndicatorsContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n innerProps = props.innerProps,\n getStyles = props.getStyles;\n return jsx(\"div\", _extends({\n css: getStyles('indicatorsContainer', props),\n className: cx({\n indicators: true\n }, className)\n }, innerProps), children);\n};\n\nvar _templateObject;\n\nvar _excluded$2 = [\"size\"];\n\nfunction _EMOTION_STRINGIFIED_CSS_ERROR__() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n}\n\nvar _ref2 = process.env.NODE_ENV === \"production\" ? {\n name: \"8mmkcg\",\n styles: \"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0\"\n} : {\n name: \"tj5bde-Svg\",\n styles: \"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXdCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpc0ZvY3VzZWQsXG4gIHRoZW1lOiB7XG4gICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIGNvbG9ycyxcbiAgfSxcbn06XG4gIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuXG4gICc6aG92ZXInOiB7XG4gICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICB9LFxufSk7XG5cbmV4cG9ydCBjb25zdCBkcm9wZG93bkluZGljYXRvckNTUyA9IGJhc2VDU1M7XG5leHBvcnQgY29uc3QgRHJvcGRvd25JbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBEcm9wZG93bkluZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+XG4pID0+IHtcbiAgY29uc3QgeyBjaGlsZHJlbiwgY2xhc3NOYW1lLCBjeCwgZ2V0U3R5bGVzLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICBjc3M9e2dldFN0eWxlcygnZHJvcGRvd25JbmRpY2F0b3InLCBwcm9wcyl9XG4gICAgICBjbGFzc05hbWU9e2N4KFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICBjbGFzc05hbWVcbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBjbGFzc05hbWUsIGN4LCBnZXRTdHlsZXMsIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIGNzcz17Z2V0U3R5bGVzKCdjbGVhckluZGljYXRvcicsIHByb3BzKX1cbiAgICAgIGNsYXNzTmFtZT17Y3goXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICAgIGNsYXNzTmFtZVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpc0Rpc2FibGVkLFxuICB0aGVtZToge1xuICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICBjb2xvcnMsXG4gIH0sXG59OiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvclNlcGFyYXRvcicsXG4gIGFsaWduU2VsZjogJ3N0cmV0Y2gnLFxuICBiYWNrZ3JvdW5kQ29sb3I6IGlzRGlzYWJsZWQgPyBjb2xvcnMubmV1dHJhbDEwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgbWFyZ2luQm90dG9tOiBiYXNlVW5pdCAqIDIsXG4gIG1hcmdpblRvcDogYmFzZVVuaXQgKiAyLFxuICB3aWR0aDogMSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNsYXNzTmFtZSwgY3gsIGdldFN0eWxlcywgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgY3NzPXtnZXRTdHlsZXMoJ2luZGljYXRvclNlcGFyYXRvcicsIHByb3BzKX1cbiAgICAgIGNsYXNzTmFtZT17Y3goeyAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUgfSwgY2xhc3NOYW1lKX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaXNGb2N1c2VkLFxuICBzaXplLFxuICB0aGVtZToge1xuICAgIGNvbG9ycyxcbiAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gIH0sXG59OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgYWxpZ25TZWxmOiAnY2VudGVyJyxcbiAgZm9udFNpemU6IHNpemUsXG4gIGxpbmVIZWlnaHQ6IDEsXG4gIG1hcmdpblJpZ2h0OiBzaXplLFxuICB0ZXh0QWxpZ246ICdjZW50ZXInLFxuICB2ZXJ0aWNhbEFsaWduOiAnbWlkZGxlJyxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNsYXNzTmFtZSwgY3gsIGdldFN0eWxlcywgaW5uZXJQcm9wcywgaXNSdGwgfSA9IHByb3BzO1xuXG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgY3NzPXtnZXRTdHlsZXMoJ2xvYWRpbmdJbmRpY2F0b3InLCBwcm9wcyl9XG4gICAgICBjbGFzc05hbWU9e2N4KFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICAgIGNsYXNzTmFtZVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5Mb2FkaW5nSW5kaWNhdG9yLmRlZmF1bHRQcm9wcyA9IHsgc2l6ZTogNCB9O1xuIl19 */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__\n}; // ==============================\n// Dropdown & Clear Icons\n// ==============================\n\n\nvar Svg = function Svg(_ref) {\n var size = _ref.size,\n props = _objectWithoutProperties(_ref, _excluded$2);\n\n return jsx(\"svg\", _extends({\n height: size,\n width: size,\n viewBox: \"0 0 20 20\",\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n css: _ref2\n }, props));\n};\n\nvar CrossIcon = function CrossIcon(props) {\n return jsx(Svg, _extends({\n size: 20\n }, props), jsx(\"path\", {\n d: \"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z\"\n }));\n};\n\nvar DownChevron = function DownChevron(props) {\n return jsx(Svg, _extends({\n size: 20\n }, props), jsx(\"path\", {\n d: \"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z\"\n }));\n}; // ==============================\n// Dropdown & Clear Buttons\n// ==============================\n\n\nvar baseCSS = function baseCSS(_ref3) {\n var isFocused = _ref3.isFocused,\n _ref3$theme = _ref3.theme,\n baseUnit = _ref3$theme.spacing.baseUnit,\n colors = _ref3$theme.colors;\n return {\n label: 'indicatorContainer',\n color: isFocused ? colors.neutral60 : colors.neutral20,\n display: 'flex',\n padding: baseUnit * 2,\n transition: 'color 150ms',\n ':hover': {\n color: isFocused ? colors.neutral80 : colors.neutral40\n }\n };\n};\n\nvar dropdownIndicatorCSS = baseCSS;\n\nvar DropdownIndicator = function DropdownIndicator(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('dropdownIndicator', props),\n className: cx({\n indicator: true,\n 'dropdown-indicator': true\n }, className)\n }, innerProps), children || jsx(DownChevron, null));\n};\n\nvar clearIndicatorCSS = baseCSS;\n\nvar ClearIndicator = function ClearIndicator(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('clearIndicator', props),\n className: cx({\n indicator: true,\n 'clear-indicator': true\n }, className)\n }, innerProps), children || jsx(CrossIcon, null));\n}; // ==============================\n// Separator\n// ==============================\n\n\nvar indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref4) {\n var isDisabled = _ref4.isDisabled,\n _ref4$theme = _ref4.theme,\n baseUnit = _ref4$theme.spacing.baseUnit,\n colors = _ref4$theme.colors;\n return {\n label: 'indicatorSeparator',\n alignSelf: 'stretch',\n backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,\n marginBottom: baseUnit * 2,\n marginTop: baseUnit * 2,\n width: 1\n };\n};\n\nvar IndicatorSeparator = function IndicatorSeparator(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"span\", _extends({}, innerProps, {\n css: getStyles('indicatorSeparator', props),\n className: cx({\n 'indicator-separator': true\n }, className)\n }));\n}; // ==============================\n// Loading\n// ==============================\n\n\nvar loadingDotAnimations = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n 0%, 80%, 100% { opacity: 0; }\\n 40% { opacity: 1; }\\n\"])));\n\nvar loadingIndicatorCSS = function loadingIndicatorCSS(_ref5) {\n var isFocused = _ref5.isFocused,\n size = _ref5.size,\n _ref5$theme = _ref5.theme,\n colors = _ref5$theme.colors,\n baseUnit = _ref5$theme.spacing.baseUnit;\n return {\n label: 'loadingIndicator',\n color: isFocused ? colors.neutral60 : colors.neutral20,\n display: 'flex',\n padding: baseUnit * 2,\n transition: 'color 150ms',\n alignSelf: 'center',\n fontSize: size,\n lineHeight: 1,\n marginRight: size,\n textAlign: 'center',\n verticalAlign: 'middle'\n };\n};\n\nvar LoadingDot = function LoadingDot(_ref6) {\n var delay = _ref6.delay,\n offset = _ref6.offset;\n return jsx(\"span\", {\n css: /*#__PURE__*/css$2({\n animation: \"\".concat(loadingDotAnimations, \" 1s ease-in-out \").concat(delay, \"ms infinite;\"),\n backgroundColor: 'currentColor',\n borderRadius: '1em',\n display: 'inline-block',\n marginLeft: offset ? '1em' : undefined,\n height: '1em',\n verticalAlign: 'top',\n width: '1em'\n }, process.env.NODE_ENV === \"production\" ? \"\" : \";label:LoadingDot;\", process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFQSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpc0ZvY3VzZWQsXG4gIHRoZW1lOiB7XG4gICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIGNvbG9ycyxcbiAgfSxcbn06XG4gIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuXG4gICc6aG92ZXInOiB7XG4gICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICB9LFxufSk7XG5cbmV4cG9ydCBjb25zdCBkcm9wZG93bkluZGljYXRvckNTUyA9IGJhc2VDU1M7XG5leHBvcnQgY29uc3QgRHJvcGRvd25JbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBEcm9wZG93bkluZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+XG4pID0+IHtcbiAgY29uc3QgeyBjaGlsZHJlbiwgY2xhc3NOYW1lLCBjeCwgZ2V0U3R5bGVzLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICBjc3M9e2dldFN0eWxlcygnZHJvcGRvd25JbmRpY2F0b3InLCBwcm9wcyl9XG4gICAgICBjbGFzc05hbWU9e2N4KFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICBjbGFzc05hbWVcbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBjbGFzc05hbWUsIGN4LCBnZXRTdHlsZXMsIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIGNzcz17Z2V0U3R5bGVzKCdjbGVhckluZGljYXRvcicsIHByb3BzKX1cbiAgICAgIGNsYXNzTmFtZT17Y3goXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICAgIGNsYXNzTmFtZVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpc0Rpc2FibGVkLFxuICB0aGVtZToge1xuICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICBjb2xvcnMsXG4gIH0sXG59OiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvclNlcGFyYXRvcicsXG4gIGFsaWduU2VsZjogJ3N0cmV0Y2gnLFxuICBiYWNrZ3JvdW5kQ29sb3I6IGlzRGlzYWJsZWQgPyBjb2xvcnMubmV1dHJhbDEwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgbWFyZ2luQm90dG9tOiBiYXNlVW5pdCAqIDIsXG4gIG1hcmdpblRvcDogYmFzZVVuaXQgKiAyLFxuICB3aWR0aDogMSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNsYXNzTmFtZSwgY3gsIGdldFN0eWxlcywgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgY3NzPXtnZXRTdHlsZXMoJ2luZGljYXRvclNlcGFyYXRvcicsIHByb3BzKX1cbiAgICAgIGNsYXNzTmFtZT17Y3goeyAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUgfSwgY2xhc3NOYW1lKX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaXNGb2N1c2VkLFxuICBzaXplLFxuICB0aGVtZToge1xuICAgIGNvbG9ycyxcbiAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gIH0sXG59OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgYWxpZ25TZWxmOiAnY2VudGVyJyxcbiAgZm9udFNpemU6IHNpemUsXG4gIGxpbmVIZWlnaHQ6IDEsXG4gIG1hcmdpblJpZ2h0OiBzaXplLFxuICB0ZXh0QWxpZ246ICdjZW50ZXInLFxuICB2ZXJ0aWNhbEFsaWduOiAnbWlkZGxlJyxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNsYXNzTmFtZSwgY3gsIGdldFN0eWxlcywgaW5uZXJQcm9wcywgaXNSdGwgfSA9IHByb3BzO1xuXG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgY3NzPXtnZXRTdHlsZXMoJ2xvYWRpbmdJbmRpY2F0b3InLCBwcm9wcyl9XG4gICAgICBjbGFzc05hbWU9e2N4KFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICAgIGNsYXNzTmFtZVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5Mb2FkaW5nSW5kaWNhdG9yLmRlZmF1bHRQcm9wcyA9IHsgc2l6ZTogNCB9O1xuIl19 */\")\n });\n};\n\nvar LoadingIndicator = function LoadingIndicator(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n isRtl = props.isRtl;\n return jsx(\"div\", _extends({\n css: getStyles('loadingIndicator', props),\n className: cx({\n indicator: true,\n 'loading-indicator': true\n }, className)\n }, innerProps), jsx(LoadingDot, {\n delay: 0,\n offset: isRtl\n }), jsx(LoadingDot, {\n delay: 160,\n offset: true\n }), jsx(LoadingDot, {\n delay: 320,\n offset: !isRtl\n }));\n};\n\nLoadingIndicator.defaultProps = {\n size: 4\n};\n\nvar css$1 = function css(_ref) {\n var isDisabled = _ref.isDisabled,\n isFocused = _ref.isFocused,\n _ref$theme = _ref.theme,\n colors = _ref$theme.colors,\n borderRadius = _ref$theme.borderRadius,\n spacing = _ref$theme.spacing;\n return {\n label: 'control',\n alignItems: 'center',\n backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,\n borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,\n borderRadius: borderRadius,\n borderStyle: 'solid',\n borderWidth: 1,\n boxShadow: isFocused ? \"0 0 0 1px \".concat(colors.primary) : undefined,\n cursor: 'default',\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n minHeight: spacing.controlHeight,\n outline: '0 !important',\n position: 'relative',\n transition: 'all 100ms',\n '&:hover': {\n borderColor: isFocused ? colors.primary : colors.neutral30\n }\n };\n};\n\nvar Control = function Control(props) {\n var children = props.children,\n cx = props.cx,\n getStyles = props.getStyles,\n className = props.className,\n isDisabled = props.isDisabled,\n isFocused = props.isFocused,\n innerRef = props.innerRef,\n innerProps = props.innerProps,\n menuIsOpen = props.menuIsOpen;\n return jsx(\"div\", _extends({\n ref: innerRef,\n css: getStyles('control', props),\n className: cx({\n control: true,\n 'control--is-disabled': isDisabled,\n 'control--is-focused': isFocused,\n 'control--menu-is-open': menuIsOpen\n }, className)\n }, innerProps), children);\n};\n\nvar _excluded$1 = [\"data\"];\n\nvar groupCSS = function groupCSS(_ref) {\n var spacing = _ref.theme.spacing;\n return {\n paddingBottom: spacing.baseUnit * 2,\n paddingTop: spacing.baseUnit * 2\n };\n};\n\nvar Group = function Group(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n Heading = props.Heading,\n headingProps = props.headingProps,\n innerProps = props.innerProps,\n label = props.label,\n theme = props.theme,\n selectProps = props.selectProps;\n return jsx(\"div\", _extends({\n css: getStyles('group', props),\n className: cx({\n group: true\n }, className)\n }, innerProps), jsx(Heading, _extends({}, headingProps, {\n selectProps: selectProps,\n theme: theme,\n getStyles: getStyles,\n cx: cx\n }), label), jsx(\"div\", null, children));\n};\n\nvar groupHeadingCSS = function groupHeadingCSS(_ref2) {\n var spacing = _ref2.theme.spacing;\n return {\n label: 'group',\n color: '#999',\n cursor: 'default',\n display: 'block',\n fontSize: '75%',\n fontWeight: 500,\n marginBottom: '0.25em',\n paddingLeft: spacing.baseUnit * 3,\n paddingRight: spacing.baseUnit * 3,\n textTransform: 'uppercase'\n };\n};\n\nvar GroupHeading = function GroupHeading(props) {\n var getStyles = props.getStyles,\n cx = props.cx,\n className = props.className;\n\n var _cleanCommonProps = cleanCommonProps(props);\n\n _cleanCommonProps.data;\n\n var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);\n\n return jsx(\"div\", _extends({\n css: getStyles('groupHeading', props),\n className: cx({\n 'group-heading': true\n }, className)\n }, innerProps));\n};\n\nvar _excluded = [\"innerRef\", \"isDisabled\", \"isHidden\", \"inputClassName\"];\n\nvar inputCSS = function inputCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n value = _ref.value,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return _objectSpread2({\n margin: spacing.baseUnit / 2,\n paddingBottom: spacing.baseUnit / 2,\n paddingTop: spacing.baseUnit / 2,\n visibility: isDisabled ? 'hidden' : 'visible',\n color: colors.neutral80,\n // force css to recompute when value change due to @emotion bug.\n // We can remove it whenever the bug is fixed.\n transform: value ? 'translateZ(0)' : ''\n }, containerStyle);\n};\n\nvar spacingStyle = {\n gridArea: '1 / 2',\n font: 'inherit',\n minWidth: '2px',\n border: 0,\n margin: 0,\n outline: 0,\n padding: 0\n};\nvar containerStyle = {\n flex: '1 1 auto',\n display: 'inline-grid',\n gridArea: '1 / 1 / 2 / 3',\n gridTemplateColumns: '0 min-content',\n '&:after': _objectSpread2({\n content: 'attr(data-value) \" \"',\n visibility: 'hidden',\n whiteSpace: 'pre'\n }, spacingStyle)\n};\n\nvar inputStyle = function inputStyle(isHidden) {\n return _objectSpread2({\n label: 'input',\n color: 'inherit',\n background: 0,\n opacity: isHidden ? 0 : 1,\n width: '100%'\n }, spacingStyle);\n};\n\nvar Input = function Input(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n value = props.value;\n\n var _cleanCommonProps = cleanCommonProps(props),\n innerRef = _cleanCommonProps.innerRef,\n isDisabled = _cleanCommonProps.isDisabled,\n isHidden = _cleanCommonProps.isHidden,\n inputClassName = _cleanCommonProps.inputClassName,\n innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded);\n\n return jsx(\"div\", {\n className: cx({\n 'input-container': true\n }, className),\n css: getStyles('input', props),\n \"data-value\": value || ''\n }, jsx(\"input\", _extends({\n className: cx({\n input: true\n }, inputClassName),\n ref: innerRef,\n style: inputStyle(isHidden),\n disabled: isDisabled\n }, innerProps)));\n};\n\nvar multiValueCSS = function multiValueCSS(_ref) {\n var _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n borderRadius = _ref$theme.borderRadius,\n colors = _ref$theme.colors;\n return {\n label: 'multiValue',\n backgroundColor: colors.neutral10,\n borderRadius: borderRadius / 2,\n display: 'flex',\n margin: spacing.baseUnit / 2,\n minWidth: 0 // resolves flex/text-overflow bug\n\n };\n};\n\nvar multiValueLabelCSS = function multiValueLabelCSS(_ref2) {\n var _ref2$theme = _ref2.theme,\n borderRadius = _ref2$theme.borderRadius,\n colors = _ref2$theme.colors,\n cropWithEllipsis = _ref2.cropWithEllipsis;\n return {\n borderRadius: borderRadius / 2,\n color: colors.neutral80,\n fontSize: '85%',\n overflow: 'hidden',\n padding: 3,\n paddingLeft: 6,\n textOverflow: cropWithEllipsis || cropWithEllipsis === undefined ? 'ellipsis' : undefined,\n whiteSpace: 'nowrap'\n };\n};\n\nvar multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) {\n var _ref3$theme = _ref3.theme,\n spacing = _ref3$theme.spacing,\n borderRadius = _ref3$theme.borderRadius,\n colors = _ref3$theme.colors,\n isFocused = _ref3.isFocused;\n return {\n alignItems: 'center',\n borderRadius: borderRadius / 2,\n backgroundColor: isFocused ? colors.dangerLight : undefined,\n display: 'flex',\n paddingLeft: spacing.baseUnit,\n paddingRight: spacing.baseUnit,\n ':hover': {\n backgroundColor: colors.dangerLight,\n color: colors.danger\n }\n };\n};\n\nvar MultiValueGeneric = function MultiValueGeneric(_ref4) {\n var children = _ref4.children,\n innerProps = _ref4.innerProps;\n return jsx(\"div\", innerProps, children);\n};\n\nvar MultiValueContainer = MultiValueGeneric;\nvar MultiValueLabel = MultiValueGeneric;\n\nfunction MultiValueRemove(_ref5) {\n var children = _ref5.children,\n innerProps = _ref5.innerProps;\n return jsx(\"div\", _extends({\n role: \"button\"\n }, innerProps), children || jsx(CrossIcon, {\n size: 14\n }));\n}\n\nvar MultiValue = function MultiValue(props) {\n var children = props.children,\n className = props.className,\n components = props.components,\n cx = props.cx,\n data = props.data,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n isDisabled = props.isDisabled,\n removeProps = props.removeProps,\n selectProps = props.selectProps;\n var Container = components.Container,\n Label = components.Label,\n Remove = components.Remove;\n return jsx(ClassNames, null, function (_ref6) {\n var css = _ref6.css,\n emotionCx = _ref6.cx;\n return jsx(Container, {\n data: data,\n innerProps: _objectSpread2({\n className: emotionCx(css(getStyles('multiValue', props)), cx({\n 'multi-value': true,\n 'multi-value--is-disabled': isDisabled\n }, className))\n }, innerProps),\n selectProps: selectProps\n }, jsx(Label, {\n data: data,\n innerProps: {\n className: emotionCx(css(getStyles('multiValueLabel', props)), cx({\n 'multi-value__label': true\n }, className))\n },\n selectProps: selectProps\n }, children), jsx(Remove, {\n data: data,\n innerProps: _objectSpread2({\n className: emotionCx(css(getStyles('multiValueRemove', props)), cx({\n 'multi-value__remove': true\n }, className)),\n 'aria-label': \"Remove \".concat(children || 'option')\n }, removeProps),\n selectProps: selectProps\n }));\n });\n};\n\nvar optionCSS = function optionCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n isFocused = _ref.isFocused,\n isSelected = _ref.isSelected,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n label: 'option',\n backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',\n color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',\n cursor: 'default',\n display: 'block',\n fontSize: 'inherit',\n padding: \"\".concat(spacing.baseUnit * 2, \"px \").concat(spacing.baseUnit * 3, \"px\"),\n width: '100%',\n userSelect: 'none',\n WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',\n // provide some affordance on touch devices\n ':active': {\n backgroundColor: !isDisabled ? isSelected ? colors.primary : colors.primary50 : undefined\n }\n };\n};\n\nvar Option = function Option(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n isDisabled = props.isDisabled,\n isFocused = props.isFocused,\n isSelected = props.isSelected,\n innerRef = props.innerRef,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('option', props),\n className: cx({\n option: true,\n 'option--is-disabled': isDisabled,\n 'option--is-focused': isFocused,\n 'option--is-selected': isSelected\n }, className),\n ref: innerRef,\n \"aria-disabled\": isDisabled\n }, innerProps), children);\n};\n\nvar placeholderCSS = function placeholderCSS(_ref) {\n var _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n label: 'placeholder',\n color: colors.neutral50,\n gridArea: '1 / 1 / 2 / 3',\n marginLeft: spacing.baseUnit / 2,\n marginRight: spacing.baseUnit / 2\n };\n};\n\nvar Placeholder = function Placeholder(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('placeholder', props),\n className: cx({\n placeholder: true\n }, className)\n }, innerProps), children);\n};\n\nvar css = function css(_ref) {\n var isDisabled = _ref.isDisabled,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n label: 'singleValue',\n color: isDisabled ? colors.neutral40 : colors.neutral80,\n gridArea: '1 / 1 / 2 / 3',\n marginLeft: spacing.baseUnit / 2,\n marginRight: spacing.baseUnit / 2,\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n };\n};\n\nvar SingleValue = function SingleValue(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n isDisabled = props.isDisabled,\n innerProps = props.innerProps;\n return jsx(\"div\", _extends({\n css: getStyles('singleValue', props),\n className: cx({\n 'single-value': true,\n 'single-value--is-disabled': isDisabled\n }, className)\n }, innerProps), children);\n};\n\nvar components = {\n ClearIndicator: ClearIndicator,\n Control: Control,\n DropdownIndicator: DropdownIndicator,\n DownChevron: DownChevron,\n CrossIcon: CrossIcon,\n Group: Group,\n GroupHeading: GroupHeading,\n IndicatorsContainer: IndicatorsContainer,\n IndicatorSeparator: IndicatorSeparator,\n Input: Input,\n LoadingIndicator: LoadingIndicator,\n Menu: Menu,\n MenuList: MenuList,\n MenuPortal: MenuPortal,\n LoadingMessage: LoadingMessage,\n NoOptionsMessage: NoOptionsMessage,\n MultiValue: MultiValue,\n MultiValueContainer: MultiValueContainer,\n MultiValueLabel: MultiValueLabel,\n MultiValueRemove: MultiValueRemove,\n Option: Option,\n Placeholder: Placeholder,\n SelectContainer: SelectContainer,\n SingleValue: SingleValue,\n ValueContainer: ValueContainer\n};\n\nvar defaultComponents = function defaultComponents(props) {\n return _objectSpread2(_objectSpread2({}, components), props.components);\n};\n\nexport { isMobileDevice as A, multiValueAsValue as B, singleValueAsValue as C, valueTernary as D, classNames as E, defaultComponents as F, notNullish as G, isDocumentElement as H, cleanValue as I, scrollIntoView as J, noop as K, handleInputChange as L, MenuPlacer as M, _createSuper as _, _objectSpread2 as a, clearIndicatorCSS as b, components as c, containerCSS as d, css$1 as e, dropdownIndicatorCSS as f, groupCSS as g, groupHeadingCSS as h, indicatorsContainerCSS as i, indicatorSeparatorCSS as j, inputCSS as k, loadingIndicatorCSS as l, loadingMessageCSS as m, menuCSS as n, menuListCSS as o, menuPortalCSS as p, multiValueCSS as q, multiValueLabelCSS as r, supportsPassiveEvents as s, multiValueRemoveCSS as t, noOptionsMessageCSS as u, optionCSS as v, placeholderCSS as w, css as x, valueContainerCSS as y, isTouchCapable as z };","export default function _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es-x/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || defineGlobalProperty(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n defineBuiltIn(target, key, sourceProperty, options);\n }\n};\n","var _curry1 = /*#__PURE__*/require(\"./_curry1\");\n\nvar _isPlaceholder = /*#__PURE__*/require(\"./_isPlaceholder\");\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}\n\nmodule.exports = _curry2;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nmodule.exports = function (e) {\n var t = {};\n\n function r(n) {\n if (t[n]) return t[n].exports;\n var o = t[n] = {\n i: n,\n l: !1,\n exports: {}\n };\n return e[n].call(o.exports, o, o.exports, r), o.l = !0, o.exports;\n }\n\n return r.m = e, r.c = t, r.d = function (e, t, n) {\n r.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: n\n });\n }, r.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, r.t = function (e, t) {\n if (1 & t && (e = r(e)), 8 & t) return e;\n if (4 & t && \"object\" == _typeof(e) && e && e.__esModule) return e;\n var n = Object.create(null);\n if (r.r(n), Object.defineProperty(n, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var o in e) {\n r.d(n, o, function (t) {\n return e[t];\n }.bind(null, o));\n }\n return n;\n }, r.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e[\"default\"];\n } : function () {\n return e;\n };\n return r.d(t, \"a\", t), t;\n }, r.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, r.p = \"\", r(r.s = 6);\n}([function (e, t) {\n e.exports = require(\"react\");\n}, function (e, t, r) {\n e.exports = r(4)();\n}, function (e, t) {\n e.exports = require(\"styled-components\");\n}, function (e, t) {\n e.exports = require(\"react-dom\");\n}, function (e, t, r) {\n \"use strict\";\n\n var n = r(5);\n\n function o() {}\n\n function a() {}\n\n a.resetWarningCache = o, e.exports = function () {\n function e(e, t, r, o, a, u) {\n if (u !== n) {\n var c = 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\");\n throw c.name = \"Invariant Violation\", c;\n }\n }\n\n function t() {\n return e;\n }\n\n e.isRequired = e;\n var r = {\n array: e,\n bool: e,\n func: e,\n number: e,\n object: e,\n string: e,\n symbol: e,\n any: e,\n arrayOf: t,\n element: e,\n elementType: e,\n instanceOf: t,\n node: e,\n objectOf: t,\n oneOf: t,\n oneOfType: t,\n shape: t,\n exact: t,\n checkPropTypes: a,\n resetWarningCache: o\n };\n return r.PropTypes = r, r;\n };\n}, function (e, t, r) {\n \"use strict\";\n\n e.exports = \"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";\n}, function (e, t, r) {\n \"use strict\";\n\n r.r(t), r.d(t, \"ModalProvider\", function () {\n return m;\n }), r.d(t, \"BaseModalBackground\", function () {\n return a;\n });\n var n = r(2),\n o = r.n(n),\n a = o.a.div.withConfig({\n displayName: \"baseStyles__BaseModalBackground\"\n })([\"display:flex;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:30;background-color:rgba(0,0,0,0.5);align-items:center;justify-content:center;\"]),\n u = r(0),\n c = r.n(u),\n i = r(1),\n l = r.n(i),\n f = c.a.createContext({}),\n s = f.Provider,\n p = f.Consumer;\n\n function d(e, t) {\n return function (e) {\n if (Array.isArray(e)) return e;\n }(e) || function (e, t) {\n if (\"undefined\" == typeof Symbol || !(Symbol.iterator in Object(e))) return;\n var r = [],\n n = !0,\n o = !1,\n a = void 0;\n\n try {\n for (var u, c = e[Symbol.iterator](); !(n = (u = c.next()).done) && (r.push(u.value), !t || r.length !== t); n = !0) {\n ;\n }\n } catch (e) {\n o = !0, a = e;\n } finally {\n try {\n n || null == c[\"return\"] || c[\"return\"]();\n } finally {\n if (o) throw a;\n }\n }\n\n return r;\n }(e, t) || function (e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return y(e, t);\n var r = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === r && e.constructor && (r = e.constructor.name);\n if (\"Map\" === r || \"Set\" === r) return Array.from(r);\n if (\"Arguments\" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return y(e, t);\n }(e, t) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n\n function y(e, t) {\n (null == t || t > e.length) && (t = e.length);\n\n for (var r = 0, n = new Array(t); r < t; r++) {\n n[r] = e[r];\n }\n\n return n;\n }\n\n function b(e) {\n var t = e.backgroundComponent,\n r = e.children,\n n = Object(u.useRef)(null),\n o = d(Object(u.useState)(null), 2),\n i = o[0],\n l = o[1],\n f = d(Object(u.useState)(a), 2),\n p = f[0],\n y = f[1];\n return Object(u.useEffect)(function () {\n t && y(t);\n }, [y, t]), Object(u.useEffect)(function () {\n l(n.current);\n }, [l, n]), c.a.createElement(s, {\n value: {\n modalNode: i,\n BackgroundComponent: p\n }\n }, r, c.a.createElement(\"div\", {\n ref: n\n }));\n }\n\n b.propTypes = {\n backgroundComponent: l.a.oneOfType([l.a.element, l.a.object])\n };\n var m = b,\n v = r(3),\n O = r.n(v);\n\n function g() {\n return (g = Object.assign || function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var r = arguments[t];\n\n for (var n in r) {\n Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);\n }\n }\n\n return e;\n }).apply(this, arguments);\n }\n\n function h(e, t) {\n return function (e) {\n if (Array.isArray(e)) return e;\n }(e) || function (e, t) {\n if (\"undefined\" == typeof Symbol || !(Symbol.iterator in Object(e))) return;\n var r = [],\n n = !0,\n o = !1,\n a = void 0;\n\n try {\n for (var u, c = e[Symbol.iterator](); !(n = (u = c.next()).done) && (r.push(u.value), !t || r.length !== t); n = !0) {\n ;\n }\n } catch (e) {\n o = !0, a = e;\n } finally {\n try {\n n || null == c[\"return\"] || c[\"return\"]();\n } finally {\n if (o) throw a;\n }\n }\n\n return r;\n }(e, t) || function (e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return j(e, t);\n var r = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === r && e.constructor && (r = e.constructor.name);\n if (\"Map\" === r || \"Set\" === r) return Array.from(r);\n if (\"Arguments\" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return j(e, t);\n }(e, t) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n\n function j(e, t) {\n (null == t || t > e.length) && (t = e.length);\n\n for (var r = 0, n = new Array(t); r < t; r++) {\n n[r] = e[r];\n }\n\n return n;\n }\n\n function w(e, t) {\n if (null == e) return {};\n\n var r,\n n,\n o = function (e, t) {\n if (null == e) return {};\n var r,\n n,\n o = {},\n a = Object.keys(e);\n\n for (n = 0; n < a.length; n++) {\n r = a[n], t.indexOf(r) >= 0 || (o[r] = e[r]);\n }\n\n return o;\n }(e, t);\n\n if (Object.getOwnPropertySymbols) {\n var a = Object.getOwnPropertySymbols(e);\n\n for (n = 0; n < a.length; n++) {\n r = a[n], t.indexOf(r) >= 0 || Object.prototype.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);\n }\n }\n\n return o;\n }\n\n function S(e) {\n var t,\n r = e.WrapperComponent,\n n = e.children,\n o = e.onBackgroundClick,\n a = e.onEscapeKeydown,\n i = e.allowScroll,\n l = e.beforeOpen,\n f = e.afterOpen,\n s = e.beforeClose,\n d = e.afterClose,\n y = e.backgroundProps,\n b = e.isOpen,\n m = w(e, [\"WrapperComponent\", \"children\", \"onBackgroundClick\", \"onEscapeKeydown\", \"allowScroll\", \"beforeOpen\", \"afterOpen\", \"beforeClose\", \"afterClose\", \"backgroundProps\", \"isOpen\"]),\n v = Object(u.useRef)(null),\n j = Object(u.useRef)(null),\n S = Object(u.useRef)(!1),\n C = h(Object(u.useState)(!1), 2),\n E = C[0],\n k = C[1];\n\n function P(e) {\n v.current === e.target && o && o(e);\n }\n\n return Object(u.useEffect)(function () {\n function e(e) {\n if (e) try {\n e().then(function () {\n return k(b);\n });\n } catch (e) {\n k(b);\n } else k(b);\n }\n\n E !== b && e(b ? l : s);\n }, [S, E, k, b, l, s]), Object(u.useEffect)(function () {\n E ? f && f() : S.current && d && d();\n }, [S, E, f, d]), Object(u.useEffect)(function () {\n function e(e) {\n \"Escape\" === e.key && a && a(e);\n }\n\n return E && document.addEventListener(\"keydown\", e), function () {\n document.removeEventListener(\"keydown\", e);\n };\n }, [E, a]), Object(u.useEffect)(function () {\n return E && !i && (j.current = document.body.style.overflow, document.body.style.overflow = \"hidden\"), function () {\n i || (document.body.style.overflow = j.current || \"\");\n };\n }, [E, i]), Object(u.useEffect)(function () {\n S.current = !0;\n }, [S]), t = r ? c.a.createElement(r, m, n) : n, c.a.createElement(p, null, function (e) {\n var r = e.modalNode,\n n = e.BackgroundComponent;\n return r && n && E ? O.a.createPortal(c.a.createElement(n, g({}, y, {\n onClick: P,\n ref: v\n }), t), r) : null;\n });\n }\n\n S.styled = function () {\n for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) {\n t[r] = arguments[r];\n }\n\n var n = t ? o.a.div.withConfig({\n displayName: \"Modal__wrap\"\n }).apply(void 0, t) : o.a.div.withConfig({\n displayName: \"Modal__wrap\"\n })();\n return function (e) {\n return c.a.createElement(S, g({\n WrapperComponent: n\n }, e));\n };\n }, S.defaultProps = {\n backgroundProps: {}\n }, S.propTypes = {\n WrapperComponent: l.a.oneOfType([l.a.element, l.a.object]),\n onBackgroundClick: l.a.func,\n onEscapeKeydown: l.a.func,\n allowScroll: l.a.bool,\n beforeOpen: l.a.func,\n afterOpen: l.a.func,\n beforeClose: l.a.func,\n afterClose: l.a.func,\n backgroundProps: l.a.object,\n isOpen: l.a.bool\n };\n var C = S;\n t[\"default\"] = C;\n}]);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar useMedia_1 = require(\"./useMedia\");\n\nexports[\"default\"] = useMedia_1[\"default\"];\nexports.useMedia = useMedia_1.useMedia;\nexports.useMediaLayout = useMedia_1.useMediaLayout;","import defineProperty from \"./defineProperty.js\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? Object(arguments[i]) : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/web.set-interval');\nrequire('../modules/web.set-timeout');\n","import { __assign, __rest } from './_virtual/_tslib.js';\nimport { toSCXMLEvent, isFunction, toEventObject, getEventType, isString, isArray } from './utils.js';\nimport { SpecialTargets, ActionTypes } from './types.js';\nimport { send as send$1, update, assign as assign$1, raise as raise$1, init, log as log$1, cancel as cancel$1, error as error$1 } from './actionTypes.js';\nvar initEvent = /*#__PURE__*/toSCXMLEvent({\n type: init\n});\n\nfunction getActionFunction(actionType, actionFunctionMap) {\n return actionFunctionMap ? actionFunctionMap[actionType] || undefined : undefined;\n}\n\nfunction toActionObject(action, actionFunctionMap) {\n var actionObject;\n\n if (isString(action) || typeof action === 'number') {\n var exec = getActionFunction(action, actionFunctionMap);\n\n if (isFunction(exec)) {\n actionObject = {\n type: action,\n exec: exec\n };\n } else if (exec) {\n actionObject = exec;\n } else {\n actionObject = {\n type: action,\n exec: undefined\n };\n }\n } else if (isFunction(action)) {\n actionObject = {\n // Convert action to string if unnamed\n type: action.name || action.toString(),\n exec: action\n };\n } else {\n var exec = getActionFunction(action.type, actionFunctionMap);\n\n if (isFunction(exec)) {\n actionObject = __assign(__assign({}, action), {\n exec: exec\n });\n } else if (exec) {\n var type = action.type,\n other = __rest(action, [\"type\"]);\n\n actionObject = __assign(__assign({\n type: type\n }, exec), other);\n } else {\n actionObject = action;\n }\n }\n\n Object.defineProperty(actionObject, 'toString', {\n value: function value() {\n return actionObject.type;\n },\n enumerable: false,\n configurable: true\n });\n return actionObject;\n}\n\nvar toActionObjects = function toActionObjects(action, actionFunctionMap) {\n if (!action) {\n return [];\n }\n\n var actions = isArray(action) ? action : [action];\n return actions.map(function (subAction) {\n return toActionObject(subAction, actionFunctionMap);\n });\n};\n\nfunction toActivityDefinition(action) {\n var actionObject = toActionObject(action);\n return __assign(__assign({\n id: isString(action) ? action : actionObject.id\n }, actionObject), {\n type: actionObject.type\n });\n}\n/**\r\n * Raises an event. This places the event in the internal event queue, so that\r\n * the event is immediately consumed by the machine in the current step.\r\n *\r\n * @param eventType The event to raise.\r\n */\n\n\nfunction raise(event) {\n if (!isString(event)) {\n return send(event, {\n to: SpecialTargets.Internal\n });\n }\n\n return {\n type: raise$1,\n event: event\n };\n}\n\nfunction resolveRaise(action) {\n return {\n type: raise$1,\n _event: toSCXMLEvent(action.event)\n };\n}\n/**\r\n * Sends an event. This returns an action that will be read by an interpreter to\r\n * send the event in the next step, after the current step is finished executing.\r\n *\r\n * @param event The event to send.\r\n * @param options Options to pass into the send event:\r\n * - `id` - The unique send event identifier (used with `cancel()`).\r\n * - `delay` - The number of milliseconds to delay the sending of the event.\r\n * - `to` - The target of this event (by default, the machine the event was sent from).\r\n */\n\n\nfunction send(event, options) {\n return {\n to: options ? options.to : undefined,\n type: send$1,\n event: isFunction(event) ? event : toEventObject(event),\n delay: options ? options.delay : undefined,\n id: options && options.id !== undefined ? options.id : isFunction(event) ? event.name : getEventType(event)\n };\n}\n\nfunction resolveSend(action, ctx, _event, delaysMap) {\n var meta = {\n _event: _event\n }; // TODO: helper function for resolving Expr\n\n var resolvedEvent = toSCXMLEvent(isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);\n var resolvedDelay;\n\n if (isString(action.delay)) {\n var configDelay = delaysMap && delaysMap[action.delay];\n resolvedDelay = isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;\n } else {\n resolvedDelay = isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;\n }\n\n var resolvedTarget = isFunction(action.to) ? action.to(ctx, _event.data, meta) : action.to;\n return __assign(__assign({}, action), {\n to: resolvedTarget,\n _event: resolvedEvent,\n event: resolvedEvent.data,\n delay: resolvedDelay\n });\n}\n/**\r\n * Sends an event to this machine's parent.\r\n *\r\n * @param event The event to send to the parent machine.\r\n * @param options Options to pass into the send event.\r\n */\n\n\nfunction sendParent(event, options) {\n return send(event, __assign(__assign({}, options), {\n to: SpecialTargets.Parent\n }));\n}\n/**\r\n * Sends an update event to this machine's parent.\r\n */\n\n\nfunction sendUpdate() {\n return sendParent(update);\n}\n/**\r\n * Sends an event back to the sender of the original event.\r\n *\r\n * @param event The event to send back to the sender\r\n * @param options Options to pass into the send event\r\n */\n\n\nfunction respond(event, options) {\n return send(event, __assign(__assign({}, options), {\n to: function to(_, __, _a) {\n var _event = _a._event;\n return _event.origin; // TODO: handle when _event.origin is undefined\n }\n }));\n}\n\nvar defaultLogExpr = function defaultLogExpr(context, event) {\n return {\n context: context,\n event: event\n };\n};\n/**\r\n *\r\n * @param expr The expression function to evaluate which will be logged.\r\n * Takes in 2 arguments:\r\n * - `ctx` - the current state context\r\n * - `event` - the event that caused this action to be executed.\r\n * @param label The label to give to the logged expression.\r\n */\n\n\nfunction log(expr, label) {\n if (expr === void 0) {\n expr = defaultLogExpr;\n }\n\n return {\n type: log$1,\n label: label,\n expr: expr\n };\n}\n\nvar resolveLog = function resolveLog(action, ctx, _event) {\n return __assign(__assign({}, action), {\n value: isString(action.expr) ? action.expr : action.expr(ctx, _event.data, {\n _event: _event\n })\n });\n};\n/**\r\n * Cancels an in-flight `send(...)` action. A canceled sent action will not\r\n * be executed, nor will its event be sent, unless it has already been sent\r\n * (e.g., if `cancel(...)` is called after the `send(...)` action's `delay`).\r\n *\r\n * @param sendId The `id` of the `send(...)` action to cancel.\r\n */\n\n\nvar cancel = function cancel(sendId) {\n return {\n type: cancel$1,\n sendId: sendId\n };\n};\n/**\r\n * Starts an activity.\r\n *\r\n * @param activity The activity to start.\r\n */\n\n\nfunction start(activity) {\n var activityDef = toActivityDefinition(activity);\n return {\n type: ActionTypes.Start,\n activity: activityDef,\n exec: undefined\n };\n}\n/**\r\n * Stops an activity.\r\n *\r\n * @param activity The activity to stop.\r\n */\n\n\nfunction stop(activity) {\n var activityDef = toActivityDefinition(activity);\n return {\n type: ActionTypes.Stop,\n activity: activityDef,\n exec: undefined\n };\n}\n/**\r\n * Updates the current context of the machine.\r\n *\r\n * @param assignment An object that represents the partial context to update.\r\n */\n\n\nvar assign = function assign(assignment) {\n return {\n type: assign$1,\n assignment: assignment\n };\n};\n/**\r\n * Returns an event type that represents an implicit event that\r\n * is sent after the specified `delay`.\r\n *\r\n * @param delayRef The delay in milliseconds\r\n * @param id The state node ID where this event is handled\r\n */\n\n\nfunction after(delayRef, id) {\n var idSuffix = id ? \"#\" + id : '';\n return ActionTypes.After + \"(\" + delayRef + \")\" + idSuffix;\n}\n/**\r\n * Returns an event that represents that a final state node\r\n * has been reached in the parent state node.\r\n *\r\n * @param id The final state node's parent state node `id`\r\n * @param data The data to pass into the event\r\n */\n\n\nfunction done(id, data) {\n var type = ActionTypes.DoneState + \".\" + id;\n var eventObject = {\n type: type,\n data: data\n };\n\n eventObject.toString = function () {\n return type;\n };\n\n return eventObject;\n}\n/**\r\n * Returns an event that represents that an invoked service has terminated.\r\n *\r\n * An invoked service is terminated when it has reached a top-level final state node,\r\n * but not when it is canceled.\r\n *\r\n * @param id The final state node ID\r\n * @param data The data to pass into the event\r\n */\n\n\nfunction doneInvoke(id, data) {\n var type = ActionTypes.DoneInvoke + \".\" + id;\n var eventObject = {\n type: type,\n data: data\n };\n\n eventObject.toString = function () {\n return type;\n };\n\n return eventObject;\n}\n\nfunction error(id, data) {\n var type = ActionTypes.ErrorPlatform + \".\" + id;\n var eventObject = {\n type: type,\n data: data\n };\n\n eventObject.toString = function () {\n return type;\n };\n\n return eventObject;\n}\n/**\r\n * Forwards (sends) an event to a specified service.\r\n *\r\n * @param target The target service to forward the event to.\r\n * @param options Options to pass into the send action creator.\r\n */\n\n\nfunction forwardTo(target, options) {\n return send(function (_, event) {\n return event;\n }, __assign(__assign({}, options), {\n to: target\n }));\n}\n/**\r\n * Escalates an error by sending it as an event to this machine's parent.\r\n *\r\n * @param errorData The error data to send, or the expression function that\r\n * takes in the `context`, `event`, and `meta`, and returns the error data to send.\r\n * @param options Options to pass into the send action creator.\r\n */\n\n\nfunction escalate(errorData, options) {\n return sendParent(function (context, event, meta) {\n return {\n type: error$1,\n data: isFunction(errorData) ? errorData(context, event, meta) : errorData\n };\n }, __assign(__assign({}, options), {\n to: SpecialTargets.Parent\n }));\n}\n\nexport { after, assign, cancel, done, doneInvoke, error, escalate, forwardTo, getActionFunction, initEvent, log, raise, resolveLog, resolveRaise, resolveSend, respond, send, sendParent, sendUpdate, start, stop, toActionObject, toActionObjects, toActivityDefinition };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport { createElement, useContext, useRef, useLayoutEffect } from 'react';\nimport '@emotion/cache';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext } from './emotion-element-99289b21.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-99289b21.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport 'hoist-non-react-statics';\nimport '../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js';\nimport { insertStyles, getRegisteredStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { StyleSheet } from '@emotion/sheet';\nvar pkg = {\n name: \"@emotion/react\",\n version: \"11.5.0\",\n main: \"dist/emotion-react.cjs.js\",\n module: \"dist/emotion-react.esm.js\",\n browser: {\n \"./dist/emotion-react.cjs.js\": \"./dist/emotion-react.browser.cjs.js\",\n \"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n },\n types: \"types/index.d.ts\",\n files: [\"src\", \"dist\", \"jsx-runtime\", \"jsx-dev-runtime\", \"isolated-hoist-non-react-statics-do-not-use-this-in-your-code\", \"types/*.d.ts\", \"macro.js\", \"macro.d.ts\", \"macro.js.flow\"],\n sideEffects: false,\n author: \"mitchellhamilton \",\n license: \"MIT\",\n scripts: {\n \"test:typescript\": \"dtslint types\"\n },\n dependencies: {\n \"@babel/runtime\": \"^7.13.10\",\n \"@emotion/cache\": \"^11.5.0\",\n \"@emotion/serialize\": \"^1.0.2\",\n \"@emotion/sheet\": \"^1.0.3\",\n \"@emotion/utils\": \"^1.0.0\",\n \"@emotion/weak-memoize\": \"^0.2.5\",\n \"hoist-non-react-statics\": \"^3.3.1\"\n },\n peerDependencies: {\n \"@babel/core\": \"^7.0.0\",\n react: \">=16.8.0\"\n },\n peerDependenciesMeta: {\n \"@babel/core\": {\n optional: true\n },\n \"@types/react\": {\n optional: true\n }\n },\n devDependencies: {\n \"@babel/core\": \"^7.13.10\",\n \"@emotion/css\": \"11.5.0\",\n \"@emotion/css-prettifier\": \"1.0.0\",\n \"@emotion/server\": \"11.4.0\",\n \"@emotion/styled\": \"11.3.0\",\n \"@types/react\": \"^16.9.11\",\n dtslint: \"^0.3.0\",\n \"html-tag-names\": \"^1.1.2\",\n react: \"16.14.0\",\n \"svg-tag-names\": \"^1.1.1\"\n },\n repository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n publishConfig: {\n access: \"public\"\n },\n \"umd:main\": \"dist/emotion-react.umd.min.js\",\n preconstruct: {\n entrypoints: [\"./index.js\", \"./jsx-runtime.js\", \"./jsx-dev-runtime.js\", \"./isolated-hoist-non-react-statics-do-not-use-this-in-your-code.js\"],\n umdName: \"emotionReact\"\n }\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwnProperty.call(props, 'css')) {\n // $FlowFixMe\n return createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, useContext(ThemeContext)); // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n var sheetRef = useRef();\n useLayoutEffect(function () {\n var key = cache.key + \"-global\";\n var sheet = new StyleSheet({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useLayoutEffect(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (_typeof(arg)) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from component.');\n }\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n {\n insertStyles(cache, serialized, false);\n }\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return ele;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var isBrowser = \"object\" !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock\n\n var isJest = typeof jest !== 'undefined';\n\n if (isBrowser && !isJest) {\n // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later\n var globalContext = // $FlowIgnore\n typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef\n : isBrowser ? window : global;\n var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n if (globalContext[globalKey]) {\n console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n }\n\n globalContext[globalKey] = true;\n }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","var _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n\nvar _dispatchable = /*#__PURE__*/require(\"./internal/_dispatchable\");\n\nvar _filter = /*#__PURE__*/require(\"./internal/_filter\");\n\nvar _isObject = /*#__PURE__*/require(\"./internal/_isObject\");\n\nvar _reduce = /*#__PURE__*/require(\"./internal/_reduce\");\n\nvar _xfilter = /*#__PURE__*/require(\"./internal/_xfilter\");\n\nvar keys = /*#__PURE__*/require(\"./keys\");\n/**\n * Takes a predicate and a `Filterable`, and returns a new filterable of the\n * same type containing the members of the given filterable which satisfy the\n * given predicate. Filterable objects include plain objects or any object\n * that has a filter method such as `Array`.\n *\n * Dispatches to the `filter` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array} Filterable\n * @see R.reject, R.transduce, R.addIndex\n * @example\n *\n * const isEven = n => n % 2 === 0;\n *\n * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\n\n\nvar filter = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['filter'], _xfilter, function (pred, filterable) {\n return _isObject(filterable) ? _reduce(function (acc, key) {\n if (pred(filterable[key])) {\n acc[key] = filterable[key];\n }\n\n return acc;\n }, {}, keys(filterable)) : // else\n _filter(pred, filterable);\n}));\n\nmodule.exports = filter;","var _includes = /*#__PURE__*/require(\"./internal/_includes\");\n\nvar _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n * Works also with strings.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.any\n * @example\n *\n * R.includes(3, [1, 2, 3]); //=> true\n * R.includes(4, [1, 2, 3]); //=> false\n * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n * R.includes([42], [[42]]); //=> true\n * R.includes('ba', 'banana'); //=>true\n */\n\n\nvar includes = /*#__PURE__*/_curry2(_includes);\n\nmodule.exports = includes;","var NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar bind = FunctionPrototype.bind;\nvar call = FunctionPrototype.call;\nvar uncurryThis = NATIVE_BIND && bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? function (fn) {\n return fn && uncurryThis(fn);\n} : function (fn) {\n return fn && function () {\n return call.apply(fn, arguments);\n };\n};\n","var _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n/**\n * Returns a copy of the list, sorted according to the comparator function,\n * which should accept two values at a time and return a negative number if the\n * first value is smaller, a positive number if it's larger, and zero if they\n * are equal. Please note that this is a **copy** of the list. It does not\n * modify the original.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, a) -> Number) -> [a] -> [a]\n * @param {Function} comparator A sorting function :: a -> b -> Int\n * @param {Array} list The list to sort\n * @return {Array} a new array with its elements sorted by the comparator function.\n * @example\n *\n * const diff = function(a, b) { return a - b; };\n * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7]\n */\n\n\nvar sort = /*#__PURE__*/_curry2(function sort(comparator, list) {\n return Array.prototype.slice.call(list, 0).sort(comparator);\n});\n\nmodule.exports = sort;","// TODO: Remove from `core-js@4`\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar DatePrototype = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar un$DateToString = uncurryThis(DatePrototype[TO_STRING]);\nvar getTime = uncurryThis(DatePrototype.getTime);\n\n// `Date.prototype.toString` method\n// https://tc39.es/ecma262/#sec-date.prototype.tostring\nif (String(new Date(NaN)) != INVALID_DATE) {\n defineBuiltIn(DatePrototype, TO_STRING, function toString() {\n var value = getTime(this);\n // eslint-disable-next-line no-self-compare -- NaN check\n return value === value ? un$DateToString(this) : INVALID_DATE;\n });\n}\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n\nvar _dispatchable = /*#__PURE__*/require(\"./internal/_dispatchable\");\n\nvar _xfindIndex = /*#__PURE__*/require(\"./internal/_xfindIndex\");\n/**\n * Returns the index of the first element of the list which matches the\n * predicate, or `-1` if no element matches.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> Boolean) -> [a] -> Number\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Number} The index of the element found, or `-1`.\n * @see R.transduce\n * @example\n *\n * const xs = [{a: 1}, {a: 2}, {a: 3}];\n * R.findIndex(R.propEq('a', 2))(xs); //=> 1\n * R.findIndex(R.propEq('a', 4))(xs); //=> -1\n */\n\n\nvar findIndex = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xfindIndex, function findIndex(fn, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (fn(list[idx])) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n}));\n\nmodule.exports = findIndex;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _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 } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _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); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { ReplaceError, Slice, Fragment, MarkType, Mark } from 'prosemirror-model'; // Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\n\nvar lower16 = 0xffff;\nvar factor16 = Math.pow(2, 16);\n\nfunction makeRecover(index, offset) {\n return index + offset * factor16;\n}\n\nfunction recoverIndex(value) {\n return value & lower16;\n}\n\nfunction recoverOffset(value) {\n return (value - (value & lower16)) / factor16;\n}\n\nvar DEL_BEFORE = 1,\n DEL_AFTER = 2,\n DEL_ACROSS = 4,\n DEL_SIDE = 8;\n/**\nAn object representing a mapped position with extra\ninformation.\n*/\n\nvar MapResult = /*#__PURE__*/function () {\n /**\n @internal\n */\n function MapResult(\n /**\n The mapped version of the position.\n */\n pos,\n /**\n @internal\n */\n delInfo,\n /**\n @internal\n */\n recover) {\n _classCallCheck(this, MapResult);\n\n this.pos = pos;\n this.delInfo = delInfo;\n this.recover = recover;\n }\n /**\n Tells you whether the position was deleted, that is, whether the\n step removed the token on the side queried (via the `assoc`)\n argument from the document.\n */\n\n\n _createClass(MapResult, [{\n key: \"deleted\",\n get: function get() {\n return (this.delInfo & DEL_SIDE) > 0;\n }\n /**\n Tells you whether the token before the mapped position was deleted.\n */\n\n }, {\n key: \"deletedBefore\",\n get: function get() {\n return (this.delInfo & (DEL_BEFORE | DEL_ACROSS)) > 0;\n }\n /**\n True when the token after the mapped position was deleted.\n */\n\n }, {\n key: \"deletedAfter\",\n get: function get() {\n return (this.delInfo & (DEL_AFTER | DEL_ACROSS)) > 0;\n }\n /**\n Tells whether any of the steps mapped through deletes across the\n position (including both the token before and after the\n position).\n */\n\n }, {\n key: \"deletedAcross\",\n get: function get() {\n return (this.delInfo & DEL_ACROSS) > 0;\n }\n }]);\n\n return MapResult;\n}();\n/**\nA map describing the deletions and insertions made by a step, which\ncan be used to find the correspondence between positions in the\npre-step version of a document and the same position in the\npost-step version.\n*/\n\n\nvar StepMap = /*#__PURE__*/function () {\n /**\n Create a position map. The modifications to the document are\n represented as an array of numbers, in which each group of three\n represents a modified chunk as `[start, oldSize, newSize]`.\n */\n function StepMap(\n /**\n @internal\n */\n ranges) {\n var inverted = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n _classCallCheck(this, StepMap);\n\n this.ranges = ranges;\n this.inverted = inverted;\n if (!ranges.length && StepMap.empty) return StepMap.empty;\n }\n /**\n @internal\n */\n\n\n _createClass(StepMap, [{\n key: \"recover\",\n value: function recover(value) {\n var diff = 0,\n index = recoverIndex(value);\n if (!this.inverted) for (var i = 0; i < index; i++) {\n diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];\n }\n return this.ranges[index * 3] + diff + recoverOffset(value);\n }\n }, {\n key: \"mapResult\",\n value: function mapResult(pos) {\n var assoc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return this._map(pos, assoc, false);\n }\n }, {\n key: \"map\",\n value: function map(pos) {\n var assoc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return this._map(pos, assoc, true);\n }\n /**\n @internal\n */\n\n }, {\n key: \"_map\",\n value: function _map(pos, assoc, simple) {\n var diff = 0,\n oldIndex = this.inverted ? 2 : 1,\n newIndex = this.inverted ? 1 : 2;\n\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos) break;\n var oldSize = this.ranges[i + oldIndex],\n newSize = this.ranges[i + newIndex],\n end = start + oldSize;\n\n if (pos <= end) {\n var side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n var result = start + diff + (side < 0 ? 0 : newSize);\n if (simple) return result;\n var recover = pos == (assoc < 0 ? start : end) ? null : makeRecover(i / 3, pos - start);\n var del = pos == start ? DEL_AFTER : pos == end ? DEL_BEFORE : DEL_ACROSS;\n if (assoc < 0 ? pos != start : pos != end) del |= DEL_SIDE;\n return new MapResult(result, del, recover);\n }\n\n diff += newSize - oldSize;\n }\n\n return simple ? pos + diff : new MapResult(pos + diff, 0, null);\n }\n /**\n @internal\n */\n\n }, {\n key: \"touches\",\n value: function touches(pos, recover) {\n var diff = 0,\n index = recoverIndex(recover);\n var oldIndex = this.inverted ? 2 : 1,\n newIndex = this.inverted ? 1 : 2;\n\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos) break;\n var oldSize = this.ranges[i + oldIndex],\n end = start + oldSize;\n if (pos <= end && i == index * 3) return true;\n diff += this.ranges[i + newIndex] - oldSize;\n }\n\n return false;\n }\n /**\n Calls the given function on each of the changed ranges included in\n this map.\n */\n\n }, {\n key: \"forEach\",\n value: function forEach(f) {\n var oldIndex = this.inverted ? 2 : 1,\n newIndex = this.inverted ? 1 : 2;\n\n for (var i = 0, diff = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i],\n oldStart = start - (this.inverted ? diff : 0),\n newStart = start + (this.inverted ? 0 : diff);\n var oldSize = this.ranges[i + oldIndex],\n newSize = this.ranges[i + newIndex];\n f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n diff += newSize - oldSize;\n }\n }\n /**\n Create an inverted version of this map. The result can be used to\n map positions in the post-step document to the pre-step document.\n */\n\n }, {\n key: \"invert\",\n value: function invert() {\n return new StepMap(this.ranges, !this.inverted);\n }\n /**\n @internal\n */\n\n }, {\n key: \"toString\",\n value: function toString() {\n return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges);\n }\n /**\n Create a map that moves all positions by offset `n` (which may be\n negative). This can be useful when applying steps meant for a\n sub-document to a larger document, or vice-versa.\n */\n\n }], [{\n key: \"offset\",\n value: function offset(n) {\n return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]);\n }\n }]);\n\n return StepMap;\n}();\n/**\nA StepMap that contains no changed ranges.\n*/\n\n\nStepMap.empty = new StepMap([]);\n/**\nA mapping represents a pipeline of zero or more [step\nmaps](https://prosemirror.net/docs/ref/#transform.StepMap). It has special provisions for losslessly\nhandling mapping positions through a series of steps in which some\nsteps are inverted versions of earlier steps. (This comes up when\n‘[rebasing](/docs/guide/#transform.rebasing)’ steps for\ncollaboration or history management.)\n*/\n\nvar Mapping = /*#__PURE__*/function () {\n /**\n Create a new mapping with the given position maps.\n */\n function Mapping() {\n var maps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var\n /**\n @internal\n */\n mirror = arguments.length > 1 ? arguments[1] : undefined;\n var from = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var to = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : maps.length;\n\n _classCallCheck(this, Mapping);\n\n this.maps = maps;\n this.mirror = mirror;\n this.from = from;\n this.to = to;\n }\n /**\n Create a mapping that maps only through a part of this one.\n */\n\n\n _createClass(Mapping, [{\n key: \"slice\",\n value: function slice() {\n var from = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.maps.length;\n return new Mapping(this.maps, this.mirror, from, to);\n }\n /**\n @internal\n */\n\n }, {\n key: \"copy\",\n value: function copy() {\n return new Mapping(this.maps.slice(), this.mirror && this.mirror.slice(), this.from, this.to);\n }\n /**\n Add a step map to the end of this mapping. If `mirrors` is\n given, it should be the index of the step map that is the mirror\n image of this one.\n */\n\n }, {\n key: \"appendMap\",\n value: function appendMap(map, mirrors) {\n this.to = this.maps.push(map);\n if (mirrors != null) this.setMirror(this.maps.length - 1, mirrors);\n }\n /**\n Add all the step maps in a given mapping to this one (preserving\n mirroring information).\n */\n\n }, {\n key: \"appendMapping\",\n value: function appendMapping(mapping) {\n for (var i = 0, startSize = this.maps.length; i < mapping.maps.length; i++) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i], mirr != null && mirr < i ? startSize + mirr : undefined);\n }\n }\n /**\n Finds the offset of the step map that mirrors the map at the\n given offset, in this mapping (as per the second argument to\n `appendMap`).\n */\n\n }, {\n key: \"getMirror\",\n value: function getMirror(n) {\n if (this.mirror) for (var i = 0; i < this.mirror.length; i++) {\n if (this.mirror[i] == n) return this.mirror[i + (i % 2 ? -1 : 1)];\n }\n }\n /**\n @internal\n */\n\n }, {\n key: \"setMirror\",\n value: function setMirror(n, m) {\n if (!this.mirror) this.mirror = [];\n this.mirror.push(n, m);\n }\n /**\n Append the inverse of the given mapping to this one.\n */\n\n }, {\n key: \"appendMappingInverted\",\n value: function appendMappingInverted(mapping) {\n for (var i = mapping.maps.length - 1, totalSize = this.maps.length + mapping.maps.length; i >= 0; i--) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : undefined);\n }\n }\n /**\n Create an inverted version of this mapping.\n */\n\n }, {\n key: \"invert\",\n value: function invert() {\n var inverse = new Mapping();\n inverse.appendMappingInverted(this);\n return inverse;\n }\n /**\n Map a position through this mapping.\n */\n\n }, {\n key: \"map\",\n value: function map(pos) {\n var assoc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n if (this.mirror) return this._map(pos, assoc, true);\n\n for (var i = this.from; i < this.to; i++) {\n pos = this.maps[i].map(pos, assoc);\n }\n\n return pos;\n }\n /**\n Map a position through this mapping, returning a mapping\n result.\n */\n\n }, {\n key: \"mapResult\",\n value: function mapResult(pos) {\n var assoc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return this._map(pos, assoc, false);\n }\n /**\n @internal\n */\n\n }, {\n key: \"_map\",\n value: function _map(pos, assoc, simple) {\n var delInfo = 0;\n\n for (var i = this.from; i < this.to; i++) {\n var map = this.maps[i],\n result = map.mapResult(pos, assoc);\n\n if (result.recover != null) {\n var corr = this.getMirror(i);\n\n if (corr != null && corr > i && corr < this.to) {\n i = corr;\n pos = this.maps[corr].recover(result.recover);\n continue;\n }\n }\n\n delInfo |= result.delInfo;\n pos = result.pos;\n }\n\n return simple ? pos : new MapResult(pos, delInfo, null);\n }\n }]);\n\n return Mapping;\n}();\n\nvar stepsByID = Object.create(null);\n/**\nA step object represents an atomic change. It generally applies\nonly to the document it was created for, since the positions\nstored in it will only make sense for that document.\n\nNew steps are defined by creating classes that extend `Step`,\noverriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\nmethods, and registering your class with a unique\nJSON-serialization identifier using\n[`Step.jsonID`](https://prosemirror.net/docs/ref/#transform.Step^jsonID).\n*/\n\nvar Step = /*#__PURE__*/function () {\n function Step() {\n _classCallCheck(this, Step);\n }\n\n _createClass(Step, [{\n key: \"getMap\",\n value:\n /**\n Get the step map that represents the changes made by this step,\n and which can be used to transform between positions in the old\n and the new document.\n */\n function getMap() {\n return StepMap.empty;\n }\n /**\n Try to merge this step with another one, to be applied directly\n after it. Returns the merged step when possible, null if the\n steps can't be merged.\n */\n\n }, {\n key: \"merge\",\n value: function merge(other) {\n return null;\n }\n /**\n Deserialize a step from its JSON representation. Will call\n through to the step class' own implementation of this method.\n */\n\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (!json || !json.stepType) throw new RangeError(\"Invalid input for Step.fromJSON\");\n var type = stepsByID[json.stepType];\n if (!type) throw new RangeError(\"No step type \".concat(json.stepType, \" defined\"));\n return type.fromJSON(schema, json);\n }\n /**\n To be able to serialize steps to JSON, each step needs a string\n ID to attach to its JSON representation. Use this method to\n register an ID for your step classes. Try to pick something\n that's unlikely to clash with steps from other modules.\n */\n\n }, {\n key: \"jsonID\",\n value: function jsonID(id, stepClass) {\n if (id in stepsByID) throw new RangeError(\"Duplicate use of step JSON ID \" + id);\n stepsByID[id] = stepClass;\n stepClass.prototype.jsonID = id;\n return stepClass;\n }\n }]);\n\n return Step;\n}();\n/**\nThe result of [applying](https://prosemirror.net/docs/ref/#transform.Step.apply) a step. Contains either a\nnew document or a failure value.\n*/\n\n\nvar StepResult = /*#__PURE__*/function () {\n /**\n @internal\n */\n function StepResult(\n /**\n The transformed document, if successful.\n */\n doc,\n /**\n The failure message, if unsuccessful.\n */\n failed) {\n _classCallCheck(this, StepResult);\n\n this.doc = doc;\n this.failed = failed;\n }\n /**\n Create a successful step result.\n */\n\n\n _createClass(StepResult, null, [{\n key: \"ok\",\n value: function ok(doc) {\n return new StepResult(doc, null);\n }\n /**\n Create a failed step result.\n */\n\n }, {\n key: \"fail\",\n value: function fail(message) {\n return new StepResult(null, message);\n }\n /**\n Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given\n arguments. Create a successful result if it succeeds, and a\n failed one if it throws a `ReplaceError`.\n */\n\n }, {\n key: \"fromReplace\",\n value: function fromReplace(doc, from, to, slice) {\n try {\n return StepResult.ok(doc.replace(from, to, slice));\n } catch (e) {\n if (e instanceof ReplaceError) return StepResult.fail(e.message);\n throw e;\n }\n }\n }]);\n\n return StepResult;\n}();\n\nfunction mapFragment(fragment, f, parent) {\n var mapped = [];\n\n for (var i = 0; i < fragment.childCount; i++) {\n var child = fragment.child(i);\n if (child.content.size) child = child.copy(mapFragment(child.content, f, child));\n if (child.isInline) child = f(child, parent, i);\n mapped.push(child);\n }\n\n return Fragment.fromArray(mapped);\n}\n/**\nAdd a mark to all inline content between two positions.\n*/\n\n\nvar AddMarkStep = /*#__PURE__*/function (_Step) {\n _inherits(AddMarkStep, _Step);\n\n var _super = _createSuper(AddMarkStep);\n\n /**\n Create a mark step.\n */\n function AddMarkStep(\n /**\n The start of the marked range.\n */\n from,\n /**\n The end of the marked range.\n */\n to,\n /**\n The mark to add.\n */\n mark) {\n var _this;\n\n _classCallCheck(this, AddMarkStep);\n\n _this = _super.call(this);\n _this.from = from;\n _this.to = to;\n _this.mark = mark;\n return _this;\n }\n\n _createClass(AddMarkStep, [{\n key: \"apply\",\n value: function apply(doc) {\n var _this2 = this;\n\n var oldSlice = doc.slice(this.from, this.to),\n $from = doc.resolve(this.from);\n var parent = $from.node($from.sharedDepth(this.to));\n var slice = new Slice(mapFragment(oldSlice.content, function (node, parent) {\n if (!node.isAtom || !parent.type.allowsMarkType(_this2.mark.type)) return node;\n return node.mark(_this2.mark.addToSet(node.marks));\n }, parent), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n }\n }, {\n key: \"invert\",\n value: function invert() {\n return new RemoveMarkStep(this.from, this.to, this.mark);\n }\n }, {\n key: \"map\",\n value: function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos) return null;\n return new AddMarkStep(from.pos, to.pos, this.mark);\n }\n }, {\n key: \"merge\",\n value: function merge(other) {\n if (other instanceof AddMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) return new AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n return null;\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n stepType: \"addMark\",\n mark: this.mark.toJSON(),\n from: this.from,\n to: this.to\n };\n }\n /**\n @internal\n */\n\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\") throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\");\n return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n }\n }]);\n\n return AddMarkStep;\n}(Step);\n\nStep.jsonID(\"addMark\", AddMarkStep);\n/**\nRemove a mark from all inline content between two positions.\n*/\n\nvar RemoveMarkStep = /*#__PURE__*/function (_Step2) {\n _inherits(RemoveMarkStep, _Step2);\n\n var _super2 = _createSuper(RemoveMarkStep);\n\n /**\n Create a mark-removing step.\n */\n function RemoveMarkStep(\n /**\n The start of the unmarked range.\n */\n from,\n /**\n The end of the unmarked range.\n */\n to,\n /**\n The mark to remove.\n */\n mark) {\n var _this3;\n\n _classCallCheck(this, RemoveMarkStep);\n\n _this3 = _super2.call(this);\n _this3.from = from;\n _this3.to = to;\n _this3.mark = mark;\n return _this3;\n }\n\n _createClass(RemoveMarkStep, [{\n key: \"apply\",\n value: function apply(doc) {\n var _this4 = this;\n\n var oldSlice = doc.slice(this.from, this.to);\n var slice = new Slice(mapFragment(oldSlice.content, function (node) {\n return node.mark(_this4.mark.removeFromSet(node.marks));\n }, doc), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n }\n }, {\n key: \"invert\",\n value: function invert() {\n return new AddMarkStep(this.from, this.to, this.mark);\n }\n }, {\n key: \"map\",\n value: function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos) return null;\n return new RemoveMarkStep(from.pos, to.pos, this.mark);\n }\n }, {\n key: \"merge\",\n value: function merge(other) {\n if (other instanceof RemoveMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) return new RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n return null;\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n stepType: \"removeMark\",\n mark: this.mark.toJSON(),\n from: this.from,\n to: this.to\n };\n }\n /**\n @internal\n */\n\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\") throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\");\n return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n }\n }]);\n\n return RemoveMarkStep;\n}(Step);\n\nStep.jsonID(\"removeMark\", RemoveMarkStep);\n/**\nAdd a mark to a specific node.\n*/\n\nvar AddNodeMarkStep = /*#__PURE__*/function (_Step3) {\n _inherits(AddNodeMarkStep, _Step3);\n\n var _super3 = _createSuper(AddNodeMarkStep);\n\n /**\n Create a node mark step.\n */\n function AddNodeMarkStep(\n /**\n The position of the target node.\n */\n pos,\n /**\n The mark to add.\n */\n mark) {\n var _this5;\n\n _classCallCheck(this, AddNodeMarkStep);\n\n _this5 = _super3.call(this);\n _this5.pos = pos;\n _this5.mark = mark;\n return _this5;\n }\n\n _createClass(AddNodeMarkStep, [{\n key: \"apply\",\n value: function apply(doc) {\n var node = doc.nodeAt(this.pos);\n if (!node) return StepResult.fail(\"No node at mark step's position\");\n var updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n }, {\n key: \"invert\",\n value: function invert(doc) {\n var node = doc.nodeAt(this.pos);\n\n if (node) {\n var newSet = this.mark.addToSet(node.marks);\n\n if (newSet.length == node.marks.length) {\n for (var i = 0; i < node.marks.length; i++) {\n if (!node.marks[i].isInSet(newSet)) return new AddNodeMarkStep(this.pos, node.marks[i]);\n }\n\n return new AddNodeMarkStep(this.pos, this.mark);\n }\n }\n\n return new RemoveNodeMarkStep(this.pos, this.mark);\n }\n }, {\n key: \"map\",\n value: function map(mapping) {\n var pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n stepType: \"addNodeMark\",\n pos: this.pos,\n mark: this.mark.toJSON()\n };\n }\n /**\n @internal\n */\n\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (typeof json.pos != \"number\") throw new RangeError(\"Invalid input for AddNodeMarkStep.fromJSON\");\n return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n }\n }]);\n\n return AddNodeMarkStep;\n}(Step);\n\nStep.jsonID(\"addNodeMark\", AddNodeMarkStep);\n/**\nRemove a mark from a specific node.\n*/\n\nvar RemoveNodeMarkStep = /*#__PURE__*/function (_Step4) {\n _inherits(RemoveNodeMarkStep, _Step4);\n\n var _super4 = _createSuper(RemoveNodeMarkStep);\n\n /**\n Create a mark-removing step.\n */\n function RemoveNodeMarkStep(\n /**\n The position of the target node.\n */\n pos,\n /**\n The mark to remove.\n */\n mark) {\n var _this6;\n\n _classCallCheck(this, RemoveNodeMarkStep);\n\n _this6 = _super4.call(this);\n _this6.pos = pos;\n _this6.mark = mark;\n return _this6;\n }\n\n _createClass(RemoveNodeMarkStep, [{\n key: \"apply\",\n value: function apply(doc) {\n var node = doc.nodeAt(this.pos);\n if (!node) return StepResult.fail(\"No node at mark step's position\");\n var updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n }, {\n key: \"invert\",\n value: function invert(doc) {\n var node = doc.nodeAt(this.pos);\n if (!node || !this.mark.isInSet(node.marks)) return this;\n return new AddNodeMarkStep(this.pos, this.mark);\n }\n }, {\n key: \"map\",\n value: function map(mapping) {\n var pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n stepType: \"removeNodeMark\",\n pos: this.pos,\n mark: this.mark.toJSON()\n };\n }\n /**\n @internal\n */\n\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (typeof json.pos != \"number\") throw new RangeError(\"Invalid input for RemoveNodeMarkStep.fromJSON\");\n return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n }\n }]);\n\n return RemoveNodeMarkStep;\n}(Step);\n\nStep.jsonID(\"removeNodeMark\", RemoveNodeMarkStep);\n/**\nReplace a part of the document with a slice of new content.\n*/\n\nvar ReplaceStep = /*#__PURE__*/function (_Step5) {\n _inherits(ReplaceStep, _Step5);\n\n var _super5 = _createSuper(ReplaceStep);\n\n /**\n The given `slice` should fit the 'gap' between `from` and\n `to`—the depths must line up, and the surrounding nodes must be\n able to be joined with the open sides of the slice. When\n `structure` is true, the step will fail if the content between\n from and to is not just a sequence of closing and then opening\n tokens (this is to guard against rebased replace steps\n overwriting something they weren't supposed to).\n */\n function ReplaceStep(\n /**\n The start position of the replaced range.\n */\n from,\n /**\n The end position of the replaced range.\n */\n to,\n /**\n The slice to insert.\n */\n slice) {\n var _this7;\n\n var structure = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n _classCallCheck(this, ReplaceStep);\n\n _this7 = _super5.call(this);\n _this7.from = from;\n _this7.to = to;\n _this7.slice = slice;\n _this7.structure = structure;\n return _this7;\n }\n\n _createClass(ReplaceStep, [{\n key: \"apply\",\n value: function apply(doc) {\n if (this.structure && contentBetween(doc, this.from, this.to)) return StepResult.fail(\"Structure replace would overwrite content\");\n return StepResult.fromReplace(doc, this.from, this.to, this.slice);\n }\n }, {\n key: \"getMap\",\n value: function getMap() {\n return new StepMap([this.from, this.to - this.from, this.slice.size]);\n }\n }, {\n key: \"invert\",\n value: function invert(doc) {\n return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));\n }\n }, {\n key: \"map\",\n value: function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n if (from.deletedAcross && to.deletedAcross) return null;\n return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice);\n }\n }, {\n key: \"merge\",\n value: function merge(other) {\n if (!(other instanceof ReplaceStep) || other.structure || this.structure) return null;\n\n if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n var slice = this.slice.size + other.slice.size == 0 ? Slice.empty : new Slice(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure);\n } else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n var _slice = this.slice.size + other.slice.size == 0 ? Slice.empty : new Slice(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n\n return new ReplaceStep(other.from, this.to, _slice, this.structure);\n } else {\n return null;\n }\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var json = {\n stepType: \"replace\",\n from: this.from,\n to: this.to\n };\n if (this.slice.size) json.slice = this.slice.toJSON();\n if (this.structure) json.structure = true;\n return json;\n }\n /**\n @internal\n */\n\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\") throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\");\n return new ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure);\n }\n }]);\n\n return ReplaceStep;\n}(Step);\n\nStep.jsonID(\"replace\", ReplaceStep);\n/**\nReplace a part of the document with a slice of content, but\npreserve a range of the replaced content by moving it into the\nslice.\n*/\n\nvar ReplaceAroundStep = /*#__PURE__*/function (_Step6) {\n _inherits(ReplaceAroundStep, _Step6);\n\n var _super6 = _createSuper(ReplaceAroundStep);\n\n /**\n Create a replace-around step with the given range and gap.\n `insert` should be the point in the slice into which the content\n of the gap should be moved. `structure` has the same meaning as\n it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class.\n */\n function ReplaceAroundStep(\n /**\n The start position of the replaced range.\n */\n from,\n /**\n The end position of the replaced range.\n */\n to,\n /**\n The start of preserved range.\n */\n gapFrom,\n /**\n The end of preserved range.\n */\n gapTo,\n /**\n The slice to insert.\n */\n slice,\n /**\n The position in the slice where the preserved range should be\n inserted.\n */\n insert) {\n var _this8;\n\n var structure = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;\n\n _classCallCheck(this, ReplaceAroundStep);\n\n _this8 = _super6.call(this);\n _this8.from = from;\n _this8.to = to;\n _this8.gapFrom = gapFrom;\n _this8.gapTo = gapTo;\n _this8.slice = slice;\n _this8.insert = insert;\n _this8.structure = structure;\n return _this8;\n }\n\n _createClass(ReplaceAroundStep, [{\n key: \"apply\",\n value: function apply(doc) {\n if (this.structure && (contentBetween(doc, this.from, this.gapFrom) || contentBetween(doc, this.gapTo, this.to))) return StepResult.fail(\"Structure gap-replace would overwrite content\");\n var gap = doc.slice(this.gapFrom, this.gapTo);\n if (gap.openStart || gap.openEnd) return StepResult.fail(\"Gap is not a flat range\");\n var inserted = this.slice.insertAt(this.insert, gap.content);\n if (!inserted) return StepResult.fail(\"Content does not fit in gap\");\n return StepResult.fromReplace(doc, this.from, this.to, inserted);\n }\n }, {\n key: \"getMap\",\n value: function getMap() {\n return new StepMap([this.from, this.gapFrom - this.from, this.insert, this.gapTo, this.to - this.gapTo, this.slice.size - this.insert]);\n }\n }, {\n key: \"invert\",\n value: function invert(doc) {\n var gap = this.gapTo - this.gapFrom;\n return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);\n }\n }, {\n key: \"map\",\n value: function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n var gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1);\n var gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1);\n if (from.deletedAcross && to.deletedAcross || gapFrom < from.pos || gapTo > to.pos) return null;\n return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var json = {\n stepType: \"replaceAround\",\n from: this.from,\n to: this.to,\n gapFrom: this.gapFrom,\n gapTo: this.gapTo,\n insert: this.insert\n };\n if (this.slice.size) json.slice = this.slice.toJSON();\n if (this.structure) json.structure = true;\n return json;\n }\n /**\n @internal\n */\n\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\" || typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\") throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\");\n return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure);\n }\n }]);\n\n return ReplaceAroundStep;\n}(Step);\n\nStep.jsonID(\"replaceAround\", ReplaceAroundStep);\n\nfunction contentBetween(doc, from, to) {\n var $from = doc.resolve(from),\n dist = to - from,\n depth = $from.depth;\n\n while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {\n depth--;\n dist--;\n }\n\n if (dist > 0) {\n var next = $from.node(depth).maybeChild($from.indexAfter(depth));\n\n while (dist > 0) {\n if (!next || next.isLeaf) return true;\n next = next.firstChild;\n dist--;\n }\n }\n\n return false;\n}\n\nfunction _addMark(tr, from, to, mark) {\n var removed = [],\n added = [];\n var removing, adding;\n tr.doc.nodesBetween(from, to, function (node, pos, parent) {\n if (!node.isInline) return;\n var marks = node.marks;\n\n if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n var start = Math.max(pos, from),\n end = Math.min(pos + node.nodeSize, to);\n var newSet = mark.addToSet(marks);\n\n for (var i = 0; i < marks.length; i++) {\n if (!marks[i].isInSet(newSet)) {\n if (removing && removing.to == start && removing.mark.eq(marks[i])) removing.to = end;else removed.push(removing = new RemoveMarkStep(start, end, marks[i]));\n }\n }\n\n if (adding && adding.to == start) adding.to = end;else added.push(adding = new AddMarkStep(start, end, mark));\n }\n });\n removed.forEach(function (s) {\n return tr.step(s);\n });\n added.forEach(function (s) {\n return tr.step(s);\n });\n}\n\nfunction _removeMark(tr, from, to, mark) {\n var matched = [],\n step = 0;\n tr.doc.nodesBetween(from, to, function (node, pos) {\n if (!node.isInline) return;\n step++;\n var toRemove = null;\n\n if (mark instanceof MarkType) {\n var set = node.marks,\n found;\n\n while (found = mark.isInSet(set)) {\n (toRemove || (toRemove = [])).push(found);\n set = found.removeFromSet(set);\n }\n } else if (mark) {\n if (mark.isInSet(node.marks)) toRemove = [mark];\n } else {\n toRemove = node.marks;\n }\n\n if (toRemove && toRemove.length) {\n var end = Math.min(pos + node.nodeSize, to);\n\n for (var i = 0; i < toRemove.length; i++) {\n var style = toRemove[i],\n _found = void 0;\n\n for (var j = 0; j < matched.length; j++) {\n var m = matched[j];\n if (m.step == step - 1 && style.eq(matched[j].style)) _found = m;\n }\n\n if (_found) {\n _found.to = end;\n _found.step = step;\n } else {\n matched.push({\n style: style,\n from: Math.max(pos, from),\n to: end,\n step: step\n });\n }\n }\n }\n });\n matched.forEach(function (m) {\n return tr.step(new RemoveMarkStep(m.from, m.to, m.style));\n });\n}\n\nfunction _clearIncompatible(tr, pos, parentType) {\n var match = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : parentType.contentMatch;\n var clearNewlines = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var node = tr.doc.nodeAt(pos);\n var replSteps = [],\n cur = pos + 1;\n\n for (var i = 0; i < node.childCount; i++) {\n var child = node.child(i),\n end = cur + child.nodeSize;\n var allowed = match.matchType(child.type);\n\n if (!allowed) {\n replSteps.push(new ReplaceStep(cur, end, Slice.empty));\n } else {\n match = allowed;\n\n for (var j = 0; j < child.marks.length; j++) {\n if (!parentType.allowsMarkType(child.marks[j].type)) tr.step(new RemoveMarkStep(cur, end, child.marks[j]));\n }\n\n if (clearNewlines && child.isText && parentType.whitespace != \"pre\") {\n var m = void 0,\n newline = /\\r?\\n|\\r/g,\n slice = void 0;\n\n while (m = newline.exec(child.text)) {\n if (!slice) slice = new Slice(Fragment.from(parentType.schema.text(\" \", parentType.allowedMarks(child.marks))), 0, 0);\n replSteps.push(new ReplaceStep(cur + m.index, cur + m.index + m[0].length, slice));\n }\n }\n }\n\n cur = end;\n }\n\n if (!match.validEnd) {\n var fill = match.fillBefore(Fragment.empty, true);\n tr.replace(cur, cur, new Slice(fill, 0, 0));\n }\n\n for (var _i = replSteps.length - 1; _i >= 0; _i--) {\n tr.step(replSteps[_i]);\n }\n}\n\nfunction canCut(node, start, end) {\n return (start == 0 || node.canReplace(start, node.childCount)) && (end == node.childCount || node.canReplace(0, end));\n}\n/**\nTry to find a target depth to which the content in the given range\ncan be lifted. Will not go across\n[isolating](https://prosemirror.net/docs/ref/#model.NodeSpec.isolating) parent nodes.\n*/\n\n\nfunction liftTarget(range) {\n var parent = range.parent;\n var content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n\n for (var depth = range.depth;; --depth) {\n var node = range.$from.node(depth);\n var index = range.$from.index(depth),\n endIndex = range.$to.indexAfter(depth);\n if (depth < range.depth && node.canReplace(index, endIndex, content)) return depth;\n if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex)) break;\n }\n\n return null;\n}\n\nfunction _lift(tr, range, target) {\n var $from = range.$from,\n $to = range.$to,\n depth = range.depth;\n var gapStart = $from.before(depth + 1),\n gapEnd = $to.after(depth + 1);\n var start = gapStart,\n end = gapEnd;\n var before = Fragment.empty,\n openStart = 0;\n\n for (var d = depth, splitting = false; d > target; d--) {\n if (splitting || $from.index(d) > 0) {\n splitting = true;\n before = Fragment.from($from.node(d).copy(before));\n openStart++;\n } else {\n start--;\n }\n }\n\n var after = Fragment.empty,\n openEnd = 0;\n\n for (var _d = depth, _splitting = false; _d > target; _d--) {\n if (_splitting || $to.after(_d + 1) < $to.end(_d)) {\n _splitting = true;\n after = Fragment.from($to.node(_d).copy(after));\n openEnd++;\n } else {\n end++;\n }\n }\n\n tr.step(new ReplaceAroundStep(start, end, gapStart, gapEnd, new Slice(before.append(after), openStart, openEnd), before.size - openStart, true));\n}\n/**\nTry to find a valid way to wrap the content in the given range in a\nnode of the given type. May introduce extra nodes around and inside\nthe wrapper node, if necessary. Returns null if no valid wrapping\ncould be found. When `innerRange` is given, that range's content is\nused as the content to fit into the wrapping, instead of the\ncontent of `range`.\n*/\n\n\nfunction findWrapping(range, nodeType) {\n var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var innerRange = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : range;\n var around = findWrappingOutside(range, nodeType);\n var inner = around && findWrappingInside(innerRange, nodeType);\n if (!inner) return null;\n return around.map(withAttrs).concat({\n type: nodeType,\n attrs: attrs\n }).concat(inner.map(withAttrs));\n}\n\nfunction withAttrs(type) {\n return {\n type: type,\n attrs: null\n };\n}\n\nfunction findWrappingOutside(range, type) {\n var parent = range.parent,\n startIndex = range.startIndex,\n endIndex = range.endIndex;\n var around = parent.contentMatchAt(startIndex).findWrapping(type);\n if (!around) return null;\n var outer = around.length ? around[0] : type;\n return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;\n}\n\nfunction findWrappingInside(range, type) {\n var parent = range.parent,\n startIndex = range.startIndex,\n endIndex = range.endIndex;\n var inner = parent.child(startIndex);\n var inside = type.contentMatch.findWrapping(inner.type);\n if (!inside) return null;\n var lastType = inside.length ? inside[inside.length - 1] : type;\n var innerMatch = lastType.contentMatch;\n\n for (var i = startIndex; innerMatch && i < endIndex; i++) {\n innerMatch = innerMatch.matchType(parent.child(i).type);\n }\n\n if (!innerMatch || !innerMatch.validEnd) return null;\n return inside;\n}\n\nfunction _wrap2(tr, range, wrappers) {\n var content = Fragment.empty;\n\n for (var i = wrappers.length - 1; i >= 0; i--) {\n if (content.size) {\n var match = wrappers[i].type.contentMatch.matchFragment(content);\n if (!match || !match.validEnd) throw new RangeError(\"Wrapper type given to Transform.wrap does not form valid content of its parent wrapper\");\n }\n\n content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));\n }\n\n var start = range.start,\n end = range.end;\n tr.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true));\n}\n\nfunction _setBlockType(tr, from, to, type, attrs) {\n if (!type.isTextblock) throw new RangeError(\"Type given to setBlockType should be a textblock\");\n var mapFrom = tr.steps.length;\n tr.doc.nodesBetween(from, to, function (node, pos) {\n if (node.isTextblock && !node.hasMarkup(type, attrs) && canChangeType(tr.doc, tr.mapping.slice(mapFrom).map(pos), type)) {\n var convertNewlines = null;\n\n if (type.schema.linebreakReplacement) {\n var pre = type.whitespace == \"pre\",\n supportLinebreak = !!type.contentMatch.matchType(type.schema.linebreakReplacement);\n if (pre && !supportLinebreak) convertNewlines = false;else if (!pre && supportLinebreak) convertNewlines = true;\n } // Ensure all markup that isn't allowed in the new node type is cleared\n\n\n if (convertNewlines === false) replaceLinebreaks(tr, node, pos, mapFrom);\n\n _clearIncompatible(tr, tr.mapping.slice(mapFrom).map(pos, 1), type, undefined, convertNewlines === null);\n\n var mapping = tr.mapping.slice(mapFrom);\n var startM = mapping.map(pos, 1),\n endM = mapping.map(pos + node.nodeSize, 1);\n tr.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type.create(attrs, null, node.marks)), 0, 0), 1, true));\n if (convertNewlines === true) replaceNewlines(tr, node, pos, mapFrom);\n return false;\n }\n });\n}\n\nfunction replaceNewlines(tr, node, pos, mapFrom) {\n node.forEach(function (child, offset) {\n if (child.isText) {\n var m,\n newline = /\\r?\\n|\\r/g;\n\n while (m = newline.exec(child.text)) {\n var start = tr.mapping.slice(mapFrom).map(pos + 1 + offset + m.index);\n tr.replaceWith(start, start + 1, node.type.schema.linebreakReplacement.create());\n }\n }\n });\n}\n\nfunction replaceLinebreaks(tr, node, pos, mapFrom) {\n node.forEach(function (child, offset) {\n if (child.type == child.type.schema.linebreakReplacement) {\n var start = tr.mapping.slice(mapFrom).map(pos + 1 + offset);\n tr.replaceWith(start, start + 1, node.type.schema.text(\"\\n\"));\n }\n });\n}\n\nfunction canChangeType(doc, pos, type) {\n var $pos = doc.resolve(pos),\n index = $pos.index();\n return $pos.parent.canReplaceWith(index, index + 1, type);\n}\n/**\nChange the type, attributes, and/or marks of the node at `pos`.\nWhen `type` isn't given, the existing node type is preserved,\n*/\n\n\nfunction _setNodeMarkup(tr, pos, type, attrs, marks) {\n var node = tr.doc.nodeAt(pos);\n if (!node) throw new RangeError(\"No node at given position\");\n if (!type) type = node.type;\n var newNode = type.create(attrs, null, marks || node.marks);\n if (node.isLeaf) return tr.replaceWith(pos, pos + node.nodeSize, newNode);\n if (!type.validContent(node.content)) throw new RangeError(\"Invalid content for node type \" + type.name);\n tr.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment.from(newNode), 0, 0), 1, true));\n}\n/**\nCheck whether splitting at the given position is allowed.\n*/\n\n\nfunction canSplit(doc, pos) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var typesAfter = arguments.length > 3 ? arguments[3] : undefined;\n var $pos = doc.resolve(pos),\n base = $pos.depth - depth;\n var innerType = typesAfter && typesAfter[typesAfter.length - 1] || $pos.parent;\n if (base < 0 || $pos.parent.type.spec.isolating || !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) || !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount))) return false;\n\n for (var d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {\n var node = $pos.node(d),\n _index = $pos.index(d);\n\n if (node.type.spec.isolating) return false;\n var rest = node.content.cutByIndex(_index, node.childCount);\n var overrideChild = typesAfter && typesAfter[i + 1];\n if (overrideChild) rest = rest.replaceChild(0, overrideChild.type.create(overrideChild.attrs));\n var after = typesAfter && typesAfter[i] || node;\n if (!node.canReplace(_index + 1, node.childCount) || !after.type.validContent(rest)) return false;\n }\n\n var index = $pos.indexAfter(base);\n var baseType = typesAfter && typesAfter[0];\n return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type);\n}\n\nfunction _split(tr, pos) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var typesAfter = arguments.length > 3 ? arguments[3] : undefined;\n var $pos = tr.doc.resolve(pos),\n before = Fragment.empty,\n after = Fragment.empty;\n\n for (var d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {\n before = Fragment.from($pos.node(d).copy(before));\n var typeAfter = typesAfter && typesAfter[i];\n after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n }\n\n tr.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));\n}\n/**\nTest whether the blocks before and after a given position can be\njoined.\n*/\n\n\nfunction canJoin(doc, pos) {\n var $pos = doc.resolve(pos),\n index = $pos.index();\n return joinable($pos.nodeBefore, $pos.nodeAfter) && $pos.parent.canReplace(index, index + 1);\n}\n\nfunction joinable(a, b) {\n return !!(a && b && !a.isLeaf && a.canAppend(b));\n}\n/**\nFind an ancestor of the given position that can be joined to the\nblock before (or after if `dir` is positive). Returns the joinable\npoint, if any.\n*/\n\n\nfunction joinPoint(doc, pos) {\n var dir = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;\n var $pos = doc.resolve(pos);\n\n for (var d = $pos.depth;; d--) {\n var before = void 0,\n after = void 0,\n index = $pos.index(d);\n\n if (d == $pos.depth) {\n before = $pos.nodeBefore;\n after = $pos.nodeAfter;\n } else if (dir > 0) {\n before = $pos.node(d + 1);\n index++;\n after = $pos.node(d).maybeChild(index);\n } else {\n before = $pos.node(d).maybeChild(index - 1);\n after = $pos.node(d + 1);\n }\n\n if (before && !before.isTextblock && joinable(before, after) && $pos.node(d).canReplace(index, index + 1)) return pos;\n if (d == 0) break;\n pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n }\n}\n\nfunction _join(tr, pos, depth) {\n var step = new ReplaceStep(pos - depth, pos + depth, Slice.empty, true);\n tr.step(step);\n}\n/**\nTry to find a point where a node of the given type can be inserted\nnear `pos`, by searching up the node hierarchy when `pos` itself\nisn't a valid place but is at the start or end of a node. Return\nnull if no position was found.\n*/\n\n\nfunction insertPoint(doc, pos, nodeType) {\n var $pos = doc.resolve(pos);\n if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType)) return pos;\n if ($pos.parentOffset == 0) for (var d = $pos.depth - 1; d >= 0; d--) {\n var index = $pos.index(d);\n if ($pos.node(d).canReplaceWith(index, index, nodeType)) return $pos.before(d + 1);\n if (index > 0) return null;\n }\n if ($pos.parentOffset == $pos.parent.content.size) for (var _d2 = $pos.depth - 1; _d2 >= 0; _d2--) {\n var _index2 = $pos.indexAfter(_d2);\n\n if ($pos.node(_d2).canReplaceWith(_index2, _index2, nodeType)) return $pos.after(_d2 + 1);\n if (_index2 < $pos.node(_d2).childCount) return null;\n }\n return null;\n}\n/**\nFinds a position at or around the given position where the given\nslice can be inserted. Will look at parent nodes' nearest boundary\nand try there, even if the original position wasn't directly at the\nstart or end of that node. Returns null when no position was found.\n*/\n\n\nfunction dropPoint(doc, pos, slice) {\n var $pos = doc.resolve(pos);\n if (!slice.content.size) return pos;\n var content = slice.content;\n\n for (var i = 0; i < slice.openStart; i++) {\n content = content.firstChild.content;\n }\n\n for (var pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {\n for (var d = $pos.depth; d >= 0; d--) {\n var bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n var insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n var parent = $pos.node(d),\n fits = false;\n\n if (pass == 1) {\n fits = parent.canReplace(insertPos, insertPos, content);\n } else {\n var wrapping = parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);\n fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);\n }\n\n if (fits) return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);\n }\n }\n\n return null;\n}\n/**\n‘Fit’ a slice into a given position in the document, producing a\n[step](https://prosemirror.net/docs/ref/#transform.Step) that inserts it. Will return null if\nthere's no meaningful way to insert the slice here, or inserting it\nwould be a no-op (an empty slice over an empty range).\n*/\n\n\nfunction replaceStep(doc, from) {\n var to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : from;\n var slice = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Slice.empty;\n if (from == to && !slice.size) return null;\n var $from = doc.resolve(from),\n $to = doc.resolve(to); // Optimization -- avoid work if it's obvious that it's not needed.\n\n if (fitsTrivially($from, $to, slice)) return new ReplaceStep(from, to, slice);\n return new Fitter($from, $to, slice).fit();\n}\n\nfunction fitsTrivially($from, $to, slice) {\n return !slice.openStart && !slice.openEnd && $from.start() == $to.start() && $from.parent.canReplace($from.index(), $to.index(), slice.content);\n} // Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in , when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// This class tracks the state of the placement progress in the\n// following properties:\n//\n// - `frontier` holds a stack of `{type, match}` objects that\n// represent the open side of the replacement. It starts at\n// `$from`, then moves forward as content is placed, and is finally\n// reconciled with `$to`.\n//\n// - `unplaced` is a slice that represents the content that hasn't\n// been placed yet.\n//\n// - `placed` is a fragment of placed content. Its open-start value\n// is implicit in `$from`, and its open-end value in `frontier`.\n\n\nvar Fitter = /*#__PURE__*/function () {\n function Fitter($from, $to, unplaced) {\n _classCallCheck(this, Fitter);\n\n this.$from = $from;\n this.$to = $to;\n this.unplaced = unplaced;\n this.frontier = [];\n this.placed = Fragment.empty;\n\n for (var i = 0; i <= $from.depth; i++) {\n var node = $from.node(i);\n this.frontier.push({\n type: node.type,\n match: node.contentMatchAt($from.indexAfter(i))\n });\n }\n\n for (var _i2 = $from.depth; _i2 > 0; _i2--) {\n this.placed = Fragment.from($from.node(_i2).copy(this.placed));\n }\n }\n\n _createClass(Fitter, [{\n key: \"depth\",\n get: function get() {\n return this.frontier.length - 1;\n }\n }, {\n key: \"fit\",\n value: function fit() {\n // As long as there's unplaced content, try to place some of it.\n // If that fails, either increase the open score of the unplaced\n // slice, or drop nodes from it, and then try again.\n while (this.unplaced.size) {\n var fit = this.findFittable();\n if (fit) this.placeNodes(fit);else this.openMore() || this.dropNode();\n } // When there's inline content directly after the frontier _and_\n // directly after `this.$to`, we must generate a `ReplaceAround`\n // step that pulls that content into the node after the frontier.\n // That means the fitting must be done to the end of the textblock\n // node after `this.$to`, not `this.$to` itself.\n\n\n var moveInline = this.mustMoveInline(),\n placedSize = this.placed.size - this.depth - this.$from.depth;\n var $from = this.$from,\n $to = this.close(moveInline < 0 ? this.$to : $from.doc.resolve(moveInline));\n if (!$to) return null; // If closing to `$to` succeeded, create a step\n\n var content = this.placed,\n openStart = $from.depth,\n openEnd = $to.depth;\n\n while (openStart && openEnd && content.childCount == 1) {\n // Normalize by dropping open parent nodes\n content = content.firstChild.content;\n openStart--;\n openEnd--;\n }\n\n var slice = new Slice(content, openStart, openEnd);\n if (moveInline > -1) return new ReplaceAroundStep($from.pos, moveInline, this.$to.pos, this.$to.end(), slice, placedSize);\n if (slice.size || $from.pos != this.$to.pos) // Don't generate no-op steps\n return new ReplaceStep($from.pos, $to.pos, slice);\n return null;\n } // Find a position on the start spine of `this.unplaced` that has\n // content that can be moved somewhere on the frontier. Returns two\n // depths, one for the slice and one for the frontier.\n\n }, {\n key: \"findFittable\",\n value: function findFittable() {\n var startDepth = this.unplaced.openStart;\n\n for (var cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++) {\n var node = cur.firstChild;\n if (cur.childCount > 1) openEnd = 0;\n\n if (node.type.spec.isolating && openEnd <= d) {\n startDepth = d;\n break;\n }\n\n cur = node.content;\n } // Only try wrapping nodes (pass 2) after finding a place without\n // wrapping failed.\n\n\n for (var pass = 1; pass <= 2; pass++) {\n for (var sliceDepth = pass == 1 ? startDepth : this.unplaced.openStart; sliceDepth >= 0; sliceDepth--) {\n var fragment = void 0,\n parent = null;\n\n if (sliceDepth) {\n parent = contentAt(this.unplaced.content, sliceDepth - 1).firstChild;\n fragment = parent.content;\n } else {\n fragment = this.unplaced.content;\n }\n\n var first = fragment.firstChild;\n\n for (var frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {\n var _this$frontier$fronti = this.frontier[frontierDepth],\n type = _this$frontier$fronti.type,\n match = _this$frontier$fronti.match,\n _wrap = void 0,\n inject = null; // In pass 1, if the next node matches, or there is no next\n // node but the parents look compatible, we've found a\n // place.\n\n\n if (pass == 1 && (first ? match.matchType(first.type) || (inject = match.fillBefore(Fragment.from(first), false)) : parent && type.compatibleContent(parent.type))) return {\n sliceDepth: sliceDepth,\n frontierDepth: frontierDepth,\n parent: parent,\n inject: inject\n }; // In pass 2, look for a set of wrapping nodes that make\n // `first` fit here.\n else if (pass == 2 && first && (_wrap = match.findWrapping(first.type))) return {\n sliceDepth: sliceDepth,\n frontierDepth: frontierDepth,\n parent: parent,\n wrap: _wrap\n }; // Don't continue looking further up if the parent node\n // would fit here.\n\n if (parent && match.matchType(parent.type)) break;\n }\n }\n }\n }\n }, {\n key: \"openMore\",\n value: function openMore() {\n var _this$unplaced = this.unplaced,\n content = _this$unplaced.content,\n openStart = _this$unplaced.openStart,\n openEnd = _this$unplaced.openEnd;\n var inner = contentAt(content, openStart);\n if (!inner.childCount || inner.firstChild.isLeaf) return false;\n this.unplaced = new Slice(content, openStart + 1, Math.max(openEnd, inner.size + openStart >= content.size - openEnd ? openStart + 1 : 0));\n return true;\n }\n }, {\n key: \"dropNode\",\n value: function dropNode() {\n var _this$unplaced2 = this.unplaced,\n content = _this$unplaced2.content,\n openStart = _this$unplaced2.openStart,\n openEnd = _this$unplaced2.openEnd;\n var inner = contentAt(content, openStart);\n\n if (inner.childCount <= 1 && openStart > 0) {\n var openAtEnd = content.size - openStart <= openStart + inner.size;\n this.unplaced = new Slice(dropFromFragment(content, openStart - 1, 1), openStart - 1, openAtEnd ? openStart - 1 : openEnd);\n } else {\n this.unplaced = new Slice(dropFromFragment(content, openStart, 1), openStart, openEnd);\n }\n } // Move content from the unplaced slice at `sliceDepth` to the\n // frontier node at `frontierDepth`. Close that frontier node when\n // applicable.\n\n }, {\n key: \"placeNodes\",\n value: function placeNodes(_ref) {\n var sliceDepth = _ref.sliceDepth,\n frontierDepth = _ref.frontierDepth,\n parent = _ref.parent,\n inject = _ref.inject,\n wrap = _ref.wrap;\n\n while (this.depth > frontierDepth) {\n this.closeFrontierNode();\n }\n\n if (wrap) for (var i = 0; i < wrap.length; i++) {\n this.openFrontierNode(wrap[i]);\n }\n var slice = this.unplaced,\n fragment = parent ? parent.content : slice.content;\n var openStart = slice.openStart - sliceDepth;\n var taken = 0,\n add = [];\n var _this$frontier$fronti2 = this.frontier[frontierDepth],\n match = _this$frontier$fronti2.match,\n type = _this$frontier$fronti2.type;\n\n if (inject) {\n for (var _i3 = 0; _i3 < inject.childCount; _i3++) {\n add.push(inject.child(_i3));\n }\n\n match = match.matchFragment(inject);\n } // Computes the amount of (end) open nodes at the end of the\n // fragment. When 0, the parent is open, but no more. When\n // negative, nothing is open.\n\n\n var openEndCount = fragment.size + sliceDepth - (slice.content.size - slice.openEnd); // Scan over the fragment, fitting as many child nodes as\n // possible.\n\n while (taken < fragment.childCount) {\n var next = fragment.child(taken),\n matches = match.matchType(next.type);\n if (!matches) break;\n taken++;\n\n if (taken > 1 || openStart == 0 || next.content.size) {\n // Drop empty open nodes\n match = matches;\n add.push(closeNodeStart(next.mark(type.allowedMarks(next.marks)), taken == 1 ? openStart : 0, taken == fragment.childCount ? openEndCount : -1));\n }\n }\n\n var toEnd = taken == fragment.childCount;\n if (!toEnd) openEndCount = -1;\n this.placed = addToFragment(this.placed, frontierDepth, Fragment.from(add));\n this.frontier[frontierDepth].match = match; // If the parent types match, and the entire node was moved, and\n // it's not open, close this frontier node right away.\n\n if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1) this.closeFrontierNode(); // Add new frontier nodes for any open nodes at the end.\n\n for (var _i4 = 0, cur = fragment; _i4 < openEndCount; _i4++) {\n var node = cur.lastChild;\n this.frontier.push({\n type: node.type,\n match: node.contentMatchAt(node.childCount)\n });\n cur = node.content;\n } // Update `this.unplaced`. Drop the entire node from which we\n // placed it we got to its end, otherwise just drop the placed\n // nodes.\n\n\n this.unplaced = !toEnd ? new Slice(dropFromFragment(slice.content, sliceDepth, taken), slice.openStart, slice.openEnd) : sliceDepth == 0 ? Slice.empty : new Slice(dropFromFragment(slice.content, sliceDepth - 1, 1), sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);\n }\n }, {\n key: \"mustMoveInline\",\n value: function mustMoveInline() {\n if (!this.$to.parent.isTextblock) return -1;\n var top = this.frontier[this.depth],\n level;\n if (!top.type.isTextblock || !contentAfterFits(this.$to, this.$to.depth, top.type, top.match, false) || this.$to.depth == this.depth && (level = this.findCloseLevel(this.$to)) && level.depth == this.depth) return -1;\n var depth = this.$to.depth,\n after = this.$to.after(depth);\n\n while (depth > 1 && after == this.$to.end(--depth)) {\n ++after;\n }\n\n return after;\n }\n }, {\n key: \"findCloseLevel\",\n value: function findCloseLevel($to) {\n scan: for (var i = Math.min(this.depth, $to.depth); i >= 0; i--) {\n var _this$frontier$i = this.frontier[i],\n match = _this$frontier$i.match,\n type = _this$frontier$i.type;\n var dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));\n var fit = contentAfterFits($to, i, type, match, dropInner);\n if (!fit) continue;\n\n for (var d = i - 1; d >= 0; d--) {\n var _this$frontier$d = this.frontier[d],\n _match = _this$frontier$d.match,\n _type = _this$frontier$d.type;\n var matches = contentAfterFits($to, d, _type, _match, true);\n if (!matches || matches.childCount) continue scan;\n }\n\n return {\n depth: i,\n fit: fit,\n move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to\n };\n }\n }\n }, {\n key: \"close\",\n value: function close($to) {\n var close = this.findCloseLevel($to);\n if (!close) return null;\n\n while (this.depth > close.depth) {\n this.closeFrontierNode();\n }\n\n if (close.fit.childCount) this.placed = addToFragment(this.placed, close.depth, close.fit);\n $to = close.move;\n\n for (var d = close.depth + 1; d <= $to.depth; d++) {\n var node = $to.node(d),\n add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));\n this.openFrontierNode(node.type, node.attrs, add);\n }\n\n return $to;\n }\n }, {\n key: \"openFrontierNode\",\n value: function openFrontierNode(type) {\n var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var content = arguments.length > 2 ? arguments[2] : undefined;\n var top = this.frontier[this.depth];\n top.match = top.match.matchType(type);\n this.placed = addToFragment(this.placed, this.depth, Fragment.from(type.create(attrs, content)));\n this.frontier.push({\n type: type,\n match: type.contentMatch\n });\n }\n }, {\n key: \"closeFrontierNode\",\n value: function closeFrontierNode() {\n var open = this.frontier.pop();\n var add = open.match.fillBefore(Fragment.empty, true);\n if (add.childCount) this.placed = addToFragment(this.placed, this.frontier.length, add);\n }\n }]);\n\n return Fitter;\n}();\n\nfunction dropFromFragment(fragment, depth, count) {\n if (depth == 0) return fragment.cutByIndex(count, fragment.childCount);\n return fragment.replaceChild(0, fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content, depth - 1, count)));\n}\n\nfunction addToFragment(fragment, depth, content) {\n if (depth == 0) return fragment.append(content);\n return fragment.replaceChild(fragment.childCount - 1, fragment.lastChild.copy(addToFragment(fragment.lastChild.content, depth - 1, content)));\n}\n\nfunction contentAt(fragment, depth) {\n for (var i = 0; i < depth; i++) {\n fragment = fragment.firstChild.content;\n }\n\n return fragment;\n}\n\nfunction closeNodeStart(node, openStart, openEnd) {\n if (openStart <= 0) return node;\n var frag = node.content;\n if (openStart > 1) frag = frag.replaceChild(0, closeNodeStart(frag.firstChild, openStart - 1, frag.childCount == 1 ? openEnd - 1 : 0));\n\n if (openStart > 0) {\n frag = node.type.contentMatch.fillBefore(frag).append(frag);\n if (openEnd <= 0) frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment.empty, true));\n }\n\n return node.copy(frag);\n}\n\nfunction contentAfterFits($to, depth, type, match, open) {\n var node = $to.node(depth),\n index = open ? $to.indexAfter(depth) : $to.index(depth);\n if (index == node.childCount && !type.compatibleContent(node.type)) return null;\n var fit = match.fillBefore(node.content, true, index);\n return fit && !invalidMarks(type, node.content, index) ? fit : null;\n}\n\nfunction invalidMarks(type, fragment, start) {\n for (var i = start; i < fragment.childCount; i++) {\n if (!type.allowsMarks(fragment.child(i).marks)) return true;\n }\n\n return false;\n}\n\nfunction definesContent(type) {\n return type.spec.defining || type.spec.definingForContent;\n}\n\nfunction _replaceRange(tr, from, to, slice) {\n if (!slice.size) return tr.deleteRange(from, to);\n var $from = tr.doc.resolve(from),\n $to = tr.doc.resolve(to);\n if (fitsTrivially($from, $to, slice)) return tr.step(new ReplaceStep(from, to, slice));\n var targetDepths = coveredDepths($from, tr.doc.resolve(to)); // Can't replace the whole document, so remove 0 if it's present\n\n if (targetDepths[targetDepths.length - 1] == 0) targetDepths.pop(); // Negative numbers represent not expansion over the whole node at\n // that depth, but replacing from $from.before(-D) to $to.pos.\n\n var preferredTarget = -($from.depth + 1);\n targetDepths.unshift(preferredTarget); // This loop picks a preferred target depth, if one of the covering\n // depths is not outside of a defining node, and adds negative\n // depths for any depth that has $from at its start and does not\n // cross a defining node.\n\n for (var d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {\n var spec = $from.node(d).type.spec;\n if (spec.defining || spec.definingAsContext || spec.isolating) break;\n if (targetDepths.indexOf(d) > -1) preferredTarget = d;else if ($from.before(d) == pos) targetDepths.splice(1, 0, -d);\n } // Try to fit each possible depth of the slice into each possible\n // target depth, starting with the preferred depths.\n\n\n var preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n var leftNodes = [],\n preferredDepth = slice.openStart;\n\n for (var content = slice.content, i = 0;; i++) {\n var node = content.firstChild;\n leftNodes.push(node);\n if (i == slice.openStart) break;\n content = node.content;\n } // Back up preferredDepth to cover defining textblocks directly\n // above it, possibly skipping a non-defining textblock.\n\n\n for (var _d3 = preferredDepth - 1; _d3 >= 0; _d3--) {\n var leftNode = leftNodes[_d3],\n def = definesContent(leftNode.type);\n if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1))) preferredDepth = _d3;else if (def || !leftNode.type.isTextblock) break;\n }\n\n for (var j = slice.openStart; j >= 0; j--) {\n var openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n var insert = leftNodes[openDepth];\n if (!insert) continue;\n\n for (var _i5 = 0; _i5 < targetDepths.length; _i5++) {\n // Loop over possible expansion levels, starting with the\n // preferred one\n var targetDepth = targetDepths[(_i5 + preferredTargetIndex) % targetDepths.length],\n expand = true;\n\n if (targetDepth < 0) {\n expand = false;\n targetDepth = -targetDepth;\n }\n\n var parent = $from.node(targetDepth - 1),\n index = $from.index(targetDepth - 1);\n if (parent.canReplaceWith(index, index, insert.type, insert.marks)) return tr.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to, new Slice(closeFragment(slice.content, 0, slice.openStart, openDepth), openDepth, slice.openEnd));\n }\n }\n\n var startSteps = tr.steps.length;\n\n for (var _i6 = targetDepths.length - 1; _i6 >= 0; _i6--) {\n tr.replace(from, to, slice);\n if (tr.steps.length > startSteps) break;\n var depth = targetDepths[_i6];\n if (depth < 0) continue;\n from = $from.before(depth);\n to = $to.after(depth);\n }\n}\n\nfunction closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n if (depth < oldOpen) {\n var first = fragment.firstChild;\n fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n }\n\n if (depth > newOpen) {\n var match = parent.contentMatchAt(0);\n var start = match.fillBefore(fragment).append(fragment);\n fragment = start.append(match.matchFragment(start).fillBefore(Fragment.empty, true));\n }\n\n return fragment;\n}\n\nfunction _replaceRangeWith(tr, from, to, node) {\n if (!node.isInline && from == to && tr.doc.resolve(from).parent.content.size) {\n var point = insertPoint(tr.doc, from, node.type);\n if (point != null) from = to = point;\n }\n\n tr.replaceRange(from, to, new Slice(Fragment.from(node), 0, 0));\n}\n\nfunction _deleteRange(tr, from, to) {\n var $from = tr.doc.resolve(from),\n $to = tr.doc.resolve(to);\n var covered = coveredDepths($from, $to);\n\n for (var i = 0; i < covered.length; i++) {\n var depth = covered[i],\n last = i == covered.length - 1;\n if (last && depth == 0 || $from.node(depth).type.contentMatch.validEnd) return tr[\"delete\"]($from.start(depth), $to.end(depth));\n if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1)))) return tr[\"delete\"]($from.before(depth), $to.after(depth));\n }\n\n for (var d = 1; d <= $from.depth && d <= $to.depth; d++) {\n if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d) return tr[\"delete\"]($from.before(d), to);\n }\n\n tr[\"delete\"](from, to);\n} // Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\n\n\nfunction coveredDepths($from, $to) {\n var result = [],\n minDepth = Math.min($from.depth, $to.depth);\n\n for (var d = minDepth; d >= 0; d--) {\n var start = $from.start(d);\n if (start < $from.pos - ($from.depth - d) || $to.end(d) > $to.pos + ($to.depth - d) || $from.node(d).type.spec.isolating || $to.node(d).type.spec.isolating) break;\n if (start == $to.start(d) || d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent && d && $to.start(d - 1) == start - 1) result.push(d);\n }\n\n return result;\n}\n/**\nUpdate an attribute in a specific node.\n*/\n\n\nvar AttrStep = /*#__PURE__*/function (_Step7) {\n _inherits(AttrStep, _Step7);\n\n var _super7 = _createSuper(AttrStep);\n\n /**\n Construct an attribute step.\n */\n function AttrStep(\n /**\n The position of the target node.\n */\n pos,\n /**\n The attribute to set.\n */\n attr, // The attribute's new value.\n value) {\n var _this9;\n\n _classCallCheck(this, AttrStep);\n\n _this9 = _super7.call(this);\n _this9.pos = pos;\n _this9.attr = attr;\n _this9.value = value;\n return _this9;\n }\n\n _createClass(AttrStep, [{\n key: \"apply\",\n value: function apply(doc) {\n var node = doc.nodeAt(this.pos);\n if (!node) return StepResult.fail(\"No node at attribute step's position\");\n var attrs = Object.create(null);\n\n for (var name in node.attrs) {\n attrs[name] = node.attrs[name];\n }\n\n attrs[this.attr] = this.value;\n var updated = node.type.create(attrs, null, node.marks);\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n }, {\n key: \"getMap\",\n value: function getMap() {\n return StepMap.empty;\n }\n }, {\n key: \"invert\",\n value: function invert(doc) {\n return new AttrStep(this.pos, this.attr, doc.nodeAt(this.pos).attrs[this.attr]);\n }\n }, {\n key: \"map\",\n value: function map(mapping) {\n var pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new AttrStep(pos.pos, this.attr, this.value);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n stepType: \"attr\",\n pos: this.pos,\n attr: this.attr,\n value: this.value\n };\n }\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (typeof json.pos != \"number\" || typeof json.attr != \"string\") throw new RangeError(\"Invalid input for AttrStep.fromJSON\");\n return new AttrStep(json.pos, json.attr, json.value);\n }\n }]);\n\n return AttrStep;\n}(Step);\n\nStep.jsonID(\"attr\", AttrStep);\n/**\nUpdate an attribute in the doc node.\n*/\n\nvar DocAttrStep = /*#__PURE__*/function (_Step8) {\n _inherits(DocAttrStep, _Step8);\n\n var _super8 = _createSuper(DocAttrStep);\n\n /**\n Construct an attribute step.\n */\n function DocAttrStep(\n /**\n The attribute to set.\n */\n attr, // The attribute's new value.\n value) {\n var _this10;\n\n _classCallCheck(this, DocAttrStep);\n\n _this10 = _super8.call(this);\n _this10.attr = attr;\n _this10.value = value;\n return _this10;\n }\n\n _createClass(DocAttrStep, [{\n key: \"apply\",\n value: function apply(doc) {\n var attrs = Object.create(null);\n\n for (var name in doc.attrs) {\n attrs[name] = doc.attrs[name];\n }\n\n attrs[this.attr] = this.value;\n var updated = doc.type.create(attrs, doc.content, doc.marks);\n return StepResult.ok(updated);\n }\n }, {\n key: \"getMap\",\n value: function getMap() {\n return StepMap.empty;\n }\n }, {\n key: \"invert\",\n value: function invert(doc) {\n return new DocAttrStep(this.attr, doc.attrs[this.attr]);\n }\n }, {\n key: \"map\",\n value: function map(mapping) {\n return this;\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n stepType: \"docAttr\",\n attr: this.attr,\n value: this.value\n };\n }\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (typeof json.attr != \"string\") throw new RangeError(\"Invalid input for DocAttrStep.fromJSON\");\n return new DocAttrStep(json.attr, json.value);\n }\n }]);\n\n return DocAttrStep;\n}(Step);\n\nStep.jsonID(\"docAttr\", DocAttrStep);\n/**\n@internal\n*/\n\nvar TransformError = /*#__PURE__*/function (_Error) {\n _inherits(TransformError, _Error);\n\n var _super9 = _createSuper(TransformError);\n\n function TransformError() {\n _classCallCheck(this, TransformError);\n\n return _super9.apply(this, arguments);\n }\n\n return _createClass(TransformError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nTransformError = function TransformError(message) {\n var err = Error.call(this, message);\n err.__proto__ = TransformError.prototype;\n return err;\n};\n\nTransformError.prototype = Object.create(Error.prototype);\nTransformError.prototype.constructor = TransformError;\nTransformError.prototype.name = \"TransformError\";\n/**\nAbstraction to build up and track an array of\n[steps](https://prosemirror.net/docs/ref/#transform.Step) representing a document transformation.\n\nMost transforming methods return the `Transform` object itself, so\nthat they can be chained.\n*/\n\nvar Transform = /*#__PURE__*/function () {\n /**\n Create a transform that starts with the given document.\n */\n function Transform(\n /**\n The current document (the result of applying the steps in the\n transform).\n */\n doc) {\n _classCallCheck(this, Transform);\n\n this.doc = doc;\n /**\n The steps in this transform.\n */\n\n this.steps = [];\n /**\n The documents before each of the steps.\n */\n\n this.docs = [];\n /**\n A mapping with the maps for each of the steps in this transform.\n */\n\n this.mapping = new Mapping();\n }\n /**\n The starting document.\n */\n\n\n _createClass(Transform, [{\n key: \"before\",\n get: function get() {\n return this.docs.length ? this.docs[0] : this.doc;\n }\n /**\n Apply a new step in this transform, saving the result. Throws an\n error when the step fails.\n */\n\n }, {\n key: \"step\",\n value: function step(_step) {\n var result = this.maybeStep(_step);\n if (result.failed) throw new TransformError(result.failed);\n return this;\n }\n /**\n Try to apply a step in this transformation, ignoring it if it\n fails. Returns the step result.\n */\n\n }, {\n key: \"maybeStep\",\n value: function maybeStep(step) {\n var result = step.apply(this.doc);\n if (!result.failed) this.addStep(step, result.doc);\n return result;\n }\n /**\n True when the document has been changed (when there are any\n steps).\n */\n\n }, {\n key: \"docChanged\",\n get: function get() {\n return this.steps.length > 0;\n }\n /**\n @internal\n */\n\n }, {\n key: \"addStep\",\n value: function addStep(step, doc) {\n this.docs.push(this.doc);\n this.steps.push(step);\n this.mapping.appendMap(step.getMap());\n this.doc = doc;\n }\n /**\n Replace the part of the document between `from` and `to` with the\n given `slice`.\n */\n\n }, {\n key: \"replace\",\n value: function replace(from) {\n var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : from;\n var slice = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Slice.empty;\n var step = replaceStep(this.doc, from, to, slice);\n if (step) this.step(step);\n return this;\n }\n /**\n Replace the given range with the given content, which may be a\n fragment, node, or array of nodes.\n */\n\n }, {\n key: \"replaceWith\",\n value: function replaceWith(from, to, content) {\n return this.replace(from, to, new Slice(Fragment.from(content), 0, 0));\n }\n /**\n Delete the content between the given positions.\n */\n\n }, {\n key: \"delete\",\n value: function _delete(from, to) {\n return this.replace(from, to, Slice.empty);\n }\n /**\n Insert the given content at the given position.\n */\n\n }, {\n key: \"insert\",\n value: function insert(pos, content) {\n return this.replaceWith(pos, pos, content);\n }\n /**\n Replace a range of the document with a given slice, using\n `from`, `to`, and the slice's\n [`openStart`](https://prosemirror.net/docs/ref/#model.Slice.openStart) property as hints, rather\n than fixed start and end points. This method may grow the\n replaced area or close open nodes in the slice in order to get a\n fit that is more in line with WYSIWYG expectations, by dropping\n fully covered parent nodes of the replaced region when they are\n marked [non-defining as\n context](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext), or including an\n open parent node from the slice that _is_ marked as [defining\n its content](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).\n \n This is the method, for example, to handle paste. The similar\n [`replace`](https://prosemirror.net/docs/ref/#transform.Transform.replace) method is a more\n primitive tool which will _not_ move the start and end of its given\n range, and is useful in situations where you need more precise\n control over what happens.\n */\n\n }, {\n key: \"replaceRange\",\n value: function replaceRange(from, to, slice) {\n _replaceRange(this, from, to, slice);\n\n return this;\n }\n /**\n Replace the given range with a node, but use `from` and `to` as\n hints, rather than precise positions. When from and to are the same\n and are at the start or end of a parent node in which the given\n node doesn't fit, this method may _move_ them out towards a parent\n that does allow the given node to be placed. When the given range\n completely covers a parent node, this method may completely replace\n that parent node.\n */\n\n }, {\n key: \"replaceRangeWith\",\n value: function replaceRangeWith(from, to, node) {\n _replaceRangeWith(this, from, to, node);\n\n return this;\n }\n /**\n Delete the given range, expanding it to cover fully covered\n parent nodes until a valid replace is found.\n */\n\n }, {\n key: \"deleteRange\",\n value: function deleteRange(from, to) {\n _deleteRange(this, from, to);\n\n return this;\n }\n /**\n Split the content in the given range off from its parent, if there\n is sibling content before or after it, and move it up the tree to\n the depth specified by `target`. You'll probably want to use\n [`liftTarget`](https://prosemirror.net/docs/ref/#transform.liftTarget) to compute `target`, to make\n sure the lift is valid.\n */\n\n }, {\n key: \"lift\",\n value: function lift(range, target) {\n _lift(this, range, target);\n\n return this;\n }\n /**\n Join the blocks around the given position. If depth is 2, their\n last and first siblings are also joined, and so on.\n */\n\n }, {\n key: \"join\",\n value: function join(pos) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n\n _join(this, pos, depth);\n\n return this;\n }\n /**\n Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.\n The wrappers are assumed to be valid in this position, and should\n probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).\n */\n\n }, {\n key: \"wrap\",\n value: function wrap(range, wrappers) {\n _wrap2(this, range, wrappers);\n\n return this;\n }\n /**\n Set the type of all textblocks (partly) between `from` and `to` to\n the given node type with the given attributes.\n */\n\n }, {\n key: \"setBlockType\",\n value: function setBlockType(from) {\n var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : from;\n var type = arguments.length > 2 ? arguments[2] : undefined;\n var attrs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n _setBlockType(this, from, to, type, attrs);\n\n return this;\n }\n /**\n Change the type, attributes, and/or marks of the node at `pos`.\n When `type` isn't given, the existing node type is preserved,\n */\n\n }, {\n key: \"setNodeMarkup\",\n value: function setNodeMarkup(pos, type) {\n var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var marks = arguments.length > 3 ? arguments[3] : undefined;\n\n _setNodeMarkup(this, pos, type, attrs, marks);\n\n return this;\n }\n /**\n Set a single attribute on a given node to a new value.\n The `pos` addresses the document content. Use `setDocAttribute`\n to set attributes on the document itself.\n */\n\n }, {\n key: \"setNodeAttribute\",\n value: function setNodeAttribute(pos, attr, value) {\n this.step(new AttrStep(pos, attr, value));\n return this;\n }\n /**\n Set a single attribute on the document to a new value.\n */\n\n }, {\n key: \"setDocAttribute\",\n value: function setDocAttribute(attr, value) {\n this.step(new DocAttrStep(attr, value));\n return this;\n }\n /**\n Add a mark to the node at position `pos`.\n */\n\n }, {\n key: \"addNodeMark\",\n value: function addNodeMark(pos, mark) {\n this.step(new AddNodeMarkStep(pos, mark));\n return this;\n }\n /**\n Remove a mark (or a mark of the given type) from the node at\n position `pos`.\n */\n\n }, {\n key: \"removeNodeMark\",\n value: function removeNodeMark(pos, mark) {\n if (!(mark instanceof Mark)) {\n var node = this.doc.nodeAt(pos);\n if (!node) throw new RangeError(\"No node at position \" + pos);\n mark = mark.isInSet(node.marks);\n if (!mark) return this;\n }\n\n this.step(new RemoveNodeMarkStep(pos, mark));\n return this;\n }\n /**\n Split the node at the given position, and optionally, if `depth` is\n greater than one, any number of nodes above that. By default, the\n parts split off will inherit the node type of the original node.\n This can be changed by passing an array of types and attributes to\n use after the split.\n */\n\n }, {\n key: \"split\",\n value: function split(pos) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var typesAfter = arguments.length > 2 ? arguments[2] : undefined;\n\n _split(this, pos, depth, typesAfter);\n\n return this;\n }\n /**\n Add the given mark to the inline content between `from` and `to`.\n */\n\n }, {\n key: \"addMark\",\n value: function addMark(from, to, mark) {\n _addMark(this, from, to, mark);\n\n return this;\n }\n /**\n Remove marks from inline nodes between `from` and `to`. When\n `mark` is a single mark, remove precisely that mark. When it is\n a mark type, remove all marks of that type. When it is null,\n remove all marks of any type.\n */\n\n }, {\n key: \"removeMark\",\n value: function removeMark(from, to, mark) {\n _removeMark(this, from, to, mark);\n\n return this;\n }\n /**\n Removes all marks and nodes from the content of the node at\n `pos` that don't match the given new parent node type. Accepts\n an optional starting [content match](https://prosemirror.net/docs/ref/#model.ContentMatch) as\n third argument.\n */\n\n }, {\n key: \"clearIncompatible\",\n value: function clearIncompatible(pos, parentType, match) {\n _clearIncompatible(this, pos, parentType, match);\n\n return this;\n }\n }]);\n\n return Transform;\n}();\n\nexport { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, MapResult, Mapping, RemoveMarkStep, RemoveNodeMarkStep, ReplaceAroundStep, ReplaceStep, Step, StepMap, StepResult, Transform, TransformError, canJoin, canSplit, dropPoint, findWrapping, insertPoint, joinPoint, liftTarget, replaceStep };","var add = /*#__PURE__*/require(\"./add\");\n/**\n * Decrements its argument.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Math\n * @sig Number -> Number\n * @param {Number} n\n * @return {Number} n - 1\n * @see R.inc\n * @example\n *\n * R.dec(42); //=> 41\n */\n\n\nvar dec = /*#__PURE__*/add(-1);\nmodule.exports = dec;","var _curry1 = /*#__PURE__*/require(\"./internal/_curry1\");\n/**\n * Returns a function that always returns the given value. Note that for\n * non-primitives the value returned is a reference to the original value.\n *\n * This function is known as `const`, `constant`, or `K` (for K combinator) in\n * other languages and libraries.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> (* -> a)\n * @param {*} val The value to wrap in a function\n * @return {Function} A Function :: * -> val.\n * @example\n *\n * const t = R.always('Tee');\n * t(); //=> 'Tee'\n */\n\n\nvar always = /*#__PURE__*/_curry1(function always(val) {\n return function () {\n return val;\n };\n});\n\nmodule.exports = always;","'use strict';\nvar $ = require('../internals/export');\nvar $find = require('../internals/array-iteration').find;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n!function (t, e) {\n \"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) && \"undefined\" != typeof module ? module.exports = e() : \"function\" == typeof define && define.amd ? define(e) : (t = \"undefined\" != typeof globalThis ? globalThis : t || self).dayjs = e();\n}(this, function () {\n \"use strict\";\n\n var t = 1e3,\n e = 6e4,\n n = 36e5,\n r = \"millisecond\",\n i = \"second\",\n s = \"minute\",\n u = \"hour\",\n a = \"day\",\n o = \"week\",\n f = \"month\",\n h = \"quarter\",\n c = \"year\",\n d = \"date\",\n $ = \"Invalid Date\",\n l = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,\n y = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,\n M = {\n name: \"en\",\n weekdays: \"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),\n months: \"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")\n },\n m = function m(t, e, n) {\n var r = String(t);\n return !r || r.length >= e ? t : \"\" + Array(e + 1 - r.length).join(n) + t;\n },\n g = {\n s: m,\n z: function z(t) {\n var e = -t.utcOffset(),\n n = Math.abs(e),\n r = Math.floor(n / 60),\n i = n % 60;\n return (e <= 0 ? \"+\" : \"-\") + m(r, 2, \"0\") + \":\" + m(i, 2, \"0\");\n },\n m: function t(e, n) {\n if (e.date() < n.date()) return -t(n, e);\n var r = 12 * (n.year() - e.year()) + (n.month() - e.month()),\n i = e.clone().add(r, f),\n s = n - i < 0,\n u = e.clone().add(r + (s ? -1 : 1), f);\n return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);\n },\n a: function a(t) {\n return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);\n },\n p: function p(t) {\n return {\n M: f,\n y: c,\n w: o,\n d: a,\n D: d,\n h: u,\n m: s,\n s: i,\n ms: r,\n Q: h\n }[t] || String(t || \"\").toLowerCase().replace(/s$/, \"\");\n },\n u: function u(t) {\n return void 0 === t;\n }\n },\n v = \"en\",\n D = {};\n\n D[v] = M;\n\n var p = function p(t) {\n return t instanceof _;\n },\n S = function t(e, n, r) {\n var i;\n if (!e) return v;\n\n if (\"string\" == typeof e) {\n var s = e.toLowerCase();\n D[s] && (i = s), n && (D[s] = n, i = s);\n var u = e.split(\"-\");\n if (!i && u.length > 1) return t(u[0]);\n } else {\n var a = e.name;\n D[a] = e, i = a;\n }\n\n return !r && i && (v = i), i || !r && v;\n },\n w = function w(t, e) {\n if (p(t)) return t.clone();\n var n = \"object\" == _typeof(e) ? e : {};\n return n.date = t, n.args = arguments, new _(n);\n },\n O = g;\n\n O.l = S, O.i = p, O.w = function (t, e) {\n return w(t, {\n locale: e.$L,\n utc: e.$u,\n x: e.$x,\n $offset: e.$offset\n });\n };\n\n var _ = function () {\n function M(t) {\n this.$L = S(t.locale, null, !0), this.parse(t);\n }\n\n var m = M.prototype;\n return m.parse = function (t) {\n this.$d = function (t) {\n var e = t.date,\n n = t.utc;\n if (null === e) return new Date(NaN);\n if (O.u(e)) return new Date();\n if (e instanceof Date) return new Date(e);\n\n if (\"string\" == typeof e && !/Z$/i.test(e)) {\n var r = e.match(l);\n\n if (r) {\n var i = r[2] - 1 || 0,\n s = (r[7] || \"0\").substring(0, 3);\n return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);\n }\n }\n\n return new Date(e);\n }(t), this.$x = t.x || {}, this.init();\n }, m.init = function () {\n var t = this.$d;\n this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();\n }, m.$utils = function () {\n return O;\n }, m.isValid = function () {\n return !(this.$d.toString() === $);\n }, m.isSame = function (t, e) {\n var n = w(t);\n return this.startOf(e) <= n && n <= this.endOf(e);\n }, m.isAfter = function (t, e) {\n return w(t) < this.startOf(e);\n }, m.isBefore = function (t, e) {\n return this.endOf(e) < w(t);\n }, m.$g = function (t, e, n) {\n return O.u(t) ? this[e] : this.set(n, t);\n }, m.unix = function () {\n return Math.floor(this.valueOf() / 1e3);\n }, m.valueOf = function () {\n return this.$d.getTime();\n }, m.startOf = function (t, e) {\n var n = this,\n r = !!O.u(e) || e,\n h = O.p(t),\n $ = function $(t, e) {\n var i = O.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);\n return r ? i : i.endOf(a);\n },\n l = function l(t, e) {\n return O.w(n.toDate()[t].apply(n.toDate(\"s\"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), n);\n },\n y = this.$W,\n M = this.$M,\n m = this.$D,\n g = \"set\" + (this.$u ? \"UTC\" : \"\");\n\n switch (h) {\n case c:\n return r ? $(1, 0) : $(31, 11);\n\n case f:\n return r ? $(1, M) : $(0, M + 1);\n\n case o:\n var v = this.$locale().weekStart || 0,\n D = (y < v ? y + 7 : y) - v;\n return $(r ? m - D : m + (6 - D), M);\n\n case a:\n case d:\n return l(g + \"Hours\", 0);\n\n case u:\n return l(g + \"Minutes\", 1);\n\n case s:\n return l(g + \"Seconds\", 2);\n\n case i:\n return l(g + \"Milliseconds\", 3);\n\n default:\n return this.clone();\n }\n }, m.endOf = function (t) {\n return this.startOf(t, !1);\n }, m.$set = function (t, e) {\n var n,\n o = O.p(t),\n h = \"set\" + (this.$u ? \"UTC\" : \"\"),\n $ = (n = {}, n[a] = h + \"Date\", n[d] = h + \"Date\", n[f] = h + \"Month\", n[c] = h + \"FullYear\", n[u] = h + \"Hours\", n[s] = h + \"Minutes\", n[i] = h + \"Seconds\", n[r] = h + \"Milliseconds\", n)[o],\n l = o === a ? this.$D + (e - this.$W) : e;\n\n if (o === f || o === c) {\n var y = this.clone().set(d, 1);\n y.$d[$](l), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;\n } else $ && this.$d[$](l);\n\n return this.init(), this;\n }, m.set = function (t, e) {\n return this.clone().$set(t, e);\n }, m.get = function (t) {\n return this[O.p(t)]();\n }, m.add = function (r, h) {\n var d,\n $ = this;\n r = Number(r);\n\n var l = O.p(h),\n y = function y(t) {\n var e = w($);\n return O.w(e.date(e.date() + Math.round(t * r)), $);\n };\n\n if (l === f) return this.set(f, this.$M + r);\n if (l === c) return this.set(c, this.$y + r);\n if (l === a) return y(1);\n if (l === o) return y(7);\n var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[l] || 1,\n m = this.$d.getTime() + r * M;\n return O.w(m, this);\n }, m.subtract = function (t, e) {\n return this.add(-1 * t, e);\n }, m.format = function (t) {\n var e = this,\n n = this.$locale();\n if (!this.isValid()) return n.invalidDate || $;\n\n var r = t || \"YYYY-MM-DDTHH:mm:ssZ\",\n i = O.z(this),\n s = this.$H,\n u = this.$m,\n a = this.$M,\n o = n.weekdays,\n f = n.months,\n h = function h(t, n, i, s) {\n return t && (t[n] || t(e, r)) || i[n].slice(0, s);\n },\n c = function c(t) {\n return O.s(s % 12 || 12, t, \"0\");\n },\n d = n.meridiem || function (t, e, n) {\n var r = t < 12 ? \"AM\" : \"PM\";\n return n ? r.toLowerCase() : r;\n },\n l = {\n YY: String(this.$y).slice(-2),\n YYYY: this.$y,\n M: a + 1,\n MM: O.s(a + 1, 2, \"0\"),\n MMM: h(n.monthsShort, a, f, 3),\n MMMM: h(f, a),\n D: this.$D,\n DD: O.s(this.$D, 2, \"0\"),\n d: String(this.$W),\n dd: h(n.weekdaysMin, this.$W, o, 2),\n ddd: h(n.weekdaysShort, this.$W, o, 3),\n dddd: o[this.$W],\n H: String(s),\n HH: O.s(s, 2, \"0\"),\n h: c(1),\n hh: c(2),\n a: d(s, u, !0),\n A: d(s, u, !1),\n m: String(u),\n mm: O.s(u, 2, \"0\"),\n s: String(this.$s),\n ss: O.s(this.$s, 2, \"0\"),\n SSS: O.s(this.$ms, 3, \"0\"),\n Z: i\n };\n\n return r.replace(y, function (t, e) {\n return e || l[t] || i.replace(\":\", \"\");\n });\n }, m.utcOffset = function () {\n return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);\n }, m.diff = function (r, d, $) {\n var l,\n y = O.p(d),\n M = w(r),\n m = (M.utcOffset() - this.utcOffset()) * e,\n g = this - M,\n v = O.m(this, M);\n return v = (l = {}, l[c] = v / 12, l[f] = v, l[h] = v / 3, l[o] = (g - m) / 6048e5, l[a] = (g - m) / 864e5, l[u] = g / n, l[s] = g / e, l[i] = g / t, l)[y] || g, $ ? v : O.a(v);\n }, m.daysInMonth = function () {\n return this.endOf(f).$D;\n }, m.$locale = function () {\n return D[this.$L];\n }, m.locale = function (t, e) {\n if (!t) return this.$L;\n var n = this.clone(),\n r = S(t, e, !0);\n return r && (n.$L = r), n;\n }, m.clone = function () {\n return O.w(this.$d, this);\n }, m.toDate = function () {\n return new Date(this.valueOf());\n }, m.toJSON = function () {\n return this.isValid() ? this.toISOString() : null;\n }, m.toISOString = function () {\n return this.$d.toISOString();\n }, m.toString = function () {\n return this.$d.toUTCString();\n }, M;\n }(),\n T = _.prototype;\n\n return w.prototype = T, [[\"$ms\", r], [\"$s\", i], [\"$m\", s], [\"$H\", u], [\"$W\", a], [\"$M\", f], [\"$y\", c], [\"$D\", d]].forEach(function (t) {\n T[t[1]] = function (e) {\n return this.$g(e, t[0], t[1]);\n };\n }), w.extend = function (t, e) {\n return t.$i || (t(e, _, w), t.$i = !0), w;\n }, w.locale = S, w.isDayjs = p, w.unix = function (t) {\n return w(1e3 * t);\n }, w.en = D[v], w.Ls = D, w.p = {}, w;\n});","import { ActionTypes } from './types.js'; // xstate-specific action types\n\nvar start = ActionTypes.Start;\nvar stop = ActionTypes.Stop;\nvar raise = ActionTypes.Raise;\nvar send = ActionTypes.Send;\nvar cancel = ActionTypes.Cancel;\nvar nullEvent = ActionTypes.NullEvent;\nvar assign = ActionTypes.Assign;\nvar after = ActionTypes.After;\nvar doneState = ActionTypes.DoneState;\nvar log = ActionTypes.Log;\nvar init = ActionTypes.Init;\nvar invoke = ActionTypes.Invoke;\nvar errorExecution = ActionTypes.ErrorExecution;\nvar errorPlatform = ActionTypes.ErrorPlatform;\nvar error = ActionTypes.ErrorCustom;\nvar update = ActionTypes.Update;\nvar pure = ActionTypes.Pure;\nexport { after, assign, cancel, doneState, error, errorExecution, errorPlatform, init, invoke, log, nullEvent, pure, raise, send, start, stop, update };","var $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\n\n// eslint-disable-next-line es-x/no-object-freeze -- safe\nvar $freeze = Object.freeze;\nvar FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });\n\n// `Object.freeze` method\n// https://tc39.es/ecma262/#sec-object.freeze\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n freeze: function freeze(it) {\n return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it;\n }\n});\n","var _concat = /*#__PURE__*/require(\"./internal/_concat\");\n\nvar _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n/**\n * Returns a new list containing the contents of the given list, followed by\n * the given element.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> [a]\n * @param {*} el The element to add to the end of the new list.\n * @param {Array} list The list of elements to add a new item to.\n * list.\n * @return {Array} A new list containing the elements of the old list followed by `el`.\n * @see R.prepend\n * @example\n *\n * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']\n * R.append('tests', []); //=> ['tests']\n * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]\n */\n\n\nvar append = /*#__PURE__*/_curry2(function append(el, list) {\n return _concat(list, [el]);\n});\n\nmodule.exports = append;","var _objectAssign = /*#__PURE__*/require(\"./internal/_objectAssign\");\n\nvar _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @example\n *\n * R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n * //=> { 'name': 'fred', 'age': 40 }\n *\n * const withDefaults = R.mergeRight({x: 0, y: 0});\n * withDefaults({y: 2}); //=> {x: 0, y: 2}\n * @symb R.mergeRight(a, b) = {...a, ...b}\n */\n\n\nvar mergeRight = /*#__PURE__*/_curry2(function mergeRight(l, r) {\n return _objectAssign({}, l, r);\n});\n\nmodule.exports = mergeRight;","var ActionTypes;\n\n(function (ActionTypes) {\n ActionTypes[\"Start\"] = \"xstate.start\";\n ActionTypes[\"Stop\"] = \"xstate.stop\";\n ActionTypes[\"Raise\"] = \"xstate.raise\";\n ActionTypes[\"Send\"] = \"xstate.send\";\n ActionTypes[\"Cancel\"] = \"xstate.cancel\";\n ActionTypes[\"NullEvent\"] = \"\";\n ActionTypes[\"Assign\"] = \"xstate.assign\";\n ActionTypes[\"After\"] = \"xstate.after\";\n ActionTypes[\"DoneState\"] = \"done.state\";\n ActionTypes[\"DoneInvoke\"] = \"done.invoke\";\n ActionTypes[\"Log\"] = \"xstate.log\";\n ActionTypes[\"Init\"] = \"xstate.init\";\n ActionTypes[\"Invoke\"] = \"xstate.invoke\";\n ActionTypes[\"ErrorExecution\"] = \"error.execution\";\n ActionTypes[\"ErrorCommunication\"] = \"error.communication\";\n ActionTypes[\"ErrorPlatform\"] = \"error.platform\";\n ActionTypes[\"ErrorCustom\"] = \"xstate.error\";\n ActionTypes[\"Update\"] = \"xstate.update\";\n ActionTypes[\"Pure\"] = \"xstate.pure\";\n})(ActionTypes || (ActionTypes = {}));\n\nvar SpecialTargets;\n\n(function (SpecialTargets) {\n SpecialTargets[\"Parent\"] = \"#_parent\";\n SpecialTargets[\"Internal\"] = \"#_internal\";\n})(SpecialTargets || (SpecialTargets = {}));\n\nexport { ActionTypes, SpecialTargets };","var _curry3 = /*#__PURE__*/require(\"./internal/_curry3\");\n/**\n * Makes an ascending comparator function out of a function that returns a value\n * that can be compared with `<` and `>`.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Function\n * @sig Ord b => (a -> b) -> a -> a -> Number\n * @param {Function} fn A function of arity one that returns a value that can be compared\n * @param {*} a The first item to be compared.\n * @param {*} b The second item to be compared.\n * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0`\n * @see R.descend\n * @example\n *\n * const byAge = R.ascend(R.prop('age'));\n * const people = [\n * { name: 'Emma', age: 70 },\n * { name: 'Peter', age: 78 },\n * { name: 'Mikhail', age: 62 },\n * ];\n * const peopleByYoungestFirst = R.sort(byAge, people);\n * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]\n */\n\n\nvar ascend = /*#__PURE__*/_curry3(function ascend(fn, a, b) {\n var aa = fn(a);\n var bb = fn(b);\n return aa < bb ? -1 : aa > bb ? 1 : 0;\n});\n\nmodule.exports = ascend;","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.es/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);\n return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@search\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeSearch, rx, S);\n\n if (res.done) return res.value;\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","var _includes = /*#__PURE__*/require(\"./internal/_includes\");\n\nvar _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n\nvar flip = /*#__PURE__*/require(\"./flip\");\n\nvar reject = /*#__PURE__*/require(\"./reject\");\n/**\n * Returns a new list without values in the first argument.\n * [`R.equals`](#equals) is used to determine equality.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @param {Array} list1 The values to be removed from `list2`.\n * @param {Array} list2 The array to remove values from.\n * @return {Array} The new array without values in `list1`.\n * @see R.transduce, R.difference, R.remove\n * @example\n *\n * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4]\n */\n\n\nvar without = /*#__PURE__*/_curry2(function (xs, list) {\n return reject(flip(_includes)(xs), list);\n});\n\nmodule.exports = without;","var _curry1 = /*#__PURE__*/require(\"./internal/_curry1\");\n\nvar empty = /*#__PURE__*/require(\"./empty\");\n\nvar equals = /*#__PURE__*/require(\"./equals\");\n/**\n * Returns `true` if the given value is its type's empty value; `false`\n * otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig a -> Boolean\n * @param {*} x\n * @return {Boolean}\n * @see R.empty\n * @example\n *\n * R.isEmpty([1, 2, 3]); //=> false\n * R.isEmpty([]); //=> true\n * R.isEmpty(''); //=> true\n * R.isEmpty(null); //=> false\n * R.isEmpty({}); //=> true\n * R.isEmpty({length: 0}); //=> false\n */\n\n\nvar isEmpty = /*#__PURE__*/_curry1(function isEmpty(x) {\n return x != null && equals(x, empty(x));\n});\n\nmodule.exports = isEmpty;","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import { scheduleMicrotask } from './utils'; // TYPES\n// CLASS\n\nvar NotifyManager = /*#__PURE__*/function () {\n function NotifyManager() {\n this.queue = [];\n this.transactions = 0;\n\n this.notifyFn = function (callback) {\n callback();\n };\n\n this.batchNotifyFn = function (callback) {\n callback();\n };\n }\n\n var _proto = NotifyManager.prototype;\n\n _proto.batch = function batch(callback) {\n this.transactions++;\n var result = callback();\n this.transactions--;\n\n if (!this.transactions) {\n this.flush();\n }\n\n return result;\n };\n\n _proto.schedule = function schedule(callback) {\n var _this = this;\n\n if (this.transactions) {\n this.queue.push(callback);\n } else {\n scheduleMicrotask(function () {\n _this.notifyFn(callback);\n });\n }\n }\n /**\n * All calls to the wrapped function will be batched.\n */\n ;\n\n _proto.batchCalls = function batchCalls(callback) {\n var _this2 = this;\n\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2.schedule(function () {\n callback.apply(void 0, args);\n });\n };\n };\n\n _proto.flush = function flush() {\n var _this3 = this;\n\n var queue = this.queue;\n this.queue = [];\n\n if (queue.length) {\n scheduleMicrotask(function () {\n _this3.batchNotifyFn(function () {\n queue.forEach(function (callback) {\n _this3.notifyFn(callback);\n });\n });\n });\n }\n }\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n ;\n\n _proto.setNotifyFunction = function setNotifyFunction(fn) {\n this.notifyFn = fn;\n }\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n ;\n\n _proto.setBatchNotifyFunction = function setBatchNotifyFunction(fn) {\n this.batchNotifyFn = fn;\n };\n\n return NotifyManager;\n}(); // SINGLETON\n\n\nexport var notifyManager = new NotifyManager();","var _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n\nvar _dispatchable = /*#__PURE__*/require(\"./internal/_dispatchable\");\n\nvar _xany = /*#__PURE__*/require(\"./internal/_xany\");\n/**\n * Returns `true` if at least one of the elements of the list match the predicate,\n * `false` otherwise.\n *\n * Dispatches to the `any` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false`\n * otherwise.\n * @see R.all, R.none, R.transduce\n * @example\n *\n * const lessThan0 = R.flip(R.lt)(0);\n * const lessThan2 = R.flip(R.lt)(2);\n * R.any(lessThan0)([1, 2]); //=> false\n * R.any(lessThan2)([1, 2]); //=> true\n */\n\n\nvar any = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['any'], _xany, function any(fn, list) {\n var idx = 0;\n\n while (idx < list.length) {\n if (fn(list[idx])) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n}));\n\nmodule.exports = any;","var nth = /*#__PURE__*/require(\"./nth\");\n/**\n * Returns the last element of the given list or string.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.init, R.head, R.tail\n * @example\n *\n * R.last(['fi', 'fo', 'fum']); //=> 'fum'\n * R.last([]); //=> undefined\n *\n * R.last('abc'); //=> 'c'\n * R.last(''); //=> ''\n */\n\n\nvar last = /*#__PURE__*/nth(-1);\nmodule.exports = last;","var _curry3 = /*#__PURE__*/require(\"./internal/_curry3\");\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @sig String -> a -> {k: v} -> {k: v}\n * @param {String} prop The property name to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except for the changed property.\n * @see R.dissoc, R.pick\n * @example\n *\n * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}\n */\n\n\nvar assoc = /*#__PURE__*/_curry3(function assoc(prop, val, obj) {\n var result = {};\n\n for (var p in obj) {\n result[p] = obj[p];\n }\n\n result[prop] = val;\n return result;\n});\n\nmodule.exports = assoc;","// Utilities\n//\n'use strict';\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _class(obj) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction isString(obj) {\n return _class(obj) === '[object String]';\n}\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return _hasOwnProperty.call(object, key);\n} // Merge objects\n//\n\n\nfunction assign(obj\n/*from1, from2, from3, ...*/\n) {\n var sources = Array.prototype.slice.call(arguments, 1);\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n\n if (_typeof(source) !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n return obj;\n} // Remove element from array and put another array at those position.\n// Useful for some operations with tokens\n\n\nfunction arrayReplaceAt(src, pos, newElements) {\n return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) {\n return false;\n } // never used\n\n\n if (c >= 0xFDD0 && c <= 0xFDEF) {\n return false;\n }\n\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) {\n return false;\n } // control codes\n\n\n if (c >= 0x00 && c <= 0x08) {\n return false;\n }\n\n if (c === 0x0B) {\n return false;\n }\n\n if (c >= 0x0E && c <= 0x1F) {\n return false;\n }\n\n if (c >= 0x7F && c <= 0x9F) {\n return false;\n } // out of range\n\n\n if (c > 0x10FFFF) {\n return false;\n }\n\n return true;\n}\n\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n return String.fromCharCode(surrogate1, surrogate2);\n }\n\n return String.fromCharCode(c);\n}\n\nvar UNESCAPE_MD_RE = /\\\\([!\"#$%&'()*+,\\-.\\/:;<=>?@[\\\\\\]^_`{|}~])/g;\nvar ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\n\nvar entities = require('./entities');\n\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n\n if (has(entities, name)) {\n return entities[name];\n }\n\n if (name.charCodeAt(0) === 0x23\n /* # */\n && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n\n return match;\n}\n/*function replaceEntities(str) {\n if (str.indexOf('&') < 0) { return str; }\n\n return str.replace(ENTITY_RE, replaceEntityPattern);\n}*/\n\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) {\n return str;\n }\n\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\nfunction unescapeAll(str) {\n if (str.indexOf('\\\\') < 0 && str.indexOf('&') < 0) {\n return str;\n }\n\n return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {\n if (escaped) {\n return escaped;\n }\n\n return replaceEntityPattern(match, entity);\n });\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n\n return str;\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g;\n\nfunction escapeRE(str) {\n return str.replace(REGEXP_ESCAPE_RE, '\\\\$&');\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction isSpace(code) {\n switch (code) {\n case 0x09:\n case 0x20:\n return true;\n }\n\n return false;\n} // Zs (unicode class) || [\\t\\f\\v\\r\\n]\n\n\nfunction isWhiteSpace(code) {\n if (code >= 0x2000 && code <= 0x200A) {\n return true;\n }\n\n switch (code) {\n case 0x09: // \\t\n\n case 0x0A: // \\n\n\n case 0x0B: // \\v\n\n case 0x0C: // \\f\n\n case 0x0D: // \\r\n\n case 0x20:\n case 0xA0:\n case 0x1680:\n case 0x202F:\n case 0x205F:\n case 0x3000:\n return true;\n }\n\n return false;\n} ////////////////////////////////////////////////////////////////////////////////\n\n/*eslint-disable max-len*/\n\n\nvar UNICODE_PUNCT_RE = require('uc.micro/categories/P/regex'); // Currently without astral characters support.\n\n\nfunction isPunctChar(ch) {\n return UNICODE_PUNCT_RE.test(ch);\n} // Markdown ASCII punctuation characters.\n//\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n//\n// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.\n//\n\n\nfunction isMdAsciiPunct(ch) {\n switch (ch) {\n case 0x21\n /* ! */\n :\n case 0x22\n /* \" */\n :\n case 0x23\n /* # */\n :\n case 0x24\n /* $ */\n :\n case 0x25\n /* % */\n :\n case 0x26\n /* & */\n :\n case 0x27\n /* ' */\n :\n case 0x28\n /* ( */\n :\n case 0x29\n /* ) */\n :\n case 0x2A\n /* * */\n :\n case 0x2B\n /* + */\n :\n case 0x2C\n /* , */\n :\n case 0x2D\n /* - */\n :\n case 0x2E\n /* . */\n :\n case 0x2F\n /* / */\n :\n case 0x3A\n /* : */\n :\n case 0x3B\n /* ; */\n :\n case 0x3C\n /* < */\n :\n case 0x3D\n /* = */\n :\n case 0x3E\n /* > */\n :\n case 0x3F\n /* ? */\n :\n case 0x40\n /* @ */\n :\n case 0x5B\n /* [ */\n :\n case 0x5C\n /* \\ */\n :\n case 0x5D\n /* ] */\n :\n case 0x5E\n /* ^ */\n :\n case 0x5F\n /* _ */\n :\n case 0x60\n /* ` */\n :\n case 0x7B\n /* { */\n :\n case 0x7C\n /* | */\n :\n case 0x7D\n /* } */\n :\n case 0x7E\n /* ~ */\n :\n return true;\n\n default:\n return false;\n }\n} // Hepler to unify [reference labels].\n//\n\n\nfunction normalizeReference(str) {\n // use .toUpperCase() instead of .toLowerCase()\n // here to avoid a conflict with Object.prototype\n // members (most notably, `__proto__`)\n return str.trim().replace(/\\s+/g, ' ').toUpperCase();\n} ////////////////////////////////////////////////////////////////////////////////\n// Re-export libraries commonly used in both markdown-it and its plugins,\n// so plugins won't have to depend on them explicitly, which reduces their\n// bundled size (e.g. a browser build).\n//\n\n\nexports.lib = {};\nexports.lib.mdurl = require('mdurl');\nexports.lib.ucmicro = require('uc.micro');\nexports.assign = assign;\nexports.isString = isString;\nexports.has = has;\nexports.unescapeMd = unescapeMd;\nexports.unescapeAll = unescapeAll;\nexports.isValidEntityCode = isValidEntityCode;\nexports.fromCodePoint = fromCodePoint; // exports.replaceEntities = replaceEntities;\n\nexports.escapeHtml = escapeHtml;\nexports.arrayReplaceAt = arrayReplaceAt;\nexports.isSpace = isSpace;\nexports.isWhiteSpace = isWhiteSpace;\nexports.isMdAsciiPunct = isMdAsciiPunct;\nexports.isPunctChar = isPunctChar;\nexports.escapeRE = escapeRE;\nexports.normalizeReference = normalizeReference;","function areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n\n for (var i = 0; i < newInputs.length; i++) {\n if (newInputs[i] !== lastInputs[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) {\n isEqual = areInputsEqual;\n }\n\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n\n function memoized() {\n var newArgs = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n\n return memoized;\n}\n\nexport default memoizeOne;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread\";\nimport { omit } from './utils';\nexport function getIndexId(context) {\n return hasMultipleIndices(context) ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex;\n}\n/**\n * @returns {import('algoliasearch-helper').SearchResults} results\n */\n\nexport function getResults(searchResults, context) {\n if (searchResults.results) {\n if (searchResults.results.hits) {\n return searchResults.results;\n }\n\n var indexId = getIndexId(context);\n\n if (searchResults.results[indexId]) {\n return searchResults.results[indexId];\n }\n }\n\n return null;\n}\nexport function hasMultipleIndices(context) {\n return context && context.multiIndexContext;\n} // eslint-disable-next-line max-params\n\nexport function refineValue(searchState, nextRefinement, context, resetPage, namespace) {\n if (hasMultipleIndices(context)) {\n var indexId = getIndexId(context);\n return namespace ? refineMultiIndexWithNamespace(searchState, nextRefinement, indexId, resetPage, namespace) : refineMultiIndex(searchState, nextRefinement, indexId, resetPage);\n } else {\n // When we have a multi index page with shared widgets we should also\n // reset their page to 1 if the resetPage is provided. Otherwise the\n // indices will always be reset\n // see: https://github.com/algolia/react-instantsearch/issues/310\n // see: https://github.com/algolia/react-instantsearch/issues/637\n if (searchState.indices && resetPage) {\n Object.keys(searchState.indices).forEach(function (targetedIndex) {\n searchState = refineValue(searchState, {\n page: 1\n }, {\n multiIndexContext: {\n targetedIndex: targetedIndex\n }\n }, true, namespace);\n });\n }\n\n return namespace ? refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) : refineSingleIndex(searchState, nextRefinement, resetPage);\n }\n}\n\nfunction refineMultiIndex(searchState, nextRefinement, indexId, resetPage) {\n var page = resetPage ? {\n page: 1\n } : undefined;\n var state = searchState.indices && searchState.indices[indexId] ? _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, searchState.indices[indexId], nextRefinement, page))) : _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, nextRefinement, page)));\n return _objectSpread({}, searchState, {\n indices: state\n });\n}\n\nfunction refineSingleIndex(searchState, nextRefinement, resetPage) {\n var page = resetPage ? {\n page: 1\n } : undefined;\n return _objectSpread({}, searchState, nextRefinement, page);\n} // eslint-disable-next-line max-params\n\n\nfunction refineMultiIndexWithNamespace(searchState, nextRefinement, indexId, resetPage, namespace) {\n var _objectSpread4;\n\n var page = resetPage ? {\n page: 1\n } : undefined;\n var state = searchState.indices && searchState.indices[indexId] ? _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, searchState.indices[indexId], (_objectSpread4 = {}, _defineProperty(_objectSpread4, namespace, _objectSpread({}, searchState.indices[indexId][namespace], nextRefinement)), _defineProperty(_objectSpread4, \"page\", 1), _objectSpread4)))) : _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread(_defineProperty({}, namespace, nextRefinement), page)));\n return _objectSpread({}, searchState, {\n indices: state\n });\n}\n\nfunction refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) {\n var page = resetPage ? {\n page: 1\n } : undefined;\n return _objectSpread({}, searchState, _defineProperty({}, namespace, _objectSpread({}, searchState[namespace], nextRefinement)), page);\n}\n\nfunction getNamespaceAndAttributeName(id) {\n var parts = id.match(/^([^.]*)\\.(.*)/);\n var namespace = parts && parts[1];\n var attributeName = parts && parts[2];\n return {\n namespace: namespace,\n attributeName: attributeName\n };\n}\n\nfunction hasRefinements(_ref) {\n var multiIndex = _ref.multiIndex,\n indexId = _ref.indexId,\n namespace = _ref.namespace,\n attributeName = _ref.attributeName,\n id = _ref.id,\n searchState = _ref.searchState;\n\n if (multiIndex && namespace) {\n return searchState.indices && searchState.indices[indexId] && searchState.indices[indexId][namespace] && Object.hasOwnProperty.call(searchState.indices[indexId][namespace], attributeName);\n }\n\n if (multiIndex) {\n return searchState.indices && searchState.indices[indexId] && Object.hasOwnProperty.call(searchState.indices[indexId], id);\n }\n\n if (namespace) {\n return searchState[namespace] && Object.hasOwnProperty.call(searchState[namespace], attributeName);\n }\n\n return Object.hasOwnProperty.call(searchState, id);\n}\n\nfunction getRefinements(_ref2) {\n var multiIndex = _ref2.multiIndex,\n indexId = _ref2.indexId,\n namespace = _ref2.namespace,\n attributeName = _ref2.attributeName,\n id = _ref2.id,\n searchState = _ref2.searchState;\n\n if (multiIndex && namespace) {\n return searchState.indices[indexId][namespace][attributeName];\n }\n\n if (multiIndex) {\n return searchState.indices[indexId][id];\n }\n\n if (namespace) {\n return searchState[namespace][attributeName];\n }\n\n return searchState[id];\n}\n\nexport function getCurrentRefinementValue(props, searchState, context, id, defaultValue) {\n var indexId = getIndexId(context);\n\n var _getNamespaceAndAttri = getNamespaceAndAttributeName(id),\n namespace = _getNamespaceAndAttri.namespace,\n attributeName = _getNamespaceAndAttri.attributeName;\n\n var multiIndex = hasMultipleIndices(context);\n var args = {\n multiIndex: multiIndex,\n indexId: indexId,\n namespace: namespace,\n attributeName: attributeName,\n id: id,\n searchState: searchState\n };\n var hasRefinementsValue = hasRefinements(args);\n\n if (hasRefinementsValue) {\n return getRefinements(args);\n }\n\n if (props.defaultRefinement) {\n return props.defaultRefinement;\n }\n\n return defaultValue;\n}\nexport function cleanUpValue(searchState, context, id) {\n var indexId = getIndexId(context);\n\n var _getNamespaceAndAttri2 = getNamespaceAndAttributeName(id),\n namespace = _getNamespaceAndAttri2.namespace,\n attributeName = _getNamespaceAndAttri2.attributeName;\n\n if (hasMultipleIndices(context) && Boolean(searchState.indices)) {\n return cleanUpValueWithMultiIndex({\n attribute: attributeName,\n searchState: searchState,\n indexId: indexId,\n id: id,\n namespace: namespace\n });\n }\n\n return cleanUpValueWithSingleIndex({\n attribute: attributeName,\n searchState: searchState,\n id: id,\n namespace: namespace\n });\n}\n\nfunction cleanUpValueWithSingleIndex(_ref3) {\n var searchState = _ref3.searchState,\n id = _ref3.id,\n namespace = _ref3.namespace,\n attribute = _ref3.attribute;\n\n if (namespace) {\n return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));\n }\n\n return omit(searchState, [id]);\n}\n\nfunction cleanUpValueWithMultiIndex(_ref4) {\n var searchState = _ref4.searchState,\n indexId = _ref4.indexId,\n id = _ref4.id,\n namespace = _ref4.namespace,\n attribute = _ref4.attribute;\n var indexSearchState = searchState.indices[indexId];\n\n if (namespace && indexSearchState) {\n return _objectSpread({}, searchState, {\n indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))\n });\n }\n\n if (indexSearchState) {\n return _objectSpread({}, searchState, {\n indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))\n });\n }\n\n return searchState;\n}","var _isPlaceholder = /*#__PURE__*/require(\"./_isPlaceholder\");\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}\n\nmodule.exports = _curry1;","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument == 'function';\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar symbolFor = Symbol && Symbol['for'];\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n var description = 'Symbol.' + name;\n if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else if (USE_SYMBOL_AS_UID && symbolFor) {\n WellKnownSymbolsStore[name] = symbolFor(description);\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol(description);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.es/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","var _curry1 = /*#__PURE__*/require(\"./internal/_curry1\");\n\nvar _has = /*#__PURE__*/require(\"./internal/_has\");\n\nvar _isArguments = /*#__PURE__*/require(\"./internal/_isArguments\"); // cover IE < 9 keys issues\n\n\nvar hasEnumBug = ! /*#__PURE__*/{\n toString: null\n}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug\n\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n};\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\n\n\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n\n var prop, nIdx;\n var ks = [];\n\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n\n nIdx -= 1;\n }\n }\n\n return ks;\n});\nmodule.exports = keys;","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport React, { useState, useCallback } from 'react';\nvar hiddenStyles = {\n display: 'none'\n};\n\nfunction HiddenText(_ref) {\n var id = _ref.id,\n value = _ref.value;\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n style: hiddenStyles\n }, value);\n}\n\nvar visuallyHidden = {\n position: 'absolute',\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap'\n};\n\nfunction LiveRegion(_ref2) {\n var id = _ref2.id,\n announcement = _ref2.announcement;\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n style: visuallyHidden,\n role: \"status\",\n \"aria-live\": \"assertive\",\n \"aria-atomic\": true\n }, announcement);\n}\n\nfunction useAnnouncement() {\n var _useState = useState(''),\n _useState2 = _slicedToArray(_useState, 2),\n announcement = _useState2[0],\n setAnnouncement = _useState2[1];\n\n var announce = useCallback(function (value) {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n return {\n announce: announce,\n announcement: announcement\n };\n}\n\nexport { HiddenText, LiveRegion, useAnnouncement };","var _excluded = [\"transform\"],\n _excluded2 = [\"id\", \"autoScroll\", \"announcements\", \"children\", \"sensors\", \"collisionDetection\", \"measuring\", \"modifiers\", \"screenReaderInstructions\"],\n _excluded3 = [\"children\", \"transform\"];\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction 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); } }\n\nfunction _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); }); }; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _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.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _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(_e2) { throw _e2; }, 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(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _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 } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _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); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport React, { createContext, useContext, useRef, useEffect, useState, useMemo, useCallback, memo, useReducer } from 'react';\nimport { createPortal, unstable_batchedUpdates } from 'react-dom';\nimport { useUniqueId, getEventCoordinates, getWindow, isDocument, isHTMLElement, isSVGElement, canUseDOM, isWindow, isNode, getOwnerDocument, add, useInterval, useLazyMemo, useNodeRef, isKeyboardEvent, subtract, useLatestValue, useIsomorphicLayoutEffect, CSS } from '@dnd-kit/utilities';\nimport { useAnnouncement, HiddenText, LiveRegion } from '@dnd-kit/accessibility';\nvar screenReaderInstructions = {\n draggable: \"\\n To pick up a draggable item, press the space bar.\\n While dragging, use the arrow keys to move the item.\\n Press space again to drop the item in its new position, or press escape to cancel.\\n \"\n};\nvar defaultAnnouncements = {\n onDragStart: function onDragStart(id) {\n return \"Picked up draggable item \".concat(id, \".\");\n },\n onDragOver: function onDragOver(id, overId) {\n if (overId) {\n return \"Draggable item \".concat(id, \" was moved over droppable area \").concat(overId, \".\");\n }\n\n return \"Draggable item \".concat(id, \" is no longer over a droppable area.\");\n },\n onDragEnd: function onDragEnd(id, overId) {\n if (overId) {\n return \"Draggable item \".concat(id, \" was dropped over droppable area \").concat(overId);\n }\n\n return \"Draggable item \".concat(id, \" was dropped.\");\n },\n onDragCancel: function onDragCancel(id) {\n return \"Dragging was cancelled. Draggable item \".concat(id, \" was dropped.\");\n }\n};\nvar Action;\n\n(function (Action) {\n Action[\"DragStart\"] = \"dragStart\";\n Action[\"DragMove\"] = \"dragMove\";\n Action[\"DragEnd\"] = \"dragEnd\";\n Action[\"DragCancel\"] = \"dragCancel\";\n Action[\"DragOver\"] = \"dragOver\";\n Action[\"RegisterDroppable\"] = \"registerDroppable\";\n Action[\"SetDroppableDisabled\"] = \"setDroppableDisabled\";\n Action[\"UnregisterDroppable\"] = \"unregisterDroppable\";\n})(Action || (Action = {}));\n\nfunction noop() {}\n\nvar DroppableContainersMap = /*#__PURE__*/function (_Map) {\n _inherits(DroppableContainersMap, _Map);\n\n var _super = _createSuper(DroppableContainersMap);\n\n function DroppableContainersMap() {\n _classCallCheck(this, DroppableContainersMap);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(DroppableContainersMap, [{\n key: \"get\",\n value: function get(id) {\n var _super$get;\n\n return id != null ? (_super$get = _get(_getPrototypeOf(DroppableContainersMap.prototype), \"get\", this).call(this, id)) != null ? _super$get : undefined : undefined;\n }\n }, {\n key: \"toArray\",\n value: function toArray() {\n return Array.from(this.values());\n }\n }, {\n key: \"getEnabled\",\n value: function getEnabled() {\n return this.toArray().filter(function (_ref2) {\n var disabled = _ref2.disabled;\n return !disabled;\n });\n }\n }, {\n key: \"getNodeFor\",\n value: function getNodeFor(id) {\n var _this$get$node$curren, _this$get;\n\n return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : undefined;\n }\n }]);\n\n return DroppableContainersMap;\n}( /*#__PURE__*/_wrapNativeSuper(Map));\n\nvar defaultPublicContext = {\n activatorEvent: null,\n active: null,\n activeNode: null,\n activeNodeRect: null,\n collisions: null,\n containerNodeRect: null,\n draggableNodes: {},\n droppableRects: /*#__PURE__*/new Map(),\n droppableContainers: /*#__PURE__*/new DroppableContainersMap(),\n over: null,\n dragOverlay: {\n nodeRef: {\n current: null\n },\n rect: null,\n setRef: noop\n },\n scrollableAncestors: [],\n scrollableAncestorRects: [],\n measureDroppableContainers: noop,\n windowRect: null,\n measuringScheduled: false\n};\nvar defaultInternalContext = {\n activatorEvent: null,\n activators: [],\n active: null,\n activeNodeRect: null,\n ariaDescribedById: {\n draggable: ''\n },\n dispatch: noop,\n draggableNodes: {},\n over: null,\n measureDroppableContainers: noop\n};\nvar InternalContext = /*#__PURE__*/createContext(defaultInternalContext);\nvar PublicContext = /*#__PURE__*/createContext(defaultPublicContext);\n\nfunction getInitialState() {\n return {\n draggable: {\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n nodes: {},\n translate: {\n x: 0,\n y: 0\n }\n },\n droppable: {\n containers: new DroppableContainersMap()\n }\n };\n}\n\nfunction reducer(state, action) {\n switch (action.type) {\n case Action.DragStart:\n return _objectSpread(_objectSpread({}, state), {}, {\n draggable: _objectSpread(_objectSpread({}, state.draggable), {}, {\n initialCoordinates: action.initialCoordinates,\n active: action.active\n })\n });\n\n case Action.DragMove:\n if (!state.draggable.active) {\n return state;\n }\n\n return _objectSpread(_objectSpread({}, state), {}, {\n draggable: _objectSpread(_objectSpread({}, state.draggable), {}, {\n translate: {\n x: action.coordinates.x - state.draggable.initialCoordinates.x,\n y: action.coordinates.y - state.draggable.initialCoordinates.y\n }\n })\n });\n\n case Action.DragEnd:\n case Action.DragCancel:\n return _objectSpread(_objectSpread({}, state), {}, {\n draggable: _objectSpread(_objectSpread({}, state.draggable), {}, {\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n translate: {\n x: 0,\n y: 0\n }\n })\n });\n\n case Action.RegisterDroppable:\n {\n var element = action.element;\n var id = element.id;\n var containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, element);\n return _objectSpread(_objectSpread({}, state), {}, {\n droppable: _objectSpread(_objectSpread({}, state.droppable), {}, {\n containers: containers\n })\n });\n }\n\n case Action.SetDroppableDisabled:\n {\n var _id = action.id,\n key = action.key,\n disabled = action.disabled;\n\n var _element = state.droppable.containers.get(_id);\n\n if (!_element || key !== _element.key) {\n return state;\n }\n\n var _containers = new DroppableContainersMap(state.droppable.containers);\n\n _containers.set(_id, _objectSpread(_objectSpread({}, _element), {}, {\n disabled: disabled\n }));\n\n return _objectSpread(_objectSpread({}, state), {}, {\n droppable: _objectSpread(_objectSpread({}, state.droppable), {}, {\n containers: _containers\n })\n });\n }\n\n case Action.UnregisterDroppable:\n {\n var _id2 = action.id,\n _key = action.key;\n\n var _element2 = state.droppable.containers.get(_id2);\n\n if (!_element2 || _key !== _element2.key) {\n return state;\n }\n\n var _containers2 = new DroppableContainersMap(state.droppable.containers);\n\n _containers2[\"delete\"](_id2);\n\n return _objectSpread(_objectSpread({}, state), {}, {\n droppable: _objectSpread(_objectSpread({}, state.droppable), {}, {\n containers: _containers2\n })\n });\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nvar DndMonitorContext = /*#__PURE__*/createContext({\n type: null,\n event: null\n});\n\nfunction useDndMonitor(_ref3) {\n var onDragStart = _ref3.onDragStart,\n onDragMove = _ref3.onDragMove,\n onDragOver = _ref3.onDragOver,\n onDragEnd = _ref3.onDragEnd,\n onDragCancel = _ref3.onDragCancel;\n var monitorState = useContext(DndMonitorContext);\n var previousMonitorState = useRef(monitorState);\n useEffect(function () {\n if (monitorState !== previousMonitorState.current) {\n var type = monitorState.type,\n event = monitorState.event;\n\n switch (type) {\n case Action.DragStart:\n onDragStart == null ? void 0 : onDragStart(event);\n break;\n\n case Action.DragMove:\n onDragMove == null ? void 0 : onDragMove(event);\n break;\n\n case Action.DragOver:\n onDragOver == null ? void 0 : onDragOver(event);\n break;\n\n case Action.DragCancel:\n onDragCancel == null ? void 0 : onDragCancel(event);\n break;\n\n case Action.DragEnd:\n onDragEnd == null ? void 0 : onDragEnd(event);\n break;\n }\n\n previousMonitorState.current = monitorState;\n }\n }, [monitorState, onDragStart, onDragMove, onDragOver, onDragEnd, onDragCancel]);\n}\n\nfunction Accessibility(_ref4) {\n var _ref4$announcements = _ref4.announcements,\n announcements = _ref4$announcements === void 0 ? defaultAnnouncements : _ref4$announcements,\n hiddenTextDescribedById = _ref4.hiddenTextDescribedById,\n screenReaderInstructions = _ref4.screenReaderInstructions;\n\n var _useAnnouncement = useAnnouncement(),\n announce = _useAnnouncement.announce,\n announcement = _useAnnouncement.announcement;\n\n var liveRegionId = useUniqueId(\"DndLiveRegion\");\n\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n mounted = _useState2[0],\n setMounted = _useState2[1];\n\n useEffect(function () {\n setMounted(true);\n }, []);\n useDndMonitor(useMemo(function () {\n return {\n onDragStart: function onDragStart(_ref5) {\n var active = _ref5.active;\n announce(announcements.onDragStart(active.id));\n },\n onDragMove: function onDragMove(_ref6) {\n var active = _ref6.active,\n over = _ref6.over;\n\n if (announcements.onDragMove) {\n announce(announcements.onDragMove(active.id, over == null ? void 0 : over.id));\n }\n },\n onDragOver: function onDragOver(_ref7) {\n var active = _ref7.active,\n over = _ref7.over;\n announce(announcements.onDragOver(active.id, over == null ? void 0 : over.id));\n },\n onDragEnd: function onDragEnd(_ref8) {\n var active = _ref8.active,\n over = _ref8.over;\n announce(announcements.onDragEnd(active.id, over == null ? void 0 : over.id));\n },\n onDragCancel: function onDragCancel(_ref9) {\n var active = _ref9.active;\n announce(announcements.onDragCancel(active.id));\n }\n };\n }, [announce, announcements]));\n return mounted ? /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HiddenText, {\n id: hiddenTextDescribedById,\n value: screenReaderInstructions.draggable\n }), /*#__PURE__*/React.createElement(LiveRegion, {\n id: liveRegionId,\n announcement: announcement\n })), document.body) : null;\n}\n\nvar defaultCoordinates = /*#__PURE__*/Object.freeze({\n x: 0,\n y: 0\n});\n/**\r\n * Returns the distance between two points\r\n */\n\nfunction distanceBetween(p1, p2) {\n return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n}\n\nfunction getRelativeTransformOrigin(event, rect) {\n var eventCoordinates = getEventCoordinates(event);\n\n if (!eventCoordinates) {\n return '0 0';\n }\n\n var transformOrigin = {\n x: (eventCoordinates.x - rect.left) / rect.width * 100,\n y: (eventCoordinates.y - rect.top) / rect.height * 100\n };\n return \"\".concat(transformOrigin.x, \"% \").concat(transformOrigin.y, \"%\");\n}\n/**\r\n * Sort collisions from smallest to greatest value\r\n */\n\n\nfunction sortCollisionsAsc(_ref10, _ref11) {\n var a = _ref10.data.value;\n var b = _ref11.data.value;\n return a - b;\n}\n/**\r\n * Sort collisions from greatest to smallest value\r\n */\n\n\nfunction sortCollisionsDesc(_ref12, _ref13) {\n var a = _ref12.data.value;\n var b = _ref13.data.value;\n return b - a;\n}\n/**\r\n * Returns the coordinates of the corners of a given rectangle:\r\n * [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]\r\n */\n\n\nfunction cornersOfRectangle(_ref14) {\n var left = _ref14.left,\n top = _ref14.top,\n height = _ref14.height,\n width = _ref14.width;\n return [{\n x: left,\n y: top\n }, {\n x: left + width,\n y: top\n }, {\n x: left,\n y: top + height\n }, {\n x: left + width,\n y: top + height\n }];\n}\n\nfunction getFirstCollision(collisions, property) {\n if (!collisions || collisions.length === 0) {\n return null;\n }\n\n var _collisions = _slicedToArray(collisions, 1),\n firstCollision = _collisions[0];\n\n return property ? firstCollision[property] : firstCollision;\n}\n/**\r\n * Returns the coordinates of the center of a given ClientRect\r\n */\n\n\nfunction centerOfRectangle(rect) {\n var left = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : rect.left;\n var top = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : rect.top;\n return {\n x: left + rect.width * 0.5,\n y: top + rect.height * 0.5\n };\n}\n/**\r\n * Returns the closest rectangles from an array of rectangles to the center of a given\r\n * rectangle.\r\n */\n\n\nvar closestCenter = function closestCenter(_ref15) {\n var collisionRect = _ref15.collisionRect,\n droppableContainers = _ref15.droppableContainers;\n var centerRect = centerOfRectangle(collisionRect, collisionRect.left, collisionRect.top);\n var collisions = [];\n\n var _iterator = _createForOfIteratorHelper(droppableContainers),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var droppableContainer = _step.value;\n var id = droppableContainer.id,\n rect = droppableContainer.rect.current;\n\n if (rect) {\n var distBetween = distanceBetween(centerOfRectangle(rect), centerRect);\n collisions.push({\n id: id,\n data: {\n droppableContainer: droppableContainer,\n value: distBetween\n }\n });\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n/**\r\n * Returns the closest rectangles from an array of rectangles to the corners of\r\n * another rectangle.\r\n */\n\n\nvar closestCorners = function closestCorners(_ref16) {\n var collisionRect = _ref16.collisionRect,\n droppableContainers = _ref16.droppableContainers;\n var corners = cornersOfRectangle(collisionRect);\n var collisions = [];\n\n var _iterator2 = _createForOfIteratorHelper(droppableContainers),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var droppableContainer = _step2.value;\n var id = droppableContainer.id,\n rect = droppableContainer.rect.current;\n\n if (rect) {\n (function () {\n var rectCorners = cornersOfRectangle(rect);\n var distances = corners.reduce(function (accumulator, corner, index) {\n return accumulator + distanceBetween(rectCorners[index], corner);\n }, 0);\n var effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id: id,\n data: {\n droppableContainer: droppableContainer,\n value: effectiveDistance\n }\n });\n })();\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n/**\r\n * Returns the intersecting rectangle area between two rectangles\r\n */\n\n\nfunction getIntersectionRatio(entry, target) {\n var top = Math.max(target.top, entry.top);\n var left = Math.max(target.left, entry.left);\n var right = Math.min(target.left + target.width, entry.left + entry.width);\n var bottom = Math.min(target.top + target.height, entry.top + entry.height);\n var width = right - left;\n var height = bottom - top;\n\n if (left < right && top < bottom) {\n var targetArea = target.width * target.height;\n var entryArea = entry.width * entry.height;\n var intersectionArea = width * height;\n var intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);\n return Number(intersectionRatio.toFixed(4));\n } // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)\n\n\n return 0;\n}\n/**\r\n * Returns the rectangles that has the greatest intersection area with a given\r\n * rectangle in an array of rectangles.\r\n */\n\n\nvar rectIntersection = function rectIntersection(_ref17) {\n var collisionRect = _ref17.collisionRect,\n droppableContainers = _ref17.droppableContainers;\n var collisions = [];\n\n var _iterator3 = _createForOfIteratorHelper(droppableContainers),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var droppableContainer = _step3.value;\n var id = droppableContainer.id,\n rect = droppableContainer.rect.current;\n\n if (rect) {\n var intersectionRatio = getIntersectionRatio(rect, collisionRect);\n\n if (intersectionRatio > 0) {\n collisions.push({\n id: id,\n data: {\n droppableContainer: droppableContainer,\n value: intersectionRatio\n }\n });\n }\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n return collisions.sort(sortCollisionsDesc);\n};\n/**\r\n * Check if a given point is contained within a bounding rectangle\r\n */\n\n\nfunction isPointWithinRect(point, rect) {\n var top = rect.top,\n left = rect.left,\n bottom = rect.bottom,\n right = rect.right;\n return top <= point.y && point.y <= bottom && left <= point.x && point.x <= right;\n}\n/**\r\n * Returns the rectangles that the pointer is hovering over\r\n */\n\n\nvar pointerWithin = function pointerWithin(_ref18) {\n var droppableContainers = _ref18.droppableContainers,\n pointerCoordinates = _ref18.pointerCoordinates;\n\n if (!pointerCoordinates) {\n return [];\n }\n\n var collisions = [];\n\n var _iterator4 = _createForOfIteratorHelper(droppableContainers),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var droppableContainer = _step4.value;\n var id = droppableContainer.id,\n rect = droppableContainer.rect.current;\n\n if (rect && isPointWithinRect(pointerCoordinates, rect)) {\n /* There may be more than a single rectangle intersecting\r\n * with the pointer coordinates. In order to sort the\r\n * colliding rectangles, we measure the distance between\r\n * the pointer and the corners of the intersecting rectangle\r\n */\n var corners = cornersOfRectangle(rect);\n var distances = corners.reduce(function (accumulator, corner) {\n return accumulator + distanceBetween(pointerCoordinates, corner);\n }, 0);\n var effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id: id,\n data: {\n droppableContainer: droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\nfunction adjustScale(transform, rect1, rect2) {\n return _objectSpread(_objectSpread({}, transform), {}, {\n scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1,\n scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1\n });\n}\n\nfunction getRectDelta(rect1, rect2) {\n return rect1 && rect2 ? {\n x: rect1.left - rect2.left,\n y: rect1.top - rect2.top\n } : defaultCoordinates;\n}\n\nfunction createRectAdjustmentFn(modifier) {\n return function adjustClientRect(rect) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {\n adjustments[_key2 - 1] = arguments[_key2];\n }\n\n return adjustments.reduce(function (acc, adjustment) {\n return _objectSpread(_objectSpread({}, acc), {}, {\n top: acc.top + modifier * adjustment.y,\n bottom: acc.bottom + modifier * adjustment.y,\n left: acc.left + modifier * adjustment.x,\n right: acc.right + modifier * adjustment.x\n });\n }, _objectSpread({}, rect));\n };\n}\n\nvar getAdjustedRect = /*#__PURE__*/createRectAdjustmentFn(1);\n\nfunction inverseTransform(rect, transform, transformOrigin) {\n var ta, sx, sy, dx, dy;\n\n if (transform.startsWith('matrix3d(')) {\n ta = transform.slice(9, -1).split(/, /);\n sx = +ta[0];\n sy = +ta[5];\n dx = +ta[12];\n dy = +ta[13];\n } else if (transform.startsWith('matrix(')) {\n ta = transform.slice(7, -1).split(/, /);\n sx = +ta[0];\n sy = +ta[3];\n dx = +ta[4];\n dy = +ta[5];\n } else {\n return rect;\n }\n\n var x = rect.left - dx - (1 - sx) * parseFloat(transformOrigin);\n var y = rect.top - dy - (1 - sy) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(' ') + 1));\n var w = sx ? rect.width / sx : rect.width;\n var h = sy ? rect.height / sy : rect.height;\n return {\n width: w,\n height: h,\n top: y,\n right: x + w,\n bottom: y + h,\n left: x\n };\n}\n\nvar defaultOptions = {\n ignoreTransform: false\n};\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n */\n\nfunction getClientRect(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions;\n var rect = element.getBoundingClientRect();\n\n if (options.ignoreTransform) {\n var _getWindow = getWindow(element),\n getComputedStyle = _getWindow.getComputedStyle;\n\n var _getComputedStyle = getComputedStyle(element),\n transform = _getComputedStyle.transform,\n transformOrigin = _getComputedStyle.transformOrigin;\n\n if (transform) {\n rect = inverseTransform(rect, transform, transformOrigin);\n }\n }\n\n var _rect = rect,\n top = _rect.top,\n left = _rect.left,\n width = _rect.width,\n height = _rect.height,\n bottom = _rect.bottom,\n right = _rect.right;\n return {\n top: top,\n left: left,\n width: width,\n height: height,\n bottom: bottom,\n right: right\n };\n}\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n *\r\n * @remarks\r\n * The ClientRect returned by this method does not take into account transforms\r\n * applied to the element it measures.\r\n *\r\n */\n\n\nfunction getTransformAgnosticClientRect(element) {\n return getClientRect(element, {\n ignoreTransform: true\n });\n}\n\nfunction getWindowClientRect(element) {\n var width = element.innerWidth;\n var height = element.innerHeight;\n return {\n top: 0,\n left: 0,\n right: width,\n bottom: height,\n width: width,\n height: height\n };\n}\n\nfunction isFixed(node) {\n var computedStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getWindow(node).getComputedStyle(node);\n return computedStyle.position === 'fixed';\n}\n\nfunction isScrollable(element) {\n var computedStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getWindow(element).getComputedStyle(element);\n var overflowRegex = /(auto|scroll|overlay)/;\n var properties = ['overflow', 'overflowX', 'overflowY'];\n return properties.find(function (property) {\n var value = computedStyle[property];\n return typeof value === 'string' ? overflowRegex.test(value) : false;\n }) != null;\n}\n\nfunction getScrollableAncestors(element) {\n var scrollParents = [];\n\n function findScrollableAncestors(node) {\n if (!node) {\n return scrollParents;\n }\n\n if (isDocument(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) {\n scrollParents.push(node.scrollingElement);\n return scrollParents;\n }\n\n if (!isHTMLElement(node) || isSVGElement(node)) {\n return scrollParents;\n }\n\n if (scrollParents.includes(node)) {\n return scrollParents;\n }\n\n var _getWindow2 = getWindow(node),\n getComputedStyle = _getWindow2.getComputedStyle;\n\n var computedStyle = getComputedStyle(node);\n\n if (node !== element) {\n if (isScrollable(node, computedStyle)) {\n scrollParents.push(node);\n }\n }\n\n if (isFixed(node, computedStyle)) {\n return scrollParents;\n }\n\n return findScrollableAncestors(node.parentNode);\n }\n\n if (!element) {\n return scrollParents;\n }\n\n return findScrollableAncestors(element);\n}\n\nfunction getScrollableElement(element) {\n if (!canUseDOM || !element) {\n return null;\n }\n\n if (isWindow(element)) {\n return element;\n }\n\n if (!isNode(element)) {\n return null;\n }\n\n if (isDocument(element) || element === getOwnerDocument(element).scrollingElement) {\n return window;\n }\n\n if (isHTMLElement(element)) {\n return element;\n }\n\n return null;\n}\n\nfunction getScrollXCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollX;\n }\n\n return element.scrollLeft;\n}\n\nfunction getScrollYCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollY;\n }\n\n return element.scrollTop;\n}\n\nfunction getScrollCoordinates(element) {\n return {\n x: getScrollXCoordinate(element),\n y: getScrollYCoordinate(element)\n };\n}\n\nvar Direction;\n\n(function (Direction) {\n Direction[Direction[\"Forward\"] = 1] = \"Forward\";\n Direction[Direction[\"Backward\"] = -1] = \"Backward\";\n})(Direction || (Direction = {}));\n\nfunction getScrollPosition(scrollingContainer) {\n var minScroll = {\n x: 0,\n y: 0\n };\n var maxScroll = {\n x: scrollingContainer.scrollWidth - scrollingContainer.clientWidth,\n y: scrollingContainer.scrollHeight - scrollingContainer.clientHeight\n };\n var isTop = scrollingContainer.scrollTop <= minScroll.y;\n var isLeft = scrollingContainer.scrollLeft <= minScroll.x;\n var isBottom = scrollingContainer.scrollTop >= maxScroll.y;\n var isRight = scrollingContainer.scrollLeft >= maxScroll.x;\n return {\n isTop: isTop,\n isLeft: isLeft,\n isBottom: isBottom,\n isRight: isRight,\n maxScroll: maxScroll,\n minScroll: minScroll\n };\n}\n\nfunction isDocumentScrollingElement(element) {\n if (!canUseDOM || !element) {\n return false;\n }\n\n return element === document.scrollingElement;\n}\n\nvar defaultThreshold = {\n x: 0.2,\n y: 0.2\n};\n\nfunction getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref19) {\n var top = _ref19.top,\n left = _ref19.left,\n right = _ref19.right,\n bottom = _ref19.bottom;\n var acceleration = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;\n var thresholdPercentage = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : defaultThreshold;\n var clientHeight = scrollContainer.clientHeight,\n clientWidth = scrollContainer.clientWidth;\n var finalScrollContainerRect = isDocumentScrollingElement(scrollContainer) ? {\n top: 0,\n left: 0,\n right: clientWidth,\n bottom: clientHeight,\n width: clientWidth,\n height: clientHeight\n } : scrollContainerRect;\n\n var _getScrollPosition = getScrollPosition(scrollContainer),\n isTop = _getScrollPosition.isTop,\n isBottom = _getScrollPosition.isBottom,\n isLeft = _getScrollPosition.isLeft,\n isRight = _getScrollPosition.isRight;\n\n var direction = {\n x: 0,\n y: 0\n };\n var speed = {\n x: 0,\n y: 0\n };\n var threshold = {\n height: finalScrollContainerRect.height * thresholdPercentage.y,\n width: finalScrollContainerRect.width * thresholdPercentage.x\n };\n\n if (!isTop && top <= finalScrollContainerRect.top + threshold.height) {\n // Scroll Up\n direction.y = Direction.Backward;\n speed.y = acceleration * Math.abs((finalScrollContainerRect.top + threshold.height - top) / threshold.height);\n } else if (!isBottom && bottom >= finalScrollContainerRect.bottom - threshold.height) {\n // Scroll Down\n direction.y = Direction.Forward;\n speed.y = acceleration * Math.abs((finalScrollContainerRect.bottom - threshold.height - bottom) / threshold.height);\n }\n\n if (!isRight && right >= finalScrollContainerRect.right - threshold.width) {\n // Scroll Right\n direction.x = Direction.Forward;\n speed.x = acceleration * Math.abs((finalScrollContainerRect.right - threshold.width - right) / threshold.width);\n } else if (!isLeft && left <= finalScrollContainerRect.left + threshold.width) {\n // Scroll Left\n direction.x = Direction.Backward;\n speed.x = acceleration * Math.abs((finalScrollContainerRect.left + threshold.width - left) / threshold.width);\n }\n\n return {\n direction: direction,\n speed: speed\n };\n}\n\nfunction getScrollElementRect(element) {\n if (element === document.scrollingElement) {\n var _window = window,\n innerWidth = _window.innerWidth,\n innerHeight = _window.innerHeight;\n return {\n top: 0,\n left: 0,\n right: innerWidth,\n bottom: innerHeight,\n width: innerWidth,\n height: innerHeight\n };\n }\n\n var _element$getBoundingC = element.getBoundingClientRect(),\n top = _element$getBoundingC.top,\n left = _element$getBoundingC.left,\n right = _element$getBoundingC.right,\n bottom = _element$getBoundingC.bottom;\n\n return {\n top: top,\n left: left,\n right: right,\n bottom: bottom,\n width: element.clientWidth,\n height: element.clientHeight\n };\n}\n\nfunction getScrollOffsets(scrollableAncestors) {\n return scrollableAncestors.reduce(function (acc, node) {\n return add(acc, getScrollCoordinates(node));\n }, defaultCoordinates);\n}\n\nfunction getScrollXOffset(scrollableAncestors) {\n return scrollableAncestors.reduce(function (acc, node) {\n return acc + getScrollXCoordinate(node);\n }, 0);\n}\n\nfunction getScrollYOffset(scrollableAncestors) {\n return scrollableAncestors.reduce(function (acc, node) {\n return acc + getScrollYCoordinate(node);\n }, 0);\n}\n\nvar properties = [['x', ['left', 'right'], getScrollXOffset], ['y', ['top', 'bottom'], getScrollYOffset]];\n\nvar Rect = /*#__PURE__*/_createClass(function Rect(rect, element) {\n var _this = this;\n\n _classCallCheck(this, Rect);\n\n this.rect = void 0;\n this.width = void 0;\n this.height = void 0;\n this.top = void 0;\n this.bottom = void 0;\n this.right = void 0;\n this.left = void 0;\n var scrollableAncestors = getScrollableAncestors(element);\n var scrollOffsets = getScrollOffsets(scrollableAncestors);\n this.rect = _objectSpread({}, rect);\n this.width = rect.width;\n this.height = rect.height;\n\n var _iterator5 = _createForOfIteratorHelper(properties),\n _step5;\n\n try {\n var _loop = function _loop() {\n var _step5$value = _slicedToArray(_step5.value, 3),\n axis = _step5$value[0],\n keys = _step5$value[1],\n getScrollOffset = _step5$value[2];\n\n var _iterator6 = _createForOfIteratorHelper(keys),\n _step6;\n\n try {\n var _loop2 = function _loop2() {\n var key = _step6.value;\n Object.defineProperty(_this, key, {\n get: function get() {\n var currentOffsets = getScrollOffset(scrollableAncestors);\n var scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets;\n return _this.rect[key] + scrollOffsetsDeltla;\n },\n enumerable: true\n });\n };\n\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n _loop2();\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n };\n\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n _loop();\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n Object.defineProperty(this, 'rect', {\n enumerable: false\n });\n});\n\nvar AutoScrollActivator;\n\n(function (AutoScrollActivator) {\n AutoScrollActivator[AutoScrollActivator[\"Pointer\"] = 0] = \"Pointer\";\n AutoScrollActivator[AutoScrollActivator[\"DraggableRect\"] = 1] = \"DraggableRect\";\n})(AutoScrollActivator || (AutoScrollActivator = {}));\n\nvar TraversalOrder;\n\n(function (TraversalOrder) {\n TraversalOrder[TraversalOrder[\"TreeOrder\"] = 0] = \"TreeOrder\";\n TraversalOrder[TraversalOrder[\"ReversedTreeOrder\"] = 1] = \"ReversedTreeOrder\";\n})(TraversalOrder || (TraversalOrder = {}));\n\nfunction useAutoScroller(_ref20) {\n var acceleration = _ref20.acceleration,\n _ref20$activator = _ref20.activator,\n activator = _ref20$activator === void 0 ? AutoScrollActivator.Pointer : _ref20$activator,\n canScroll = _ref20.canScroll,\n draggingRect = _ref20.draggingRect,\n enabled = _ref20.enabled,\n _ref20$interval = _ref20.interval,\n interval = _ref20$interval === void 0 ? 5 : _ref20$interval,\n _ref20$order = _ref20.order,\n order = _ref20$order === void 0 ? TraversalOrder.TreeOrder : _ref20$order,\n pointerCoordinates = _ref20.pointerCoordinates,\n scrollableAncestors = _ref20.scrollableAncestors,\n scrollableAncestorRects = _ref20.scrollableAncestorRects,\n threshold = _ref20.threshold;\n\n var _useInterval = useInterval(),\n _useInterval2 = _slicedToArray(_useInterval, 2),\n setAutoScrollInterval = _useInterval2[0],\n clearAutoScrollInterval = _useInterval2[1];\n\n var scrollSpeed = useRef({\n x: 1,\n y: 1\n });\n var rect = useMemo(function () {\n switch (activator) {\n case AutoScrollActivator.Pointer:\n return pointerCoordinates ? {\n top: pointerCoordinates.y,\n bottom: pointerCoordinates.y,\n left: pointerCoordinates.x,\n right: pointerCoordinates.x\n } : null;\n\n case AutoScrollActivator.DraggableRect:\n return draggingRect;\n }\n\n return null;\n }, [activator, draggingRect, pointerCoordinates]);\n var scrollDirection = useRef(defaultCoordinates);\n var scrollContainerRef = useRef(null);\n var autoScroll = useCallback(function () {\n var scrollContainer = scrollContainerRef.current;\n\n if (!scrollContainer) {\n return;\n }\n\n var scrollLeft = scrollSpeed.current.x * scrollDirection.current.x;\n var scrollTop = scrollSpeed.current.y * scrollDirection.current.y;\n scrollContainer.scrollBy(scrollLeft, scrollTop);\n }, []);\n var sortedScrollableAncestors = useMemo(function () {\n return order === TraversalOrder.TreeOrder ? _toConsumableArray(scrollableAncestors).reverse() : scrollableAncestors;\n }, [order, scrollableAncestors]);\n useEffect(function () {\n if (!enabled || !scrollableAncestors.length || !rect) {\n clearAutoScrollInterval();\n return;\n }\n\n var _iterator7 = _createForOfIteratorHelper(sortedScrollableAncestors),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var scrollContainer = _step7.value;\n\n if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {\n continue;\n }\n\n var index = scrollableAncestors.indexOf(scrollContainer);\n var scrollContainerRect = scrollableAncestorRects[index];\n\n if (!scrollContainerRect) {\n continue;\n }\n\n var _getScrollDirectionAn = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold),\n direction = _getScrollDirectionAn.direction,\n speed = _getScrollDirectionAn.speed;\n\n if (speed.x > 0 || speed.y > 0) {\n clearAutoScrollInterval();\n scrollContainerRef.current = scrollContainer;\n setAutoScrollInterval(autoScroll, interval);\n scrollSpeed.current = speed;\n scrollDirection.current = direction;\n return;\n }\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n\n scrollSpeed.current = {\n x: 0,\n y: 0\n };\n scrollDirection.current = {\n x: 0,\n y: 0\n };\n clearAutoScrollInterval();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [acceleration, autoScroll, canScroll, clearAutoScrollInterval, enabled, interval, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(rect), setAutoScrollInterval, scrollableAncestors, sortedScrollableAncestors, scrollableAncestorRects, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold)]);\n}\n\nfunction useCachedNode(draggableNodes, id) {\n var draggableNode = id !== null ? draggableNodes[id] : undefined;\n var node = draggableNode ? draggableNode.node.current : null;\n return useLazyMemo(function (cachedNode) {\n var _ref;\n\n if (id === null) {\n return null;\n } // In some cases, the draggable node can unmount while dragging\n // This is the case for virtualized lists. In those situations,\n // we fall back to the last known value for that node.\n\n\n return (_ref = node != null ? node : cachedNode) != null ? _ref : null;\n }, [node, id]);\n}\n\nfunction useCombineActivators(sensors, getSyntheticHandler) {\n return useMemo(function () {\n return sensors.reduce(function (accumulator, sensor) {\n var Sensor = sensor.sensor;\n var sensorActivators = Sensor.activators.map(function (activator) {\n return {\n eventName: activator.eventName,\n handler: getSyntheticHandler(activator.handler, sensor)\n };\n });\n return [].concat(_toConsumableArray(accumulator), _toConsumableArray(sensorActivators));\n }, []);\n }, [sensors, getSyntheticHandler]);\n}\n\nvar MeasuringStrategy;\n\n(function (MeasuringStrategy) {\n MeasuringStrategy[MeasuringStrategy[\"Always\"] = 0] = \"Always\";\n MeasuringStrategy[MeasuringStrategy[\"BeforeDragging\"] = 1] = \"BeforeDragging\";\n MeasuringStrategy[MeasuringStrategy[\"WhileDragging\"] = 2] = \"WhileDragging\";\n})(MeasuringStrategy || (MeasuringStrategy = {}));\n\nvar MeasuringFrequency;\n\n(function (MeasuringFrequency) {\n MeasuringFrequency[\"Optimized\"] = \"optimized\";\n})(MeasuringFrequency || (MeasuringFrequency = {}));\n\nvar defaultValue = /*#__PURE__*/new Map();\nvar defaultConfig = {\n measure: getTransformAgnosticClientRect,\n strategy: MeasuringStrategy.WhileDragging,\n frequency: MeasuringFrequency.Optimized\n};\n\nfunction useDroppableMeasuring(containers, _ref21) {\n var dragging = _ref21.dragging,\n dependencies = _ref21.dependencies,\n config = _ref21.config;\n\n var _useState3 = useState(null),\n _useState4 = _slicedToArray(_useState3, 2),\n containerIdsScheduledForMeasurement = _useState4[0],\n setContainerIdsScheduledForMeasurement = _useState4[1];\n\n var measuringScheduled = containerIdsScheduledForMeasurement != null;\n\n var _defaultConfig$config = _objectSpread(_objectSpread({}, defaultConfig), config),\n frequency = _defaultConfig$config.frequency,\n measure = _defaultConfig$config.measure,\n strategy = _defaultConfig$config.strategy;\n\n var containersRef = useRef(containers);\n var measureDroppableContainers = useCallback(function () {\n var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n return setContainerIdsScheduledForMeasurement(function (value) {\n return value ? value.concat(ids) : ids;\n });\n }, []);\n var timeoutId = useRef(null);\n var disabled = isDisabled();\n var droppableRects = useLazyMemo(function (previousValue) {\n if (disabled && !dragging) {\n return defaultValue;\n }\n\n var ids = containerIdsScheduledForMeasurement;\n\n if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || ids != null) {\n var map = new Map();\n\n var _iterator8 = _createForOfIteratorHelper(containers),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var container = _step8.value;\n\n if (!container) {\n continue;\n }\n\n if (ids && ids.length > 0 && !ids.includes(container.id) && container.rect.current) {\n // This container does not need to be re-measured\n map.set(container.id, container.rect.current);\n continue;\n }\n\n var node = container.node.current;\n var rect = node ? new Rect(measure(node), node) : null;\n container.rect.current = rect;\n\n if (rect) {\n map.set(container.id, rect);\n }\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n\n return map;\n }\n\n return previousValue;\n }, [containers, containerIdsScheduledForMeasurement, dragging, disabled, measure]);\n useEffect(function () {\n containersRef.current = containers;\n }, [containers]);\n useEffect(function () {\n if (disabled) {\n return;\n }\n\n requestAnimationFrame(function () {\n return measureDroppableContainers();\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [dragging, disabled]);\n useEffect(function () {\n if (measuringScheduled) {\n setContainerIdsScheduledForMeasurement(null);\n }\n }, [measuringScheduled]);\n useEffect(function () {\n if (disabled || typeof frequency !== 'number' || timeoutId.current !== null) {\n return;\n }\n\n timeoutId.current = setTimeout(function () {\n measureDroppableContainers();\n timeoutId.current = null;\n }, frequency);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [frequency, disabled, measureDroppableContainers].concat(_toConsumableArray(dependencies)));\n return {\n droppableRects: droppableRects,\n measureDroppableContainers: measureDroppableContainers,\n measuringScheduled: measuringScheduled\n };\n\n function isDisabled() {\n switch (strategy) {\n case MeasuringStrategy.Always:\n return false;\n\n case MeasuringStrategy.BeforeDragging:\n return dragging;\n\n default:\n return !dragging;\n }\n }\n}\n/**\r\n * Returns a new ResizeObserver instance bound to the `onResize` callback.\r\n * If `ResizeObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\n\nfunction useResizeObserver(_ref22) {\n var onResize = _ref22.onResize,\n disabled = _ref22.disabled;\n var resizeObserver = useMemo(function () {\n if (disabled || typeof window === 'undefined' || typeof window.ResizeObserver === 'undefined') {\n return undefined;\n }\n\n var _window2 = window,\n ResizeObserver = _window2.ResizeObserver;\n return new ResizeObserver(onResize);\n }, [disabled, onResize]);\n return resizeObserver;\n}\n\nfunction useScrollOffsets(elements) {\n var _useState5 = useState(null),\n _useState6 = _slicedToArray(_useState5, 2),\n scrollCoordinates = _useState6[0],\n setScrollCoordinates = _useState6[1];\n\n var prevElements = useRef(elements); // To-do: Throttle the handleScroll callback\n\n var handleScroll = useCallback(function (event) {\n var scrollingElement = getScrollableElement(event.target);\n\n if (!scrollingElement) {\n return;\n }\n\n setScrollCoordinates(function (scrollCoordinates) {\n if (!scrollCoordinates) {\n return null;\n }\n\n scrollCoordinates.set(scrollingElement, getScrollCoordinates(scrollingElement));\n return new Map(scrollCoordinates);\n });\n }, []);\n useEffect(function () {\n var previousElements = prevElements.current;\n\n if (elements !== previousElements) {\n cleanup(previousElements);\n var entries = elements.map(function (element) {\n var scrollableElement = getScrollableElement(element);\n\n if (scrollableElement) {\n scrollableElement.addEventListener('scroll', handleScroll, {\n passive: true\n });\n return [scrollableElement, getScrollCoordinates(scrollableElement)];\n }\n\n return null;\n }).filter(function (entry) {\n return entry != null;\n });\n setScrollCoordinates(entries.length ? new Map(entries) : null);\n prevElements.current = elements;\n }\n\n return function () {\n cleanup(elements);\n cleanup(previousElements);\n };\n\n function cleanup(elements) {\n elements.forEach(function (element) {\n var scrollableElement = getScrollableElement(element);\n scrollableElement == null ? void 0 : scrollableElement.removeEventListener('scroll', handleScroll);\n });\n }\n }, [handleScroll, elements]);\n return useMemo(function () {\n if (elements.length) {\n return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce(function (acc, coordinates) {\n return add(acc, coordinates);\n }, defaultCoordinates) : getScrollOffsets(elements);\n }\n\n return defaultCoordinates;\n }, [elements, scrollCoordinates]);\n}\n\nvar defaultValue$1 = [];\n\nfunction useScrollableAncestors(node) {\n var previousNode = useRef(node);\n var ancestors = useLazyMemo(function (previousValue) {\n if (!node) {\n return defaultValue$1;\n }\n\n if (previousValue && node && previousNode.current && node.parentNode === previousNode.current.parentNode) {\n return previousValue;\n }\n\n return getScrollableAncestors(node);\n }, [node]);\n useEffect(function () {\n previousNode.current = node;\n }, [node]);\n return ancestors;\n}\n\nfunction useSensorSetup(sensors) {\n useEffect(function () {\n if (!canUseDOM) {\n return;\n }\n\n var teardownFns = sensors.map(function (_ref23) {\n var sensor = _ref23.sensor;\n return sensor.setup == null ? void 0 : sensor.setup();\n });\n return function () {\n var _iterator9 = _createForOfIteratorHelper(teardownFns),\n _step9;\n\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n var teardown = _step9.value;\n teardown == null ? void 0 : teardown();\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n };\n }, // TO-DO: Sensors length could theoretically change which would not be a valid dependency\n // eslint-disable-next-line react-hooks/exhaustive-deps\n sensors.map(function (_ref24) {\n var sensor = _ref24.sensor;\n return sensor;\n }));\n}\n\nfunction useSyntheticListeners(listeners, id) {\n return useMemo(function () {\n return listeners.reduce(function (acc, _ref25) {\n var eventName = _ref25.eventName,\n handler = _ref25.handler;\n\n acc[eventName] = function (event) {\n handler(event, id);\n };\n\n return acc;\n }, {});\n }, [listeners, id]);\n}\n\nvar useClientRect = /*#__PURE__*/createUseRectFn(getTransformAgnosticClientRect);\nvar useClientRects = /*#__PURE__*/createUseRectsFn(getTransformAgnosticClientRect);\n\nfunction useRect(element, getRect, forceRecompute) {\n var previousElement = useRef(element);\n return useLazyMemo(function (previousValue) {\n if (!element) {\n return null;\n }\n\n if (forceRecompute || !previousValue && element || element !== previousElement.current) {\n if (isHTMLElement(element) && element.parentNode == null) {\n return null;\n }\n\n return new Rect(getRect(element), element);\n }\n\n return previousValue != null ? previousValue : null;\n }, [element, forceRecompute, getRect]);\n}\n\nfunction createUseRectFn(getRect) {\n return function (element, forceRecompute) {\n return useRect(element, getRect, forceRecompute);\n };\n}\n\nfunction createUseRectsFn(getRect) {\n var defaultValue = [];\n return function useRects(elements, forceRecompute) {\n var previousElements = useRef(elements);\n return useLazyMemo(function (previousValue) {\n if (!elements.length) {\n return defaultValue;\n }\n\n if (forceRecompute || !previousValue && elements.length || elements !== previousElements.current) {\n return elements.map(function (element) {\n return new Rect(getRect(element), element);\n });\n }\n\n return previousValue != null ? previousValue : defaultValue;\n }, [elements, forceRecompute]);\n };\n}\n\nfunction useWindowRect(element) {\n return useMemo(function () {\n return element ? getWindowClientRect(element) : null;\n }, [element]);\n}\n\nfunction getMeasurableNode(node) {\n if (!node) {\n return null;\n }\n\n if (node.children.length > 1) {\n return node;\n }\n\n var firstChild = node.children[0];\n return isHTMLElement(firstChild) ? firstChild : node;\n}\n\nfunction useDragOverlayMeasuring(_ref26) {\n var _ref26$measure = _ref26.measure,\n measure = _ref26$measure === void 0 ? getClientRect : _ref26$measure;\n\n var _useState7 = useState(null),\n _useState8 = _slicedToArray(_useState7, 2),\n rect = _useState8[0],\n setRect = _useState8[1];\n\n var handleResize = useCallback(function (entries) {\n var _iterator10 = _createForOfIteratorHelper(entries),\n _step10;\n\n try {\n var _loop3 = function _loop3() {\n var target = _step10.value.target;\n\n if (isHTMLElement(target)) {\n setRect(function (rect) {\n var newRect = measure(target);\n return rect ? _objectSpread(_objectSpread({}, rect), {}, {\n width: newRect.width,\n height: newRect.height\n }) : newRect;\n });\n return \"break\";\n }\n };\n\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var _ret = _loop3();\n\n if (_ret === \"break\") break;\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n }, [measure]);\n var resizeObserver = useResizeObserver({\n onResize: handleResize\n });\n var handleNodeChange = useCallback(function (element) {\n var node = getMeasurableNode(element);\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n\n if (node) {\n resizeObserver == null ? void 0 : resizeObserver.observe(node);\n }\n\n setRect(node ? measure(node) : null);\n }, [measure, resizeObserver]);\n\n var _useNodeRef = useNodeRef(handleNodeChange),\n _useNodeRef2 = _slicedToArray(_useNodeRef, 2),\n nodeRef = _useNodeRef2[0],\n setRef = _useNodeRef2[1];\n\n return useMemo(function () {\n return {\n nodeRef: nodeRef,\n rect: rect,\n setRef: setRef\n };\n }, [rect, nodeRef, setRef]);\n}\n\nfunction useSensor(sensor, options) {\n return useMemo(function () {\n return {\n sensor: sensor,\n options: options != null ? options : {}\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [sensor, options]);\n}\n\nfunction useSensors() {\n for (var _len2 = arguments.length, sensors = new Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {\n sensors[_key3] = arguments[_key3];\n }\n\n return useMemo(function () {\n return [].concat(sensors).filter(function (sensor) {\n return sensor != null;\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [].concat(sensors));\n}\n\nvar Listeners = /*#__PURE__*/function () {\n function Listeners(target) {\n var _this2 = this;\n\n _classCallCheck(this, Listeners);\n\n this.target = void 0;\n this.listeners = [];\n\n this.removeAll = function () {\n _this2.listeners.forEach(function (listener) {\n var _this$target3;\n\n var _this$target;\n\n return (_this$target = _this2.target) == null ? void 0 : (_this$target3 = _this$target).removeEventListener.apply(_this$target3, _toConsumableArray(listener));\n });\n };\n\n this.target = target;\n }\n\n _createClass(Listeners, [{\n key: \"add\",\n value: function add(eventName, handler, options) {\n var _this$target2;\n\n (_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options);\n this.listeners.push([eventName, handler, options]);\n }\n }]);\n\n return Listeners;\n}();\n\nfunction getEventListenerTarget(target) {\n // If the `event.target` element is removed from the document events will still be targeted\n // at it, and hence won't always bubble up to the window or document anymore.\n // If there is any risk of an element being removed while it is being dragged,\n // the best practice is to attach the event listeners directly to the target.\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget\n var _getWindow3 = getWindow(target),\n EventTarget = _getWindow3.EventTarget;\n\n return target instanceof EventTarget ? target : getOwnerDocument(target);\n}\n\nfunction hasExceededDistance(delta, measurement) {\n var dx = Math.abs(delta.x);\n var dy = Math.abs(delta.y);\n\n if (typeof measurement === 'number') {\n return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)) > measurement;\n }\n\n if ('x' in measurement && 'y' in measurement) {\n return dx > measurement.x && dy > measurement.y;\n }\n\n if ('x' in measurement) {\n return dx > measurement.x;\n }\n\n if ('y' in measurement) {\n return dy > measurement.y;\n }\n\n return false;\n}\n\nvar EventName;\n\n(function (EventName) {\n EventName[\"Click\"] = \"click\";\n EventName[\"DragStart\"] = \"dragstart\";\n EventName[\"Keydown\"] = \"keydown\";\n EventName[\"ContextMenu\"] = \"contextmenu\";\n EventName[\"Resize\"] = \"resize\";\n EventName[\"SelectionChange\"] = \"selectionchange\";\n EventName[\"VisibilityChange\"] = \"visibilitychange\";\n})(EventName || (EventName = {}));\n\nfunction preventDefault(event) {\n event.preventDefault();\n}\n\nfunction stopPropagation(event) {\n event.stopPropagation();\n}\n\nvar KeyboardCode;\n\n(function (KeyboardCode) {\n KeyboardCode[\"Space\"] = \"Space\";\n KeyboardCode[\"Down\"] = \"ArrowDown\";\n KeyboardCode[\"Right\"] = \"ArrowRight\";\n KeyboardCode[\"Left\"] = \"ArrowLeft\";\n KeyboardCode[\"Up\"] = \"ArrowUp\";\n KeyboardCode[\"Esc\"] = \"Escape\";\n KeyboardCode[\"Enter\"] = \"Enter\";\n})(KeyboardCode || (KeyboardCode = {}));\n\nvar defaultKeyboardCodes = {\n start: [KeyboardCode.Space, KeyboardCode.Enter],\n cancel: [KeyboardCode.Esc],\n end: [KeyboardCode.Space, KeyboardCode.Enter]\n};\n\nvar defaultKeyboardCoordinateGetter = function defaultKeyboardCoordinateGetter(event, _ref27) {\n var currentCoordinates = _ref27.currentCoordinates;\n\n switch (event.code) {\n case KeyboardCode.Right:\n return _objectSpread(_objectSpread({}, currentCoordinates), {}, {\n x: currentCoordinates.x + 25\n });\n\n case KeyboardCode.Left:\n return _objectSpread(_objectSpread({}, currentCoordinates), {}, {\n x: currentCoordinates.x - 25\n });\n\n case KeyboardCode.Down:\n return _objectSpread(_objectSpread({}, currentCoordinates), {}, {\n y: currentCoordinates.y + 25\n });\n\n case KeyboardCode.Up:\n return _objectSpread(_objectSpread({}, currentCoordinates), {}, {\n y: currentCoordinates.y - 25\n });\n }\n\n return undefined;\n};\n\nvar KeyboardSensor = /*#__PURE__*/function () {\n function KeyboardSensor(props) {\n _classCallCheck(this, KeyboardSensor);\n\n this.props = void 0;\n this.autoScrollEnabled = false;\n this.coordinates = defaultCoordinates;\n this.listeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n var target = props.event.target;\n this.props = props;\n this.listeners = new Listeners(getOwnerDocument(target));\n this.windowListeners = new Listeners(getWindow(target));\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.attach();\n }\n\n _createClass(KeyboardSensor, [{\n key: \"attach\",\n value: function attach() {\n var _this3 = this;\n\n this.handleStart();\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n setTimeout(function () {\n return _this3.listeners.add(EventName.Keydown, _this3.handleKeyDown);\n });\n }\n }, {\n key: \"handleStart\",\n value: function handleStart() {\n var _this$props = this.props,\n activeNode = _this$props.activeNode,\n onStart = _this$props.onStart;\n\n if (!activeNode.node.current) {\n throw new Error('Active draggable node is undefined');\n }\n\n var activeNodeRect = getTransformAgnosticClientRect(activeNode.node.current);\n var coordinates = {\n x: activeNodeRect.left,\n y: activeNodeRect.top\n };\n this.coordinates = coordinates;\n onStart(coordinates);\n }\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n if (isKeyboardEvent(event)) {\n var coordinates = this.coordinates;\n var _this$props2 = this.props,\n active = _this$props2.active,\n context = _this$props2.context,\n options = _this$props2.options;\n var _options$keyboardCode = options.keyboardCodes,\n keyboardCodes = _options$keyboardCode === void 0 ? defaultKeyboardCodes : _options$keyboardCode,\n _options$coordinateGe = options.coordinateGetter,\n coordinateGetter = _options$coordinateGe === void 0 ? defaultKeyboardCoordinateGetter : _options$coordinateGe,\n _options$scrollBehavi = options.scrollBehavior,\n scrollBehavior = _options$scrollBehavi === void 0 ? 'smooth' : _options$scrollBehavi;\n var code = event.code;\n\n if (keyboardCodes.end.includes(code)) {\n this.handleEnd(event);\n return;\n }\n\n if (keyboardCodes.cancel.includes(code)) {\n this.handleCancel(event);\n return;\n }\n\n var newCoordinates = coordinateGetter(event, {\n active: active,\n context: context.current,\n currentCoordinates: coordinates\n });\n\n if (newCoordinates) {\n var scrollDelta = {\n x: 0,\n y: 0\n };\n var scrollableAncestors = context.current.scrollableAncestors;\n\n var _iterator11 = _createForOfIteratorHelper(scrollableAncestors),\n _step11;\n\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var scrollContainer = _step11.value;\n var direction = event.code;\n var coordinatesDelta = subtract(newCoordinates, coordinates);\n\n var _getScrollPosition2 = getScrollPosition(scrollContainer),\n isTop = _getScrollPosition2.isTop,\n isRight = _getScrollPosition2.isRight,\n isLeft = _getScrollPosition2.isLeft,\n isBottom = _getScrollPosition2.isBottom,\n maxScroll = _getScrollPosition2.maxScroll,\n minScroll = _getScrollPosition2.minScroll;\n\n var scrollElementRect = getScrollElementRect(scrollContainer);\n var clampedCoordinates = {\n x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),\n y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))\n };\n var canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;\n var canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;\n\n if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {\n var canFullyScrollToNewCoordinates = direction === KeyboardCode.Right && scrollContainer.scrollLeft + coordinatesDelta.x <= maxScroll.x || direction === KeyboardCode.Left && scrollContainer.scrollLeft + coordinatesDelta.x >= minScroll.x;\n\n if (canFullyScrollToNewCoordinates) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollBy({\n left: coordinatesDelta.x,\n behavior: scrollBehavior\n });\n return;\n }\n\n scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;\n scrollContainer.scrollBy({\n left: -scrollDelta.x,\n behavior: scrollBehavior\n });\n break;\n } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {\n var _canFullyScrollToNewCoordinates = direction === KeyboardCode.Down && scrollContainer.scrollTop + coordinatesDelta.y <= maxScroll.y || direction === KeyboardCode.Up && scrollContainer.scrollTop + coordinatesDelta.y >= minScroll.y;\n\n if (_canFullyScrollToNewCoordinates) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollBy({\n top: coordinatesDelta.y,\n behavior: scrollBehavior\n });\n return;\n }\n\n scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;\n scrollContainer.scrollBy({\n top: -scrollDelta.y,\n behavior: scrollBehavior\n });\n break;\n }\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n\n this.handleMove(event, add(newCoordinates, scrollDelta));\n }\n }\n }\n }, {\n key: \"handleMove\",\n value: function handleMove(event, coordinates) {\n var onMove = this.props.onMove;\n event.preventDefault();\n onMove(coordinates);\n this.coordinates = coordinates;\n }\n }, {\n key: \"handleEnd\",\n value: function handleEnd(event) {\n var onEnd = this.props.onEnd;\n event.preventDefault();\n this.detach();\n onEnd();\n }\n }, {\n key: \"handleCancel\",\n value: function handleCancel(event) {\n var onCancel = this.props.onCancel;\n event.preventDefault();\n this.detach();\n onCancel();\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll();\n }\n }]);\n\n return KeyboardSensor;\n}();\n\nKeyboardSensor.activators = [{\n eventName: 'onKeyDown',\n handler: function handler(event, _ref28) {\n var _ref28$keyboardCodes = _ref28.keyboardCodes,\n keyboardCodes = _ref28$keyboardCodes === void 0 ? defaultKeyboardCodes : _ref28$keyboardCodes,\n onActivation = _ref28.onActivation;\n var code = event.nativeEvent.code;\n\n if (keyboardCodes.start.includes(code)) {\n event.preventDefault();\n onActivation == null ? void 0 : onActivation({\n event: event.nativeEvent\n });\n return true;\n }\n\n return false;\n }\n}];\n\nfunction isDistanceConstraint(constraint) {\n return Boolean(constraint && 'distance' in constraint);\n}\n\nfunction isDelayConstraint(constraint) {\n return Boolean(constraint && 'delay' in constraint);\n}\n\nvar AbstractPointerSensor = /*#__PURE__*/function () {\n function AbstractPointerSensor(props, events) {\n var listenerTarget = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getEventListenerTarget(props.event.target);\n\n _classCallCheck(this, AbstractPointerSensor);\n\n var _getEventCoordinates;\n\n this.props = void 0;\n this.events = void 0;\n this.autoScrollEnabled = true;\n this.document = void 0;\n this.activated = false;\n this.initialCoordinates = void 0;\n this.timeoutId = null;\n this.listeners = void 0;\n this.documentListeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n this.events = events;\n var event = props.event;\n var target = event.target;\n this.props = props;\n this.events = events;\n this.document = getOwnerDocument(target);\n this.documentListeners = new Listeners(this.document);\n this.listeners = new Listeners(listenerTarget);\n this.windowListeners = new Listeners(getWindow(target));\n this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates;\n this.handleStart = this.handleStart.bind(this);\n this.handleMove = this.handleMove.bind(this);\n this.handleEnd = this.handleEnd.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleKeydown = this.handleKeydown.bind(this);\n this.removeTextSelection = this.removeTextSelection.bind(this);\n this.attach();\n }\n\n _createClass(AbstractPointerSensor, [{\n key: \"attach\",\n value: function attach() {\n var events = this.events,\n activationConstraint = this.props.options.activationConstraint;\n this.listeners.add(events.move.name, this.handleMove, {\n passive: false\n });\n this.listeners.add(events.end.name, this.handleEnd);\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.DragStart, preventDefault);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n this.windowListeners.add(EventName.ContextMenu, preventDefault);\n this.documentListeners.add(EventName.Keydown, this.handleKeydown);\n\n if (activationConstraint) {\n if (isDistanceConstraint(activationConstraint)) {\n return;\n }\n\n if (isDelayConstraint(activationConstraint)) {\n this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);\n return;\n }\n }\n\n this.handleStart();\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll(); // Wait until the next event loop before removing document listeners\n // This is necessary because we listen for `click` and `selection` events on the document\n\n setTimeout(this.documentListeners.removeAll, 50);\n\n if (this.timeoutId !== null) {\n clearTimeout(this.timeoutId);\n this.timeoutId = null;\n }\n }\n }, {\n key: \"handleStart\",\n value: function handleStart() {\n var initialCoordinates = this.initialCoordinates;\n var onStart = this.props.onStart;\n\n if (initialCoordinates) {\n this.activated = true; // Stop propagation of click events once activation constraints are met\n\n this.documentListeners.add(EventName.Click, stopPropagation, {\n capture: true\n }); // Remove any text selection from the document\n\n this.removeTextSelection(); // Prevent further text selection while dragging\n\n this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);\n onStart(initialCoordinates);\n }\n }\n }, {\n key: \"handleMove\",\n value: function handleMove(event) {\n var _getEventCoordinates2;\n\n var activated = this.activated,\n initialCoordinates = this.initialCoordinates,\n props = this.props;\n var onMove = props.onMove,\n activationConstraint = props.options.activationConstraint;\n\n if (!initialCoordinates) {\n return;\n }\n\n var coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates;\n var delta = subtract(initialCoordinates, coordinates);\n\n if (!activated && activationConstraint) {\n // Constraint validation\n if (isDelayConstraint(activationConstraint)) {\n if (hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n\n return;\n }\n\n if (isDistanceConstraint(activationConstraint)) {\n if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n\n if (hasExceededDistance(delta, activationConstraint.distance)) {\n return this.handleStart();\n }\n\n return;\n }\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n onMove(coordinates);\n }\n }, {\n key: \"handleEnd\",\n value: function handleEnd() {\n var onEnd = this.props.onEnd;\n this.detach();\n onEnd();\n }\n }, {\n key: \"handleCancel\",\n value: function handleCancel() {\n var onCancel = this.props.onCancel;\n this.detach();\n onCancel();\n }\n }, {\n key: \"handleKeydown\",\n value: function handleKeydown(event) {\n if (event.code === KeyboardCode.Esc) {\n this.handleCancel();\n }\n }\n }, {\n key: \"removeTextSelection\",\n value: function removeTextSelection() {\n var _this$document$getSel;\n\n (_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges();\n }\n }]);\n\n return AbstractPointerSensor;\n}();\n\nvar events = {\n move: {\n name: 'pointermove'\n },\n end: {\n name: 'pointerup'\n }\n};\n\nvar PointerSensor = /*#__PURE__*/function (_AbstractPointerSenso) {\n _inherits(PointerSensor, _AbstractPointerSenso);\n\n var _super2 = _createSuper(PointerSensor);\n\n function PointerSensor(props) {\n _classCallCheck(this, PointerSensor);\n\n var event = props.event; // Pointer events stop firing if the target is unmounted while dragging\n // Therefore we attach listeners to the owner document instead\n\n var listenerTarget = getOwnerDocument(event.target);\n return _super2.call(this, props, events, listenerTarget);\n }\n\n return _createClass(PointerSensor);\n}(AbstractPointerSensor);\n\nPointerSensor.activators = [{\n eventName: 'onPointerDown',\n handler: function handler(_ref29, _ref30) {\n var event = _ref29.nativeEvent;\n var onActivation = _ref30.onActivation;\n\n if (!event.isPrimary || event.button !== 0) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event: event\n });\n return true;\n }\n}];\nvar events$1 = {\n move: {\n name: 'mousemove'\n },\n end: {\n name: 'mouseup'\n }\n};\nvar MouseButton;\n\n(function (MouseButton) {\n MouseButton[MouseButton[\"RightClick\"] = 2] = \"RightClick\";\n})(MouseButton || (MouseButton = {}));\n\nvar MouseSensor = /*#__PURE__*/function (_AbstractPointerSenso2) {\n _inherits(MouseSensor, _AbstractPointerSenso2);\n\n var _super3 = _createSuper(MouseSensor);\n\n function MouseSensor(props) {\n _classCallCheck(this, MouseSensor);\n\n return _super3.call(this, props, events$1, getOwnerDocument(props.event.target));\n }\n\n return _createClass(MouseSensor);\n}(AbstractPointerSensor);\n\nMouseSensor.activators = [{\n eventName: 'onMouseDown',\n handler: function handler(_ref31, _ref32) {\n var event = _ref31.nativeEvent;\n var onActivation = _ref32.onActivation;\n\n if (event.button === MouseButton.RightClick) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event: event\n });\n return true;\n }\n}];\nvar events$2 = {\n move: {\n name: 'touchmove'\n },\n end: {\n name: 'touchend'\n }\n};\n\nvar TouchSensor = /*#__PURE__*/function (_AbstractPointerSenso3) {\n _inherits(TouchSensor, _AbstractPointerSenso3);\n\n var _super4 = _createSuper(TouchSensor);\n\n function TouchSensor(props) {\n _classCallCheck(this, TouchSensor);\n\n return _super4.call(this, props, events$2);\n }\n\n _createClass(TouchSensor, null, [{\n key: \"setup\",\n value: function setup() {\n // Adding a non-capture and non-passive `touchmove` listener in order\n // to force `event.preventDefault()` calls to work in dynamically added\n // touchmove event handlers. This is required for iOS Safari.\n window.addEventListener(events$2.move.name, noop, {\n capture: false,\n passive: false\n });\n return function teardown() {\n window.removeEventListener(events$2.move.name, noop);\n }; // We create a new handler because the teardown function of another sensor\n // could remove our event listener if we use a referentially equal listener.\n\n function noop() {}\n }\n }]);\n\n return TouchSensor;\n}(AbstractPointerSensor);\n\nTouchSensor.activators = [{\n eventName: 'onTouchStart',\n handler: function handler(_ref33, _ref34) {\n var event = _ref33.nativeEvent;\n var onActivation = _ref34.onActivation;\n var touches = event.touches;\n\n if (touches.length > 1) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event: event\n });\n return true;\n }\n}];\n\nfunction applyModifiers(modifiers, _ref35) {\n var transform = _ref35.transform,\n args = _objectWithoutProperties(_ref35, _excluded);\n\n return (modifiers == null ? void 0 : modifiers.length) ? modifiers.reduce(function (accumulator, modifier) {\n return modifier(_objectSpread({\n transform: accumulator\n }, args));\n }, transform) : transform;\n}\n\nvar defaultSensors = [{\n sensor: PointerSensor,\n options: {}\n}, {\n sensor: KeyboardSensor,\n options: {}\n}];\nvar defaultData = {\n current: {}\n};\nvar ActiveDraggableContext = /*#__PURE__*/createContext(_objectSpread(_objectSpread({}, defaultCoordinates), {}, {\n scaleX: 1,\n scaleY: 1\n}));\nvar DndContext = /*#__PURE__*/memo(function DndContext(_ref36) {\n var id = _ref36.id,\n _ref36$autoScroll = _ref36.autoScroll,\n autoScroll = _ref36$autoScroll === void 0 ? true : _ref36$autoScroll,\n announcements = _ref36.announcements,\n children = _ref36.children,\n _ref36$sensors = _ref36.sensors,\n sensors = _ref36$sensors === void 0 ? defaultSensors : _ref36$sensors,\n _ref36$collisionDetec = _ref36.collisionDetection,\n collisionDetection = _ref36$collisionDetec === void 0 ? rectIntersection : _ref36$collisionDetec,\n measuring = _ref36.measuring,\n modifiers = _ref36.modifiers,\n _ref36$screenReaderIn = _ref36.screenReaderInstructions,\n screenReaderInstructions$1 = _ref36$screenReaderIn === void 0 ? screenReaderInstructions : _ref36$screenReaderIn,\n props = _objectWithoutProperties(_ref36, _excluded2);\n\n var _measuring$draggable$, _measuring$draggable, _sensorContext$curren, _measuring$dragOverla, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;\n\n var store = useReducer(reducer, undefined, getInitialState);\n\n var _store = _slicedToArray(store, 2),\n state = _store[0],\n dispatch = _store[1];\n\n var _useState9 = useState(function () {\n return {\n type: null,\n event: null\n };\n }),\n _useState10 = _slicedToArray(_useState9, 2),\n monitorState = _useState10[0],\n setMonitorState = _useState10[1];\n\n var _useState11 = useState(false),\n _useState12 = _slicedToArray(_useState11, 2),\n isDragging = _useState12[0],\n setIsDragging = _useState12[1];\n\n var _state$draggable = state.draggable,\n activeId = _state$draggable.active,\n draggableNodes = _state$draggable.nodes,\n translate = _state$draggable.translate,\n droppableContainers = state.droppable.containers;\n var node = activeId ? draggableNodes[activeId] : null;\n var activeRects = useRef({\n initial: null,\n translated: null\n });\n var active = useMemo(function () {\n var _node$data;\n\n return activeId != null ? {\n id: activeId,\n // It's possible for the active node to unmount while dragging\n data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData,\n rect: activeRects\n } : null;\n }, [activeId, node]);\n var activeRef = useRef(null);\n\n var _useState13 = useState(null),\n _useState14 = _slicedToArray(_useState13, 2),\n activeSensor = _useState14[0],\n setActiveSensor = _useState14[1];\n\n var _useState15 = useState(null),\n _useState16 = _slicedToArray(_useState15, 2),\n activatorEvent = _useState16[0],\n setActivatorEvent = _useState16[1];\n\n var latestProps = useLatestValue(props, Object.values(props));\n var draggableDescribedById = useUniqueId(\"DndDescribedBy\", id);\n var enabledDroppableContainers = useMemo(function () {\n return droppableContainers.getEnabled();\n }, [droppableContainers]);\n\n var _useDroppableMeasurin = useDroppableMeasuring(enabledDroppableContainers, {\n dragging: isDragging,\n dependencies: [translate.x, translate.y],\n config: measuring == null ? void 0 : measuring.droppable\n }),\n droppableRects = _useDroppableMeasurin.droppableRects,\n measureDroppableContainers = _useDroppableMeasurin.measureDroppableContainers,\n measuringScheduled = _useDroppableMeasurin.measuringScheduled;\n\n var activeNode = useCachedNode(draggableNodes, activeId);\n var activationCoordinates = activatorEvent ? getEventCoordinates(activatorEvent) : null;\n var activeNodeRect = useRect(activeNode, (_measuring$draggable$ = measuring == null ? void 0 : (_measuring$draggable = measuring.draggable) == null ? void 0 : _measuring$draggable.measure) != null ? _measuring$draggable$ : getTransformAgnosticClientRect);\n var containerNodeRect = useClientRect(activeNode ? activeNode.parentElement : null);\n var sensorContext = useRef({\n active: null,\n activeNode: activeNode,\n collisionRect: null,\n collisions: null,\n droppableRects: droppableRects,\n draggableNodes: draggableNodes,\n draggingNode: null,\n draggingNodeRect: null,\n droppableContainers: droppableContainers,\n over: null,\n scrollableAncestors: [],\n scrollAdjustedTranslate: null\n });\n var overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id);\n var dragOverlay = useDragOverlayMeasuring({\n measure: measuring == null ? void 0 : (_measuring$dragOverla = measuring.dragOverlay) == null ? void 0 : _measuring$dragOverla.measure\n }); // Use the rect of the drag overlay if it is mounted\n\n var draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode;\n var draggingNodeRect = (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect;\n var initialActiveNodeRectRef = useRef(null);\n var initialActiveNodeRect = initialActiveNodeRectRef.current; // The delta between the previous and new position of the draggable node\n // is only relevant when there is no drag overlay\n\n var nodeRectDelta = draggingNodeRect === activeNodeRect ? getRectDelta(activeNodeRect, initialActiveNodeRect) : defaultCoordinates; // Get the window rect of the dragging node\n\n var windowRect = useWindowRect(draggingNode ? draggingNode.ownerDocument.defaultView : null); // Get scrollable ancestors of the dragging node\n\n var scrollableAncestors = useScrollableAncestors(activeId ? overNode != null ? overNode : draggingNode : null);\n var scrollableAncestorRects = useClientRects(scrollableAncestors); // Apply modifiers\n\n var modifiedTranslate = applyModifiers(modifiers, {\n transform: {\n x: translate.x - nodeRectDelta.x,\n y: translate.y - nodeRectDelta.y,\n scaleX: 1,\n scaleY: 1\n },\n activatorEvent: activatorEvent,\n active: active,\n activeNodeRect: activeNodeRect,\n containerNodeRect: containerNodeRect,\n draggingNodeRect: draggingNodeRect,\n over: sensorContext.current.over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors: scrollableAncestors,\n scrollableAncestorRects: scrollableAncestorRects,\n windowRect: windowRect\n });\n var pointerCoordinates = activationCoordinates ? add(activationCoordinates, translate) : null;\n var scrollAdjustment = useScrollOffsets(scrollableAncestors);\n var scrollAdjustedTranslate = add(modifiedTranslate, scrollAdjustment);\n var collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null;\n var collisions = active && collisionRect ? collisionDetection({\n active: active,\n collisionRect: collisionRect,\n droppableContainers: enabledDroppableContainers,\n pointerCoordinates: pointerCoordinates\n }) : null;\n var overId = getFirstCollision(collisions, 'id');\n\n var _useState17 = useState(null),\n _useState18 = _slicedToArray(_useState17, 2),\n over = _useState18[0],\n setOver = _useState18[1];\n\n var transform = adjustScale(modifiedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);\n var instantiateSensor = useCallback(function (event, _ref37) {\n var Sensor = _ref37.sensor,\n options = _ref37.options;\n\n if (!activeRef.current) {\n return;\n }\n\n var activeNode = draggableNodes[activeRef.current];\n\n if (!activeNode) {\n return;\n }\n\n var sensorInstance = new Sensor({\n active: activeRef.current,\n activeNode: activeNode,\n event: event.nativeEvent,\n options: options,\n // Sensors need to be instantiated with refs for arguments that change over time\n // otherwise they are frozen in time with the stale arguments\n context: sensorContext,\n onStart: function onStart(initialCoordinates) {\n var id = activeRef.current;\n\n if (!id) {\n return;\n }\n\n var node = draggableNodes[id];\n\n if (!node) {\n return;\n }\n\n var onDragStart = latestProps.current.onDragStart;\n var event = {\n active: {\n id: id,\n data: node.data,\n rect: activeRects\n }\n };\n unstable_batchedUpdates(function () {\n dispatch({\n type: Action.DragStart,\n initialCoordinates: initialCoordinates,\n active: id\n });\n setMonitorState({\n type: Action.DragStart,\n event: event\n });\n });\n onDragStart == null ? void 0 : onDragStart(event);\n },\n onMove: function onMove(coordinates) {\n dispatch({\n type: Action.DragMove,\n coordinates: coordinates\n });\n },\n onEnd: createHandler(Action.DragEnd),\n onCancel: createHandler(Action.DragCancel)\n });\n unstable_batchedUpdates(function () {\n setActiveSensor(sensorInstance);\n setActivatorEvent(event.nativeEvent);\n });\n\n function createHandler(type) {\n return /*#__PURE__*/function () {\n var _handler = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var _sensorContext$curren2, active, collisions, over, scrollAdjustedTranslate, event, cancelDrop, shouldCancel;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _sensorContext$curren2 = sensorContext.current, active = _sensorContext$curren2.active, collisions = _sensorContext$curren2.collisions, over = _sensorContext$curren2.over, scrollAdjustedTranslate = _sensorContext$curren2.scrollAdjustedTranslate;\n event = null;\n\n if (!(active && scrollAdjustedTranslate)) {\n _context.next = 10;\n break;\n }\n\n cancelDrop = latestProps.current.cancelDrop;\n event = {\n active: active,\n collisions: collisions,\n delta: scrollAdjustedTranslate,\n over: over\n };\n\n if (!(type === Action.DragEnd && typeof cancelDrop === 'function')) {\n _context.next = 10;\n break;\n }\n\n _context.next = 8;\n return Promise.resolve(cancelDrop(event));\n\n case 8:\n shouldCancel = _context.sent;\n\n if (shouldCancel) {\n type = Action.DragCancel;\n }\n\n case 10:\n activeRef.current = null;\n unstable_batchedUpdates(function () {\n dispatch({\n type: type\n });\n setOver(null);\n setIsDragging(false);\n setActiveSensor(null);\n setActivatorEvent(null);\n\n if (event) {\n setMonitorState({\n type: type,\n event: event\n });\n }\n\n if (event) {\n var _latestProps$current = latestProps.current,\n onDragCancel = _latestProps$current.onDragCancel,\n onDragEnd = _latestProps$current.onDragEnd;\n\n var _handler2 = type === Action.DragEnd ? onDragEnd : onDragCancel;\n\n _handler2 == null ? void 0 : _handler2(event);\n }\n });\n\n case 12:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n function handler() {\n return _handler.apply(this, arguments);\n }\n\n return handler;\n }();\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes]);\n var bindActivatorToSensorInstantiator = useCallback(function (handler, sensor) {\n return function (event, active) {\n var nativeEvent = event.nativeEvent;\n\n if ( // No active draggable\n activeRef.current !== null || // Event has already been captured\n nativeEvent.dndKit || nativeEvent.defaultPrevented) {\n return;\n }\n\n if (handler(event, sensor.options) === true) {\n nativeEvent.dndKit = {\n capturedBy: sensor.sensor\n };\n activeRef.current = active;\n instantiateSensor(event, sensor);\n }\n };\n }, [instantiateSensor]);\n var activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);\n useSensorSetup(sensors);\n useEffect(function () {\n if (activeId != null) {\n setIsDragging(true);\n }\n }, [activeId]);\n useEffect(function () {\n if (!active) {\n initialActiveNodeRectRef.current = null;\n }\n\n if (active && activeNodeRect && !initialActiveNodeRectRef.current) {\n initialActiveNodeRectRef.current = activeNodeRect;\n }\n }, [activeNodeRect, active]);\n useEffect(function () {\n var onDragMove = latestProps.current.onDragMove;\n var _sensorContext$curren3 = sensorContext.current,\n active = _sensorContext$curren3.active,\n collisions = _sensorContext$curren3.collisions,\n over = _sensorContext$curren3.over;\n\n if (!active) {\n return;\n }\n\n var event = {\n active: active,\n collisions: collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over: over\n };\n setMonitorState({\n type: Action.DragMove,\n event: event\n });\n onDragMove == null ? void 0 : onDragMove(event);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]);\n useEffect(function () {\n var _sensorContext$curren4 = sensorContext.current,\n active = _sensorContext$curren4.active,\n collisions = _sensorContext$curren4.collisions,\n droppableContainers = _sensorContext$curren4.droppableContainers,\n scrollAdjustedTranslate = _sensorContext$curren4.scrollAdjustedTranslate;\n\n if (!active || !activeRef.current || !scrollAdjustedTranslate) {\n return;\n }\n\n var onDragOver = latestProps.current.onDragOver;\n var overContainer = droppableContainers.get(overId);\n var over = overContainer && overContainer.rect.current ? {\n id: overContainer.id,\n rect: overContainer.rect.current,\n data: overContainer.data,\n disabled: overContainer.disabled\n } : null;\n var event = {\n active: active,\n collisions: collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over: over\n };\n unstable_batchedUpdates(function () {\n setOver(over);\n setMonitorState({\n type: Action.DragOver,\n event: event\n });\n onDragOver == null ? void 0 : onDragOver(event);\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [overId]);\n useIsomorphicLayoutEffect(function () {\n sensorContext.current = {\n active: active,\n activeNode: activeNode,\n collisionRect: collisionRect,\n collisions: collisions,\n droppableRects: droppableRects,\n draggableNodes: draggableNodes,\n draggingNode: draggingNode,\n draggingNodeRect: draggingNodeRect,\n droppableContainers: droppableContainers,\n over: over,\n scrollableAncestors: scrollableAncestors,\n scrollAdjustedTranslate: scrollAdjustedTranslate\n };\n activeRects.current = {\n initial: draggingNodeRect,\n translated: collisionRect\n };\n }, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]);\n useAutoScroller(_objectSpread(_objectSpread({}, getAutoScrollerOptions()), {}, {\n draggingRect: collisionRect,\n pointerCoordinates: pointerCoordinates,\n scrollableAncestors: scrollableAncestors,\n scrollableAncestorRects: scrollableAncestorRects\n }));\n var publicContext = useMemo(function () {\n var context = {\n active: active,\n activeNode: activeNode,\n activeNodeRect: activeNodeRect,\n activatorEvent: activatorEvent,\n collisions: collisions,\n containerNodeRect: containerNodeRect,\n dragOverlay: dragOverlay,\n draggableNodes: draggableNodes,\n droppableContainers: droppableContainers,\n droppableRects: droppableRects,\n over: over,\n measureDroppableContainers: measureDroppableContainers,\n scrollableAncestors: scrollableAncestors,\n scrollableAncestorRects: scrollableAncestorRects,\n measuringScheduled: measuringScheduled,\n windowRect: windowRect\n };\n return context;\n }, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringScheduled, windowRect]);\n var internalContext = useMemo(function () {\n var context = {\n activatorEvent: activatorEvent,\n activators: activators,\n active: active,\n activeNodeRect: activeNodeRect,\n ariaDescribedById: {\n draggable: draggableDescribedById\n },\n dispatch: dispatch,\n draggableNodes: draggableNodes,\n over: over,\n measureDroppableContainers: measureDroppableContainers\n };\n return context;\n }, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);\n return /*#__PURE__*/React.createElement(DndMonitorContext.Provider, {\n value: monitorState\n }, /*#__PURE__*/React.createElement(InternalContext.Provider, {\n value: internalContext\n }, /*#__PURE__*/React.createElement(PublicContext.Provider, {\n value: publicContext\n }, /*#__PURE__*/React.createElement(ActiveDraggableContext.Provider, {\n value: transform\n }, children))), /*#__PURE__*/React.createElement(Accessibility, {\n announcements: announcements,\n hiddenTextDescribedById: draggableDescribedById,\n screenReaderInstructions: screenReaderInstructions$1\n }));\n\n function getAutoScrollerOptions() {\n var activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false;\n var autoScrollGloballyDisabled = _typeof(autoScroll) === 'object' ? autoScroll.enabled === false : autoScroll === false;\n var enabled = !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled;\n\n if (_typeof(autoScroll) === 'object') {\n return _objectSpread(_objectSpread({}, autoScroll), {}, {\n enabled: enabled\n });\n }\n\n return {\n enabled: enabled\n };\n }\n});\nvar NullContext = /*#__PURE__*/createContext(null);\nvar defaultRole = 'button';\nvar ID_PREFIX = 'Droppable';\n\nfunction useDraggable(_ref38) {\n var id = _ref38.id,\n data = _ref38.data,\n _ref38$disabled = _ref38.disabled,\n disabled = _ref38$disabled === void 0 ? false : _ref38$disabled,\n attributes = _ref38.attributes;\n var key = useUniqueId(ID_PREFIX);\n\n var _useContext = useContext(InternalContext),\n activators = _useContext.activators,\n activatorEvent = _useContext.activatorEvent,\n active = _useContext.active,\n activeNodeRect = _useContext.activeNodeRect,\n ariaDescribedById = _useContext.ariaDescribedById,\n draggableNodes = _useContext.draggableNodes,\n over = _useContext.over;\n\n var _ref39 = attributes != null ? attributes : {},\n _ref39$role = _ref39.role,\n role = _ref39$role === void 0 ? defaultRole : _ref39$role,\n _ref39$roleDescriptio = _ref39.roleDescription,\n roleDescription = _ref39$roleDescriptio === void 0 ? 'draggable' : _ref39$roleDescriptio,\n _ref39$tabIndex = _ref39.tabIndex,\n tabIndex = _ref39$tabIndex === void 0 ? 0 : _ref39$tabIndex;\n\n var isDragging = (active == null ? void 0 : active.id) === id;\n var transform = useContext(isDragging ? ActiveDraggableContext : NullContext);\n\n var _useNodeRef3 = useNodeRef(),\n _useNodeRef4 = _slicedToArray(_useNodeRef3, 2),\n node = _useNodeRef4[0],\n setNodeRef = _useNodeRef4[1];\n\n var listeners = useSyntheticListeners(activators, id);\n var dataRef = useLatestValue(data);\n useIsomorphicLayoutEffect(function () {\n draggableNodes[id] = {\n id: id,\n key: key,\n node: node,\n data: dataRef\n };\n return function () {\n var node = draggableNodes[id];\n\n if (node && node.key === key) {\n delete draggableNodes[id];\n }\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes, id]);\n var memoizedAttributes = useMemo(function () {\n return {\n role: role,\n tabIndex: tabIndex,\n 'aria-pressed': isDragging && role === defaultRole ? true : undefined,\n 'aria-roledescription': roleDescription,\n 'aria-describedby': ariaDescribedById.draggable\n };\n }, [role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);\n return {\n active: active,\n activatorEvent: activatorEvent,\n activeNodeRect: activeNodeRect,\n attributes: memoizedAttributes,\n isDragging: isDragging,\n listeners: disabled ? undefined : listeners,\n node: node,\n over: over,\n setNodeRef: setNodeRef,\n transform: transform\n };\n}\n\nfunction useDndContext() {\n return useContext(PublicContext);\n}\n\nvar ID_PREFIX$1 = 'Droppable';\nvar defaultResizeObserverConfig = {\n timeout: 25\n};\n\nfunction useDroppable(_ref40) {\n var data = _ref40.data,\n _ref40$disabled = _ref40.disabled,\n disabled = _ref40$disabled === void 0 ? false : _ref40$disabled,\n id = _ref40.id,\n resizeObserverConfig = _ref40.resizeObserverConfig;\n var key = useUniqueId(ID_PREFIX$1);\n\n var _useContext2 = useContext(InternalContext),\n active = _useContext2.active,\n dispatch = _useContext2.dispatch,\n over = _useContext2.over,\n measureDroppableContainers = _useContext2.measureDroppableContainers;\n\n var resizeObserverConnected = useRef(false);\n var rect = useRef(null);\n var callbackId = useRef(null);\n\n var _defaultResizeObserve = _objectSpread(_objectSpread({}, defaultResizeObserverConfig), resizeObserverConfig),\n resizeObserverDisabled = _defaultResizeObserve.disabled,\n updateMeasurementsFor = _defaultResizeObserve.updateMeasurementsFor,\n resizeObserverTimeout = _defaultResizeObserve.timeout;\n\n var ids = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id);\n var handleResize = useCallback(function () {\n if (!resizeObserverConnected.current) {\n // ResizeObserver invokes the `handleResize` callback as soon as `observe` is called,\n // assuming the element is rendered and displayed.\n resizeObserverConnected.current = true;\n return;\n }\n\n if (callbackId.current != null) {\n clearTimeout(callbackId.current);\n }\n\n callbackId.current = setTimeout(function () {\n measureDroppableContainers(typeof ids.current === 'string' ? [ids.current] : ids.current);\n callbackId.current = null;\n }, resizeObserverTimeout);\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [resizeObserverTimeout]);\n var resizeObserver = useResizeObserver({\n onResize: handleResize,\n disabled: resizeObserverDisabled || !active\n });\n var handleNodeChange = useCallback(function (newElement, previousElement) {\n if (!resizeObserver) {\n return;\n }\n\n if (previousElement) {\n resizeObserver.unobserve(previousElement);\n resizeObserverConnected.current = false;\n }\n\n if (newElement) {\n resizeObserver.observe(newElement);\n }\n }, [resizeObserver]);\n\n var _useNodeRef5 = useNodeRef(handleNodeChange),\n _useNodeRef6 = _slicedToArray(_useNodeRef5, 2),\n nodeRef = _useNodeRef6[0],\n setNodeRef = _useNodeRef6[1];\n\n var dataRef = useLatestValue(data);\n useEffect(function () {\n if (!resizeObserver || !nodeRef.current) {\n return;\n }\n\n resizeObserver.disconnect();\n resizeObserverConnected.current = false;\n resizeObserver.observe(nodeRef.current);\n }, [nodeRef, resizeObserver]);\n useIsomorphicLayoutEffect(function () {\n dispatch({\n type: Action.RegisterDroppable,\n element: {\n id: id,\n key: key,\n disabled: disabled,\n node: nodeRef,\n rect: rect,\n data: dataRef\n }\n });\n return function () {\n return dispatch({\n type: Action.UnregisterDroppable,\n key: key,\n id: id\n });\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [id]);\n useEffect(function () {\n dispatch({\n type: Action.SetDroppableDisabled,\n id: id,\n key: key,\n disabled: disabled\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [disabled]);\n return {\n active: active,\n rect: rect,\n isOver: (over == null ? void 0 : over.id) === id,\n node: nodeRef,\n over: over,\n setNodeRef: setNodeRef\n };\n}\n\nvar defaultDropAnimation = {\n duration: 250,\n easing: 'ease',\n dragSourceOpacity: 0\n};\n\nfunction useDropAnimation(_ref41) {\n var animate = _ref41.animate,\n adjustScale = _ref41.adjustScale,\n activeId = _ref41.activeId,\n draggableNodes = _ref41.draggableNodes,\n duration = _ref41.duration,\n dragSourceOpacity = _ref41.dragSourceOpacity,\n easing = _ref41.easing,\n node = _ref41.node,\n transform = _ref41.transform;\n\n var _useState19 = useState(false),\n _useState20 = _slicedToArray(_useState19, 2),\n dropAnimationComplete = _useState20[0],\n setDropAnimationComplete = _useState20[1];\n\n useIsomorphicLayoutEffect(function () {\n var _draggableNodes$activ;\n\n if (!animate || !activeId || !easing || !duration) {\n if (animate) {\n setDropAnimationComplete(true);\n }\n\n return;\n }\n\n var finalNode = (_draggableNodes$activ = draggableNodes[activeId]) == null ? void 0 : _draggableNodes$activ.node.current;\n\n if (transform && node && finalNode && finalNode.parentNode !== null) {\n var fromNode = getMeasurableNode(node);\n\n if (fromNode) {\n var from = fromNode.getBoundingClientRect();\n var to = getTransformAgnosticClientRect(finalNode);\n var delta = {\n x: from.left - to.left,\n y: from.top - to.top\n };\n\n if (Math.abs(delta.x) || Math.abs(delta.y)) {\n var scaleDelta = {\n scaleX: adjustScale ? to.width * transform.scaleX / from.width : 1,\n scaleY: adjustScale ? to.height * transform.scaleY / from.height : 1\n };\n var finalTransform = CSS.Transform.toString(_objectSpread({\n x: transform.x - delta.x,\n y: transform.y - delta.y\n }, scaleDelta));\n var originalOpacity = finalNode.style.opacity;\n\n if (dragSourceOpacity != null) {\n finalNode.style.opacity = \"\".concat(dragSourceOpacity);\n }\n\n var nodeAnimation = node.animate([{\n transform: CSS.Transform.toString(transform)\n }, {\n transform: finalTransform\n }], {\n easing: easing,\n duration: duration\n });\n\n nodeAnimation.onfinish = function () {\n node.style.display = 'none';\n setDropAnimationComplete(true);\n\n if (finalNode && dragSourceOpacity != null) {\n finalNode.style.opacity = originalOpacity;\n }\n };\n\n return;\n }\n }\n }\n\n setDropAnimationComplete(true);\n }, [animate, activeId, adjustScale, draggableNodes, duration, easing, dragSourceOpacity, node, transform]);\n useIsomorphicLayoutEffect(function () {\n if (dropAnimationComplete) {\n setDropAnimationComplete(false);\n }\n }, [dropAnimationComplete]);\n return dropAnimationComplete;\n}\n\nvar defaultTransform = {\n x: 0,\n y: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nvar defaultTransition = function defaultTransition(activatorEvent) {\n var isKeyboardActivator = isKeyboardEvent(activatorEvent);\n return isKeyboardActivator ? 'transform 250ms ease' : undefined;\n};\n\nvar DragOverlay = /*#__PURE__*/React.memo(function (_ref42) {\n var _ref42$adjustScale = _ref42.adjustScale,\n adjustScale = _ref42$adjustScale === void 0 ? false : _ref42$adjustScale,\n children = _ref42.children,\n _ref42$dropAnimation = _ref42.dropAnimation,\n dropAnimation = _ref42$dropAnimation === void 0 ? defaultDropAnimation : _ref42$dropAnimation,\n styleProp = _ref42.style,\n _ref42$transition = _ref42.transition,\n transition = _ref42$transition === void 0 ? defaultTransition : _ref42$transition,\n modifiers = _ref42.modifiers,\n _ref42$wrapperElement = _ref42.wrapperElement,\n wrapperElement = _ref42$wrapperElement === void 0 ? 'div' : _ref42$wrapperElement,\n className = _ref42.className,\n _ref42$zIndex = _ref42.zIndex,\n zIndex = _ref42$zIndex === void 0 ? 999 : _ref42$zIndex;\n\n var _active$id, _attributesSnapshot$c;\n\n var _useDndContext = useDndContext(),\n active = _useDndContext.active,\n activeNodeRect = _useDndContext.activeNodeRect,\n containerNodeRect = _useDndContext.containerNodeRect,\n draggableNodes = _useDndContext.draggableNodes,\n activatorEvent = _useDndContext.activatorEvent,\n over = _useDndContext.over,\n dragOverlay = _useDndContext.dragOverlay,\n scrollableAncestors = _useDndContext.scrollableAncestors,\n scrollableAncestorRects = _useDndContext.scrollableAncestorRects,\n windowRect = _useDndContext.windowRect;\n\n var transform = useContext(ActiveDraggableContext);\n var modifiedTransform = applyModifiers(modifiers, {\n activatorEvent: activatorEvent,\n active: active,\n activeNodeRect: activeNodeRect,\n containerNodeRect: containerNodeRect,\n draggingNodeRect: dragOverlay.rect,\n over: over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors: scrollableAncestors,\n scrollableAncestorRects: scrollableAncestorRects,\n transform: transform,\n windowRect: windowRect\n });\n var isDragging = active !== null;\n var finalTransform = adjustScale ? modifiedTransform : _objectSpread(_objectSpread({}, modifiedTransform), {}, {\n scaleX: 1,\n scaleY: 1\n });\n var initialRect = useLazyMemo(function (previousValue) {\n if (isDragging) {\n if (previousValue) {\n return previousValue;\n }\n\n if (!activeNodeRect) {\n return null;\n }\n\n return _objectSpread({}, activeNodeRect);\n }\n\n return null;\n }, [isDragging, activeNodeRect]);\n var style = initialRect ? _objectSpread({\n position: 'fixed',\n width: initialRect.width,\n height: initialRect.height,\n top: initialRect.top,\n left: initialRect.left,\n zIndex: zIndex,\n transform: CSS.Transform.toString(finalTransform),\n touchAction: 'none',\n transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, initialRect) : undefined,\n transition: typeof transition === 'function' ? transition(activatorEvent) : transition\n }, styleProp) : undefined;\n var attributes = isDragging ? {\n style: style,\n children: children,\n className: className,\n transform: finalTransform\n } : undefined;\n var attributesSnapshot = useRef(attributes);\n var derivedAttributes = attributes != null ? attributes : attributesSnapshot.current;\n\n var _ref43 = derivedAttributes != null ? derivedAttributes : {},\n finalChildren = _ref43.children,\n _ = _ref43.transform,\n otherAttributes = _objectWithoutProperties(_ref43, _excluded3);\n\n var prevActiveId = useRef((_active$id = active == null ? void 0 : active.id) != null ? _active$id : null);\n var dropAnimationComplete = useDropAnimation({\n animate: Boolean(dropAnimation && prevActiveId.current && !active),\n adjustScale: adjustScale,\n activeId: prevActiveId.current,\n draggableNodes: draggableNodes,\n duration: dropAnimation == null ? void 0 : dropAnimation.duration,\n easing: dropAnimation == null ? void 0 : dropAnimation.easing,\n dragSourceOpacity: dropAnimation == null ? void 0 : dropAnimation.dragSourceOpacity,\n node: dragOverlay.nodeRef.current,\n transform: (_attributesSnapshot$c = attributesSnapshot.current) == null ? void 0 : _attributesSnapshot$c.transform\n });\n var shouldRender = Boolean(finalChildren && (children || dropAnimation && !dropAnimationComplete));\n useEffect(function () {\n if ((active == null ? void 0 : active.id) !== prevActiveId.current) {\n var _active$id2;\n\n prevActiveId.current = (_active$id2 = active == null ? void 0 : active.id) != null ? _active$id2 : null;\n }\n\n if (active && attributesSnapshot.current !== attributes) {\n attributesSnapshot.current = attributes;\n }\n }, [active, attributes]);\n useEffect(function () {\n if (dropAnimationComplete) {\n attributesSnapshot.current = undefined;\n }\n }, [dropAnimationComplete]);\n\n if (!shouldRender) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(InternalContext.Provider, {\n value: defaultInternalContext\n }, /*#__PURE__*/React.createElement(ActiveDraggableContext.Provider, {\n value: defaultTransform\n }, /*#__PURE__*/React.createElement(wrapperElement, _objectSpread(_objectSpread({}, otherAttributes), {}, {\n ref: dragOverlay.setRef\n }), finalChildren)));\n});\nexport { AutoScrollActivator, DndContext, DragOverlay, KeyboardCode, KeyboardSensor, MeasuringFrequency, MeasuringStrategy, MouseSensor, PointerSensor, TouchSensor, TraversalOrder, applyModifiers, closestCenter, closestCorners, defaultAnnouncements, defaultCoordinates, defaultDropAnimation, getClientRect, getFirstCollision, getScrollableAncestors, pointerWithin, rectIntersection, useDndContext, useDndMonitor, useDraggable, useDroppable, useSensor, useSensors };","var $ = require('../internals/export');\nvar $parseInt = require('../internals/number-parse-int');\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\n$({ global: true, forced: parseInt != $parseInt }, {\n parseInt: $parseInt\n});\n","var _concat = /*#__PURE__*/require(\"./internal/_concat\");\n\nvar _curry3 = /*#__PURE__*/require(\"./internal/_curry3\");\n/**\n * Applies a function to the value at the given index of an array, returning a\n * new copy of the array with the element at the given index replaced with the\n * result of the function application.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig Number -> (a -> a) -> [a] -> [a]\n * @param {Number} idx The index.\n * @param {Function} fn The function to apply.\n * @param {Array|Arguments} list An array-like object whose value\n * at the supplied index will be replaced.\n * @return {Array} A copy of the supplied array-like object with\n * the element at index `idx` replaced with the value\n * returned by applying `fn` to the existing element.\n * @see R.update\n * @example\n *\n * R.adjust(1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'B', 'c', 'd']\n * R.adjust(-1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c', 'D']\n * @symb R.adjust(-1, f, [a, b]) = [a, f(b)]\n * @symb R.adjust(0, f, [a, b]) = [f(a), b]\n */\n\n\nvar adjust = /*#__PURE__*/_curry3(function adjust(idx, fn, list) {\n if (idx >= list.length || idx < -list.length) {\n return list;\n }\n\n var start = idx < 0 ? list.length : 0;\n\n var _idx = start + idx;\n\n var _list = _concat(list);\n\n _list[_idx] = fn(list[_idx]);\n return _list;\n});\n\nmodule.exports = adjust;","var NATIVE_BIND = require('../internals/function-bind-native');\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n","var global = require('../internals/global');\nvar classof = require('../internals/classof');\n\nvar String = global.String;\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return String(argument);\n};\n","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { createMemoryHistory, createLocation, locationsAreEqual, createPath } from 'history';\nimport warning from 'tiny-warning';\nimport createContext from 'mini-create-react-context';\nimport invariant from 'tiny-invariant';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport pathToRegexp from 'path-to-regexp';\nimport { isValidElementType } from 'react-is';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport hoistStatics from 'hoist-non-react-statics'; // TODO: Replace with React.createContext once we can assume React 16+\n\nvar createNamedContext = function createNamedContext(name) {\n var context = createContext();\n context.displayName = name;\n return context;\n};\n\nvar historyContext = /*#__PURE__*/createNamedContext(\"Router-History\");\nvar context = /*#__PURE__*/createNamedContext(\"Router\");\n/**\n * The public API for putting history on context.\n */\n\nvar Router = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Router, _React$Component);\n\n Router.computeRootMatch = function computeRootMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n function Router(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n location: props.history.location\n }; // This is a bit of a hack. We have to start listening for location\n // changes here in the constructor in case there are any s\n // on the initial render. If there are, they will replace/push when\n // they mount and since cDM fires in children before parents, we may\n // get a new location before the is mounted.\n\n _this._isMounted = false;\n _this._pendingLocation = null;\n\n if (!props.staticContext) {\n _this.unlisten = props.history.listen(function (location) {\n if (_this._isMounted) {\n _this.setState({\n location: location\n });\n } else {\n _this._pendingLocation = location;\n }\n });\n }\n\n return _this;\n }\n\n var _proto = Router.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this._isMounted = true;\n\n if (this._pendingLocation) {\n this.setState({\n location: this._pendingLocation\n });\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.unlisten) {\n this.unlisten();\n this._isMounted = false;\n this._pendingLocation = null;\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(context.Provider, {\n value: {\n history: this.props.history,\n location: this.state.location,\n match: Router.computeRootMatch(this.state.location.pathname),\n staticContext: this.props.staticContext\n }\n }, /*#__PURE__*/React.createElement(historyContext.Provider, {\n children: this.props.children || null,\n value: this.props.history\n }));\n };\n\n return Router;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n Router.propTypes = {\n children: PropTypes.node,\n history: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n };\n\n Router.prototype.componentDidUpdate = function (prevProps) {\n process.env.NODE_ENV !== \"production\" ? warning(prevProps.history === this.props.history, \"You cannot change \") : void 0;\n };\n}\n/**\n * The public API for a that stores location in memory.\n */\n\n\nvar MemoryRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createMemoryHistory(_this.props);\n return _this;\n }\n\n var _proto = MemoryRouter.prototype;\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return MemoryRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n MemoryRouter.propTypes = {\n initialEntries: PropTypes.array,\n initialIndex: PropTypes.number,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n };\n\n MemoryRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\") : void 0;\n };\n}\n\nvar Lifecycle = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Lifecycle, _React$Component);\n\n function Lifecycle() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Lifecycle.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n if (this.props.onMount) this.props.onMount.call(this, this);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.props.onUnmount) this.props.onUnmount.call(this, this);\n };\n\n _proto.render = function render() {\n return null;\n };\n\n return Lifecycle;\n}(React.Component);\n/**\n * The public API for prompting the user before navigating away from a screen.\n */\n\n\nfunction Prompt(_ref) {\n var message = _ref.message,\n _ref$when = _ref.when,\n when = _ref$when === void 0 ? true : _ref$when;\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n if (!when || context.staticContext) return null;\n var method = context.history.block;\n return /*#__PURE__*/React.createElement(Lifecycle, {\n onMount: function onMount(self) {\n self.release = method(message);\n },\n onUpdate: function onUpdate(self, prevProps) {\n if (prevProps.message !== message) {\n self.release();\n self.release = method(message);\n }\n },\n onUnmount: function onUnmount(self) {\n self.release();\n },\n message: message\n });\n });\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n var messageType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);\n Prompt.propTypes = {\n when: PropTypes.bool,\n message: messageType.isRequired\n };\n}\n\nvar cache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nfunction compilePath(path) {\n if (cache[path]) return cache[path];\n var generator = pathToRegexp.compile(path);\n\n if (cacheCount < cacheLimit) {\n cache[path] = generator;\n cacheCount++;\n }\n\n return generator;\n}\n/**\n * Public API for generating a URL pathname from a path and parameters.\n */\n\n\nfunction generatePath(path, params) {\n if (path === void 0) {\n path = \"/\";\n }\n\n if (params === void 0) {\n params = {};\n }\n\n return path === \"/\" ? path : compilePath(path)(params, {\n pretty: true\n });\n}\n/**\n * The public API for navigating programmatically with a component.\n */\n\n\nfunction Redirect(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to,\n _ref$push = _ref.push,\n push = _ref$push === void 0 ? false : _ref$push;\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var history = context.history,\n staticContext = context.staticContext;\n var method = push ? history.push : history.replace;\n var location = createLocation(computedMatch ? typeof to === \"string\" ? generatePath(to, computedMatch.params) : _extends({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n }) : to); // When rendering in a static context,\n // set the new location immediately.\n\n if (staticContext) {\n method(location);\n return null;\n }\n\n return /*#__PURE__*/React.createElement(Lifecycle, {\n onMount: function onMount() {\n method(location);\n },\n onUpdate: function onUpdate(self, prevProps) {\n var prevLocation = createLocation(prevProps.to);\n\n if (!locationsAreEqual(prevLocation, _extends({}, location, {\n key: prevLocation.key\n }))) {\n method(location);\n }\n },\n to: to\n });\n });\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n Redirect.propTypes = {\n push: PropTypes.bool,\n from: PropTypes.string,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n };\n}\n\nvar cache$1 = {};\nvar cacheLimit$1 = 10000;\nvar cacheCount$1 = 0;\n\nfunction compilePath$1(path, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});\n if (pathCache[path]) return pathCache[path];\n var keys = [];\n var regexp = pathToRegexp(path, keys, options);\n var result = {\n regexp: regexp,\n keys: keys\n };\n\n if (cacheCount$1 < cacheLimit$1) {\n pathCache[path] = result;\n cacheCount$1++;\n }\n\n return result;\n}\n/**\n * Public API for matching a URL pathname to a path.\n */\n\n\nfunction matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}\n\nfunction isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n}\n\nfunction evalChildrenDev(children, props, path) {\n var value = children(props);\n process.env.NODE_ENV !== \"production\" ? warning(value !== undefined, \"You returned `undefined` from the `children` function of \" + (\", but you \") + \"should have returned a React element or `null`\") : void 0;\n return value || null;\n}\n/**\n * The public API for matching a single path and rendering.\n */\n\n\nvar Route = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Route, _React$Component);\n\n function Route() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Route.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context$1) {\n !context$1 ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var location = _this.props.location || context$1.location;\n var match = _this.props.computedMatch ? _this.props.computedMatch // already computed the match for us\n : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;\n\n var props = _extends({}, context$1, {\n location: location,\n match: match\n });\n\n var _this$props = _this.props,\n children = _this$props.children,\n component = _this$props.component,\n render = _this$props.render; // Preact uses an empty array as children by\n // default, so use null if that's the case.\n\n if (Array.isArray(children) && isEmptyChildren(children)) {\n children = null;\n }\n\n return /*#__PURE__*/React.createElement(context.Provider, {\n value: props\n }, props.match ? children ? typeof children === \"function\" ? process.env.NODE_ENV !== \"production\" ? evalChildrenDev(children, props, _this.props.path) : children(props) : children : component ? /*#__PURE__*/React.createElement(component, props) : render ? render(props) : null : typeof children === \"function\" ? process.env.NODE_ENV !== \"production\" ? evalChildrenDev(children, props, _this.props.path) : children(props) : null);\n });\n };\n\n return Route;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n Route.propTypes = {\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n component: function component(props, propName) {\n if (props[propName] && !isValidElementType(props[propName])) {\n return new Error(\"Invalid prop 'component' supplied to 'Route': the prop is not a valid React component\");\n }\n },\n exact: PropTypes.bool,\n location: PropTypes.object,\n path: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n render: PropTypes.func,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool\n };\n\n Route.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.component), \"You should not use and in the same route; will be ignored\") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.render), \"You should not use and in the same route; will be ignored\") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\") : void 0;\n };\n\n Route.prototype.componentDidUpdate = function (prevProps) {\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.location && !prevProps.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(!this.props.location && prevProps.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : void 0;\n };\n}\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n}\n\nfunction addBasename(basename, location) {\n if (!basename) return location;\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n}\n\nfunction stripBasename(basename, location) {\n if (!basename) return location;\n var base = addLeadingSlash(basename);\n if (location.pathname.indexOf(base) !== 0) return location;\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n}\n\nfunction createURL(location) {\n return typeof location === \"string\" ? location : createPath(location);\n}\n\nfunction staticHandler(methodName) {\n return function () {\n process.env.NODE_ENV !== \"production\" ? invariant(false, \"You cannot %s with \", methodName) : invariant(false);\n };\n}\n\nfunction noop() {}\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\n\nvar StaticRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handlePush = function (location) {\n return _this.navigateTo(location, \"PUSH\");\n };\n\n _this.handleReplace = function (location) {\n return _this.navigateTo(location, \"REPLACE\");\n };\n\n _this.handleListen = function () {\n return noop;\n };\n\n _this.handleBlock = function () {\n return noop;\n };\n\n return _this;\n }\n\n var _proto = StaticRouter.prototype;\n\n _proto.navigateTo = function navigateTo(location, action) {\n var _this$props = this.props,\n _this$props$basename = _this$props.basename,\n basename = _this$props$basename === void 0 ? \"\" : _this$props$basename,\n _this$props$context = _this$props.context,\n context = _this$props$context === void 0 ? {} : _this$props$context;\n context.action = action;\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n _this$props2$basename = _this$props2.basename,\n basename = _this$props2$basename === void 0 ? \"\" : _this$props2$basename,\n _this$props2$context = _this$props2.context,\n context = _this$props2$context === void 0 ? {} : _this$props2$context,\n _this$props2$location = _this$props2.location,\n location = _this$props2$location === void 0 ? \"/\" : _this$props2$location,\n rest = _objectWithoutPropertiesLoose(_this$props2, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: function createHref(path) {\n return addLeadingSlash(basename + createURL(path));\n },\n action: \"POP\",\n location: stripBasename(basename, createLocation(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n return /*#__PURE__*/React.createElement(Router, _extends({}, rest, {\n history: history,\n staticContext: context\n }));\n };\n\n return StaticRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n StaticRouter.propTypes = {\n basename: PropTypes.string,\n context: PropTypes.object,\n location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n };\n\n StaticRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\") : void 0;\n };\n}\n/**\n * The public API for rendering the first that matches.\n */\n\n\nvar Switch = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Switch, _React$Component);\n\n function Switch() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Switch.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var location = _this.props.location || context.location;\n var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()\n // here because toArray adds keys to all child elements and we do not want\n // to trigger an unmount/remount for two s that render the same\n // component at different URLs.\n\n React.Children.forEach(_this.props.children, function (child) {\n if (match == null && /*#__PURE__*/React.isValidElement(child)) {\n element = child;\n var path = child.props.path || child.props.from;\n match = path ? matchPath(location.pathname, _extends({}, child.props, {\n path: path\n })) : context.match;\n }\n });\n return match ? /*#__PURE__*/React.cloneElement(element, {\n location: location,\n computedMatch: match\n }) : null;\n });\n };\n\n return Switch;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n Switch.propTypes = {\n children: PropTypes.node,\n location: PropTypes.object\n };\n\n Switch.prototype.componentDidUpdate = function (prevProps) {\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.location && !prevProps.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(!this.props.location && prevProps.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : void 0;\n };\n}\n/**\n * A public higher-order component to access the imperative API\n */\n\n\nfunction withRouter(Component) {\n var displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutPropertiesLoose(props, [\"wrappedComponentRef\"]);\n\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use <\" + displayName + \" /> outside a \") : invariant(false) : void 0;\n return /*#__PURE__*/React.createElement(Component, _extends({}, remainingProps, context, {\n ref: wrappedComponentRef\n }));\n });\n };\n\n C.displayName = displayName;\n C.WrappedComponent = Component;\n\n if (process.env.NODE_ENV !== \"production\") {\n C.propTypes = {\n wrappedComponentRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object])\n };\n }\n\n return hoistStatics(C, Component);\n}\n\nvar useContext = React.useContext;\n\nfunction useHistory() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useHistory()\") : invariant(false) : void 0;\n }\n\n return useContext(historyContext);\n}\n\nfunction useLocation() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useLocation()\") : invariant(false) : void 0;\n }\n\n return useContext(context).location;\n}\n\nfunction useParams() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useParams()\") : invariant(false) : void 0;\n }\n\n var match = useContext(context).match;\n return match ? match.params : {};\n}\n\nfunction useRouteMatch(path) {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useRouteMatch()\") : invariant(false) : void 0;\n }\n\n var location = useLocation();\n var match = useContext(context).match;\n return path ? matchPath(location.pathname, path) : match;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n if (typeof window !== \"undefined\") {\n var global = window;\n var key = \"__react_router_build__\";\n var buildNames = {\n cjs: \"CommonJS\",\n esm: \"ES modules\",\n umd: \"UMD\"\n };\n\n if (global[key] && global[key] !== \"esm\") {\n var initialBuildName = buildNames[global[key]];\n var secondaryBuildName = buildNames[\"esm\"]; // TODO: Add link to article that explains in detail how to avoid\n // loading 2 different builds.\n\n throw new Error(\"You are loading the \" + secondaryBuildName + \" build of React Router \" + (\"on a page that is already running the \" + initialBuildName + \" \") + \"build, so things won't work right.\");\n }\n\n global[key] = \"esm\";\n }\n}\n\nexport { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, historyContext as __HistoryContext, context as __RouterContext, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter };","var _curry1 = /*#__PURE__*/require(\"./internal/_curry1\");\n/**\n * A function that returns the `!` of its argument. It will return `true` when\n * passed false-y value, and `false` when passed a truth-y one.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig * -> Boolean\n * @param {*} a any value\n * @return {Boolean} the logical inverse of passed argument.\n * @see R.complement\n * @example\n *\n * R.not(true); //=> false\n * R.not(false); //=> true\n * R.not(0); //=> true\n * R.not(1); //=> false\n */\n\n\nvar not = /*#__PURE__*/_curry1(function not(a) {\n return !a;\n});\n\nmodule.exports = not;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"RecurlyProvider\", {\n enumerable: true,\n get: function get() {\n return _provider[\"default\"];\n }\n});\nObject.defineProperty(exports, \"useRecurly\", {\n enumerable: true,\n get: function get() {\n return _useRecurly[\"default\"];\n }\n});\nObject.defineProperty(exports, \"Elements\", {\n enumerable: true,\n get: function get() {\n return _elements[\"default\"];\n }\n});\nObject.defineProperty(exports, \"CardElement\", {\n enumerable: true,\n get: function get() {\n return _card[\"default\"];\n }\n});\nObject.defineProperty(exports, \"CardNumberElement\", {\n enumerable: true,\n get: function get() {\n return _cardNumber[\"default\"];\n }\n});\nObject.defineProperty(exports, \"CardMonthElement\", {\n enumerable: true,\n get: function get() {\n return _cardMonth[\"default\"];\n }\n});\nObject.defineProperty(exports, \"CardYearElement\", {\n enumerable: true,\n get: function get() {\n return _cardYear[\"default\"];\n }\n});\nObject.defineProperty(exports, \"CardCvvElement\", {\n enumerable: true,\n get: function get() {\n return _cardCvv[\"default\"];\n }\n});\nObject.defineProperty(exports, \"RiskDataCollector\", {\n enumerable: true,\n get: function get() {\n return _riskDataCollector[\"default\"];\n }\n});\nObject.defineProperty(exports, \"ThreeDSecureAction\", {\n enumerable: true,\n get: function get() {\n return _threeDSecureAction[\"default\"];\n }\n});\nObject.defineProperty(exports, \"useCheckoutPricing\", {\n enumerable: true,\n get: function get() {\n return _useCheckoutPricing[\"default\"];\n }\n});\n\nvar _provider = _interopRequireDefault(require(\"./provider\"));\n\nvar _useRecurly = _interopRequireDefault(require(\"./use-recurly\"));\n\nvar _elements = _interopRequireDefault(require(\"./elements\"));\n\nvar _card = _interopRequireDefault(require(\"./element/card\"));\n\nvar _cardNumber = _interopRequireDefault(require(\"./element/card-number\"));\n\nvar _cardMonth = _interopRequireDefault(require(\"./element/card-month\"));\n\nvar _cardYear = _interopRequireDefault(require(\"./element/card-year\"));\n\nvar _cardCvv = _interopRequireDefault(require(\"./element/card-cvv\"));\n\nvar _riskDataCollector = _interopRequireDefault(require(\"./risk-data-collector\"));\n\nvar _threeDSecureAction = _interopRequireDefault(require(\"./three-d-secure-action\"));\n\nvar _useCheckoutPricing = _interopRequireDefault(require(\"./use-checkout-pricing\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n\nvar paths = /*#__PURE__*/require(\"./paths\");\n/**\n * Retrieve the value at a given path.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig [Idx] -> {a} -> a | Undefined\n * @param {Array} path The path to use.\n * @param {Object} obj The object to retrieve the nested property from.\n * @return {*} The data at `path`.\n * @see R.prop, R.nth\n * @example\n *\n * R.path(['a', 'b'], {a: {b: 2}}); //=> 2\n * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined\n * R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1\n * R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2\n */\n\n\nvar path = /*#__PURE__*/_curry2(function path(pathAr, obj) {\n return paths([pathAr], obj)[0];\n});\n\nmodule.exports = path;","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\nexport default isArray;","var _curry3 = /*#__PURE__*/require(\"./internal/_curry3\");\n/**\n * Makes a descending comparator function out of a function that returns a value\n * that can be compared with `<` and `>`.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Function\n * @sig Ord b => (a -> b) -> a -> a -> Number\n * @param {Function} fn A function of arity one that returns a value that can be compared\n * @param {*} a The first item to be compared.\n * @param {*} b The second item to be compared.\n * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0`\n * @see R.ascend\n * @example\n *\n * const byAge = R.descend(R.prop('age'));\n * const people = [\n * { name: 'Emma', age: 70 },\n * { name: 'Peter', age: 78 },\n * { name: 'Mikhail', age: 62 },\n * ];\n * const peopleByOldestFirst = R.sort(byAge, people);\n * //=> [{ name: 'Peter', age: 78 }, { name: 'Emma', age: 70 }, { name: 'Mikhail', age: 62 }]\n */\n\n\nvar descend = /*#__PURE__*/_curry3(function descend(fn, a, b) {\n var aa = fn(a);\n var bb = fn(b);\n return aa > bb ? -1 : aa < bb ? 1 : 0;\n});\n\nmodule.exports = descend;","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","var IS_PRODUCTION = process.env.NODE_ENV === 'production';\nexport { IS_PRODUCTION };","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar hasOwn = require('../internals/has-own-property');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar isSymbol = require('../internals/is-symbol');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar thisNumberValue = require('../internals/this-number-value');\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\nvar TypeError = global.TypeError;\nvar arraySlice = uncurryThis(''.slice);\nvar charCodeAt = uncurryThis(''.charCodeAt);\n\n// `ToNumeric` abstract operation\n// https://tc39.es/ecma262/#sec-tonumeric\nvar toNumeric = function (value) {\n var primValue = toPrimitive(value, 'number');\n return typeof primValue == 'bigint' ? primValue : toNumber(primValue);\n};\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, 'number');\n var first, third, radix, maxCode, digits, length, index, code;\n if (isSymbol(it)) throw TypeError('Cannot convert a Symbol value to a number');\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = charCodeAt(it, 0);\n if (first === 43 || first === 45) {\n third = charCodeAt(it, 2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (charCodeAt(it, 1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = arraySlice(it, 2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = charCodeAt(digits, index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));\n var dummy = this;\n // check on 1..constructor(foo) case\n return isPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); })\n ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n;\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +\n // ESNext\n 'fromString,range'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (hasOwn(NativeNumber, key = keys[j]) && !hasOwn(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n defineBuiltIn(global, NUMBER, NumberWrapper, { constructor: true });\n}\n","import * as o from \"react\";\nexport var useLayoutEffect = Boolean(null === globalThis || void 0 === globalThis ? void 0 : globalThis.document) ? o.useLayoutEffect : function () {};","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useLayoutEffect as t } from \"@radix-ui/react-use-layout-effect\";\nimport * as e from \"react\";\n\nvar r = e[\"useId\".toString()] || function () {};\n\nvar n = 0;\nexport function useId(o) {\n var _e$useState = e.useState(r()),\n _e$useState2 = _slicedToArray(_e$useState, 2),\n u = _e$useState2[0],\n i = _e$useState2[1];\n\n return t(function () {\n o || i(function (t) {\n return null != t ? t : String(n++);\n });\n }, [o]), o || (u ? \"radix-\".concat(u) : \"\");\n}\nexport function IdProvider(_ref) {\n var t = _ref.children;\n return e.useEffect(function () {\n 0;\n }, []), /*#__PURE__*/e.createElement(e.Fragment, null, t);\n}","import * as e from \"react\";\nvar t = 0;\nexport function FocusGuards(e) {\n return useFocusGuards(), e.children;\n}\nexport function useFocusGuards() {\n e.useEffect(function () {\n var e, n;\n var r = document.querySelectorAll(\"[data-radix-focus-guard]\");\n return document.body.insertAdjacentElement(\"afterbegin\", null !== (e = r[0]) && void 0 !== e ? e : o()), document.body.insertAdjacentElement(\"beforeend\", null !== (n = r[1]) && void 0 !== n ? n : o()), t++, function () {\n 1 === t && document.querySelectorAll(\"[data-radix-focus-guard]\").forEach(function (e) {\n return e.remove();\n }), t--;\n };\n }, []);\n}\n\nfunction o() {\n var e = document.createElement(\"span\");\n return e.setAttribute(\"data-radix-focus-guard\", \"\"), e.tabIndex = 0, e.style.cssText = \"outline: none; opacity: 0; position: fixed; pointer-events: none\", e;\n}\n\nexport var Root = FocusGuards;","import * as e from \"react\";\nexport function useCallbackRef(r) {\n var t = e.useRef(r);\n return e.useEffect(function () {\n t.current = r;\n }), e.useMemo(function () {\n return function () {\n var _r;\n\n var r;\n\n for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {\n e[_key] = arguments[_key];\n }\n\n return null === (r = t.current) || void 0 === r ? void 0 : (_r = r).call.apply(_r, [t].concat(e));\n };\n }, []);\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport * as e from \"react\";\nexport function useDirection(t, n) {\n var _e$useState = e.useState(\"ltr\"),\n _e$useState2 = _slicedToArray(_e$useState, 2),\n r = _e$useState2[0],\n o = _e$useState2[1],\n _e$useState3 = e.useState(),\n _e$useState4 = _slicedToArray(_e$useState3, 2),\n i = _e$useState4[0],\n u = _e$useState4[1],\n c = e.useRef(0);\n\n return e.useEffect(function () {\n if (void 0 === n && null != t && t.parentElement) {\n var _e2 = getComputedStyle(t.parentElement);\n\n u(_e2);\n }\n }, [t, n]), e.useEffect(function () {\n return void 0 === n && function e() {\n c.current = requestAnimationFrame(function () {\n var t = null == i ? void 0 : i.direction;\n t && o(t), e();\n });\n }(), function () {\n return cancelAnimationFrame(c.current);\n };\n }, [i, n, o]), n || r;\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useCallbackRef as e } from \"@radix-ui/react-use-callback-ref\";\nimport * as t from \"react\";\nexport function useControllableState(_ref) {\n var o = _ref.prop,\n r = _ref.defaultProp,\n _ref$onChange = _ref.onChange,\n n = _ref$onChange === void 0 ? function () {} : _ref$onChange;\n\n var _ref2 = function (_ref4) {\n var o = _ref4.defaultProp,\n r = _ref4.onChange;\n\n var n = t.useState(o),\n _n2 = _slicedToArray(n, 1),\n a = _n2[0],\n u = t.useRef(a),\n c = e(r);\n\n return t.useEffect(function () {\n u.current !== a && (c(a), u.current = a);\n }, [a, u, c]), n;\n }({\n defaultProp: r,\n onChange: n\n }),\n _ref3 = _slicedToArray(_ref2, 2),\n a = _ref3[0],\n u = _ref3[1],\n c = void 0 !== o,\n f = c ? o : a,\n l = e(n);\n\n return [f, t.useCallback(function (e) {\n if (c) {\n var _t = e,\n _r = \"function\" == typeof e ? _t(o) : e;\n\n _r !== o && l(_r);\n } else u(e);\n }, [c, o, u, l])];\n}","import * as o from \"react\";\nexport function composeRefs() {\n for (var _len = arguments.length, o = new Array(_len), _key = 0; _key < _len; _key++) {\n o[_key] = arguments[_key];\n }\n\n return function (e) {\n return o.forEach(function (o) {\n return function (o, e) {\n \"function\" == typeof o ? o(e) : null != o && (o.current = e);\n }(o, e);\n });\n };\n}\nexport function useComposedRefs() {\n for (var _len2 = arguments.length, e = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n e[_key2] = arguments[_key2];\n }\n\n return o.useCallback(composeRefs.apply(void 0, e), e);\n}","var _excluded = [\"children\"],\n _excluded2 = [\"children\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _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; }\n\nimport { composeRefs as e } from \"@radix-ui/react-compose-refs\";\nimport * as t from \"react\";\nimport r from \"@babel/runtime/helpers/esm/extends\";\nexport var Slot = /*#__PURE__*/t.forwardRef(function (e, o) {\n var a = e.children,\n s = _objectWithoutProperties(e, _excluded);\n\n return t.Children.toArray(a).some(l) ? /*#__PURE__*/t.createElement(t.Fragment, null, t.Children.map(a, function (e) {\n return l(e) ? /*#__PURE__*/t.createElement(n, r({}, s, {\n ref: o\n }), e.props.children) : e;\n })) : /*#__PURE__*/t.createElement(n, r({}, s, {\n ref: o\n }), a);\n});\nSlot.displayName = \"Slot\";\nvar n = /*#__PURE__*/t.forwardRef(function (r, n) {\n var l = r.children,\n a = _objectWithoutProperties(r, _excluded2);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/t.isValidElement(l) ? /*#__PURE__*/t.cloneElement(l, _objectSpread(_objectSpread({}, o(a, l.props)), {}, {\n ref: e(n, l.ref)\n })) : t.Children.count(l) > 1 ? t.Children.only(null) : null;\n});\nn.displayName = \"SlotClone\";\nexport var Slottable = function Slottable(_ref) {\n var e = _ref.children;\n return /*#__PURE__*/t.createElement(t.Fragment, null, e);\n};\n\nfunction l(e) {\n /*#__PURE__*/\n return /*#__PURE__*/t.isValidElement(e) && e.type === Slottable;\n}\n\nfunction o(e, t) {\n var r = _objectSpread({}, t);\n\n var _loop = function _loop(_n) {\n var l = e[_n],\n o = t[_n];\n /^on[A-Z]/.test(_n) ? r[_n] = function () {\n null == o || o.apply(void 0, arguments), null == l || l.apply(void 0, arguments);\n } : \"style\" === _n ? r[_n] = _objectSpread(_objectSpread({}, l), o) : \"className\" === _n && (r[_n] = [l, o].filter(Boolean).join(\" \"));\n };\n\n for (var _n in t) {\n _loop(_n);\n }\n\n return _objectSpread(_objectSpread({}, e), r);\n}\n\nexport var Root = Slot;","var _excluded = [\"asChild\"];\n\nfunction _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; }\n\nfunction _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; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nimport { Slot as e } from \"@radix-ui/react-slot\";\nimport * as r from \"react\";\nimport t from \"@babel/runtime/helpers/esm/extends\";\nexport var Primitive = [\"a\", \"button\", \"div\", \"h2\", \"h3\", \"img\", \"li\", \"nav\", \"ol\", \"p\", \"span\", \"svg\", \"ul\"].reduce(function (o, i) {\n return _objectSpread(_objectSpread({}, o), {}, _defineProperty({}, i, /*#__PURE__*/r.forwardRef(function (o, m) {\n var a = o.asChild,\n s = _objectWithoutProperties(o, _excluded),\n n = a ? e : i;\n\n return r.useEffect(function () {\n window[Symbol[\"for\"](\"radix-ui\")] = !0;\n }, []), /*#__PURE__*/r.createElement(n, t({}, s, {\n ref: m\n }));\n })));\n}, {});\nexport var Root = Primitive;","var _excluded = [\"children\"],\n _excluded2 = [\"scope\", \"children\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _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; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _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; }\n\nimport * as e from \"react\";\nexport function createContext(t, n) {\n var o = /*#__PURE__*/e.createContext(n);\n\n function r(t) {\n var n = t.children,\n r = _objectWithoutProperties(t, _excluded),\n c = e.useMemo(function () {\n return r;\n }, Object.values(r));\n /*#__PURE__*/\n\n\n return /*#__PURE__*/e.createElement(o.Provider, {\n value: c\n }, n);\n }\n\n return r.displayName = t + \"Provider\", [r, function (r) {\n var c = e.useContext(o);\n if (c) return c;\n if (void 0 !== n) return n;\n throw new Error(\"`\".concat(r, \"` must be used within `\").concat(t, \"`\"));\n }];\n}\nexport function createContextScope(n) {\n var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var r = [];\n\n var c = function c() {\n var t = r.map(function (t) {\n return /*#__PURE__*/e.createContext(t);\n });\n return function (o) {\n var r = (null == o ? void 0 : o[n]) || t;\n return e.useMemo(function () {\n return _defineProperty({}, \"__scope\".concat(n), _objectSpread(_objectSpread({}, o), {}, _defineProperty({}, n, r)));\n }, [o, r]);\n };\n };\n\n return c.scopeName = n, [function (t, o) {\n var c = /*#__PURE__*/e.createContext(o),\n u = r.length;\n\n function s(t) {\n var o = t.scope,\n r = t.children,\n s = _objectWithoutProperties(t, _excluded2),\n i = (null == o ? void 0 : o[n][u]) || c,\n a = e.useMemo(function () {\n return s;\n }, Object.values(s));\n /*#__PURE__*/\n\n\n return /*#__PURE__*/e.createElement(i.Provider, {\n value: a\n }, r);\n }\n\n return r = [].concat(_toConsumableArray(r), [o]), s.displayName = t + \"Provider\", [s, function (r, s) {\n var i = (null == s ? void 0 : s[n][u]) || c,\n a = e.useContext(i);\n if (a) return a;\n if (void 0 !== o) return o;\n throw new Error(\"`\".concat(r, \"` must be used within `\").concat(t, \"`\"));\n }];\n }, t.apply(void 0, [c].concat(_toConsumableArray(o)))];\n}\n\nfunction t() {\n for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {\n t[_key] = arguments[_key];\n }\n\n var n = t[0];\n if (1 === t.length) return n;\n\n var o = function o() {\n var o = t.map(function (e) {\n return {\n useScope: e(),\n scopeName: e.scopeName\n };\n });\n return function (t) {\n var r = o.reduce(function (e, _ref2) {\n var n = _ref2.useScope,\n o = _ref2.scopeName;\n return _objectSpread(_objectSpread({}, e), n(t)[\"__scope\".concat(o)]);\n }, {});\n return e.useMemo(function () {\n return _defineProperty({}, \"__scope\".concat(n.scopeName), r);\n }, [r]);\n };\n };\n\n return o.scopeName = n.scopeName, o;\n}","var _excluded = [\"scope\", \"children\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { Slot as e } from \"@radix-ui/react-slot\";\nimport { useComposedRefs as r } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope as t } from \"@radix-ui/react-context\";\nimport o from \"react\";\nexport function createCollection(c) {\n var n = c + \"CollectionProvider\",\n _t = t(n),\n _t2 = _slicedToArray(_t, 2),\n l = _t2[0],\n i = _t2[1],\n _l = l(n, {\n collectionRef: {\n current: null\n },\n itemMap: new Map()\n }),\n _l2 = _slicedToArray(_l, 2),\n f = _l2[0],\n a = _l2[1],\n u = function u(e) {\n var r = e.scope,\n t = e.children,\n c = o.useRef(null),\n n = o.useRef(new Map()).current;\n /*#__PURE__*/\n\n /*#__PURE__*/\n return /*#__PURE__*/o.createElement(f, {\n scope: r,\n itemMap: n,\n collectionRef: c\n }, t);\n },\n m = c + \"CollectionSlot\",\n s = /*#__PURE__*/o.forwardRef(function (t, c) {\n var n = t.scope,\n l = t.children,\n i = a(m, n),\n f = r(c, i.collectionRef);\n /*#__PURE__*/\n\n /*#__PURE__*/\n return /*#__PURE__*/o.createElement(e, {\n ref: f\n }, l);\n }),\n p = c + \"CollectionItemSlot\",\n d = \"data-radix-collection-item\",\n R = /*#__PURE__*/o.forwardRef(function (t, c) {\n var _o$createElement;\n\n var n = t.scope,\n l = t.children,\n i = _objectWithoutProperties(t, _excluded),\n f = o.useRef(null),\n u = r(c, f),\n m = a(p, n);\n\n return o.useEffect(function () {\n return m.itemMap.set(f, _objectSpread({\n ref: f\n }, i)), function () {\n m.itemMap[\"delete\"](f);\n };\n }), /*#__PURE__*/o.createElement(e, (_o$createElement = {}, _defineProperty(_o$createElement, d, \"\"), _defineProperty(_o$createElement, \"ref\", u), _o$createElement), l);\n });\n\n return [{\n Provider: u,\n Slot: s,\n ItemSlot: R\n }, function (e) {\n var r = a(c + \"CollectionConsumer\", e);\n return o.useCallback(function () {\n var e = r.collectionRef.current;\n if (!e) return [];\n var t = Array.from(e.querySelectorAll(\"[\".concat(d, \"]\")));\n return Array.from(r.itemMap.values()).sort(function (e, r) {\n return t.indexOf(e.ref.current) - t.indexOf(r.ref.current);\n });\n }, [r.collectionRef, r.itemMap]);\n }, i];\n}","export function composeEventHandlers(e, n) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref$checkForDefaultP = _ref.checkForDefaultPrevented,\n t = _ref$checkForDefaultP === void 0 ? !0 : _ref$checkForDefaultP;\n\n return function (r) {\n if (null == e || e(r), !1 === t || !r.defaultPrevented) return null == n ? void 0 : n(r);\n };\n}","var _excluded = [\"__scopeRovingFocusGroup\", \"orientation\", \"dir\", \"loop\", \"currentTabStopId\", \"defaultCurrentTabStopId\", \"onCurrentTabStopIdChange\", \"onEntryFocus\"],\n _excluded2 = [\"__scopeRovingFocusGroup\", \"focusable\", \"active\"];\n\nfunction _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(_e5) { throw _e5; }, 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(_e6) { didErr = true; err = _e6; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _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.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useControllableState as e } from \"@radix-ui/react-use-controllable-state\";\nimport { useCallbackRef as o } from \"@radix-ui/react-use-callback-ref\";\nimport { Primitive as r } from \"@radix-ui/react-primitive\";\nimport { useId as t } from \"@radix-ui/react-id\";\nimport { createContextScope as n } from \"@radix-ui/react-context\";\nimport { useComposedRefs as i } from \"@radix-ui/react-compose-refs\";\nimport { createCollection as c } from \"@radix-ui/react-collection\";\nimport { composeEventHandlers as u } from \"@radix-ui/primitive\";\nimport * as s from \"react\";\nimport a from \"@babel/runtime/helpers/esm/extends\";\n\nvar f = {\n bubbles: !1,\n cancelable: !0\n},\n _c = c(\"RovingFocusGroup\"),\n _c2 = _slicedToArray(_c, 3),\n p = _c2[0],\n l = _c2[1],\n m = _c2[2],\n _n2 = n(\"RovingFocusGroup\", [m]),\n _n3 = _slicedToArray(_n2, 2),\n d = _n3[0],\n v = _n3[1];\n\nexport { v as createRovingFocusGroupScope };\n\nvar _d2 = d(\"RovingFocusGroup\"),\n _d3 = _slicedToArray(_d2, 2),\n g = _d3[0],\n F = _d3[1];\n\nexport var RovingFocusGroup = /*#__PURE__*/s.forwardRef(function (e, o) {\n return /*#__PURE__*/s.createElement(p.Provider, {\n scope: e.__scopeRovingFocusGroup\n }, /*#__PURE__*/s.createElement(p.Slot, {\n scope: e.__scopeRovingFocusGroup\n }, /*#__PURE__*/s.createElement(w, a({}, e, {\n ref: o\n }))));\n});\n/*#__PURE__*/\n\nvar w = /*#__PURE__*/s.forwardRef(function (t, n) {\n var c = t.__scopeRovingFocusGroup,\n p = t.orientation,\n _t$dir = t.dir,\n m = _t$dir === void 0 ? \"ltr\" : _t$dir,\n _t$loop = t.loop,\n d = _t$loop === void 0 ? !1 : _t$loop,\n v = t.currentTabStopId,\n F = t.defaultCurrentTabStopId,\n w = t.onCurrentTabStopIdChange,\n b = t.onEntryFocus,\n x = _objectWithoutProperties(t, _excluded),\n E = s.useRef(null),\n I = i(n, E),\n _e2 = e({\n prop: v,\n defaultProp: F,\n onChange: w\n }),\n _e3 = _slicedToArray(_e2, 2),\n _e3$ = _e3[0],\n G = _e3$ === void 0 ? null : _e3$,\n h = _e3[1],\n _s$useState = s.useState(!1),\n _s$useState2 = _slicedToArray(_s$useState, 2),\n T = _s$useState2[0],\n A = _s$useState2[1],\n y = o(b),\n D = l(c),\n S = s.useRef(!1);\n\n return s.useEffect(function () {\n var e = E.current;\n if (e) return e.addEventListener(\"rovingFocusGroup.onEntryFocus\", y), function () {\n return e.removeEventListener(\"rovingFocusGroup.onEntryFocus\", y);\n };\n }, [y]), /*#__PURE__*/s.createElement(g, {\n scope: c,\n orientation: p,\n dir: m,\n loop: d,\n currentTabStopId: G,\n onItemFocus: s.useCallback(function (e) {\n return h(e);\n }, [h]),\n onItemShiftTab: s.useCallback(function () {\n return A(!0);\n }, [])\n }, /*#__PURE__*/s.createElement(r.div, a({\n tabIndex: T ? -1 : 0,\n \"data-orientation\": p\n }, x, {\n ref: I,\n style: _objectSpread({\n outline: \"none\"\n }, t.style),\n onMouseDown: u(t.onMouseDown, function () {\n S.current = !0;\n }),\n onFocus: u(t.onFocus, function (e) {\n var o = !S.current;\n\n if (e.target === e.currentTarget && o && !T) {\n var _o = new Event(\"rovingFocusGroup.onEntryFocus\", f);\n\n if (e.currentTarget.dispatchEvent(_o), !_o.defaultPrevented) {\n var _e4 = D().filter(function (e) {\n return e.focusable;\n });\n\n R([_e4.find(function (e) {\n return e.active;\n }), _e4.find(function (e) {\n return e.id === G;\n })].concat(_toConsumableArray(_e4)).filter(Boolean).map(function (e) {\n return e.ref.current;\n }));\n }\n }\n\n S.current = !1;\n }),\n onBlur: u(t.onBlur, function () {\n return A(!1);\n })\n })));\n});\nexport var RovingFocusGroupItem = /*#__PURE__*/s.forwardRef(function (e, o) {\n var n = e.__scopeRovingFocusGroup,\n _e$focusable = e.focusable,\n i = _e$focusable === void 0 ? !0 : _e$focusable,\n _e$active = e.active,\n c = _e$active === void 0 ? !1 : _e$active,\n f = _objectWithoutProperties(e, _excluded2),\n m = t(),\n d = F(\"RovingFocusGroupItem\", n),\n v = d.currentTabStopId === m,\n g = l(n);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/s.createElement(p.ItemSlot, {\n scope: n,\n id: m,\n focusable: i,\n active: c\n }, /*#__PURE__*/s.createElement(r.span, a({\n tabIndex: v ? 0 : -1,\n \"data-orientation\": d.orientation\n }, f, {\n ref: o,\n onMouseDown: u(e.onMouseDown, function (e) {\n i ? d.onItemFocus(m) : e.preventDefault();\n }),\n onFocus: u(e.onFocus, function () {\n return d.onItemFocus(m);\n }),\n onKeyDown: u(e.onKeyDown, function (e) {\n if (\"Tab\" === e.key && e.shiftKey) return void d.onItemShiftTab();\n if (e.target !== e.currentTarget) return;\n\n var o = function (e, o, r) {\n var t = function (e, o) {\n return \"rtl\" !== o ? e : \"ArrowLeft\" === e ? \"ArrowRight\" : \"ArrowRight\" === e ? \"ArrowLeft\" : e;\n }(e.key, r);\n\n return \"vertical\" === o && [\"ArrowLeft\", \"ArrowRight\"].includes(t) || \"horizontal\" === o && [\"ArrowUp\", \"ArrowDown\"].includes(t) ? void 0 : b[t];\n }(e, d.orientation, d.dir);\n\n if (void 0 !== o) {\n e.preventDefault();\n\n var _n4 = g().filter(function (e) {\n return e.focusable;\n }).map(function (e) {\n return e.ref.current;\n });\n\n if (\"last\" === o) _n4.reverse();else if (\"prev\" === o || \"next\" === o) {\n \"prev\" === o && _n4.reverse();\n\n var _i2 = _n4.indexOf(e.currentTarget);\n\n _n4 = d.loop ? (t = _i2 + 1, (r = _n4).map(function (e, o) {\n return r[(t + o) % r.length];\n })) : _n4.slice(_i2 + 1);\n }\n setTimeout(function () {\n return R(_n4);\n });\n }\n\n var r, t;\n })\n })));\n});\n/*#__PURE__*/\n\nvar b = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\n\nfunction R(e) {\n var o = document.activeElement;\n\n var _iterator = _createForOfIteratorHelper(e),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _r = _step.value;\n if (_r === o) return;\n if (_r.focus(), document.activeElement !== o) return;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n}\n\nexport var Root = RovingFocusGroup;\nexport var Item = RovingFocusGroupItem;","var _excluded = [\"containerRef\", \"style\"],\n _excluded2 = [\"container\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _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; }\n\nfunction _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; }\n\nimport { Primitive as o } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect as t } from \"@radix-ui/react-use-layout-effect\";\nimport e from \"react-dom\";\nimport * as r from \"react\";\nimport l from \"@babel/runtime/helpers/esm/extends\";\nexport var Portal = /*#__PURE__*/r.forwardRef(function (a, i) {\n var n, d;\n\n var s = a.containerRef,\n u = a.style,\n c = _objectWithoutProperties(a, _excluded),\n m = null !== (n = null == s ? void 0 : s.current) && void 0 !== n ? n : null === globalThis || void 0 === globalThis || null === (d = globalThis.document) || void 0 === d ? void 0 : d.body,\n _r$useState = r.useState({}),\n _r$useState2 = _slicedToArray(_r$useState, 2),\n f = _r$useState2[1];\n\n return t(function () {\n f({});\n }, []), m ? /*#__PURE__*/e.createPortal( /*#__PURE__*/r.createElement(o.div, l({\n \"data-radix-portal\": \"\"\n }, c, {\n ref: i,\n style: m === document.body ? _objectSpread({\n position: \"absolute\",\n top: 0,\n left: 0,\n zIndex: 2147483647\n }, u) : void 0\n })), m) : null;\n});\n/*#__PURE__*/\n\nexport var UnstablePortal = /*#__PURE__*/r.forwardRef(function (t, a) {\n var i;\n\n var _t$container = t.container,\n n = _t$container === void 0 ? null === globalThis || void 0 === globalThis || null === (i = globalThis.document) || void 0 === i ? void 0 : i.body : _t$container,\n d = _objectWithoutProperties(t, _excluded2);\n\n return n ? /*#__PURE__*/e.createPortal( /*#__PURE__*/r.createElement(o.div, l({}, d, {\n ref: a\n })), n) : null;\n});\n/*#__PURE__*/\n\nexport var Root = Portal;","var _excluded = [\"children\", \"width\", \"height\"];\n\nfunction _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; }\n\nfunction _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; }\n\nimport { Primitive as e } from \"@radix-ui/react-primitive\";\nimport * as r from \"react\";\nimport t from \"@babel/runtime/helpers/esm/extends\";\nexport var Arrow = /*#__PURE__*/r.forwardRef(function (o, i) {\n var n = o.children,\n _o$width = o.width,\n s = _o$width === void 0 ? 10 : _o$width,\n _o$height = o.height,\n m = _o$height === void 0 ? 5 : _o$height,\n p = _objectWithoutProperties(o, _excluded);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/r.createElement(e.svg, t({}, p, {\n ref: i,\n width: s,\n height: m,\n viewBox: \"0 0 30 10\",\n preserveAspectRatio: \"none\"\n }), o.asChild ? n : /*#__PURE__*/r.createElement(\"polygon\", {\n points: \"0,0 30,0 15,10\"\n }));\n});\n/*#__PURE__*/\n\nexport var Root = Arrow;","export function observeElementRect(n, o) {\n var i = e.get(n);\n return void 0 === i ? (e.set(n, {\n rect: {},\n callbacks: [o]\n }), 1 === e.size && (t = requestAnimationFrame(c))) : (i.callbacks.push(o), o(n.getBoundingClientRect())), function () {\n var c = e.get(n);\n if (void 0 === c) return;\n var i = c.callbacks.indexOf(o);\n i > -1 && c.callbacks.splice(i, 1), 0 === c.callbacks.length && (e[\"delete\"](n), 0 === e.size && cancelAnimationFrame(t));\n };\n}\nvar t;\nvar e = new Map();\n\nfunction c() {\n var n = [];\n e.forEach(function (t, e) {\n var c = e.getBoundingClientRect();\n var o, i;\n o = t.rect, i = c, (o.width !== i.width || o.height !== i.height || o.top !== i.top || o.right !== i.right || o.bottom !== i.bottom || o.left !== i.left) && (t.rect = c, n.push(t));\n }), n.forEach(function (t) {\n t.callbacks.forEach(function (e) {\n return e(t.rect);\n });\n }), t = requestAnimationFrame(c);\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport * as e from \"react\";\nexport function useSize(r) {\n var _e$useState = e.useState(void 0),\n _e$useState2 = _slicedToArray(_e$useState, 2),\n i = _e$useState2[0],\n t = _e$useState2[1];\n\n return e.useEffect(function () {\n if (r) {\n var _e2 = new ResizeObserver(function (e) {\n if (!Array.isArray(e)) return;\n if (!e.length) return;\n var i = e[0];\n var o, n;\n\n if (\"borderBoxSize\" in i) {\n var _e3 = i.borderBoxSize,\n _r = Array.isArray(_e3) ? _e3[0] : _e3;\n\n o = _r.inlineSize, n = _r.blockSize;\n } else {\n var _e4 = r.getBoundingClientRect();\n\n o = _e4.width, n = _e4.height;\n }\n\n t({\n width: o,\n height: n\n });\n });\n\n return _e2.observe(r, {\n box: \"border-box\"\n }), function () {\n return _e2.unobserve(r);\n };\n }\n\n t(void 0);\n }, [r]), i;\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { observeElementRect as t } from \"@radix-ui/rect\";\nimport * as r from \"react\";\nexport function useRect(e) {\n var _r$useState = r.useState(),\n _r$useState2 = _slicedToArray(_r$useState, 2),\n o = _r$useState2[0],\n c = _r$useState2[1];\n\n return r.useEffect(function () {\n if (e) {\n var _r = t(e, c);\n\n return function () {\n c(void 0), _r();\n };\n }\n }, [e]), o;\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nexport var SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nexport var ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nexport function getPlacementData(_ref) {\n var p = _ref.anchorRect,\n c = _ref.popperSize,\n f = _ref.arrowSize,\n _ref$arrowOffset = _ref.arrowOffset,\n l = _ref$arrowOffset === void 0 ? 0 : _ref$arrowOffset,\n d = _ref.side,\n _ref$sideOffset = _ref.sideOffset,\n h = _ref$sideOffset === void 0 ? 0 : _ref$sideOffset,\n x = _ref.align,\n _ref$alignOffset = _ref.alignOffset,\n g = _ref$alignOffset === void 0 ? 0 : _ref$alignOffset,\n _ref$shouldAvoidColli = _ref.shouldAvoidCollisions,\n u = _ref$shouldAvoidColli === void 0 ? !0 : _ref$shouldAvoidColli,\n w = _ref.collisionBoundariesRect,\n _ref$collisionToleran = _ref.collisionTolerance,\n m = _ref$collisionToleran === void 0 ? 0 : _ref$collisionToleran;\n if (!p || !c || !w) return {\n popperStyles: o,\n arrowStyles: n\n };\n\n var y = function (e, r) {\n var o = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var i = arguments.length > 4 ? arguments[4] : undefined;\n var p = i ? i.height : 0,\n a = t(r, e, \"x\"),\n s = t(r, e, \"y\"),\n c = s.before - o - p,\n f = s.after + o + p,\n l = a.before - o - p,\n d = a.after + o + p;\n return {\n top: {\n start: {\n x: a.start + n,\n y: c\n },\n center: {\n x: a.center,\n y: c\n },\n end: {\n x: a.end - n,\n y: c\n }\n },\n right: {\n start: {\n x: d,\n y: s.start + n\n },\n center: {\n x: d,\n y: s.center\n },\n end: {\n x: d,\n y: s.end - n\n }\n },\n bottom: {\n start: {\n x: a.start + n,\n y: f\n },\n center: {\n x: a.center,\n y: f\n },\n end: {\n x: a.end - n,\n y: f\n }\n },\n left: {\n start: {\n x: l,\n y: s.start + n\n },\n center: {\n x: l,\n y: s.center\n },\n end: {\n x: l,\n y: s.end - n\n }\n }\n };\n }(c, p, h, g, f),\n b = y[d][x];\n\n if (!1 === u) {\n var _t = e(b);\n\n var _o = n;\n f && (_o = i({\n popperSize: c,\n arrowSize: f,\n arrowOffset: l,\n side: d,\n align: x\n }));\n return {\n popperStyles: _objectSpread(_objectSpread({}, _t), {}, {\n \"--radix-popper-transform-origin\": r(c, d, x, l, f)\n }),\n arrowStyles: _o,\n placedSide: d,\n placedAlign: x\n };\n }\n\n var S = DOMRect.fromRect(_objectSpread(_objectSpread({}, c), b)),\n $ = (O = w, z = m, DOMRect.fromRect({\n width: O.width - 2 * z,\n height: O.height - 2 * z,\n x: O.left + z,\n y: O.top + z\n }));\n var O, z;\n\n var R = s(S, $),\n M = y[a(d)][x],\n D = function (t, e, r) {\n var o = a(t);\n return e[t] && !r[o] ? o : t;\n }(d, R, s(DOMRect.fromRect(_objectSpread(_objectSpread({}, c), M)), $)),\n A = function (t, e, r, o, n) {\n var i = \"top\" === r || \"bottom\" === r,\n p = i ? \"left\" : \"top\",\n a = i ? \"right\" : \"bottom\",\n s = i ? \"width\" : \"height\",\n c = e[s] > t[s];\n if ((\"start\" === o || \"center\" === o) && (n[p] && c || n[a] && !c)) return \"end\";\n if ((\"end\" === o || \"center\" === o) && (n[a] && c || n[p] && !c)) return \"start\";\n return o;\n }(c, p, d, x, R),\n I = e(y[D][A]);\n\n var C = n;\n f && (C = i({\n popperSize: c,\n arrowSize: f,\n arrowOffset: l,\n side: D,\n align: A\n }));\n return {\n popperStyles: _objectSpread(_objectSpread({}, I), {}, {\n \"--radix-popper-transform-origin\": r(c, D, A, l, f)\n }),\n arrowStyles: C,\n placedSide: D,\n placedAlign: A\n };\n}\n\nfunction t(t, e, r) {\n var o = t[\"x\" === r ? \"left\" : \"top\"],\n n = \"x\" === r ? \"width\" : \"height\",\n i = t[n],\n p = e[n];\n return {\n before: o - p,\n start: o,\n center: o + (i - p) / 2,\n end: o + i - p,\n after: o + i\n };\n}\n\nfunction e(t) {\n return {\n position: \"absolute\",\n top: 0,\n left: 0,\n minWidth: \"max-content\",\n willChange: \"transform\",\n transform: \"translate3d(\".concat(Math.round(t.x + window.scrollX), \"px, \").concat(Math.round(t.y + window.scrollY), \"px, 0)\")\n };\n}\n\nfunction r(t, e, r, o, n) {\n var i = \"top\" === e || \"bottom\" === e,\n p = n ? n.width : 0,\n a = n ? n.height : 0,\n s = p / 2 + o;\n var c = \"\",\n f = \"\";\n return i ? (c = {\n start: \"\".concat(s, \"px\"),\n center: \"center\",\n end: t.width - s + \"px\"\n }[r], f = \"top\" === e ? \"\".concat(t.height + a, \"px\") : -a + \"px\") : (c = \"left\" === e ? \"\".concat(t.width + a, \"px\") : -a + \"px\", f = {\n start: \"\".concat(s, \"px\"),\n center: \"center\",\n end: t.height - s + \"px\"\n }[r]), \"\".concat(c, \" \").concat(f);\n}\n\nvar o = {\n position: \"fixed\",\n top: 0,\n left: 0,\n opacity: 0,\n transform: \"translate3d(0, -200%, 0)\"\n},\n n = {\n position: \"absolute\",\n opacity: 0\n};\n\nfunction i(_ref2) {\n var _f;\n\n var t = _ref2.popperSize,\n e = _ref2.arrowSize,\n r = _ref2.arrowOffset,\n o = _ref2.side,\n n = _ref2.align;\n var i = (t.width - e.width) / 2,\n a = (t.height - e.width) / 2,\n s = {\n top: 0,\n right: 90,\n bottom: 180,\n left: -90\n }[o],\n c = Math.max(e.width, e.height),\n f = (_f = {\n width: \"\".concat(c, \"px\"),\n height: \"\".concat(c, \"px\"),\n transform: \"rotate(\".concat(s, \"deg)\"),\n willChange: \"transform\",\n position: \"absolute\"\n }, _defineProperty(_f, o, \"100%\"), _defineProperty(_f, \"direction\", p(o, n)), _f);\n return \"top\" !== o && \"bottom\" !== o || (\"start\" === n && (f.left = \"\".concat(r, \"px\")), \"center\" === n && (f.left = \"\".concat(i, \"px\")), \"end\" === n && (f.right = \"\".concat(r, \"px\"))), \"left\" !== o && \"right\" !== o || (\"start\" === n && (f.top = \"\".concat(r, \"px\")), \"center\" === n && (f.top = \"\".concat(a, \"px\")), \"end\" === n && (f.bottom = \"\".concat(r, \"px\"))), f;\n}\n\nfunction p(t, e) {\n return (\"top\" !== t && \"right\" !== t || \"end\" !== e) && (\"bottom\" !== t && \"left\" !== t || \"end\" === e) ? \"ltr\" : \"rtl\";\n}\n\nfunction a(t) {\n return {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n }[t];\n}\n\nfunction s(t, e) {\n return {\n top: t.top < e.top,\n right: t.right > e.right,\n bottom: t.bottom > e.bottom,\n left: t.left < e.left\n };\n}","var _excluded = [\"__scopePopper\", \"virtualRef\"],\n _excluded2 = [\"__scopePopper\", \"side\", \"sideOffset\", \"align\", \"alignOffset\", \"collisionTolerance\", \"avoidCollisions\"],\n _excluded3 = [\"__scopePopper\", \"offset\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport * as e from \"@radix-ui/react-arrow\";\nimport { Primitive as o } from \"@radix-ui/react-primitive\";\nimport { useSize as r } from \"@radix-ui/react-use-size\";\nimport { useRect as t } from \"@radix-ui/react-use-rect\";\nimport { createContextScope as n } from \"@radix-ui/react-context\";\nimport { useComposedRefs as i } from \"@radix-ui/react-compose-refs\";\nimport { getPlacementData as p } from \"@radix-ui/popper\";\nimport * as s from \"react\";\nimport a from \"@babel/runtime/helpers/esm/extends\";\n\nvar _n = n(\"Popper\"),\n _n2 = _slicedToArray(_n, 2),\n c = _n2[0],\n l = _n2[1];\n\nexport { l as createPopperScope };\n\nvar _c = c(\"Popper\"),\n _c2 = _slicedToArray(_c, 2),\n f = _c2[0],\n d = _c2[1];\n\nexport var Popper = function Popper(e) {\n var o = e.__scopePopper,\n r = e.children,\n _s$useState = s.useState(null),\n _s$useState2 = _slicedToArray(_s$useState, 2),\n t = _s$useState2[0],\n n = _s$useState2[1];\n /*#__PURE__*/\n\n\n return /*#__PURE__*/s.createElement(f, {\n scope: o,\n anchor: t,\n onAnchorChange: n\n }, r);\n};\n/*#__PURE__*/\n\nexport var PopperAnchor = /*#__PURE__*/s.forwardRef(function (e, r) {\n var t = e.__scopePopper,\n n = e.virtualRef,\n p = _objectWithoutProperties(e, _excluded),\n c = d(\"PopperAnchor\", t),\n l = s.useRef(null),\n f = i(r, l);\n\n return s.useEffect(function () {\n c.onAnchorChange((null == n ? void 0 : n.current) || l.current);\n }), n ? null : /*#__PURE__*/s.createElement(o.div, a({}, p, {\n ref: f\n }));\n});\n/*#__PURE__*/\n\nvar _c3 = c(\"PopperContent\"),\n _c4 = _slicedToArray(_c3, 2),\n u = _c4[0],\n m = _c4[1];\n\nexport var PopperContent = /*#__PURE__*/s.forwardRef(function (e, n) {\n var c = e.__scopePopper,\n _e$side = e.side,\n l = _e$side === void 0 ? \"bottom\" : _e$side,\n f = e.sideOffset,\n _e$align = e.align,\n m = _e$align === void 0 ? \"center\" : _e$align,\n w = e.alignOffset,\n h = e.collisionTolerance,\n _e$avoidCollisions = e.avoidCollisions,\n x = _e$avoidCollisions === void 0 ? !0 : _e$avoidCollisions,\n v = _objectWithoutProperties(e, _excluded2),\n P = d(\"PopperContent\", c),\n _s$useState3 = s.useState(),\n _s$useState4 = _slicedToArray(_s$useState3, 2),\n A = _s$useState4[0],\n g = _s$useState4[1],\n E = t(P.anchor),\n _s$useState5 = s.useState(null),\n _s$useState6 = _slicedToArray(_s$useState5, 2),\n y = _s$useState6[0],\n C = _s$useState6[1],\n S = r(y),\n _s$useState7 = s.useState(null),\n _s$useState8 = _slicedToArray(_s$useState7, 2),\n R = _s$useState8[0],\n O = _s$useState8[1],\n _ = r(R),\n b = i(n, function (e) {\n return C(e);\n }),\n z = function () {\n var _s$useState9 = s.useState(void 0),\n _s$useState10 = _slicedToArray(_s$useState9, 2),\n e = _s$useState10[0],\n o = _s$useState10[1];\n\n return s.useEffect(function () {\n var e;\n\n function r() {\n o({\n width: window.innerWidth,\n height: window.innerHeight\n });\n }\n\n function t() {\n window.clearTimeout(e), e = window.setTimeout(r, 100);\n }\n\n return r(), window.addEventListener(\"resize\", t), function () {\n return window.removeEventListener(\"resize\", t);\n };\n }, []), e;\n }(),\n T = z ? DOMRect.fromRect(_objectSpread(_objectSpread({}, z), {}, {\n x: 0,\n y: 0\n })) : void 0,\n _p = p({\n anchorRect: E,\n popperSize: S,\n arrowSize: _,\n arrowOffset: A,\n side: l,\n sideOffset: f,\n align: m,\n alignOffset: w,\n shouldAvoidCollisions: x,\n collisionBoundariesRect: T,\n collisionTolerance: h\n }),\n k = _p.popperStyles,\n L = _p.arrowStyles,\n B = _p.placedSide,\n D = _p.placedAlign,\n H = void 0 !== B;\n /*#__PURE__*/\n\n\n return /*#__PURE__*/s.createElement(\"div\", {\n style: k,\n \"data-radix-popper-content-wrapper\": \"\"\n }, /*#__PURE__*/s.createElement(u, {\n scope: c,\n arrowStyles: L,\n onArrowChange: O,\n onArrowOffsetChange: g\n }, /*#__PURE__*/s.createElement(o.div, a({\n \"data-side\": B,\n \"data-align\": D\n }, v, {\n style: _objectSpread(_objectSpread({}, v.style), {}, {\n animation: H ? void 0 : \"none\"\n }),\n ref: b\n }))));\n});\n/*#__PURE__*/\n\nexport var PopperArrow = /*#__PURE__*/s.forwardRef(function (o, r) {\n var t = o.__scopePopper,\n n = o.offset,\n i = _objectWithoutProperties(o, _excluded3),\n p = m(\"PopperArrow\", t),\n c = p.onArrowOffsetChange;\n\n return s.useEffect(function () {\n return c(n);\n }, [c, n]), /*#__PURE__*/s.createElement(\"span\", {\n style: _objectSpread(_objectSpread({}, p.arrowStyles), {}, {\n pointerEvents: \"none\"\n })\n }, /*#__PURE__*/s.createElement(\"span\", {\n ref: p.onArrowChange,\n style: {\n display: \"inline-block\",\n verticalAlign: \"top\",\n pointerEvents: \"auto\"\n }\n }, /*#__PURE__*/s.createElement(e.Root, a({}, i, {\n ref: r,\n style: _objectSpread(_objectSpread({}, i.style), {}, {\n display: \"block\"\n })\n }))));\n});\n/*#__PURE__*/\n\nexport var Root = Popper;\nexport var Anchor = PopperAnchor;\nexport var Content = PopperContent;\nexport var Arrow = PopperArrow;","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useLayoutEffect as e } from \"@radix-ui/react-use-layout-effect\";\nimport { useComposedRefs as n } from \"@radix-ui/react-compose-refs\";\nimport * as t from \"react\";\nexport var Presence = function Presence(u) {\n var o = u.present,\n i = u.children,\n s = function (n) {\n var _t$useState = t.useState(),\n _t$useState2 = _slicedToArray(_t$useState, 2),\n u = _t$useState2[0],\n o = _t$useState2[1],\n i = t.useRef({}),\n s = t.useRef(n),\n c = t.useRef(\"none\"),\n a = n ? \"mounted\" : \"unmounted\",\n _ref = function (e, n) {\n return t.useReducer(function (e, t) {\n var r = n[e][t];\n return null != r ? r : e;\n }, e);\n }(a, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n }),\n _ref2 = _slicedToArray(_ref, 2),\n d = _ref2[0],\n m = _ref2[1];\n\n return t.useEffect(function () {\n var e = r(i.current);\n c.current = \"mounted\" === d ? e : \"none\";\n }, [d]), e(function () {\n var e = i.current,\n t = s.current;\n\n if (t !== n) {\n var _u = c.current,\n _o = r(e);\n\n if (n) m(\"MOUNT\");else if (\"none\" === _o || \"none\" === (null == e ? void 0 : e.display)) m(\"UNMOUNT\");else {\n var _e2 = _u !== _o;\n\n m(t && _e2 ? \"ANIMATION_OUT\" : \"UNMOUNT\");\n }\n s.current = n;\n }\n }, [n, m]), e(function () {\n if (u) {\n var _e3 = function _e3(e) {\n var n = r(i.current).includes(e.animationName);\n e.target === u && n && m(\"ANIMATION_END\");\n },\n _n2 = function _n2(e) {\n e.target === u && (c.current = r(i.current));\n };\n\n return u.addEventListener(\"animationstart\", _n2), u.addEventListener(\"animationcancel\", _e3), u.addEventListener(\"animationend\", _e3), function () {\n u.removeEventListener(\"animationstart\", _n2), u.removeEventListener(\"animationcancel\", _e3), u.removeEventListener(\"animationend\", _e3);\n };\n }\n\n m(\"ANIMATION_END\");\n }, [u, m]), {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(d),\n ref: t.useCallback(function (e) {\n e && (i.current = getComputedStyle(e)), o(e);\n }, [])\n };\n }(o),\n c = \"function\" == typeof i ? i({\n present: s.isPresent\n }) : t.Children.only(i),\n a = n(s.ref, c.ref);\n\n return \"function\" == typeof i || s.isPresent ? /*#__PURE__*/t.cloneElement(c, {\n ref: a\n }) : null;\n};\n\nfunction r(e) {\n return (null == e ? void 0 : e.animationName) || \"none\";\n}\n\nPresence.displayName = \"Presence\";","var _excluded = [\"loop\", \"trapped\", \"onMountAutoFocus\", \"onUnmountAutoFocus\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _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.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _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(_e3) { throw _e3; }, 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(_e4) { didErr = true; err = _e4; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _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; }\n\nfunction _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; }\n\nimport { useCallbackRef as e } from \"@radix-ui/react-use-callback-ref\";\nimport { Primitive as t } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs as n } from \"@radix-ui/react-compose-refs\";\nimport * as o from \"react\";\nimport u from \"@babel/runtime/helpers/esm/extends\";\nvar c = {\n bubbles: !1,\n cancelable: !0\n};\nexport var FocusScope = /*#__PURE__*/o.forwardRef(function (i, f) {\n var _i$loop = i.loop,\n l = _i$loop === void 0 ? !1 : _i$loop,\n _i$trapped = i.trapped,\n m = _i$trapped === void 0 ? !1 : _i$trapped,\n p = i.onMountAutoFocus,\n v = i.onUnmountAutoFocus,\n E = _objectWithoutProperties(i, _excluded),\n _o$useState = o.useState(null),\n _o$useState2 = _slicedToArray(_o$useState, 2),\n F = _o$useState2[0],\n S = _o$useState2[1],\n b = e(p),\n T = e(v),\n y = o.useRef(null),\n L = n(f, function (e) {\n return S(e);\n }),\n h = o.useRef({\n paused: !1,\n pause: function pause() {\n this.paused = !0;\n },\n resume: function resume() {\n this.paused = !1;\n }\n }).current;\n\n o.useEffect(function () {\n if (m) {\n var _e2 = function _e2(e) {\n if (h.paused || !F) return;\n var t = e.target;\n F.contains(t) ? y.current = t : a(y.current, {\n select: !0\n });\n };\n\n var _t = function _t(e) {\n !h.paused && F && (F.contains(e.relatedTarget) || a(y.current, {\n select: !0\n }));\n };\n\n return document.addEventListener(\"focusin\", _e2), document.addEventListener(\"focusout\", _t), function () {\n document.removeEventListener(\"focusin\", _e2), document.removeEventListener(\"focusout\", _t);\n };\n }\n }, [m, F, h.paused]), o.useEffect(function () {\n if (F) {\n d.add(h);\n var _t2 = document.activeElement;\n\n if (!F.contains(_t2)) {\n var _n2 = new Event(\"focusScope.autoFocusOnMount\", c);\n\n F.addEventListener(\"focusScope.autoFocusOnMount\", b), F.dispatchEvent(_n2), _n2.defaultPrevented || (!function (e) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$select = _ref.select,\n t = _ref$select === void 0 ? !1 : _ref$select;\n\n var n = document.activeElement;\n\n var _iterator = _createForOfIteratorHelper(e),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _o = _step.value;\n if (a(_o, {\n select: t\n }), document.activeElement !== n) return;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }((e = r(F), e.filter(function (e) {\n return \"A\" !== e.tagName;\n })), {\n select: !0\n }), document.activeElement === _t2 && a(F));\n }\n\n return function () {\n F.removeEventListener(\"focusScope.autoFocusOnMount\", b), setTimeout(function () {\n var e = new Event(\"focusScope.autoFocusOnUnmount\", c);\n F.addEventListener(\"focusScope.autoFocusOnUnmount\", T), F.dispatchEvent(e), e.defaultPrevented || a(null != _t2 ? _t2 : document.body, {\n select: !0\n }), F.removeEventListener(\"focusScope.autoFocusOnUnmount\", T), d.remove(h);\n }, 0);\n };\n }\n\n var e;\n }, [F, b, T, h]);\n var N = o.useCallback(function (e) {\n if (!l && !m) return;\n if (h.paused) return;\n var t = \"Tab\" === e.key && !e.altKey && !e.ctrlKey && !e.metaKey,\n n = document.activeElement;\n\n if (t && n) {\n var _t3 = e.currentTarget,\n _ref2 = function (e) {\n var t = r(e),\n n = s(t, e),\n o = s(t.reverse(), e);\n return [n, o];\n }(_t3),\n _ref3 = _slicedToArray(_ref2, 2),\n _o2 = _ref3[0],\n _u = _ref3[1];\n\n _o2 && _u ? e.shiftKey || n !== _u ? e.shiftKey && n === _o2 && (e.preventDefault(), l && a(_u, {\n select: !0\n })) : (e.preventDefault(), l && a(_o2, {\n select: !0\n })) : n === _t3 && e.preventDefault();\n }\n }, [l, m, h.paused]);\n /*#__PURE__*/\n\n return /*#__PURE__*/o.createElement(t.div, u({\n tabIndex: -1\n }, E, {\n ref: L,\n onKeyDown: N\n }));\n});\n/*#__PURE__*/\n\nfunction r(e) {\n var t = [],\n n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {\n acceptNode: function acceptNode(e) {\n var t = \"INPUT\" === e.tagName && \"hidden\" === e.type;\n return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n\n for (; n.nextNode();) {\n t.push(n.currentNode);\n }\n\n return t;\n}\n\nfunction s(e, t) {\n var _iterator2 = _createForOfIteratorHelper(e),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _n3 = _step2.value;\n if (!i(_n3, {\n upTo: t\n })) return _n3;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n}\n\nfunction i(e, _ref4) {\n var t = _ref4.upTo;\n if (\"hidden\" === getComputedStyle(e).visibility) return !0;\n\n for (; e;) {\n if (void 0 !== t && e === t) return !1;\n if (\"none\" === getComputedStyle(e).display) return !0;\n e = e.parentElement;\n }\n\n return !1;\n}\n\nfunction a(e) {\n var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref5$select = _ref5.select,\n t = _ref5$select === void 0 ? !1 : _ref5$select;\n\n if (e && e.focus) {\n var _n4 = document.activeElement;\n e.focus({\n preventScroll: !0\n }), e !== _n4 && function (e) {\n return e instanceof HTMLInputElement && \"select\" in e;\n }(e) && t && e.select();\n }\n}\n\nvar d = function () {\n var e = [];\n return {\n add: function add(t) {\n var n = e[0];\n t !== n && (null == n || n.pause()), e = f(e, t), e.unshift(t);\n },\n remove: function remove(t) {\n var n;\n e = f(e, t), null === (n = e[0]) || void 0 === n || n.resume();\n }\n };\n}();\n\nfunction f(e, t) {\n var n = _toConsumableArray(e),\n o = n.indexOf(t);\n\n return -1 !== o && n.splice(o, 1), n;\n}\n\nexport var Root = FocusScope;","import { useLayoutEffect as e } from \"@radix-ui/react-use-layout-effect\";\nimport * as t from \"react\";\nvar n,\n o = 0;\nexport function useBodyPointerEvents(_ref) {\n var r = _ref.disabled;\n var i = t.useRef(!1);\n e(function () {\n if (r) {\n var _e = function _e() {\n o--, 0 === o && (document.body.style.pointerEvents = n);\n };\n\n var _t = function _t(e) {\n i.current = \"mouse\" !== e.pointerType;\n };\n\n return 0 === o && (n = document.body.style.pointerEvents), document.body.style.pointerEvents = \"none\", o++, document.addEventListener(\"pointerup\", _t), function () {\n i.current ? document.addEventListener(\"click\", _e, {\n once: !0\n }) : _e(), document.removeEventListener(\"pointerup\", _t);\n };\n }\n }, [r]);\n}","var _excluded = [\"disableOutsidePointerEvents\", \"onEscapeKeyDown\", \"onPointerDownOutside\", \"onFocusOutside\", \"onInteractOutside\", \"onDismiss\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _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.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _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; }\n\nfunction _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; }\n\nimport { useEscapeKeydown as e } from \"@radix-ui/react-use-escape-keydown\";\nimport { useCallbackRef as t } from \"@radix-ui/react-use-callback-ref\";\nimport { useBodyPointerEvents as n } from \"@radix-ui/react-use-body-pointer-events\";\nimport { useComposedRefs as r } from \"@radix-ui/react-compose-refs\";\nimport { Primitive as s } from \"@radix-ui/react-primitive\";\nimport { composeEventHandlers as o } from \"@radix-ui/primitive\";\nimport * as i from \"react\";\nimport a from \"@babel/runtime/helpers/esm/extends\";\nvar u = /*#__PURE__*/i.createContext({\n layers: new Set(),\n layersWithOutsidePointerEventsDisabled: new Set(),\n branches: new Set()\n});\nexport var DismissableLayer = /*#__PURE__*/i.forwardRef(function (l, m) {\n var _l$disableOutsidePoin = l.disableOutsidePointerEvents,\n f = _l$disableOutsidePoin === void 0 ? !1 : _l$disableOutsidePoin,\n p = l.onEscapeKeyDown,\n v = l.onPointerDownOutside,\n b = l.onFocusOutside,\n E = l.onInteractOutside,\n y = l.onDismiss,\n w = _objectWithoutProperties(l, _excluded),\n h = i.useContext(u),\n _i$useState = i.useState(null),\n _i$useState2 = _slicedToArray(_i$useState, 2),\n D = _i$useState2[0],\n x = _i$useState2[1],\n _i$useState3 = i.useState({}),\n _i$useState4 = _slicedToArray(_i$useState3, 2),\n C = _i$useState4[1],\n L = r(m, function (e) {\n return x(e);\n }),\n P = Array.from(h.layers),\n _slice = _toConsumableArray(h.layersWithOutsidePointerEventsDisabled).slice(-1),\n _slice2 = _slicedToArray(_slice, 1),\n O = _slice2[0],\n g = P.indexOf(O),\n B = D ? P.indexOf(D) : -1,\n R = h.layersWithOutsidePointerEventsDisabled.size > 0,\n F = B >= g,\n S = function (e) {\n var n = t(e),\n r = i.useRef(!1);\n return i.useEffect(function () {\n var e = function e(_e2) {\n if (_e2.target && !r.current) {\n d(\"dismissableLayer.pointerDownOutside\", n, {\n originalEvent: _e2\n });\n }\n\n r.current = !1;\n },\n t = window.setTimeout(function () {\n document.addEventListener(\"pointerdown\", e);\n }, 0);\n\n return function () {\n window.clearTimeout(t), document.removeEventListener(\"pointerdown\", e);\n };\n }, [n]), {\n onPointerDownCapture: function onPointerDownCapture() {\n return r.current = !0;\n }\n };\n }(function (e) {\n var t = e.target,\n n = _toConsumableArray(h.branches).some(function (e) {\n return e.contains(t);\n });\n\n F && !n && (null == v || v(e), null == E || E(e), e.defaultPrevented || null == y || y());\n }),\n W = function (e) {\n var n = t(e),\n r = i.useRef(!1);\n return i.useEffect(function () {\n var e = function e(_e3) {\n if (_e3.target && !r.current) {\n d(\"dismissableLayer.focusOutside\", n, {\n originalEvent: _e3\n });\n }\n };\n\n return document.addEventListener(\"focusin\", e), function () {\n return document.removeEventListener(\"focusin\", e);\n };\n }, [n]), {\n onFocusCapture: function onFocusCapture() {\n return r.current = !0;\n },\n onBlurCapture: function onBlurCapture() {\n return r.current = !1;\n }\n };\n }(function (e) {\n var t = e.target;\n _toConsumableArray(h.branches).some(function (e) {\n return e.contains(t);\n }) || (null == b || b(e), null == E || E(e), e.defaultPrevented || null == y || y());\n });\n\n return e(function (e) {\n B === h.layers.size - 1 && (null == p || p(e), e.defaultPrevented || null == y || y());\n }), n({\n disabled: f\n }), i.useEffect(function () {\n D && (f && h.layersWithOutsidePointerEventsDisabled.add(D), h.layers.add(D), c());\n }, [D, f, h]), i.useEffect(function () {\n return function () {\n D && (h.layers[\"delete\"](D), h.layersWithOutsidePointerEventsDisabled[\"delete\"](D), c());\n };\n }, [D, h]), i.useEffect(function () {\n var e = function e() {\n return C({});\n };\n\n return document.addEventListener(\"dismissableLayer.update\", e), function () {\n return document.removeEventListener(\"dismissableLayer.update\", e);\n };\n }, []), /*#__PURE__*/i.createElement(s.div, a({}, w, {\n ref: L,\n style: _objectSpread({\n pointerEvents: R ? F ? \"auto\" : \"none\" : void 0\n }, l.style),\n onFocusCapture: o(l.onFocusCapture, W.onFocusCapture),\n onBlurCapture: o(l.onBlurCapture, W.onBlurCapture),\n onPointerDownCapture: o(l.onPointerDownCapture, S.onPointerDownCapture)\n }));\n});\n/*#__PURE__*/\n\nexport var DismissableLayerBranch = /*#__PURE__*/i.forwardRef(function (e, t) {\n var n = i.useContext(u),\n o = i.useRef(null),\n c = r(t, o);\n return i.useEffect(function () {\n var e = o.current;\n if (e) return n.branches.add(e), function () {\n n.branches[\"delete\"](e);\n };\n }, [n.branches]), /*#__PURE__*/i.createElement(s.div, a({}, e, {\n ref: c\n }));\n});\n/*#__PURE__*/\n\nfunction c() {\n var e = new Event(\"dismissableLayer.update\");\n document.dispatchEvent(e);\n}\n\nfunction d(e, t, n) {\n var r = n.originalEvent.target,\n s = new CustomEvent(e, {\n bubbles: !1,\n cancelable: !0,\n detail: n\n });\n return t && r.addEventListener(e, t, {\n once: !0\n }), !r.dispatchEvent(s);\n}\n\nexport var Root = DismissableLayer;\nexport var Branch = DismissableLayerBranch;","import { useCallbackRef as e } from \"@radix-ui/react-use-callback-ref\";\nimport * as t from \"react\";\nexport function useEscapeKeydown(n) {\n var o = e(n);\n t.useEffect(function () {\n var e = function e(_e) {\n \"Escape\" === _e.key && o(_e);\n };\n\n return document.addEventListener(\"keydown\", e), function () {\n return document.removeEventListener(\"keydown\", e);\n };\n }, [o]);\n}","var getDefaultParent = function getDefaultParent(originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\n\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nexport var hideOthers = function hideOthers(originalTarget, parentNode, markerName) {\n if (parentNode === void 0) {\n parentNode = getDefaultParent(originalTarget);\n }\n\n if (markerName === void 0) {\n markerName = \"data-aria-hidden\";\n }\n\n var targets = Array.isArray(originalTarget) ? originalTarget : [originalTarget];\n\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n\n var keep = function keep(el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n\n targets.forEach(keep);\n\n var deep = function deep(parent) {\n if (!parent || targets.indexOf(parent) >= 0) {\n return;\n }\n\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n } else {\n var attr = node.getAttribute('aria-hidden');\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n\n if (!alreadyHidden) {\n node.setAttribute('aria-hidden', 'true');\n }\n }\n });\n };\n\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute('aria-hidden');\n }\n\n uncontrolledNodes[\"delete\"](node);\n }\n\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n\n if (!lockCount) {\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};","export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';","import * as tslib_1 from \"tslib\";\n\nfunction ItoI(a) {\n return a;\n}\n\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) {\n middleware = ItoI;\n }\n\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function read() {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n\n return defaults;\n },\n useMedium: function useMedium(data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) {\n return x !== item;\n });\n };\n },\n assignSyncMedium: function assignSyncMedium(cb) {\n assigned = true;\n\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n\n buffer = {\n push: function push(x) {\n return cb(x);\n },\n filter: function filter() {\n return buffer;\n }\n };\n },\n assignMedium: function assignMedium(cb) {\n assigned = true;\n var pendingQueue = [];\n\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n\n var executeQueue = function executeQueue() {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n\n var cycle = function cycle() {\n return Promise.resolve().then(executeQueue);\n };\n\n cycle();\n buffer = {\n push: function push(x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function filter(_filter) {\n pendingQueue = pendingQueue.filter(_filter);\n return buffer;\n }\n };\n }\n };\n return medium;\n}\n\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) {\n middleware = ItoI;\n }\n\n return innerCreateMedium(defaults, middleware);\n}\nexport function createSidecarMedium(options) {\n if (options === void 0) {\n options = {};\n }\n\n var medium = innerCreateMedium(null);\n medium.options = tslib_1.__assign({\n async: true,\n ssr: false\n }, options);\n return medium;\n}","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();","import { useCallbackRef } from './useRef';\nimport { assignRef } from './assignRef';\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return ...
\n * }\n */\n\nexport function useMergeRefs(refs, defaultValue) {\n return useCallbackRef(defaultValue, function (newValue) {\n return refs.forEach(function (ref) {\n return assignRef(ref, newValue);\n });\n });\n}","import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\n\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () {\n return {\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n\n set current(value) {\n var last = ref.value;\n\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n }\n\n }\n };\n })[0]; // update callback\n\n ref.callback = callback;\n return ref.facade;\n}","/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n\n return ref;\n}","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { effectCar } from './medium';\nimport { useMergeRefs } from 'use-callback-ref';\n\nvar nothing = function nothing() {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\n\n\nvar RemoveScroll = /*#__PURE__*/React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing\n }),\n callbacks = _a[0],\n setCallbacks = _a[1];\n\n var forwardProps = props.forwardProps,\n children = props.children,\n className = props.className,\n removeScrollBar = props.removeScrollBar,\n enabled = props.enabled,\n shards = props.shards,\n sideCar = props.sideCar,\n noIsolation = props.noIsolation,\n inert = props.inert,\n allowPinchZoom = props.allowPinchZoom,\n _b = props.as,\n Container = _b === void 0 ? 'div' : _b,\n rest = tslib_1.__rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\"]);\n\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n\n var containerProps = tslib_1.__assign({}, rest, callbacks);\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, enabled && /*#__PURE__*/React.createElement(SideCar, {\n sideCar: effectCar,\n removeScrollBar: removeScrollBar,\n shards: shards,\n noIsolation: noIsolation,\n inert: inert,\n setCallbacks: setCallbacks,\n allowPinchZoom: !!allowPinchZoom,\n lockRef: ref\n }), forwardProps ? /*#__PURE__*/React.cloneElement(React.Children.only(children), tslib_1.__assign({}, containerProps, {\n ref: containerRef\n })) : /*#__PURE__*/React.createElement(Container, tslib_1.__assign({}, containerProps, {\n className: className,\n ref: containerRef\n }), children));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName\n};\nexport { RemoveScroll };","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\n\nvar SideCar = function SideCar(_a) {\n var sideCar = _a.sideCar,\n rest = tslib_1.__rest(_a, [\"sideCar\"]);\n\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n\n var Target = sideCar.read();\n\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n\n return /*#__PURE__*/React.createElement(Target, tslib_1.__assign({}, rest));\n};\n\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}","var currentNonce;\nexport var setNonce = function setNonce(nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function getNonce() {\n if (currentNonce) {\n return currentNonce;\n }\n\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n\n return undefined;\n};","import { getNonce } from \"get-nonce\";\n\nfunction makeStyleTag() {\n if (!document) return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n\n return tag;\n}\n\nfunction injectStyles(tag, css) {\n if (tag.styleSheet) {\n tag.styleSheet.cssText = css;\n } else {\n tag.appendChild(document.createTextNode(css));\n }\n}\n\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\n\nexport var stylesheetSingleton = function stylesheetSingleton() {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function add(style) {\n if (counter == 0) {\n if (stylesheet = makeStyleTag()) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n\n counter++;\n },\n remove: function remove() {\n counter--;\n\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n }\n };\n};","import { styleHookSingleton } from \"./hook\";\nexport var styleSingleton = function styleSingleton() {\n var useStyle = styleHookSingleton();\n\n var Sheet = function Sheet(_a) {\n var styles = _a.styles;\n useStyle(styles);\n return null;\n };\n\n return Sheet;\n};","import * as React from 'react';\nimport { stylesheetSingleton } from \"./singleton\";\nexport var styleHookSingleton = function styleHookSingleton() {\n var sheet = stylesheetSingleton();\n return function (styles) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, []);\n };\n};","export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0\n};\n\nvar parse = function parse(x) {\n return parseInt(x || '', 10) || 0;\n};\n\nvar getOffset = function getOffset(gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\n\nexport var getGapWidth = function getGapWidth(gapMode) {\n if (gapMode === void 0) {\n gapMode = 'margin';\n }\n\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])\n };\n};","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { getGapWidth } from './utils';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from \"./constants\";\nvar Style = styleSingleton();\n\nvar getStyles = function getStyles(_a, allowRelative, gapMode, important) {\n var left = _a.left,\n top = _a.top,\n right = _a.right,\n gap = _a.gap;\n\n if (gapMode === void 0) {\n gapMode = 'margin';\n }\n\n return \"\\n .\" + noScrollbarsClassName + \" {\\n overflow: hidden \" + important + \";\\n padding-right: \" + gap + \"px \" + important + \";\\n }\\n body {\\n overflow: hidden \" + important + \";\\n \" + [allowRelative && \"position: relative \" + important + \";\", gapMode === 'margin' && \"\\n padding-left: \" + left + \"px;\\n padding-top: \" + top + \"px;\\n padding-right: \" + right + \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \" + gap + \"px \" + important + \";\\n \", gapMode === 'padding' && \"padding-right: \" + gap + \"px \" + important + \";\"].filter(Boolean).join('') + \"\\n }\\n \\n .\" + zeroRightClassName + \" {\\n right: \" + gap + \"px \" + important + \";\\n }\\n \\n .\" + fullWidthClassName + \" {\\n margin-right: \" + gap + \"px \" + important + \";\\n }\\n \\n .\" + zeroRightClassName + \" .\" + zeroRightClassName + \" {\\n right: 0 \" + important + \";\\n }\\n \\n .\" + fullWidthClassName + \" .\" + fullWidthClassName + \" {\\n margin-right: 0 \" + important + \";\\n }\\n \\n body {\\n \" + removedBarSizeVariable + \": \" + gap + \"px;\\n }\\n\";\n};\n\nexport var RemoveScrollBar = function RemoveScrollBar(props) {\n var _a = React.useState(getGapWidth(props.gapMode)),\n gap = _a[0],\n setGap = _a[1];\n\n React.useEffect(function () {\n setGap(getGapWidth(props.gapMode));\n }, [props.gapMode]);\n var noRelative = props.noRelative,\n noImportant = props.noImportant,\n _b = props.gapMode,\n gapMode = _b === void 0 ? 'margin' : _b;\n return /*#__PURE__*/React.createElement(Style, {\n styles: getStyles(gap, !noRelative, gapMode, !noImportant ? \"!important\" : '')\n });\n};","var elementCouldBeVScrolled = function elementCouldBeVScrolled(node) {\n var styles = window.getComputedStyle(node);\n return styles.overflowY !== 'hidden' && // not-not-scrollable\n !(styles.overflowY === styles.overflowX && styles.overflowY === 'visible') // scrollable\n ;\n};\n\nvar elementCouldBeHScrolled = function elementCouldBeHScrolled(node) {\n var styles = window.getComputedStyle(node); // we allow horizontal scroll on range elements\n\n if (node.type === \"range\") {\n return true;\n }\n\n return styles.overflowX !== 'hidden' && // not-not-scrollable\n !(styles.overflowY === styles.overflowX && styles.overflowX === 'visible') // scrollable\n ;\n};\n\nexport var locationCouldBeScrolled = function locationCouldBeScrolled(axis, node) {\n var current = node;\n\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== \"undefined\" && current instanceof ShadowRoot) {\n current = current.host;\n }\n\n var isScrollable = elementCouldBeScrolled(axis, current);\n\n if (isScrollable) {\n var _a = getScrollVariables(axis, current),\n s = _a[1],\n d = _a[2];\n\n if (s > d) {\n return true;\n }\n }\n\n current = current.parentNode;\n } while (current && current !== document.body);\n\n return false;\n};\n\nvar getVScrollVariables = function getVScrollVariables(_a) {\n var scrollTop = _a.scrollTop,\n scrollHeight = _a.scrollHeight,\n clientHeight = _a.clientHeight;\n return [scrollTop, scrollHeight, clientHeight];\n};\n\nvar getHScrollVariables = function getHScrollVariables(_a) {\n var scrollLeft = _a.scrollLeft,\n scrollWidth = _a.scrollWidth,\n clientWidth = _a.clientWidth;\n return [scrollLeft, scrollWidth, clientWidth];\n};\n\nvar elementCouldBeScrolled = function elementCouldBeScrolled(axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\n\nvar getScrollVariables = function getScrollVariables(axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\n\nexport var handleScroll = function handleScroll(axis, endTarget, event, sourceDelta, noOverscroll) {\n var delta = sourceDelta; // find scrollable target\n\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n\n do {\n var _a = getScrollVariables(axis, target),\n position = _a[0],\n scroll_1 = _a[1],\n capacity = _a[2];\n\n var elementScroll = scroll_1 - capacity - position;\n\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n\n target = target.parentNode;\n } while ( // portaled content\n !targetInLock && target !== document.body || // self content\n targetInLock && (endTarget.contains(target) || endTarget === target));\n\n if (isDeltaPositive && (noOverscroll && availableScroll === 0 || !noOverscroll && delta > availableScroll)) {\n shouldCancelScroll = true;\n } else if (!isDeltaPositive && (noOverscroll && availableScrollTop === 0 || !noOverscroll && -delta > availableScrollTop)) {\n shouldCancelScroll = true;\n }\n\n return shouldCancelScroll;\n};","var passiveSupported = false;\n\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passiveSupported = true;\n return true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (err) {\n passiveSupported = false;\n }\n}\n\nexport var nonPassive = passiveSupported ? {\n passive: false\n} : false;","import * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nimport { nonPassive } from './aggresiveCapture';\nexport var getTouchXY = function getTouchXY(event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function getDeltaXY(event) {\n return [event.deltaX, event.deltaY];\n};\n\nvar extractRef = function extractRef(ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\n\nvar deltaCompare = function deltaCompare(x, y) {\n return x[0] === y[0] && x[1] === y[1];\n};\n\nvar generateStyle = function generateStyle(id) {\n return \"\\n .block-interactivity-\" + id + \" {pointer-events: none;}\\n .allow-interactivity-\" + id + \" {pointer-events: all;}\\n\";\n};\n\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(function () {\n return styleSingleton();\n })[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\" + id);\n var allow_1 = [props.lockRef.current].concat((props.shards || []).map(extractRef)).filter(Boolean);\n allow_1.forEach(function (el) {\n return el.classList.add(\"allow-interactivity-\" + id);\n });\n return function () {\n document.body.classList.remove(\"block-interactivity-\" + id);\n allow_1.forEach(function (el) {\n return el.classList.remove(\"allow-interactivity-\" + id);\n });\n };\n }\n\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if ('touches' in event && event.touches.length === 2) {\n return !lastProps.current.allowPinchZoom;\n }\n\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n } else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target); // other axis might be not scrollable\n }\n\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n\n if (!currentAxis) {\n return true;\n }\n\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) {\n return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta);\n })[0]; // self event, and should be canceled\n\n if (sourceEvent && sourceEvent.should) {\n event.preventDefault();\n return;\n } // outside or shard event\n\n\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function (node) {\n return node.contains(event.target);\n });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n\n if (shouldStop) {\n event.preventDefault();\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = {\n name: name,\n delta: delta,\n target: target,\n should: should\n };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) {\n return e !== event;\n });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) {\n return inst !== Style;\n });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar,\n inert = props.inert;\n return /*#__PURE__*/React.createElement(React.Fragment, null, inert ? /*#__PURE__*/React.createElement(Style, {\n styles: generateStyle(id)\n }) : null, removeScrollBar ? /*#__PURE__*/React.createElement(RemoveScrollBar, {\n gapMode: \"margin\"\n }) : null);\n}","import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(RemoveScroll, tslib_1.__assign({}, props, {\n ref: ref,\n sideCar: SideCar\n }));\n});\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;","var _excluded = [\"__scopeMenu\"],\n _excluded2 = [\"forceMount\"],\n _excluded3 = [\"__scopeMenu\", \"loop\", \"trapFocus\", \"onOpenAutoFocus\", \"onCloseAutoFocus\", \"disableOutsidePointerEvents\", \"onEscapeKeyDown\", \"onPointerDownOutside\", \"onFocusOutside\", \"onInteractOutside\", \"onDismiss\", \"disableOutsideScroll\", \"allowPinchZoom\", \"portalled\"],\n _excluded4 = [\"__scopeMenu\"],\n _excluded5 = [\"__scopeMenu\"],\n _excluded6 = [\"disabled\", \"onSelect\"],\n _excluded7 = [\"__scopeMenu\", \"disabled\", \"textValue\"],\n _excluded8 = [\"checked\", \"onCheckedChange\"],\n _excluded9 = [\"value\", \"onValueChange\"],\n _excluded10 = [\"value\"],\n _excluded11 = [\"__scopeMenu\", \"forceMount\"],\n _excluded12 = [\"__scopeMenu\"],\n _excluded13 = [\"__scopeMenu\"];\n\nfunction _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(_e3) { throw _e3; }, 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(_e4) { didErr = true; err = _e4; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useId as e } from \"@radix-ui/react-id\";\nimport { useFocusGuards as n } from \"@radix-ui/react-focus-guards\";\nimport { useCallbackRef as t } from \"@radix-ui/react-use-callback-ref\";\nimport { useDirection as r } from \"@radix-ui/react-use-direction\";\nimport * as o from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope as u } from \"@radix-ui/react-roving-focus\";\nimport { Portal as c } from \"@radix-ui/react-portal\";\nimport * as a from \"@radix-ui/react-popper\";\nimport { createPopperScope as i } from \"@radix-ui/react-popper\";\nimport { Primitive as s } from \"@radix-ui/react-primitive\";\nimport { Presence as l } from \"@radix-ui/react-presence\";\nimport { FocusScope as d } from \"@radix-ui/react-focus-scope\";\nimport { DismissableLayer as p } from \"@radix-ui/react-dismissable-layer\";\nimport { createContextScope as f } from \"@radix-ui/react-context\";\nimport { useComposedRefs as m, composeRefs as v } from \"@radix-ui/react-compose-refs\";\nimport { createCollection as g } from \"@radix-ui/react-collection\";\nimport { composeEventHandlers as M } from \"@radix-ui/primitive\";\nimport { hideOthers as h } from \"aria-hidden\";\nimport { RemoveScroll as C } from \"react-remove-scroll\";\nimport * as E from \"react\";\nimport w from \"@babel/runtime/helpers/esm/extends\";\n\nvar x = [\"Enter\", \" \"],\n b = [\"ArrowUp\", \"PageDown\", \"End\"],\n R = [\"ArrowDown\", \"PageUp\", \"Home\"].concat(b),\n _ = {\n ltr: [].concat(x, [\"ArrowRight\"]),\n rtl: [].concat(x, [\"ArrowLeft\"])\n},\n y = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n},\n _g = g(\"Menu\"),\n _g2 = _slicedToArray(_g, 3),\n I = _g2[0],\n k = _g2[1],\n P = _g2[2],\n _f = f(\"Menu\", [P, i, u]),\n _f2 = _slicedToArray(_f, 2),\n D = _f2[0],\n S = _f2[1];\n\nexport { S as createMenuScope };\n\nvar O = i(),\n T = u(),\n _D = D(\"Menu\"),\n _D2 = _slicedToArray(_D, 2),\n L = _D2[0],\n A = _D2[1];\n\nexport var Menu = function Menu(e) {\n var n = e.__scopeMenu,\n _e$open = e.open,\n o = _e$open === void 0 ? !1 : _e$open,\n u = e.children,\n c = e.onOpenChange,\n _e$modal = e.modal,\n i = _e$modal === void 0 ? !0 : _e$modal,\n s = O(n),\n _E$useState = E.useState(null),\n _E$useState2 = _slicedToArray(_E$useState, 2),\n l = _E$useState2[0],\n d = _E$useState2[1],\n p = E.useRef(!1),\n f = t(c),\n m = r(l, e.dir);\n\n return E.useEffect(function () {\n var e = function e() {\n p.current = !0, document.addEventListener(\"pointerdown\", n, {\n capture: !0,\n once: !0\n }), document.addEventListener(\"pointermove\", n, {\n capture: !0,\n once: !0\n });\n },\n n = function n() {\n return p.current = !1;\n };\n\n return document.addEventListener(\"keydown\", e, {\n capture: !0\n }), function () {\n document.removeEventListener(\"keydown\", e, {\n capture: !0\n }), document.removeEventListener(\"pointerdown\", n, {\n capture: !0\n }), document.removeEventListener(\"pointermove\", n, {\n capture: !0\n });\n };\n }, []), /*#__PURE__*/E.createElement(a.Root, s, /*#__PURE__*/E.createElement(L, {\n scope: n,\n isSubmenu: !1,\n isUsingKeyboardRef: p,\n dir: m,\n open: o,\n onOpenChange: f,\n content: l,\n onContentChange: d,\n onRootClose: E.useCallback(function () {\n return f(!1);\n }, [f]),\n modal: i\n }, u));\n};\n/*#__PURE__*/\n\nexport var MenuSub = function MenuSub(n) {\n var r = n.__scopeMenu,\n o = n.children,\n _n$open = n.open,\n u = _n$open === void 0 ? !1 : _n$open,\n c = n.onOpenChange,\n i = A(\"MenuSub\", r),\n s = O(r),\n _E$useState3 = E.useState(null),\n _E$useState4 = _slicedToArray(_E$useState3, 2),\n l = _E$useState4[0],\n d = _E$useState4[1],\n _E$useState5 = E.useState(null),\n _E$useState6 = _slicedToArray(_E$useState5, 2),\n p = _E$useState6[0],\n f = _E$useState6[1],\n m = t(c);\n\n return E.useEffect(function () {\n return !1 === i.open && m(!1), function () {\n return m(!1);\n };\n }, [i.open, m]), /*#__PURE__*/E.createElement(a.Root, s, /*#__PURE__*/E.createElement(L, {\n scope: r,\n isSubmenu: !0,\n isUsingKeyboardRef: i.isUsingKeyboardRef,\n dir: i.dir,\n open: u,\n onOpenChange: m,\n content: p,\n onContentChange: f,\n onRootClose: i.onRootClose,\n contentId: e(),\n trigger: l,\n onTriggerChange: d,\n triggerId: e(),\n modal: !1\n }, o));\n};\n/*#__PURE__*/\n\nexport var MenuAnchor = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = e.__scopeMenu,\n r = _objectWithoutProperties(e, _excluded),\n o = O(t);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(a.Anchor, w({}, o, r, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nvar _D3 = D(\"MenuContent\"),\n _D4 = _slicedToArray(_D3, 2),\n F = _D4[0],\n K = _D4[1];\n\nexport var MenuContent = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = e.forceMount,\n r = _objectWithoutProperties(e, _excluded2),\n o = A(\"MenuContent\", e.__scopeMenu);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(I.Provider, {\n scope: e.__scopeMenu\n }, /*#__PURE__*/E.createElement(l, {\n present: t || o.open\n }, /*#__PURE__*/E.createElement(I.Slot, {\n scope: e.__scopeMenu\n }, o.isSubmenu ? /*#__PURE__*/E.createElement(X, w({}, r, {\n ref: n\n })) : /*#__PURE__*/E.createElement(G, w({}, r, {\n ref: n\n })))));\n});\nvar G = /*#__PURE__*/E.forwardRef(function (e, n) {\n return A(\"MenuContent\", e.__scopeMenu).modal ? /*#__PURE__*/E.createElement(U, w({}, e, {\n ref: n\n })) : /*#__PURE__*/E.createElement(V, w({}, e, {\n ref: n\n }));\n}),\n U = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = A(\"MenuContent\", e.__scopeMenu),\n r = E.useRef(null),\n o = m(n, r);\n return E.useEffect(function () {\n var e = r.current;\n if (e) return h(e);\n }, []), /*#__PURE__*/E.createElement(B, w({}, e, {\n ref: o,\n trapFocus: t.open,\n disableOutsidePointerEvents: t.open,\n disableOutsideScroll: !0,\n onFocusOutside: M(e.onFocusOutside, function (e) {\n return e.preventDefault();\n }, {\n checkForDefaultPrevented: !1\n }),\n onDismiss: function onDismiss() {\n return t.onOpenChange(!1);\n }\n }));\n}),\n V = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = A(\"MenuContent\", e.__scopeMenu);\n /*#__PURE__*/\n\n return /*#__PURE__*/E.createElement(B, w({}, e, {\n ref: n,\n trapFocus: !1,\n disableOutsidePointerEvents: !1,\n disableOutsideScroll: !1,\n onDismiss: function onDismiss() {\n return t.onOpenChange(!1);\n }\n }));\n}),\n X = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = A(\"MenuContent\", e.__scopeMenu),\n r = E.useRef(null),\n o = m(n, r);\n return t.isSubmenu ? /*#__PURE__*/E.createElement(B, w({\n id: t.contentId,\n \"aria-labelledby\": t.triggerId\n }, e, {\n ref: o,\n align: \"start\",\n side: \"rtl\" === t.dir ? \"left\" : \"right\",\n portalled: !0,\n disableOutsidePointerEvents: !1,\n disableOutsideScroll: !1,\n trapFocus: !1,\n onOpenAutoFocus: function onOpenAutoFocus(e) {\n var n;\n t.isUsingKeyboardRef.current && (null === (n = r.current) || void 0 === n || n.focus()), e.preventDefault();\n },\n onCloseAutoFocus: function onCloseAutoFocus(e) {\n return e.preventDefault();\n },\n onFocusOutside: M(e.onFocusOutside, function (e) {\n e.target !== t.trigger && t.onOpenChange(!1);\n }),\n onEscapeKeyDown: M(e.onEscapeKeyDown, t.onRootClose),\n onKeyDown: M(e.onKeyDown, function (e) {\n var n = e.currentTarget.contains(e.target),\n r = y[t.dir].includes(e.key);\n var o;\n n && r && (t.onOpenChange(!1), null === (o = t.trigger) || void 0 === o || o.focus(), e.preventDefault());\n })\n })) : null;\n}),\n B = /*#__PURE__*/E.forwardRef(function (e, t) {\n var r = e.__scopeMenu,\n _e$loop = e.loop,\n u = _e$loop === void 0 ? !1 : _e$loop,\n i = e.trapFocus,\n s = e.onOpenAutoFocus,\n l = e.onCloseAutoFocus,\n f = e.disableOutsidePointerEvents,\n v = e.onEscapeKeyDown,\n g = e.onPointerDownOutside,\n h = e.onFocusOutside,\n x = e.onInteractOutside,\n _ = e.onDismiss,\n y = e.disableOutsideScroll,\n I = e.allowPinchZoom,\n P = e.portalled,\n D = _objectWithoutProperties(e, _excluded3),\n S = A(\"MenuContent\", r),\n L = O(r),\n K = T(r),\n G = k(r),\n _E$useState7 = E.useState(null),\n _E$useState8 = _slicedToArray(_E$useState7, 2),\n U = _E$useState8[0],\n V = _E$useState8[1],\n X = E.useRef(null),\n B = m(t, X, S.onContentChange),\n Y = E.useRef(0),\n Z = E.useRef(\"\"),\n z = E.useRef(0),\n H = E.useRef(null),\n W = E.useRef(\"right\"),\n q = E.useRef(0),\n N = P ? c : E.Fragment,\n Q = y ? C : E.Fragment,\n $ = y ? {\n allowPinchZoom: I\n } : void 0,\n ee = function ee(e) {\n var n, t;\n\n var r = Z.current + e,\n o = G().filter(function (e) {\n return !e.disabled;\n }),\n u = document.activeElement,\n c = null === (n = o.find(function (e) {\n return e.ref.current === u;\n })) || void 0 === n ? void 0 : n.textValue,\n a = function (e, n, t) {\n var r = n.length > 1 && Array.from(n).every(function (e) {\n return e === n[0];\n }) ? n[0] : n,\n o = t ? e.indexOf(t) : -1;\n var u = (c = e, a = Math.max(o, 0), c.map(function (e, n) {\n return c[(a + n) % c.length];\n }));\n var c, a;\n 1 === r.length && (u = u.filter(function (e) {\n return e !== t;\n }));\n var i = u.find(function (e) {\n return e.toLowerCase().startsWith(r.toLowerCase());\n });\n return i !== t ? i : void 0;\n }(o.map(function (e) {\n return e.textValue;\n }), r, c),\n i = null === (t = o.find(function (e) {\n return e.textValue === a;\n })) || void 0 === t ? void 0 : t.ref.current;\n\n !function e(n) {\n Z.current = n, window.clearTimeout(Y.current), \"\" !== n && (Y.current = window.setTimeout(function () {\n return e(\"\");\n }, 1e3));\n }(r), i && setTimeout(function () {\n return i.focus();\n });\n };\n\n E.useEffect(function () {\n return function () {\n return window.clearTimeout(Y.current);\n };\n }, []), n();\n var ne = E.useCallback(function (e) {\n var n, t;\n return W.current === (null === (n = H.current) || void 0 === n ? void 0 : n.side) && function (e, n) {\n if (!n) return !1;\n return function (e, n) {\n var t = e.x,\n r = e.y;\n var o = !1;\n\n for (var _e2 = 0, _u = n.length - 1; _e2 < n.length; _u = _e2++) {\n var _c = n[_e2].x,\n _a = n[_e2].y,\n _i2 = n[_u].x,\n _s2 = n[_u].y;\n _a > r != _s2 > r && t < (_i2 - _c) * (r - _a) / (_s2 - _a) + _c && (o = !o);\n }\n\n return o;\n }({\n x: e.clientX,\n y: e.clientY\n }, n);\n }(e, null === (t = H.current) || void 0 === t ? void 0 : t.area);\n }, []);\n /*#__PURE__*/\n\n return /*#__PURE__*/E.createElement(N, null, /*#__PURE__*/E.createElement(Q, $, /*#__PURE__*/E.createElement(F, {\n scope: r,\n searchRef: Z,\n onItemEnter: E.useCallback(function (e) {\n ne(e) && e.preventDefault();\n }, [ne]),\n onItemLeave: E.useCallback(function (e) {\n var n;\n ne(e) || (null === (n = X.current) || void 0 === n || n.focus(), V(null));\n }, [ne]),\n onTriggerLeave: E.useCallback(function (e) {\n ne(e) && e.preventDefault();\n }, [ne]),\n pointerGraceTimerRef: z,\n onPointerGraceIntentChange: E.useCallback(function (e) {\n H.current = e;\n }, [])\n }, /*#__PURE__*/E.createElement(d, {\n asChild: !0,\n trapped: i,\n onMountAutoFocus: M(s, function (e) {\n var n;\n e.preventDefault(), null === (n = X.current) || void 0 === n || n.focus();\n }),\n onUnmountAutoFocus: l\n }, /*#__PURE__*/E.createElement(p, {\n asChild: !0,\n disableOutsidePointerEvents: f,\n onEscapeKeyDown: v,\n onPointerDownOutside: g,\n onFocusOutside: h,\n onInteractOutside: x,\n onDismiss: _\n }, /*#__PURE__*/E.createElement(o.Root, w({\n asChild: !0\n }, K, {\n dir: S.dir,\n orientation: \"vertical\",\n loop: u,\n currentTabStopId: U,\n onCurrentTabStopIdChange: V,\n onEntryFocus: function onEntryFocus(e) {\n S.isUsingKeyboardRef.current || e.preventDefault();\n }\n }), /*#__PURE__*/E.createElement(a.Content, w({\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": j(S.open),\n dir: S.dir\n }, L, D, {\n ref: B,\n style: _objectSpread({\n outline: \"none\"\n }, D.style),\n onKeyDown: M(D.onKeyDown, function (e) {\n var n = e.target,\n t = e.currentTarget.contains(n),\n r = e.ctrlKey || e.altKey || e.metaKey,\n o = 1 === e.key.length;\n t && (\"Tab\" === e.key && e.preventDefault(), !r && o && ee(e.key));\n var u = X.current;\n if (e.target !== u) return;\n if (!R.includes(e.key)) return;\n e.preventDefault();\n var c = G().filter(function (e) {\n return !e.disabled;\n }).map(function (e) {\n return e.ref.current;\n });\n b.includes(e.key) && c.reverse(), function (e) {\n var n = document.activeElement;\n\n var _iterator = _createForOfIteratorHelper(e),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _t = _step.value;\n if (_t === n) return;\n if (_t.focus(), document.activeElement !== n) return;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }(c);\n }),\n onBlur: M(e.onBlur, function (e) {\n e.currentTarget.contains(e.target) || (window.clearTimeout(Y.current), Z.current = \"\");\n }),\n onPointerMove: M(e.onPointerMove, J(function (e) {\n var n = e.target,\n t = q.current !== e.clientX;\n\n if (e.currentTarget.contains(n) && t) {\n var _n2 = e.clientX > q.current ? \"right\" : \"left\";\n\n W.current = _n2, q.current = e.clientX;\n }\n }))\n }))))))));\n});\nexport var MenuGroup = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = e.__scopeMenu,\n r = _objectWithoutProperties(e, _excluded4);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(s.div, w({\n role: \"group\"\n }, r, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var MenuLabel = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = e.__scopeMenu,\n r = _objectWithoutProperties(e, _excluded5);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(s.div, w({}, r, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var MenuItem = /*#__PURE__*/E.forwardRef(function (e, n) {\n var _e$disabled = e.disabled,\n t = _e$disabled === void 0 ? !1 : _e$disabled,\n r = e.onSelect,\n o = _objectWithoutProperties(e, _excluded6),\n u = E.useRef(null),\n c = A(\"MenuItem\", e.__scopeMenu),\n a = K(\"MenuItem\", e.__scopeMenu),\n i = m(n, u),\n s = E.useRef(!1);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(Y, w({}, o, {\n ref: i,\n disabled: t,\n onClick: M(e.onClick, function () {\n var e = u.current;\n\n if (!t && e) {\n var _n3 = new Event(\"menu.itemSelect\", {\n bubbles: !0,\n cancelable: !0\n });\n\n e.addEventListener(\"menu.itemSelect\", function (e) {\n return null == r ? void 0 : r(e);\n }, {\n once: !0\n }), e.dispatchEvent(_n3), _n3.defaultPrevented ? s.current = !1 : c.onRootClose();\n }\n }),\n onPointerDown: function onPointerDown(n) {\n var t;\n null === (t = e.onPointerDown) || void 0 === t || t.call(e, n), s.current = !0;\n },\n onPointerUp: M(e.onPointerUp, function (e) {\n var n;\n s.current || null === (n = e.currentTarget) || void 0 === n || n.click();\n }),\n onKeyDown: M(e.onKeyDown, function (e) {\n var n = \"\" !== a.searchRef.current;\n t || n && \" \" === e.key || x.includes(e.key) && (e.currentTarget.click(), e.preventDefault());\n })\n }));\n});\n/*#__PURE__*/\n\nexport var MenuSubTrigger = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = A(\"MenuSubTrigger\", e.__scopeMenu),\n r = K(\"MenuSubTrigger\", e.__scopeMenu),\n o = E.useRef(null),\n u = r.pointerGraceTimerRef,\n c = r.onPointerGraceIntentChange,\n a = {\n __scopeMenu: e.__scopeMenu\n },\n i = E.useCallback(function () {\n o.current && window.clearTimeout(o.current), o.current = null;\n }, []);\n return E.useEffect(function () {\n return i;\n }, [i]), E.useEffect(function () {\n var e = u.current;\n return function () {\n window.clearTimeout(e), c(null);\n };\n }, [u, c]), t.isSubmenu ? /*#__PURE__*/E.createElement(MenuAnchor, w({\n asChild: !0\n }, a), /*#__PURE__*/E.createElement(Y, w({\n id: t.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": t.open,\n \"aria-controls\": t.contentId,\n \"data-state\": j(t.open)\n }, e, {\n ref: v(n, t.onTriggerChange),\n onClick: function onClick(n) {\n var r;\n null === (r = e.onClick) || void 0 === r || r.call(e, n), e.disabled || n.defaultPrevented || (n.currentTarget.focus(), t.open || t.onOpenChange(!0));\n },\n onPointerMove: M(e.onPointerMove, J(function (n) {\n r.onItemEnter(n), n.defaultPrevented || e.disabled || t.open || o.current || (r.onPointerGraceIntentChange(null), o.current = window.setTimeout(function () {\n t.onOpenChange(!0), i();\n }, 100));\n })),\n onPointerLeave: M(e.onPointerLeave, J(function (e) {\n var n;\n i();\n var o = null === (n = t.content) || void 0 === n ? void 0 : n.getBoundingClientRect();\n\n if (o) {\n var c;\n\n var _n4 = null === (c = t.content) || void 0 === c ? void 0 : c.dataset.side,\n _a2 = \"right\" === _n4,\n _i3 = _a2 ? -5 : 5,\n _s3 = o[_a2 ? \"left\" : \"right\"],\n _l = o[_a2 ? \"right\" : \"left\"];\n\n r.onPointerGraceIntentChange({\n area: [{\n x: e.clientX + _i3,\n y: e.clientY\n }, {\n x: _s3,\n y: o.top\n }, {\n x: _l,\n y: o.top\n }, {\n x: _l,\n y: o.bottom\n }, {\n x: _s3,\n y: o.bottom\n }],\n side: _n4\n }), window.clearTimeout(u.current), u.current = window.setTimeout(function () {\n return r.onPointerGraceIntentChange(null);\n }, 300);\n } else {\n if (r.onTriggerLeave(e), e.defaultPrevented) return;\n r.onPointerGraceIntentChange(null);\n }\n })),\n onKeyDown: M(e.onKeyDown, function (n) {\n var o = \"\" !== r.searchRef.current;\n var u;\n e.disabled || o && \" \" === n.key || _[t.dir].includes(n.key) && (t.onOpenChange(!0), null === (u = t.content) || void 0 === u || u.focus(), n.preventDefault());\n })\n }))) : null;\n});\n/*#__PURE__*/\n\nvar Y = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = e.__scopeMenu,\n _e$disabled2 = e.disabled,\n r = _e$disabled2 === void 0 ? !1 : _e$disabled2,\n u = e.textValue,\n c = _objectWithoutProperties(e, _excluded7),\n a = K(\"MenuItem\", t),\n i = T(t),\n l = E.useRef(null),\n d = m(n, l),\n _E$useState9 = E.useState(\"\"),\n _E$useState10 = _slicedToArray(_E$useState9, 2),\n p = _E$useState10[0],\n f = _E$useState10[1];\n\n return E.useEffect(function () {\n var e = l.current;\n var n;\n e && f((null !== (n = e.textContent) && void 0 !== n ? n : \"\").trim());\n }, [c.children]), /*#__PURE__*/E.createElement(I.ItemSlot, {\n scope: t,\n disabled: r,\n textValue: null != u ? u : p\n }, /*#__PURE__*/E.createElement(o.Item, w({\n asChild: !0\n }, i, {\n focusable: !r\n }), /*#__PURE__*/E.createElement(s.div, w({\n role: \"menuitem\",\n \"aria-disabled\": r || void 0,\n \"data-disabled\": r ? \"\" : void 0\n }, c, {\n ref: d,\n onPointerMove: M(e.onPointerMove, J(function (e) {\n if (r) a.onItemLeave(e);else if (a.onItemEnter(e), !e.defaultPrevented) {\n e.currentTarget.focus();\n }\n })),\n onPointerLeave: M(e.onPointerLeave, J(function (e) {\n return a.onItemLeave(e);\n }))\n }))));\n});\nexport var MenuCheckboxItem = /*#__PURE__*/E.forwardRef(function (e, n) {\n var _e$checked = e.checked,\n t = _e$checked === void 0 ? !1 : _e$checked,\n r = e.onCheckedChange,\n o = _objectWithoutProperties(e, _excluded8);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(H, {\n scope: e.__scopeMenu,\n checked: t\n }, /*#__PURE__*/E.createElement(MenuItem, w({\n role: \"menuitemcheckbox\",\n \"aria-checked\": t\n }, o, {\n ref: n,\n \"data-state\": q(t),\n onSelect: M(o.onSelect, function () {\n return null == r ? void 0 : r(!t);\n }, {\n checkForDefaultPrevented: !1\n })\n })));\n});\n/*#__PURE__*/\n\nvar _D5 = D(\"MenuRadioGroup\", {\n value: void 0,\n onValueChange: function onValueChange() {}\n}),\n _D6 = _slicedToArray(_D5, 2),\n Z = _D6[0],\n z = _D6[1];\n\nexport var MenuRadioGroup = /*#__PURE__*/E.forwardRef(function (e, n) {\n var r = e.value,\n o = e.onValueChange,\n u = _objectWithoutProperties(e, _excluded9),\n c = t(o);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(Z, {\n scope: e.__scopeMenu,\n value: r,\n onValueChange: c\n }, /*#__PURE__*/E.createElement(MenuGroup, w({}, u, {\n ref: n\n })));\n});\n/*#__PURE__*/\n\nexport var MenuRadioItem = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = e.value,\n r = _objectWithoutProperties(e, _excluded10),\n o = z(\"MenuRadioItem\", e.__scopeMenu),\n u = t === o.value;\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(H, {\n scope: e.__scopeMenu,\n checked: u\n }, /*#__PURE__*/E.createElement(MenuItem, w({\n role: \"menuitemradio\",\n \"aria-checked\": u\n }, r, {\n ref: n,\n \"data-state\": q(u),\n onSelect: M(r.onSelect, function () {\n var e;\n return null === (e = o.onValueChange) || void 0 === e ? void 0 : e.call(o, t);\n }, {\n checkForDefaultPrevented: !1\n })\n })));\n});\n/*#__PURE__*/\n\nvar _D7 = D(\"MenuItemIndicator\", {\n checked: !1\n}),\n _D8 = _slicedToArray(_D7, 2),\n H = _D8[0],\n W = _D8[1];\n\nexport var MenuItemIndicator = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = e.__scopeMenu,\n r = e.forceMount,\n o = _objectWithoutProperties(e, _excluded11),\n u = W(\"MenuItemIndicator\", t);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(l, {\n present: r || u.checked\n }, /*#__PURE__*/E.createElement(s.span, w({}, o, {\n ref: n,\n \"data-state\": q(u.checked)\n })));\n});\n/*#__PURE__*/\n\nexport var MenuSeparator = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = e.__scopeMenu,\n r = _objectWithoutProperties(e, _excluded12);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(s.div, w({\n role: \"separator\",\n \"aria-orientation\": \"horizontal\"\n }, r, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var MenuArrow = /*#__PURE__*/E.forwardRef(function (e, n) {\n var t = e.__scopeMenu,\n r = _objectWithoutProperties(e, _excluded13),\n o = O(t);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/E.createElement(a.Arrow, w({}, o, r, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nfunction j(e) {\n return e ? \"open\" : \"closed\";\n}\n\nfunction q(e) {\n return e ? \"checked\" : \"unchecked\";\n}\n\nfunction J(e) {\n return function (n) {\n return \"mouse\" === n.pointerType ? e(n) : void 0;\n };\n}\n\nexport var Root = Menu;\nexport var Sub = MenuSub;\nexport var Anchor = MenuAnchor;\nexport var SubTrigger = MenuSubTrigger;\nexport var Content = MenuContent;\nexport var Group = MenuGroup;\nexport var Label = MenuLabel;\nexport var Item = MenuItem;\nexport var CheckboxItem = MenuCheckboxItem;\nexport var RadioGroup = MenuRadioGroup;\nexport var RadioItem = MenuRadioItem;\nexport var ItemIndicator = MenuItemIndicator;\nexport var Separator = MenuSeparator;\nexport var Arrow = MenuArrow;","var _excluded = [\"__scopeDropdownMenu\", \"disabled\"],\n _excluded2 = [\"__scopeDropdownMenu\"],\n _excluded3 = [\"__scopeDropdownMenu\", \"portalled\"],\n _excluded4 = [\"__scopeDropdownMenu\"],\n _excluded5 = [\"__scopeDropdownMenu\"],\n _excluded6 = [\"__scopeDropdownMenu\"],\n _excluded7 = [\"__scopeDropdownMenu\"],\n _excluded8 = [\"__scopeDropdownMenu\"],\n _excluded9 = [\"__scopeDropdownMenu\"],\n _excluded10 = [\"__scopeDropdownMenu\"],\n _excluded11 = [\"__scopeDropdownMenu\"],\n _excluded12 = [\"__scopeDropdownMenu\"],\n _excluded13 = [\"__scopeDropdownMenu\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _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); }\n\nfunction _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; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useId as e } from \"@radix-ui/react-id\";\nimport * as o from \"@radix-ui/react-menu\";\nimport { createMenuScope as n } from \"@radix-ui/react-menu\";\nimport { Primitive as r } from \"@radix-ui/react-primitive\";\nimport { useControllableState as t } from \"@radix-ui/react-use-controllable-state\";\nimport { createContextScope as p } from \"@radix-ui/react-context\";\nimport { composeRefs as d } from \"@radix-ui/react-compose-refs\";\nimport { composeEventHandlers as a } from \"@radix-ui/primitive\";\nimport * as c from \"react\";\nimport u from \"@babel/runtime/helpers/esm/extends\";\n\nvar _p = p(\"DropdownMenu\", [n]),\n _p2 = _slicedToArray(_p, 2),\n s = _p2[0],\n i = _p2[1];\n\nexport { i as createDropdownMenuScope };\n\nvar l = n(),\n _s2 = s(\"DropdownMenu\"),\n _s3 = _slicedToArray(_s2, 2),\n m = _s3[0],\n w = _s3[1];\n\nexport var DropdownMenu = function DropdownMenu(e) {\n var n = e.__scopeDropdownMenu,\n r = e.children,\n p = e.open,\n d = e.defaultOpen,\n a = e.onOpenChange,\n s = M(\"DropdownMenu\", n),\n i = l(n),\n _t = t({\n prop: p,\n defaultProp: d,\n onChange: a\n }),\n _t2 = _slicedToArray(_t, 2),\n _t2$ = _t2[0],\n w = _t2$ === void 0 ? !1 : _t2$,\n D = _t2[1],\n g = c.useCallback(function () {\n return D(function (e) {\n return !e;\n });\n }, [D]);\n\n return s.isInsideContent ? /*#__PURE__*/c.createElement(m, {\n scope: n,\n isRootMenu: !1,\n open: w,\n onOpenChange: D,\n onOpenToggle: g\n }, /*#__PURE__*/c.createElement(o.Sub, u({}, i, {\n open: w,\n onOpenChange: D\n }), r)) : /*#__PURE__*/c.createElement(f, u({}, e, {\n open: w,\n onOpenChange: D,\n onOpenToggle: g\n }), r);\n};\n/*#__PURE__*/\n\nvar f = function f(n) {\n var r = n.__scopeDropdownMenu,\n t = n.children,\n p = n.dir,\n d = n.open,\n a = n.onOpenChange,\n s = n.onOpenToggle,\n _n$modal = n.modal,\n i = _n$modal === void 0 ? !0 : _n$modal,\n w = l(r),\n f = c.useRef(null);\n /*#__PURE__*/\n\n return /*#__PURE__*/c.createElement(m, {\n scope: r,\n isRootMenu: !0,\n triggerId: e(),\n triggerRef: f,\n contentId: e(),\n open: d,\n onOpenChange: a,\n onOpenToggle: s,\n modal: i\n }, /*#__PURE__*/c.createElement(o.Root, u({}, w, {\n open: d,\n onOpenChange: a,\n dir: p,\n modal: i\n }), t));\n};\n\nexport var DropdownMenuTrigger = /*#__PURE__*/c.forwardRef(function (e, n) {\n var t = e.__scopeDropdownMenu,\n _e$disabled = e.disabled,\n p = _e$disabled === void 0 ? !1 : _e$disabled,\n s = _objectWithoutProperties(e, _excluded),\n i = w(\"DropdownMenuTrigger\", t),\n m = l(t);\n\n return i.isRootMenu ? /*#__PURE__*/c.createElement(o.Anchor, u({\n asChild: !0\n }, m), /*#__PURE__*/c.createElement(r.button, u({\n type: \"button\",\n id: i.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": !!i.open || void 0,\n \"aria-controls\": i.open ? i.contentId : void 0,\n \"data-state\": i.open ? \"open\" : \"closed\",\n \"data-disabled\": p ? \"\" : void 0,\n disabled: p\n }, s, {\n ref: d(n, i.triggerRef),\n onPointerDown: a(e.onPointerDown, function (e) {\n p || 0 !== e.button || !1 !== e.ctrlKey || (i.open || e.preventDefault(), i.onOpenToggle());\n }),\n onKeyDown: a(e.onKeyDown, function (e) {\n p || ([\"Enter\", \" \"].includes(e.key) && i.onOpenToggle(), \"ArrowDown\" === e.key && i.onOpenChange(!0), [\" \", \"ArrowDown\"].includes(e.key) && e.preventDefault());\n })\n }))) : null;\n});\n/*#__PURE__*/\n\nvar _s4 = s(\"DropdownMenuContent\", {\n isInsideContent: !1\n}),\n _s5 = _slicedToArray(_s4, 2),\n D = _s5[0],\n M = _s5[1];\n\nexport var DropdownMenuContent = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded2),\n p = w(\"DropdownMenuContent\", r),\n d = l(r),\n a = _objectSpread(_objectSpread({}, t), {}, {\n style: _objectSpread(_objectSpread({}, e.style), {}, {\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\"\n })\n });\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(D, {\n scope: r,\n isInsideContent: !0\n }, p.isRootMenu ? /*#__PURE__*/c.createElement(g, u({\n __scopeDropdownMenu: r\n }, a, {\n ref: n\n })) : /*#__PURE__*/c.createElement(o.Content, u({}, d, a, {\n ref: n\n })));\n});\n/*#__PURE__*/\n\nvar g = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n _e$portalled = e.portalled,\n t = _e$portalled === void 0 ? !0 : _e$portalled,\n p = _objectWithoutProperties(e, _excluded3),\n d = w(\"DropdownMenuContent\", r),\n s = l(r),\n i = c.useRef(!1);\n\n return d.isRootMenu ? /*#__PURE__*/c.createElement(o.Content, u({\n id: d.contentId,\n \"aria-labelledby\": d.triggerId\n }, s, p, {\n ref: n,\n portalled: t,\n onCloseAutoFocus: a(e.onCloseAutoFocus, function (e) {\n var o;\n i.current || null === (o = d.triggerRef.current) || void 0 === o || o.focus(), i.current = !1, e.preventDefault();\n }),\n onInteractOutside: a(e.onInteractOutside, function (e) {\n var o = e.detail.originalEvent,\n n = 0 === o.button && !0 === o.ctrlKey,\n r = 2 === o.button || n;\n d.modal && !r || (i.current = !0);\n })\n })) : null;\n});\nexport var DropdownMenuGroup = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded4),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.Group, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var DropdownMenuLabel = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded5),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.Label, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var DropdownMenuItem = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded6),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.Item, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var DropdownMenuTriggerItem = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded7),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.SubTrigger, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var DropdownMenuCheckboxItem = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded8),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.CheckboxItem, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var DropdownMenuRadioGroup = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded9),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.RadioGroup, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var DropdownMenuRadioItem = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded10),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.RadioItem, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var DropdownMenuItemIndicator = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded11),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.ItemIndicator, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var DropdownMenuSeparator = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded12),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.Separator, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var DropdownMenuArrow = /*#__PURE__*/c.forwardRef(function (e, n) {\n var r = e.__scopeDropdownMenu,\n t = _objectWithoutProperties(e, _excluded13),\n p = l(r);\n /*#__PURE__*/\n\n\n return /*#__PURE__*/c.createElement(o.Arrow, u({}, p, t, {\n ref: n\n }));\n});\n/*#__PURE__*/\n\nexport var Root = DropdownMenu;\nexport var Trigger = DropdownMenuTrigger;\nexport var Content = DropdownMenuContent;\nexport var Group = DropdownMenuGroup;\nexport var Label = DropdownMenuLabel;\nexport var Item = DropdownMenuItem;\nexport var TriggerItem = DropdownMenuTriggerItem;\nexport var CheckboxItem = DropdownMenuCheckboxItem;\nexport var RadioGroup = DropdownMenuRadioGroup;\nexport var RadioItem = DropdownMenuRadioItem;\nexport var ItemIndicator = DropdownMenuItemIndicator;\nexport var Separator = DropdownMenuSeparator;\nexport var Arrow = DropdownMenuArrow;","var uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es-x/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import { __values, __spread } from './_virtual/_tslib.js';\nimport { keys, flatten } from './utils.js';\n\nvar isLeafNode = function isLeafNode(stateNode) {\n return stateNode.type === 'atomic' || stateNode.type === 'final';\n};\n\nfunction getChildren(stateNode) {\n return keys(stateNode.states).map(function (key) {\n return stateNode.states[key];\n });\n}\n\nfunction getAllStateNodes(stateNode) {\n var stateNodes = [stateNode];\n\n if (isLeafNode(stateNode)) {\n return stateNodes;\n }\n\n return stateNodes.concat(flatten(getChildren(stateNode).map(getAllStateNodes)));\n}\n\nfunction getConfiguration(prevStateNodes, stateNodes) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d;\n\n var prevConfiguration = new Set(prevStateNodes);\n var prevAdjList = getAdjList(prevConfiguration);\n var configuration = new Set(stateNodes);\n\n try {\n // add all ancestors\n for (var configuration_1 = __values(configuration), configuration_1_1 = configuration_1.next(); !configuration_1_1.done; configuration_1_1 = configuration_1.next()) {\n var s = configuration_1_1.value;\n var m = s.parent;\n\n while (m && !configuration.has(m)) {\n configuration.add(m);\n m = m.parent;\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (configuration_1_1 && !configuration_1_1.done && (_a = configuration_1[\"return\"])) _a.call(configuration_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n\n var adjList = getAdjList(configuration);\n\n try {\n // add descendants\n for (var configuration_2 = __values(configuration), configuration_2_1 = configuration_2.next(); !configuration_2_1.done; configuration_2_1 = configuration_2.next()) {\n var s = configuration_2_1.value; // if previously active, add existing child nodes\n\n if (s.type === 'compound' && (!adjList.get(s) || !adjList.get(s).length)) {\n if (prevAdjList.get(s)) {\n prevAdjList.get(s).forEach(function (sn) {\n return configuration.add(sn);\n });\n } else {\n s.initialStateNodes.forEach(function (sn) {\n return configuration.add(sn);\n });\n }\n } else {\n if (s.type === 'parallel') {\n try {\n for (var _e = (e_3 = void 0, __values(getChildren(s))), _f = _e.next(); !_f.done; _f = _e.next()) {\n var child = _f.value;\n\n if (child.type === 'history') {\n continue;\n }\n\n if (!configuration.has(child)) {\n configuration.add(child);\n\n if (prevAdjList.get(child)) {\n prevAdjList.get(child).forEach(function (sn) {\n return configuration.add(sn);\n });\n } else {\n child.initialStateNodes.forEach(function (sn) {\n return configuration.add(sn);\n });\n }\n }\n }\n } catch (e_3_1) {\n e_3 = {\n error: e_3_1\n };\n } finally {\n try {\n if (_f && !_f.done && (_c = _e[\"return\"])) _c.call(_e);\n } finally {\n if (e_3) throw e_3.error;\n }\n }\n }\n }\n }\n } catch (e_2_1) {\n e_2 = {\n error: e_2_1\n };\n } finally {\n try {\n if (configuration_2_1 && !configuration_2_1.done && (_b = configuration_2[\"return\"])) _b.call(configuration_2);\n } finally {\n if (e_2) throw e_2.error;\n }\n }\n\n try {\n // add all ancestors\n for (var configuration_3 = __values(configuration), configuration_3_1 = configuration_3.next(); !configuration_3_1.done; configuration_3_1 = configuration_3.next()) {\n var s = configuration_3_1.value;\n var m = s.parent;\n\n while (m && !configuration.has(m)) {\n configuration.add(m);\n m = m.parent;\n }\n }\n } catch (e_4_1) {\n e_4 = {\n error: e_4_1\n };\n } finally {\n try {\n if (configuration_3_1 && !configuration_3_1.done && (_d = configuration_3[\"return\"])) _d.call(configuration_3);\n } finally {\n if (e_4) throw e_4.error;\n }\n }\n\n return configuration;\n}\n\nfunction getValueFromAdj(baseNode, adjList) {\n var childStateNodes = adjList.get(baseNode);\n\n if (!childStateNodes) {\n return {}; // todo: fix?\n }\n\n if (baseNode.type === 'compound') {\n var childStateNode = childStateNodes[0];\n\n if (childStateNode) {\n if (isLeafNode(childStateNode)) {\n return childStateNode.key;\n }\n } else {\n return {};\n }\n }\n\n var stateValue = {};\n childStateNodes.forEach(function (csn) {\n stateValue[csn.key] = getValueFromAdj(csn, adjList);\n });\n return stateValue;\n}\n\nfunction getAdjList(configuration) {\n var e_5, _a;\n\n var adjList = new Map();\n\n try {\n for (var configuration_4 = __values(configuration), configuration_4_1 = configuration_4.next(); !configuration_4_1.done; configuration_4_1 = configuration_4.next()) {\n var s = configuration_4_1.value;\n\n if (!adjList.has(s)) {\n adjList.set(s, []);\n }\n\n if (s.parent) {\n if (!adjList.has(s.parent)) {\n adjList.set(s.parent, []);\n }\n\n adjList.get(s.parent).push(s);\n }\n }\n } catch (e_5_1) {\n e_5 = {\n error: e_5_1\n };\n } finally {\n try {\n if (configuration_4_1 && !configuration_4_1.done && (_a = configuration_4[\"return\"])) _a.call(configuration_4);\n } finally {\n if (e_5) throw e_5.error;\n }\n }\n\n return adjList;\n}\n\nfunction getValue(rootNode, configuration) {\n var config = getConfiguration([rootNode], configuration);\n return getValueFromAdj(rootNode, getAdjList(config));\n}\n\nfunction has(iterable, item) {\n if (Array.isArray(iterable)) {\n return iterable.some(function (member) {\n return member === item;\n });\n }\n\n if (iterable instanceof Set) {\n return iterable.has(item);\n }\n\n return false; // TODO: fix\n}\n\nfunction nextEvents(configuration) {\n return flatten(__spread(new Set(configuration.map(function (sn) {\n return sn.ownEvents;\n }))));\n}\n\nfunction isInFinalState(configuration, stateNode) {\n if (stateNode.type === 'compound') {\n return getChildren(stateNode).some(function (s) {\n return s.type === 'final' && has(configuration, s);\n });\n }\n\n if (stateNode.type === 'parallel') {\n return getChildren(stateNode).every(function (sn) {\n return isInFinalState(configuration, sn);\n });\n }\n\n return false;\n}\n\nexport { getAdjList, getAllStateNodes, getChildren, getConfiguration, getValue, has, isInFinalState, isLeafNode, nextEvents };","var _curry1 = /*#__PURE__*/require(\"./_curry1\");\n\nvar _curry2 = /*#__PURE__*/require(\"./_curry2\");\n\nvar _isPlaceholder = /*#__PURE__*/require(\"./_isPlaceholder\");\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}\n\nmodule.exports = _curry3;","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar String = global.String;\nvar TypeError = global.TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport freeGlobal from './_freeGlobal.js';\n/** Detect free variable `self`. */\n\nvar freeSelf = (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) == 'object' && self && self.Object === Object && self;\n/** Used as a reference to the global object. */\n\nvar root = freeGlobal || freeSelf || Function('return this')();\nexport default root;","var _objectAssign = /*#__PURE__*/require(\"./internal/_objectAssign\");\n\nvar _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the first object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeRight, R.mergeDeepLeft, R.mergeWith, R.mergeWithKey\n * @example\n *\n * R.mergeLeft({ 'age': 40 }, { 'name': 'fred', 'age': 10 });\n * //=> { 'name': 'fred', 'age': 40 }\n *\n * const resetToDefault = R.mergeLeft({x: 0});\n * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2}\n * @symb R.mergeLeft(a, b) = {...b, ...a}\n */\n\n\nvar mergeLeft = /*#__PURE__*/_curry2(function mergeLeft(l, r) {\n return _objectAssign({}, r, l);\n});\n\nmodule.exports = mergeLeft;","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && _typeof(value) == 'object';\n}\n\nexport default isObjectLike;","var _curry1 = /*#__PURE__*/require(\"./internal/_curry1\");\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\n\n\nvar isNil = /*#__PURE__*/_curry1(function isNil(x) {\n return x == null;\n});\n\nmodule.exports = isNil;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\"; // From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js\n\nexport var shallowEqual = function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n var hasOwn = Object.prototype.hasOwnProperty;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n }\n\n return true;\n};\nexport var getDisplayName = function getDisplayName(Component) {\n return Component.displayName || Component.name || 'UnknownComponent';\n};\nvar resolved = Promise.resolve();\nexport var defer = function defer(f) {\n resolved.then(f);\n};\n\nvar isPlainObject = function isPlainObject(value) {\n return _typeof(value) === 'object' && value !== null && !Array.isArray(value);\n};\n\nexport var removeEmptyKey = function removeEmptyKey(obj) {\n Object.keys(obj).forEach(function (key) {\n var value = obj[key];\n\n if (!isPlainObject(value)) {\n return;\n }\n\n if (!objectHasKeys(value)) {\n delete obj[key];\n } else {\n removeEmptyKey(value);\n }\n });\n return obj;\n};\nexport var removeEmptyArraysFromObject = function removeEmptyArraysFromObject(obj) {\n Object.keys(obj).forEach(function (key) {\n var value = obj[key];\n\n if (Array.isArray(value) && value.length === 0) {\n delete obj[key];\n }\n });\n return obj;\n};\nexport function addAbsolutePositions(hits, hitsPerPage, page) {\n return hits.map(function (hit, index) {\n return _objectSpread({}, hit, {\n __position: hitsPerPage * page + index + 1\n });\n });\n}\nexport function addQueryID(hits, queryID) {\n if (!queryID) {\n return hits;\n }\n\n return hits.map(function (hit) {\n return _objectSpread({}, hit, {\n __queryID: queryID\n });\n });\n}\nexport function find(array, comparator) {\n if (!Array.isArray(array)) {\n return undefined;\n }\n\n for (var i = 0; i < array.length; i++) {\n if (comparator(array[i])) {\n return array[i];\n }\n }\n\n return undefined;\n}\nexport function objectHasKeys(object) {\n return object && Object.keys(object).length > 0;\n} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620\n\nexport function omit(source, excluded) {\n if (source === null || source === undefined) {\n return {};\n }\n\n var target = {};\n var sourceKeys = Object.keys(source);\n\n for (var i = 0; i < sourceKeys.length; i++) {\n var _key = sourceKeys[i];\n\n if (excluded.indexOf(_key) >= 0) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n target[_key] = source[_key];\n }\n\n return target;\n}\n/**\n * Retrieve the value at a path of the object:\n *\n * @example\n * getPropertyByPath(\n * { test: { this: { function: [{ now: { everyone: true } }] } } },\n * 'test.this.function[0].now.everyone'\n * ); // true\n *\n * getPropertyByPath(\n * { test: { this: { function: [{ now: { everyone: true } }] } } },\n * ['test', 'this', 'function', 0, 'now', 'everyone']\n * ); // true\n *\n * @param object Source object to query\n * @param path either an array of properties, or a string form of the properties, separated by .\n */\n\nexport var getPropertyByPath = function getPropertyByPath(object, path) {\n return (Array.isArray(path) ? path : path.replace(/\\[(\\d+)]/g, '.$1').split('.')).reduce(function (current, key) {\n return current ? current[key] : undefined;\n }, object);\n};\nexport function getObjectType(object) {\n return Object.prototype.toString.call(object).slice(8, -1);\n}","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar CHROME_VERSION = require('../internals/engine-v8-version');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n var length = arguments.length;\n return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);\n }\n});\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n","var _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n/**\n * Returns `true` if the first argument is less than the second; `false`\n * otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @see R.gt\n * @example\n *\n * R.lt(2, 1); //=> false\n * R.lt(2, 2); //=> false\n * R.lt(2, 3); //=> true\n * R.lt('a', 'z'); //=> true\n * R.lt('z', 'a'); //=> false\n */\n\n\nvar lt = /*#__PURE__*/_curry2(function lt(a, b) {\n return a < b;\n});\n\nmodule.exports = lt;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n'use strict';\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n } // Detect buggy property enumeration order in older V8 versions.\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\n\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\n test1[5] = 'de';\n\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test2 = {};\n\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n\n if (order2.join('') !== '0123456789') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n};","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","import root from './_root.js';\n/** Built-in value references. */\n\nvar _Symbol = root.Symbol;\nexport default _Symbol;","var global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar TypeError = global.TypeError;\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var isCallable = require('../internals/is-callable');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nmodule.exports = function (O, key, value, options) {\n if (!options) options = {};\n var simple = options.enumerable;\n var name = options.name !== undefined ? options.name : key;\n if (isCallable(value)) makeBuiltIn(value, name, options);\n if (options.global) {\n if (simple) O[key] = value;\n else defineGlobalProperty(key, value);\n } else {\n if (!options.unsafe) delete O[key];\n else if (O[key]) simple = true;\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n } return O;\n};\n","var _curry3 = /*#__PURE__*/require(\"./internal/_curry3\");\n\nvar _reduce = /*#__PURE__*/require(\"./internal/_reduce\");\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\n\n\nvar reduce = /*#__PURE__*/_curry3(_reduce);\n\nmodule.exports = reduce;","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","var invoker = /*#__PURE__*/require(\"./invoker\");\n/**\n * The lower case version of a string.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to lower case.\n * @return {String} The lower case version of `str`.\n * @see R.toUpper\n * @example\n *\n * R.toLower('XYZ'); //=> 'xyz'\n */\n\n\nvar toLower = /*#__PURE__*/invoker(0, 'toLowerCase');\nmodule.exports = toLower;","import { __spread, __rest, __assign } from './_virtual/_tslib.js';\nimport { EMPTY_ACTIVITY_MAP } from './constants.js';\nimport { isString, matchesState, keys } from './utils.js';\nimport { nextEvents } from './stateUtils.js';\nimport { initEvent } from './actions.js';\n\nfunction stateValuesEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a === undefined || b === undefined) {\n return false;\n }\n\n if (isString(a) || isString(b)) {\n return a === b;\n }\n\n var aKeys = keys(a);\n var bKeys = keys(b);\n return aKeys.length === bKeys.length && aKeys.every(function (key) {\n return stateValuesEqual(a[key], b[key]);\n });\n}\n\nfunction isState(state) {\n if (isString(state)) {\n return false;\n }\n\n return 'value' in state && 'history' in state;\n}\n\nfunction bindActionToState(action, state) {\n var exec = action.exec;\n\n var boundAction = __assign(__assign({}, action), {\n exec: exec !== undefined ? function () {\n return exec(state.context, state.event, {\n action: action,\n state: state,\n _event: state._event\n });\n } : undefined\n });\n\n return boundAction;\n}\n\nvar State =\n/*#__PURE__*/\n\n/** @class */\nfunction () {\n /**\r\n * Creates a new State instance.\r\n * @param value The state value\r\n * @param context The extended state\r\n * @param historyValue The tree representing historical values of the state nodes\r\n * @param history The previous state\r\n * @param actions An array of action objects to execute as side-effects\r\n * @param activities A mapping of activities and whether they are started (`true`) or stopped (`false`).\r\n * @param meta\r\n * @param events Internal event queue. Should be empty with run-to-completion semantics.\r\n * @param configuration\r\n */\n function State(config) {\n var _this = this;\n\n this.actions = [];\n this.activities = EMPTY_ACTIVITY_MAP;\n this.meta = {};\n this.events = [];\n this.value = config.value;\n this.context = config.context;\n this._event = config._event;\n this._sessionid = config._sessionid;\n this.event = this._event.data;\n this.historyValue = config.historyValue;\n this.history = config.history;\n this.actions = config.actions || [];\n this.activities = config.activities || EMPTY_ACTIVITY_MAP;\n this.meta = config.meta || {};\n this.events = config.events || [];\n this.matches = this.matches.bind(this);\n this.toStrings = this.toStrings.bind(this);\n this.configuration = config.configuration;\n this.transitions = config.transitions;\n this.children = config.children;\n this.done = !!config.done;\n Object.defineProperty(this, 'nextEvents', {\n get: function get() {\n return nextEvents(_this.configuration);\n }\n });\n }\n /**\r\n * Creates a new State instance for the given `stateValue` and `context`.\r\n * @param stateValue\r\n * @param context\r\n */\n\n\n State.from = function (stateValue, context) {\n if (stateValue instanceof State) {\n if (stateValue.context !== context) {\n return new State({\n value: stateValue.value,\n context: context,\n _event: stateValue._event,\n _sessionid: null,\n historyValue: stateValue.historyValue,\n history: stateValue.history,\n actions: [],\n activities: stateValue.activities,\n meta: {},\n events: [],\n configuration: [],\n transitions: [],\n children: {}\n });\n }\n\n return stateValue;\n }\n\n var _event = initEvent;\n return new State({\n value: stateValue,\n context: context,\n _event: _event,\n _sessionid: null,\n historyValue: undefined,\n history: undefined,\n actions: [],\n activities: undefined,\n meta: undefined,\n events: [],\n configuration: [],\n transitions: [],\n children: {}\n });\n };\n /**\r\n * Creates a new State instance for the given `config`.\r\n * @param config The state config\r\n */\n\n\n State.create = function (config) {\n return new State(config);\n };\n /**\r\n * Creates a new `State` instance for the given `stateValue` and `context` with no actions (side-effects).\r\n * @param stateValue\r\n * @param context\r\n */\n\n\n State.inert = function (stateValue, context) {\n if (stateValue instanceof State) {\n if (!stateValue.actions.length) {\n return stateValue;\n }\n\n var _event = initEvent;\n return new State({\n value: stateValue.value,\n context: context,\n _event: _event,\n _sessionid: null,\n historyValue: stateValue.historyValue,\n history: stateValue.history,\n activities: stateValue.activities,\n configuration: stateValue.configuration,\n transitions: [],\n children: {}\n });\n }\n\n return State.from(stateValue, context);\n };\n /**\r\n * Returns an array of all the string leaf state node paths.\r\n * @param stateValue\r\n * @param delimiter The character(s) that separate each subpath in the string state node path.\r\n */\n\n\n State.prototype.toStrings = function (stateValue, delimiter) {\n var _this = this;\n\n if (stateValue === void 0) {\n stateValue = this.value;\n }\n\n if (delimiter === void 0) {\n delimiter = '.';\n }\n\n if (isString(stateValue)) {\n return [stateValue];\n }\n\n var valueKeys = keys(stateValue);\n return valueKeys.concat.apply(valueKeys, __spread(valueKeys.map(function (key) {\n return _this.toStrings(stateValue[key], delimiter).map(function (s) {\n return key + delimiter + s;\n });\n })));\n };\n\n State.prototype.toJSON = function () {\n var _a = this,\n configuration = _a.configuration,\n transitions = _a.transitions,\n jsonValues = __rest(_a, [\"configuration\", \"transitions\"]);\n\n return jsonValues;\n };\n /**\r\n * Whether the current state value is a subset of the given parent state value.\r\n * @param parentStateValue\r\n */\n\n\n State.prototype.matches = function (parentStateValue) {\n return matchesState(parentStateValue, this.value);\n };\n\n return State;\n}();\n\nexport { State, bindActionToState, isState, stateValuesEqual };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport { createContext, useContext, forwardRef, createElement } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\n\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || _typeof(mergedTheme) !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if (process.env.NODE_ENV !== 'production' && (theme == null || _typeof(theme) !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\n\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\n\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = useContext(ThemeContext);\n return /*#__PURE__*/createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n} // thus we only need to replace what is a valid character for JS, but not for CSS\n\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\n\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type;\n\n if (process.env.NODE_ENV !== 'production') {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z0-9$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z0-9$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = insertStyles(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/createElement(type, newProps);\n return ele;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwnProperty as h, useTheme as u, withEmotionCache as w };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport React, { Component } from 'react';\nimport isEqual from 'react-fast-compare';\nimport { shallowEqual, getDisplayName, removeEmptyKey } from './utils';\nimport { InstantSearchConsumer, IndexConsumer } from './context';\n/**\n * Connectors are the HOC used to transform React components\n * into InstantSearch widgets.\n * In order to simplify the construction of such connectors\n * `createConnector` takes a description and transform it into\n * a connector.\n * @param {ConnectorDescription} connectorDesc the description of the connector\n * @return {Connector} a function that wraps a component into\n * an instantsearch connected one.\n */\n\nexport function createConnectorWithoutContext(connectorDesc) {\n if (!connectorDesc.displayName) {\n throw new Error('`createConnector` requires you to provide a `displayName` property.');\n }\n\n var isWidget = typeof connectorDesc.getSearchParameters === 'function' || typeof connectorDesc.getMetadata === 'function' || typeof connectorDesc.transitionState === 'function';\n return function (Composed) {\n var Connector = /*#__PURE__*/function (_Component) {\n _inherits(Connector, _Component);\n\n function Connector(props) {\n var _this;\n\n _classCallCheck(this, Connector);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this, props));\n\n _defineProperty(_assertThisInitialized(_this), \"unsubscribe\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"unregisterWidget\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"isUnmounting\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n providedProps: _this.getProvidedProps(_this.props)\n });\n\n _defineProperty(_assertThisInitialized(_this), \"refine\", function () {\n var _ref;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this.props.contextValue.onInternalStateUpdate( // refine will always be defined here because the prop is only given conditionally\n (_ref = connectorDesc.refine).call.apply(_ref, [_assertThisInitialized(_this), _this.props, _this.props.contextValue.store.getState().widgets].concat(args)));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"createURL\", function () {\n var _ref2;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _this.props.contextValue.createHrefForState( // refine will always be defined here because the prop is only given conditionally\n (_ref2 = connectorDesc.refine).call.apply(_ref2, [_assertThisInitialized(_this), _this.props, _this.props.contextValue.store.getState().widgets].concat(args)));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"searchForFacetValues\", function () {\n var _ref3;\n\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n _this.props.contextValue.onSearchForFacetValues( // searchForFacetValues will always be defined here because the prop is only given conditionally\n (_ref3 = connectorDesc.searchForFacetValues).call.apply(_ref3, [_assertThisInitialized(_this), _this.props, _this.props.contextValue.store.getState().widgets].concat(args)));\n });\n\n if (connectorDesc.getSearchParameters) {\n _this.props.contextValue.onSearchParameters(connectorDesc.getSearchParameters.bind(_assertThisInitialized(_this)), {\n ais: _this.props.contextValue,\n multiIndexContext: _this.props.indexContextValue\n }, _this.props, connectorDesc.getMetadata && connectorDesc.getMetadata.bind(_assertThisInitialized(_this)));\n }\n\n return _this;\n }\n\n _createClass(Connector, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n this.unsubscribe = this.props.contextValue.store.subscribe(function () {\n if (!_this2.isUnmounting) {\n _this2.setState({\n providedProps: _this2.getProvidedProps(_this2.props)\n });\n }\n });\n\n if (isWidget) {\n this.unregisterWidget = this.props.contextValue.widgetsManager.registerWidget(this);\n }\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n if (typeof connectorDesc.shouldComponentUpdate === 'function') {\n return connectorDesc.shouldComponentUpdate.call(this, this.props, nextProps, this.state, nextState);\n }\n\n var propsEqual = shallowEqual(this.props, nextProps);\n\n if (this.state.providedProps === null || nextState.providedProps === null) {\n if (this.state.providedProps === nextState.providedProps) {\n return !propsEqual;\n }\n\n return true;\n }\n\n return !propsEqual || !shallowEqual(this.state.providedProps, nextState.providedProps);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (!isEqual(prevProps, this.props)) {\n this.setState({\n providedProps: this.getProvidedProps(this.props)\n });\n\n if (isWidget) {\n this.props.contextValue.widgetsManager.update();\n\n if (typeof connectorDesc.transitionState === 'function') {\n this.props.contextValue.onSearchStateChange(connectorDesc.transitionState.call(this, this.props, this.props.contextValue.store.getState().widgets, this.props.contextValue.store.getState().widgets));\n }\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.isUnmounting = true;\n\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n\n if (this.unregisterWidget) {\n this.unregisterWidget();\n\n if (typeof connectorDesc.cleanUp === 'function') {\n var nextState = connectorDesc.cleanUp.call(this, this.props, this.props.contextValue.store.getState().widgets);\n this.props.contextValue.store.setState(_objectSpread({}, this.props.contextValue.store.getState(), {\n widgets: nextState\n }));\n this.props.contextValue.onSearchStateChange(removeEmptyKey(nextState));\n }\n }\n }\n }, {\n key: \"getProvidedProps\",\n value: function getProvidedProps(props) {\n var _this$props$contextVa = this.props.contextValue.store.getState(),\n widgets = _this$props$contextVa.widgets,\n results = _this$props$contextVa.results,\n resultsFacetValues = _this$props$contextVa.resultsFacetValues,\n searching = _this$props$contextVa.searching,\n searchingForFacetValues = _this$props$contextVa.searchingForFacetValues,\n isSearchStalled = _this$props$contextVa.isSearchStalled,\n metadata = _this$props$contextVa.metadata,\n error = _this$props$contextVa.error;\n\n var searchResults = {\n results: results,\n searching: searching,\n searchingForFacetValues: searchingForFacetValues,\n isSearchStalled: isSearchStalled,\n error: error\n };\n return connectorDesc.getProvidedProps.call(this, props, widgets, searchResults, metadata, // @MAJOR: move this attribute on the `searchResults` it doesn't\n // makes sense to have it into a separate argument. The search\n // flags are on the object why not the results?\n resultsFacetValues);\n }\n }, {\n key: \"getSearchParameters\",\n value: function getSearchParameters(searchParameters) {\n if (typeof connectorDesc.getSearchParameters === 'function') {\n return connectorDesc.getSearchParameters.call(this, searchParameters, this.props, this.props.contextValue.store.getState().widgets);\n }\n\n return null;\n }\n }, {\n key: \"getMetadata\",\n value: function getMetadata(nextWidgetsState) {\n if (typeof connectorDesc.getMetadata === 'function') {\n return connectorDesc.getMetadata.call(this, this.props, nextWidgetsState);\n }\n\n return {};\n }\n }, {\n key: \"transitionState\",\n value: function transitionState(prevWidgetsState, nextWidgetsState) {\n if (typeof connectorDesc.transitionState === 'function') {\n return connectorDesc.transitionState.call(this, this.props, prevWidgetsState, nextWidgetsState);\n }\n\n return nextWidgetsState;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n contextValue = _this$props.contextValue,\n props = _objectWithoutProperties(_this$props, [\"contextValue\"]);\n\n var providedProps = this.state.providedProps;\n\n if (providedProps === null) {\n return null;\n }\n\n var refineProps = typeof connectorDesc.refine === 'function' ? {\n refine: this.refine,\n createURL: this.createURL\n } : {};\n var searchForFacetValuesProps = typeof connectorDesc.searchForFacetValues === 'function' ? {\n searchForItems: this.searchForFacetValues\n } : {};\n return /*#__PURE__*/React.createElement(Composed, _extends({}, props, providedProps, refineProps, searchForFacetValuesProps));\n }\n }]);\n\n return Connector;\n }(Component);\n\n _defineProperty(Connector, \"displayName\", \"\".concat(connectorDesc.displayName, \"(\").concat(getDisplayName(Composed), \")\"));\n\n _defineProperty(Connector, \"propTypes\", connectorDesc.propTypes);\n\n _defineProperty(Connector, \"defaultProps\", connectorDesc.defaultProps);\n\n return Connector;\n };\n}\n\nvar createConnectorWithContext = function createConnectorWithContext(connectorDesc) {\n return function (Composed) {\n var Connector = createConnectorWithoutContext(connectorDesc)(Composed);\n\n var ConnectorWrapper = function ConnectorWrapper(props) {\n return /*#__PURE__*/React.createElement(InstantSearchConsumer, null, function (contextValue) {\n return /*#__PURE__*/React.createElement(IndexConsumer, null, function (indexContextValue) {\n return /*#__PURE__*/React.createElement(Connector, _extends({\n contextValue: contextValue,\n indexContextValue: indexContextValue\n }, props));\n });\n });\n };\n\n return ConnectorWrapper;\n };\n};\n\nexport default createConnectorWithContext;","var _objectAssign = /*#__PURE__*/require(\"./internal/_objectAssign\");\n\nvar _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeRight, R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @deprecated since v0.26.0\n * @example\n *\n * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n * //=> { 'name': 'fred', 'age': 40 }\n *\n * const withDefaults = R.merge({x: 0, y: 0});\n * withDefaults({y: 2}); //=> {x: 0, y: 2}\n * @symb R.merge(a, b) = {...a, ...b}\n */\n\n\nvar merge = /*#__PURE__*/_curry2(function merge(l, r) {\n return _objectAssign({}, l, r);\n});\n\nmodule.exports = merge;","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\nvar ReCAPTCHA = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ReCAPTCHA, _React$Component);\n\n function ReCAPTCHA() {\n var _this;\n\n _this = _React$Component.call(this) || this;\n _this.handleExpired = _this.handleExpired.bind(_assertThisInitialized(_this));\n _this.handleErrored = _this.handleErrored.bind(_assertThisInitialized(_this));\n _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));\n _this.handleRecaptchaRef = _this.handleRecaptchaRef.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = ReCAPTCHA.prototype;\n\n _proto.getValue = function getValue() {\n if (this.props.grecaptcha && this._widgetId !== undefined) {\n return this.props.grecaptcha.getResponse(this._widgetId);\n }\n\n return null;\n };\n\n _proto.getWidgetId = function getWidgetId() {\n if (this.props.grecaptcha && this._widgetId !== undefined) {\n return this._widgetId;\n }\n\n return null;\n };\n\n _proto.execute = function execute() {\n var grecaptcha = this.props.grecaptcha;\n\n if (grecaptcha && this._widgetId !== undefined) {\n return grecaptcha.execute(this._widgetId);\n } else {\n this._executeRequested = true;\n }\n };\n\n _proto.executeAsync = function executeAsync() {\n var _this2 = this;\n\n return new Promise(function (resolve, reject) {\n _this2.executionResolve = resolve;\n _this2.executionReject = reject;\n\n _this2.execute();\n });\n };\n\n _proto.reset = function reset() {\n if (this.props.grecaptcha && this._widgetId !== undefined) {\n this.props.grecaptcha.reset(this._widgetId);\n }\n };\n\n _proto.handleExpired = function handleExpired() {\n if (this.props.onExpired) {\n this.props.onExpired();\n } else {\n this.handleChange(null);\n }\n };\n\n _proto.handleErrored = function handleErrored() {\n if (this.props.onErrored) {\n this.props.onErrored();\n }\n\n if (this.executionReject) {\n this.executionReject();\n delete this.executionResolve;\n delete this.executionReject;\n }\n };\n\n _proto.handleChange = function handleChange(token) {\n if (this.props.onChange) {\n this.props.onChange(token);\n }\n\n if (this.executionResolve) {\n this.executionResolve(token);\n delete this.executionReject;\n delete this.executionResolve;\n }\n };\n\n _proto.explicitRender = function explicitRender() {\n if (this.props.grecaptcha && this.props.grecaptcha.render && this._widgetId === undefined) {\n var wrapper = document.createElement(\"div\");\n this._widgetId = this.props.grecaptcha.render(wrapper, {\n sitekey: this.props.sitekey,\n callback: this.handleChange,\n theme: this.props.theme,\n type: this.props.type,\n tabindex: this.props.tabindex,\n \"expired-callback\": this.handleExpired,\n \"error-callback\": this.handleErrored,\n size: this.props.size,\n stoken: this.props.stoken,\n hl: this.props.hl,\n badge: this.props.badge\n });\n this.captcha.appendChild(wrapper);\n }\n\n if (this._executeRequested && this.props.grecaptcha && this._widgetId !== undefined) {\n this._executeRequested = false;\n this.execute();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.explicitRender();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.explicitRender();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._widgetId !== undefined) {\n this.delayOfCaptchaIframeRemoving();\n this.reset();\n }\n };\n\n _proto.delayOfCaptchaIframeRemoving = function delayOfCaptchaIframeRemoving() {\n var temporaryNode = document.createElement(\"div\");\n document.body.appendChild(temporaryNode);\n temporaryNode.style.display = \"none\"; // move of the recaptcha to a temporary node\n\n while (this.captcha.firstChild) {\n temporaryNode.appendChild(this.captcha.firstChild);\n } // delete the temporary node after reset will be done\n\n\n setTimeout(function () {\n document.body.removeChild(temporaryNode);\n }, 5000);\n };\n\n _proto.handleRecaptchaRef = function handleRecaptchaRef(elem) {\n this.captcha = elem;\n };\n\n _proto.render = function render() {\n // consume properties owned by the reCATPCHA, pass the rest to the div so the user can style it.\n\n /* eslint-disable no-unused-vars */\n var _this$props = this.props,\n sitekey = _this$props.sitekey,\n onChange = _this$props.onChange,\n theme = _this$props.theme,\n type = _this$props.type,\n tabindex = _this$props.tabindex,\n onExpired = _this$props.onExpired,\n onErrored = _this$props.onErrored,\n size = _this$props.size,\n stoken = _this$props.stoken,\n grecaptcha = _this$props.grecaptcha,\n badge = _this$props.badge,\n hl = _this$props.hl,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"sitekey\", \"onChange\", \"theme\", \"type\", \"tabindex\", \"onExpired\", \"onErrored\", \"size\", \"stoken\", \"grecaptcha\", \"badge\", \"hl\"]);\n /* eslint-enable no-unused-vars */\n\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, childProps, {\n ref: this.handleRecaptchaRef\n }));\n };\n\n return ReCAPTCHA;\n}(React.Component);\n\nexport { ReCAPTCHA as default };\nReCAPTCHA.displayName = \"ReCAPTCHA\";\nReCAPTCHA.propTypes = {\n sitekey: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n grecaptcha: PropTypes.object,\n theme: PropTypes.oneOf([\"dark\", \"light\"]),\n type: PropTypes.oneOf([\"image\", \"audio\"]),\n tabindex: PropTypes.number,\n onExpired: PropTypes.func,\n onErrored: PropTypes.func,\n size: PropTypes.oneOf([\"compact\", \"normal\", \"invisible\"]),\n stoken: PropTypes.string,\n hl: PropTypes.string,\n badge: PropTypes.oneOf([\"bottomright\", \"bottomleft\", \"inline\"])\n};\nReCAPTCHA.defaultProps = {\n onChange: function onChange() {},\n theme: \"light\",\n type: \"image\",\n tabindex: 0,\n size: \"normal\",\n badge: \"bottomright\"\n};","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nimport { Component, createElement, forwardRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nvar SCRIPT_MAP = {}; // A counter used to generate a unique id for each component that uses the function\n\nvar idCount = 0;\nexport default function makeAsyncScript(getScriptURL, options) {\n options = options || {};\n return function wrapWithAsyncScript(WrappedComponent) {\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || \"Component\";\n\n var AsyncScriptLoader = /*#__PURE__*/function (_Component) {\n _inheritsLoose(AsyncScriptLoader, _Component);\n\n function AsyncScriptLoader(props, context) {\n var _this;\n\n _this = _Component.call(this, props, context) || this;\n _this.state = {};\n _this.__scriptURL = \"\";\n return _this;\n }\n\n var _proto = AsyncScriptLoader.prototype;\n\n _proto.asyncScriptLoaderGetScriptLoaderID = function asyncScriptLoaderGetScriptLoaderID() {\n if (!this.__scriptLoaderID) {\n this.__scriptLoaderID = \"async-script-loader-\" + idCount++;\n }\n\n return this.__scriptLoaderID;\n };\n\n _proto.setupScriptURL = function setupScriptURL() {\n this.__scriptURL = typeof getScriptURL === \"function\" ? getScriptURL() : getScriptURL;\n return this.__scriptURL;\n };\n\n _proto.asyncScriptLoaderHandleLoad = function asyncScriptLoaderHandleLoad(state) {\n var _this2 = this; // use reacts setState callback to fire props.asyncScriptOnLoad with new state/entry\n\n\n this.setState(state, function () {\n return _this2.props.asyncScriptOnLoad && _this2.props.asyncScriptOnLoad(_this2.state);\n });\n };\n\n _proto.asyncScriptLoaderTriggerOnScriptLoaded = function asyncScriptLoaderTriggerOnScriptLoaded() {\n var mapEntry = SCRIPT_MAP[this.__scriptURL];\n\n if (!mapEntry || !mapEntry.loaded) {\n throw new Error(\"Script is not loaded.\");\n }\n\n for (var obsKey in mapEntry.observers) {\n mapEntry.observers[obsKey](mapEntry);\n }\n\n delete window[options.callbackName];\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this3 = this;\n\n var scriptURL = this.setupScriptURL();\n var key = this.asyncScriptLoaderGetScriptLoaderID();\n var _options = options,\n globalName = _options.globalName,\n callbackName = _options.callbackName,\n scriptId = _options.scriptId; // check if global object already attached to window\n\n if (globalName && typeof window[globalName] !== \"undefined\") {\n SCRIPT_MAP[scriptURL] = {\n loaded: true,\n observers: {}\n };\n } // check if script loading already\n\n\n if (SCRIPT_MAP[scriptURL]) {\n var entry = SCRIPT_MAP[scriptURL]; // if loaded or errored then \"finish\"\n\n if (entry && (entry.loaded || entry.errored)) {\n this.asyncScriptLoaderHandleLoad(entry);\n return;\n } // if still loading then callback to observer queue\n\n\n entry.observers[key] = function (entry) {\n return _this3.asyncScriptLoaderHandleLoad(entry);\n };\n\n return;\n }\n /*\n * hasn't started loading\n * start the \"magic\"\n * setup script to load and observers\n */\n\n\n var observers = {};\n\n observers[key] = function (entry) {\n return _this3.asyncScriptLoaderHandleLoad(entry);\n };\n\n SCRIPT_MAP[scriptURL] = {\n loaded: false,\n observers: observers\n };\n var script = document.createElement(\"script\");\n script.src = scriptURL;\n script.async = true;\n\n for (var attribute in options.attributes) {\n script.setAttribute(attribute, options.attributes[attribute]);\n }\n\n if (scriptId) {\n script.id = scriptId;\n }\n\n var callObserverFuncAndRemoveObserver = function callObserverFuncAndRemoveObserver(func) {\n if (SCRIPT_MAP[scriptURL]) {\n var mapEntry = SCRIPT_MAP[scriptURL];\n var observersMap = mapEntry.observers;\n\n for (var obsKey in observersMap) {\n if (func(observersMap[obsKey])) {\n delete observersMap[obsKey];\n }\n }\n }\n };\n\n if (callbackName && typeof window !== \"undefined\") {\n window[callbackName] = function () {\n return _this3.asyncScriptLoaderTriggerOnScriptLoaded();\n };\n }\n\n script.onload = function () {\n var mapEntry = SCRIPT_MAP[scriptURL];\n\n if (mapEntry) {\n mapEntry.loaded = true;\n callObserverFuncAndRemoveObserver(function (observer) {\n if (callbackName) {\n return false;\n }\n\n observer(mapEntry);\n return true;\n });\n }\n };\n\n script.onerror = function () {\n var mapEntry = SCRIPT_MAP[scriptURL];\n\n if (mapEntry) {\n mapEntry.errored = true;\n callObserverFuncAndRemoveObserver(function (observer) {\n observer(mapEntry);\n return true;\n });\n }\n };\n\n document.body.appendChild(script);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n // Remove tag script\n var scriptURL = this.__scriptURL;\n\n if (options.removeOnUnmount === true) {\n var allScripts = document.getElementsByTagName(\"script\");\n\n for (var i = 0; i < allScripts.length; i += 1) {\n if (allScripts[i].src.indexOf(scriptURL) > -1) {\n if (allScripts[i].parentNode) {\n allScripts[i].parentNode.removeChild(allScripts[i]);\n }\n }\n }\n } // Clean the observer entry\n\n\n var mapEntry = SCRIPT_MAP[scriptURL];\n\n if (mapEntry) {\n delete mapEntry.observers[this.asyncScriptLoaderGetScriptLoaderID()];\n\n if (options.removeOnUnmount === true) {\n delete SCRIPT_MAP[scriptURL];\n }\n }\n };\n\n _proto.render = function render() {\n var globalName = options.globalName; // remove asyncScriptOnLoad from childProps\n\n var _this$props = this.props,\n asyncScriptOnLoad = _this$props.asyncScriptOnLoad,\n forwardedRef = _this$props.forwardedRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"asyncScriptOnLoad\", \"forwardedRef\"]); // eslint-disable-line no-unused-vars\n\n\n if (globalName && typeof window !== \"undefined\") {\n childProps[globalName] = typeof window[globalName] !== \"undefined\" ? window[globalName] : undefined;\n }\n\n childProps.ref = forwardedRef;\n return /*#__PURE__*/createElement(WrappedComponent, childProps);\n };\n\n return AsyncScriptLoader;\n }(Component); // Note the second param \"ref\" provided by React.forwardRef.\n // We can pass it along to AsyncScriptLoader as a regular prop, e.g. \"forwardedRef\"\n // And it can then be attached to the Component.\n\n\n var ForwardedComponent = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/createElement(AsyncScriptLoader, _extends({}, props, {\n forwardedRef: ref\n }));\n });\n ForwardedComponent.displayName = \"AsyncScriptLoader(\" + wrappedComponentName + \")\";\n ForwardedComponent.propTypes = {\n asyncScriptOnLoad: PropTypes.func\n };\n return hoistStatics(ForwardedComponent, WrappedComponent);\n };\n}","import ReCAPTCHA from \"./recaptcha\";\nimport makeAsyncScriptLoader from \"react-async-script\";\nvar callbackName = \"onloadcallback\";\nvar globalName = \"grecaptcha\";\n\nfunction getOptions() {\n return typeof window !== \"undefined\" && window.recaptchaOptions || {};\n}\n\nfunction getURL() {\n var dynamicOptions = getOptions();\n var hostname = dynamicOptions.useRecaptchaNet ? \"recaptcha.net\" : \"www.google.com\";\n return \"https://\" + hostname + \"/recaptcha/api.js?onload=\" + callbackName + \"&render=explicit\";\n}\n\nexport default makeAsyncScriptLoader(getURL, {\n callbackName: callbackName,\n globalName: globalName\n})(ReCAPTCHA);","import RecaptchaWrapper from \"./recaptcha-wrapper\";\nimport ReCAPTCHA from \"./recaptcha\";\nexport default RecaptchaWrapper;\nexport { ReCAPTCHA };","'use strict';\n\nvar reactIs = require('react-is');\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;","var global = require('../internals/global');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar Object = global.Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","import _Symbol from './_Symbol.js';\n/** Used for built-in method references. */\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar nativeObjectToString = objectProto.toString;\n/** Built-in value references. */\n\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n\n return result;\n}\n\nexport default getRawTag;","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar nativeObjectToString = objectProto.toString;\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;","import _Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n/** `Object#toString` result references. */\n\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n/** Built-in value references. */\n\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);\n}\n\nexport default baseGetTag;","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","var _curry3 = /*#__PURE__*/require(\"./internal/_curry3\");\n\nvar equals = /*#__PURE__*/require(\"./equals\");\n\nvar path = /*#__PURE__*/require(\"./path\");\n/**\n * Determines whether a nested path on an object has a specific value, in\n * [`R.equals`](#equals) terms. Most likely used to filter a list.\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Relation\n * @typedefn Idx = String | Int\n * @sig [Idx] -> a -> {a} -> Boolean\n * @param {Array} path The path of the nested property to use\n * @param {*} val The value to compare the nested property with\n * @param {Object} obj The object to check the nested property in\n * @return {Boolean} `true` if the value equals the nested object property,\n * `false` otherwise.\n * @example\n *\n * const user1 = { address: { zipCode: 90210 } };\n * const user2 = { address: { zipCode: 55555 } };\n * const user3 = { name: 'Bob' };\n * const users = [ user1, user2, user3 ];\n * const isFamous = R.pathEq(['address', 'zipCode'], 90210);\n * R.filter(isFamous, users); //=> [ user1 ]\n */\n\n\nvar pathEq = /*#__PURE__*/_curry3(function pathEq(_path, val, obj) {\n return equals(path(_path, obj), val);\n});\n\nmodule.exports = pathEq;","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\n\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n\n if (isProduction) {\n throw new Error(prefix);\n }\n\n throw new Error(prefix + \": \" + (message || ''));\n}\n\nexport default invariant;","import { Presence } from '../types.js';\n/**\n * Default handlers for batching VisualElements\n */\n\nvar defaultHandler = {\n measureLayout: function measureLayout(child) {\n return child.updateLayoutMeasurement();\n },\n layoutReady: function layoutReady(child) {\n return child.notifyLayoutReady();\n }\n};\n/**\n * Create a batcher to process VisualElements\n */\n\nfunction createBatcher() {\n var queue = new Set();\n return {\n add: function add(child) {\n return queue.add(child);\n },\n flush: function flush(_a) {\n var _b = _a === void 0 ? defaultHandler : _a,\n measureLayout = _b.measureLayout,\n layoutReady = _b.layoutReady,\n parent = _b.parent;\n\n var order = Array.from(queue).sort(function (a, b) {\n return a.depth - b.depth;\n });\n\n var resetAndMeasure = function resetAndMeasure() {\n /**\n * Write: Reset any transforms on children elements so we can read their actual layout\n */\n order.forEach(function (child) {\n return child.resetTransform();\n });\n /**\n * Read: Measure the actual layout\n */\n\n order.forEach(measureLayout);\n };\n\n parent ? parent.withoutTransform(resetAndMeasure) : resetAndMeasure();\n /**\n * Write: Notify the VisualElements they're ready for further write operations.\n */\n\n order.forEach(layoutReady);\n /**\n * After all children have started animating, ensure any Entering components are set to Present.\n * If we add deferred animations (set up all animations and then start them in two loops) this\n * could be moved to the start loop. But it needs to happen after all the animations configs\n * are generated in AnimateSharedLayout as this relies on presence data\n */\n\n order.forEach(function (child) {\n if (child.isPresent) child.presence = Presence.Present;\n });\n queue.clear();\n }\n };\n}\n\nexport { createBatcher };","import { createContext } from 'react';\nimport { createBatcher } from '../components/AnimateSharedLayout/utils/batcher.js';\nvar SharedLayoutContext = /*#__PURE__*/createContext(createBatcher());\n/**\n * @internal\n */\n\nvar FramerTreeLayoutContext = /*#__PURE__*/createContext(createBatcher());\n\nfunction isSharedLayout(context) {\n return !!context.forceUpdate;\n}\n\nexport { FramerTreeLayoutContext, SharedLayoutContext, isSharedLayout };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;","var global = require('../internals/global');\n\nvar TypeError = global.TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar un$Join = uncurryThis([].join);\n\nvar ES3_STRINGS = IndexedObject != Object;\nvar STRICT_METHOD = arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.es/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {\n join: function join(separator) {\n return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n});\n","var _concat = /*#__PURE__*/require(\"./internal/_concat\");\n\nvar _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n/**\n * Returns a new list with the given element at the front, followed by the\n * contents of the list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> [a]\n * @param {*} el The item to add to the head of the output list.\n * @param {Array} list The array to add to the tail of the output list.\n * @return {Array} A new array.\n * @see R.append\n * @example\n *\n * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum']\n */\n\n\nvar prepend = /*#__PURE__*/_curry2(function prepend(el, list) {\n return _concat([el], list);\n});\n\nmodule.exports = prepend;","import coreJsData from './_coreJsData.js';\n/** Used to detect methods masquerading as native. */\n\nvar maskSrcKey = function () {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? 'Symbol(src)_1.' + uid : '';\n}();\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n\n\nfunction isMasked(func) {\n return !!maskSrcKey && maskSrcKey in func;\n}\n\nexport default isMasked;","import root from './_root.js';\n/** Used to detect overreaching core-js shims. */\n\nvar coreJsData = root['__core-js_shared__'];\nexport default coreJsData;","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n/** Used to detect host constructors (Safari). */\n\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n/** Used for built-in method references. */\n\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n/** Used to resolve the decompiled source of functions. */\n\nvar funcToString = funcProto.toString;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/** Used to detect if a method is native. */\n\nvar reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&').replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;","var _curry2 = /*#__PURE__*/require(\"./internal/_curry2\");\n\nvar mergeDeepWithKey = /*#__PURE__*/require(\"./mergeDeepWithKey\");\n/**\n * Creates a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects:\n * - and both values are objects, the two values will be recursively merged\n * - otherwise the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig {a} -> {a} -> {a}\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey\n * @example\n *\n * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},\n * { age: 40, contact: { email: 'baa@example.com' }});\n * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }}\n */\n\n\nvar mergeDeepRight = /*#__PURE__*/_curry2(function mergeDeepRight(lObj, rObj) {\n return mergeDeepWithKey(function (k, lVal, rVal) {\n return rVal;\n }, lObj, rObj);\n});\n\nmodule.exports = mergeDeepRight;","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n} // About 1.5x faster than the two-arg version of Array#splice()\n\n\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n} // This implementation is based heavily on node's url.parse\n\n\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n var hasTrailingSlash;\n\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }\n if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n var result = fromParts.join('/');\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n return result;\n}\n\nexport default resolvePathname;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true; // Otherwise, if either of them == null they are not equal.\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n if (_typeof(a) === 'object' || _typeof(b) === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n return Object.keys(Object.assign({}, a, b)).every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\n\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\n\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\n\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\n\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\n\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\n\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\n\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(_typeof(path) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(_typeof(path) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(_typeof(path) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(_typeof(path) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","module.exports = false;\n","'use strict';\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar bind = require('./helpers/bind'); // utils is a library of generic helper functions non-specific to axios\n\n\nvar toString = Object.prototype.toString;\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\n\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\n\n\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\n\n\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\n\n\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\n\n\nfunction isFormData(val) {\n return typeof FormData !== 'undefined' && val instanceof FormData;\n}\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\n\n\nfunction isArrayBufferView(val) {\n var result;\n\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && val.buffer instanceof ArrayBuffer;\n }\n\n return result;\n}\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\n\n\nfunction isString(val) {\n return typeof val === 'string';\n}\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\n\n\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\n\n\nfunction isObject(val) {\n return val !== null && _typeof(val) === 'object';\n}\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\n\n\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\n\n\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\n\n\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\n\n\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\n\n\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\n\n\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\n\n\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\n\n\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\n\n\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) {\n return false;\n }\n\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\n\n\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n } // Force an array if not already something iterable\n\n\n if (_typeof(obj) !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\n\n\nfunction\n /* obj1, obj2, obj3, ... */\nmerge() {\n var result = {};\n\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n\n return result;\n}\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\n\n\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\n\n\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport $$observable from 'symbol-observable';\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\n\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split('').join('.');\n};\n\nvar ActionTypes = {\n INIT: \"@@redux/INIT\" + randomString(),\n REPLACE: \"@@redux/REPLACE\" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\n }\n};\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\n\nfunction isPlainObject(obj) {\n if (_typeof(obj) !== 'object' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');\n }\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n /**\n * This makes a shallow copy of currentListeners so we can use\n * nextListeners as a temporary list while dispatching.\n *\n * This prevents any bugs around consumers calling\n * subscribe/unsubscribe in the middle of a dispatch.\n */\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected the listener to be a function.');\n }\n\n if (isDispatching) {\n throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n currentListeners = null;\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.\n // Any reducers that existed in both the new and old rootReducer\n // will receive the previous state. This effectively populates\n // the new state tree with any relevant data from the old one.\n\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (_typeof(observer) !== 'object' || observer === null) {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n } // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\n\n\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionDescription = actionType && \"action \\\"\" + String(actionType) + \"\\\"\" || 'an action';\n return \"Given \" + actionDescription + \", reducer \\\"\" + key + \"\\\" returned undefined. \" + \"To ignore an action, you must explicitly return the previous state. \" + \"If you want this reducer to hold no value, you can return null instead of undefined.\";\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return \"The \" + argumentName + \" has unexpected type of \\\"\" + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + \"\\\". Expected argument to be an object with the following \" + (\"keys: \\\"\" + reducerKeys.join('\", \"') + \"\\\"\");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle \" + ActionTypes.INIT + \" or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning(\"No reducer provided for key \\\"\" + key + \"\\\"\");\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (_typeof(actionCreators) !== 'object' || actionCreators === null) {\n throw new Error(\"bindActionCreators expected an object or a function, instead received \" + (actionCreators === null ? 'null' : _typeof(actionCreators)) + \". \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\n\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\n\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning('You are currently using minified code outside of NODE_ENV === \"production\". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore };","import React from 'react';\nexport var ReactReduxContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== 'production') {\n ReactReduxContext.displayName = 'ReactRedux';\n}\n\nexport default ReactReduxContext;","// Default to a dummy \"batch\" implementation that just runs the callback\nfunction defaultNoopBatch(callback) {\n callback();\n}\n\nvar batch = defaultNoopBatch; // Allow injecting another batching function later\n\nexport var setBatch = function setBatch(newBatch) {\n return batch = newBatch;\n}; // Supply a getter just to skip dealing with ESM bindings\n\nexport var getBatch = function getBatch() {\n return batch;\n};","import { getBatch } from './batch'; // encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nvar nullListeners = {\n notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n var batch = getBatch();\n var first = null;\n var last = null;\n return {\n clear: function clear() {\n first = null;\n last = null;\n },\n notify: function notify() {\n batch(function () {\n var listener = first;\n\n while (listener) {\n listener.callback();\n listener = listener.next;\n }\n });\n },\n get: function get() {\n var listeners = [];\n var listener = first;\n\n while (listener) {\n listeners.push(listener);\n listener = listener.next;\n }\n\n return listeners;\n },\n subscribe: function subscribe(callback) {\n var isSubscribed = true;\n var listener = last = {\n callback: callback,\n next: null,\n prev: last\n };\n\n if (listener.prev) {\n listener.prev.next = listener;\n } else {\n first = listener;\n }\n\n return function unsubscribe() {\n if (!isSubscribed || first === null) return;\n isSubscribed = false;\n\n if (listener.next) {\n listener.next.prev = listener.prev;\n } else {\n last = listener.prev;\n }\n\n if (listener.prev) {\n listener.prev.next = listener.next;\n } else {\n first = listener.next;\n }\n };\n }\n };\n}\n\nvar Subscription = /*#__PURE__*/function () {\n function Subscription(store, parentSub) {\n this.store = store;\n this.parentSub = parentSub;\n this.unsubscribe = null;\n this.listeners = nullListeners;\n this.handleChangeWrapper = this.handleChangeWrapper.bind(this);\n }\n\n var _proto = Subscription.prototype;\n\n _proto.addNestedSub = function addNestedSub(listener) {\n this.trySubscribe();\n return this.listeners.subscribe(listener);\n };\n\n _proto.notifyNestedSubs = function notifyNestedSubs() {\n this.listeners.notify();\n };\n\n _proto.handleChangeWrapper = function handleChangeWrapper() {\n if (this.onStateChange) {\n this.onStateChange();\n }\n };\n\n _proto.isSubscribed = function isSubscribed() {\n return Boolean(this.unsubscribe);\n };\n\n _proto.trySubscribe = function trySubscribe() {\n if (!this.unsubscribe) {\n this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.handleChangeWrapper) : this.store.subscribe(this.handleChangeWrapper);\n this.listeners = createListenerCollection();\n }\n };\n\n _proto.tryUnsubscribe = function tryUnsubscribe() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n this.listeners.clear();\n this.listeners = nullListeners;\n }\n };\n\n return Subscription;\n}();\n\nexport { Subscription as default };","import React, { useMemo, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { ReactReduxContext } from './Context';\nimport Subscription from '../utils/Subscription';\n\nfunction Provider(_ref) {\n var store = _ref.store,\n context = _ref.context,\n children = _ref.children;\n var contextValue = useMemo(function () {\n var subscription = new Subscription(store);\n subscription.onStateChange = subscription.notifyNestedSubs;\n return {\n store: store,\n subscription: subscription\n };\n }, [store]);\n var previousState = useMemo(function () {\n return store.getState();\n }, [store]);\n useEffect(function () {\n var subscription = contextValue.subscription;\n subscription.trySubscribe();\n\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n\n return function () {\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n };\n }, [contextValue, previousState]);\n var Context = context || ReactReduxContext;\n return /*#__PURE__*/React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nif (process.env.NODE_ENV !== 'production') {\n Provider.propTypes = {\n store: PropTypes.shape({\n subscribe: PropTypes.func.isRequired,\n dispatch: PropTypes.func.isRequired,\n getState: PropTypes.func.isRequired\n }),\n context: PropTypes.object,\n children: PropTypes.any\n };\n}\n\nexport default Provider;","import { useEffect, useLayoutEffect } from 'react'; // React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store\n// subscription callback always has the selector from the latest render commit\n// available, otherwise a store update may happen between render and the effect,\n// which may cause missed updates; we also must ensure the store subscription\n// is created synchronously, otherwise a store update may occur before the\n// subscription is created and an inconsistent state may be observed\n\nexport var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport hoistStatics from 'hoist-non-react-statics';\nimport React, { useContext, useMemo, useRef, useReducer } from 'react';\nimport { isValidElementType, isContextConsumer } from 'react-is';\nimport Subscription from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\nimport { ReactReduxContext } from './Context'; // Define some constant arrays just to avoid re-creating these\n\nvar EMPTY_ARRAY = [];\nvar NO_SUBSCRIPTION_ARRAY = [null, null];\n\nvar stringifyComponent = function stringifyComponent(Comp) {\n try {\n return JSON.stringify(Comp);\n } catch (err) {\n return String(Comp);\n }\n};\n\nfunction storeStateUpdatesReducer(state, action) {\n var updateCount = state[1];\n return [action.payload, updateCount + 1];\n}\n\nfunction useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {\n useIsomorphicLayoutEffect(function () {\n return effectFunc.apply(void 0, effectArgs);\n }, dependencies);\n}\n\nfunction captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs) {\n // We want to capture the wrapper props and child props we used for later comparisons\n lastWrapperProps.current = wrapperProps;\n lastChildProps.current = actualChildProps;\n renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update\n\n if (childPropsFromStoreUpdate.current) {\n childPropsFromStoreUpdate.current = null;\n notifyNestedSubs();\n }\n}\n\nfunction subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch) {\n // If we're not subscribed to the store, nothing to do here\n if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts\n\n var didUnsubscribe = false;\n var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component\n\n var checkForUpdates = function checkForUpdates() {\n if (didUnsubscribe) {\n // Don't run stale listeners.\n // Redux doesn't guarantee unsubscriptions happen until next dispatch.\n return;\n }\n\n var latestStoreState = store.getState();\n var newChildProps, error;\n\n try {\n // Actually run the selector with the most recent store state and wrapper props\n // to determine what the child props should be\n newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current);\n } catch (e) {\n error = e;\n lastThrownError = e;\n }\n\n if (!error) {\n lastThrownError = null;\n } // If the child props haven't changed, nothing to do here - cascade the subscription update\n\n\n if (newChildProps === lastChildProps.current) {\n if (!renderIsScheduled.current) {\n notifyNestedSubs();\n }\n } else {\n // Save references to the new child props. Note that we track the \"child props from store update\"\n // as a ref instead of a useState/useReducer because we need a way to determine if that value has\n // been processed. If this went into useState/useReducer, we couldn't clear out the value without\n // forcing another re-render, which we don't want.\n lastChildProps.current = newChildProps;\n childPropsFromStoreUpdate.current = newChildProps;\n renderIsScheduled.current = true; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render\n\n forceComponentUpdateDispatch({\n type: 'STORE_UPDATED',\n payload: {\n error: error\n }\n });\n }\n }; // Actually subscribe to the nearest connected ancestor (or store)\n\n\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe(); // Pull data from the store after first render in case the store has\n // changed since we began.\n\n checkForUpdates();\n\n var unsubscribeWrapper = function unsubscribeWrapper() {\n didUnsubscribe = true;\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n\n if (lastThrownError) {\n // It's possible that we caught an error due to a bad mapState function, but the\n // parent re-rendered without this component and we're about to unmount.\n // This shouldn't happen as long as we do top-down subscriptions correctly, but\n // if we ever do those wrong, this throw will surface the error in our tests.\n // In that case, throw the error from here so it doesn't get lost.\n throw lastThrownError;\n }\n };\n\n return unsubscribeWrapper;\n}\n\nvar initStateUpdates = function initStateUpdates() {\n return [null, 0];\n};\n\nexport default function connectAdvanced(\n/*\n selectorFactory is a func that is responsible for returning the selector function used to\n compute new props from state, props, and dispatch. For example:\n export default connectAdvanced((dispatch, options) => (state, props) => ({\n thing: state.things[props.thingId],\n saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n }))(YourComponent)\n Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n props. Do not use connectAdvanced directly without memoizing results between calls to your\n selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory, // options object:\n_ref) {\n if (_ref === void 0) {\n _ref = {};\n }\n\n var _ref2 = _ref,\n _ref2$getDisplayName = _ref2.getDisplayName,\n getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {\n return \"ConnectAdvanced(\" + name + \")\";\n } : _ref2$getDisplayName,\n _ref2$methodName = _ref2.methodName,\n methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,\n _ref2$renderCountProp = _ref2.renderCountProp,\n renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,\n _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,\n shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,\n _ref2$storeKey = _ref2.storeKey,\n storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,\n _ref2$withRef = _ref2.withRef,\n withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,\n _ref2$forwardRef = _ref2.forwardRef,\n forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef,\n _ref2$context = _ref2.context,\n context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context,\n connectOptions = _objectWithoutPropertiesLoose(_ref2, [\"getDisplayName\", \"methodName\", \"renderCountProp\", \"shouldHandleStateChanges\", \"storeKey\", \"withRef\", \"forwardRef\", \"context\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (renderCountProp !== undefined) {\n throw new Error(\"renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension\");\n }\n\n if (withRef) {\n throw new Error('withRef is removed. To access the wrapped instance, use a ref on the connected component');\n }\n\n var customStoreWarningMessage = 'To use a custom Redux store for specific components, create a custom React context with ' + \"React.createContext(), and pass the context object to React Redux's Provider and specific components\" + ' like: . ' + 'You may also pass a {context : MyContext} option to connect';\n\n if (storeKey !== 'store') {\n throw new Error('storeKey has been removed and does not do anything. ' + customStoreWarningMessage);\n }\n }\n\n var Context = context;\n return function wrapWithConnect(WrappedComponent) {\n if (process.env.NODE_ENV !== 'production' && !isValidElementType(WrappedComponent)) {\n throw new Error(\"You must pass a component to the function returned by \" + (methodName + \". Instead received \" + stringifyComponent(WrappedComponent)));\n }\n\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n var displayName = getDisplayName(wrappedComponentName);\n\n var selectorFactoryOptions = _extends({}, connectOptions, {\n getDisplayName: getDisplayName,\n methodName: methodName,\n renderCountProp: renderCountProp,\n shouldHandleStateChanges: shouldHandleStateChanges,\n storeKey: storeKey,\n displayName: displayName,\n wrappedComponentName: wrappedComponentName,\n WrappedComponent: WrappedComponent\n });\n\n var pure = connectOptions.pure;\n\n function createChildSelector(store) {\n return selectorFactory(store.dispatch, selectorFactoryOptions);\n } // If we aren't running in \"pure\" mode, we don't want to memoize values.\n // To avoid conditionally calling hooks, we fall back to a tiny wrapper\n // that just executes the given callback immediately.\n\n\n var usePureOnlyMemo = pure ? useMemo : function (callback) {\n return callback();\n };\n\n function ConnectFunction(props) {\n var _useMemo = useMemo(function () {\n // Distinguish between actual \"data\" props that were passed to the wrapper component,\n // and values needed to control behavior (forwarded refs, alternate context instances).\n // To maintain the wrapperProps object reference, memoize this destructuring.\n var reactReduxForwardedRef = props.reactReduxForwardedRef,\n wrapperProps = _objectWithoutPropertiesLoose(props, [\"reactReduxForwardedRef\"]);\n\n return [props.context, reactReduxForwardedRef, wrapperProps];\n }, [props]),\n propsContext = _useMemo[0],\n reactReduxForwardedRef = _useMemo[1],\n wrapperProps = _useMemo[2];\n\n var ContextToUse = useMemo(function () {\n // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.\n // Memoize the check that determines which context instance we should use.\n return propsContext && propsContext.Consumer && isContextConsumer( /*#__PURE__*/React.createElement(propsContext.Consumer, null)) ? propsContext : Context;\n }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available\n\n var contextValue = useContext(ContextToUse); // The store _must_ exist as either a prop or in context.\n // We'll check to see if it _looks_ like a Redux store first.\n // This allows us to pass through a `store` prop that is just a plain value.\n\n var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);\n var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);\n\n if (process.env.NODE_ENV !== 'production' && !didStoreComeFromProps && !didStoreComeFromContext) {\n throw new Error(\"Could not find \\\"store\\\" in the context of \" + (\"\\\"\" + displayName + \"\\\". Either wrap the root component in a , \") + \"or pass a custom React context provider to and the corresponding \" + (\"React context consumer to \" + displayName + \" in connect options.\"));\n } // Based on the previous check, one of these must be true\n\n\n var store = didStoreComeFromProps ? props.store : contextValue.store;\n var childPropsSelector = useMemo(function () {\n // The child props selector needs the store reference as an input.\n // Re-create this selector whenever the store changes.\n return createChildSelector(store);\n }, [store]);\n\n var _useMemo2 = useMemo(function () {\n if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component\n // connected to the store via props shouldn't use subscription from context, or vice versa.\n\n var subscription = new Subscription(store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n // the middle of the notification loop, where `subscription` will then be null. This can\n // probably be avoided if Subscription's listeners logic is changed to not call listeners\n // that have been unsubscribed in the middle of the notification loop.\n\n var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription);\n return [subscription, notifyNestedSubs];\n }, [store, didStoreComeFromProps, contextValue]),\n subscription = _useMemo2[0],\n notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary,\n // and memoize that value to avoid unnecessary context updates.\n\n\n var overriddenContextValue = useMemo(function () {\n if (didStoreComeFromProps) {\n // This component is directly subscribed to a store from props.\n // We don't want descendants reading from this store - pass down whatever\n // the existing context value is from the nearest connected ancestor.\n return contextValue;\n } // Otherwise, put this component's subscription instance into context, so that\n // connected descendants won't update until after this component is done\n\n\n return _extends({}, contextValue, {\n subscription: subscription\n });\n }, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update\n // causes a change to the calculated child component props (or we caught an error in mapState)\n\n var _useReducer = useReducer(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates),\n _useReducer$ = _useReducer[0],\n previousStateUpdateResult = _useReducer$[0],\n forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards\n\n\n if (previousStateUpdateResult && previousStateUpdateResult.error) {\n throw previousStateUpdateResult.error;\n } // Set up refs to coordinate values between the subscription effect and the render logic\n\n\n var lastChildProps = useRef();\n var lastWrapperProps = useRef(wrapperProps);\n var childPropsFromStoreUpdate = useRef();\n var renderIsScheduled = useRef(false);\n var actualChildProps = usePureOnlyMemo(function () {\n // Tricky logic here:\n // - This render may have been triggered by a Redux store update that produced new child props\n // - However, we may have gotten new wrapper props after that\n // If we have new child props, and the same wrapper props, we know we should use the new child props as-is.\n // But, if we have new wrapper props, those might change the child props, so we have to recalculate things.\n // So, we'll use the child props from store update only if the wrapper props are the same as last time.\n if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {\n return childPropsFromStoreUpdate.current;\n } // TODO We're reading the store directly in render() here. Bad idea?\n // This will likely cause Bad Things (TM) to happen in Concurrent Mode.\n // Note that we do this because on renders _not_ caused by store updates, we need the latest store state\n // to determine what the child props should be.\n\n\n return childPropsSelector(store.getState(), wrapperProps);\n }, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns\n // about useLayoutEffect in SSR, so we try to detect environment and fall back to\n // just useEffect instead to avoid the warning, since neither will run anyway.\n\n useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs]); // Our re-subscribe logic only runs when the store/subscription setup changes\n\n useIsomorphicLayoutEffectWithArgs(subscribeUpdates, [shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch], [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component.\n // We memoize the elements for the rendered child component as an optimization.\n\n var renderedWrappedComponent = useMemo(function () {\n return /*#__PURE__*/React.createElement(WrappedComponent, _extends({}, actualChildProps, {\n ref: reactReduxForwardedRef\n }));\n }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering\n // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.\n\n var renderedChild = useMemo(function () {\n if (shouldHandleStateChanges) {\n // If this component is subscribed to store updates, we need to pass its own\n // subscription instance down to our descendants. That means rendering the same\n // Context instance, and putting a different value into the context.\n return /*#__PURE__*/React.createElement(ContextToUse.Provider, {\n value: overriddenContextValue\n }, renderedWrappedComponent);\n }\n\n return renderedWrappedComponent;\n }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);\n return renderedChild;\n } // If we're in \"pure\" mode, ensure our wrapper component only re-renders when incoming props have changed.\n\n\n var Connect = pure ? /*#__PURE__*/React.memo(ConnectFunction) : ConnectFunction;\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = displayName;\n\n if (forwardRef) {\n var forwarded = /*#__PURE__*/React.forwardRef(function forwardConnectRef(props, ref) {\n return /*#__PURE__*/React.createElement(Connect, _extends({}, props, {\n reactReduxForwardedRef: ref\n }));\n });\n forwarded.displayName = displayName;\n forwarded.WrappedComponent = WrappedComponent;\n return hoistStatics(forwarded, WrappedComponent);\n }\n\n return hoistStatics(Connect, WrappedComponent);\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nexport default function shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n\n if (_typeof(objA) !== 'object' || objA === null || _typeof(objB) !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}","import verifyPlainObject from '../utils/verifyPlainObject';\nexport function wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch, options) {\n var constant = getConstant(dispatch, options);\n\n function constantSelector() {\n return constant;\n }\n\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n//\n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\n\nexport function getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n//\n// * Detects whether the mapToProps function being called depends on props, which\n// is used by selectorFactory to decide if it should reinvoke on props changes.\n//\n// * On first call, handles mapToProps if returns another function, and treats that\n// new function as the true mapToProps for subsequent calls.\n//\n// * On first call, verifies the first result is a plain object, in order to warn\n// the developer that their mapToProps function is not returning a valid result.\n//\n\nexport function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport { bindActionCreators } from 'redux';\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;\n}\nexport function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n return {\n dispatch: dispatch\n };\n }) : undefined;\n}\nexport function whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n return mapDispatchToProps && _typeof(mapDispatchToProps) === 'object' ? wrapMapToPropsConstant(function (dispatch) {\n return bindActionCreators(mapDispatchToProps, dispatch);\n }) : undefined;\n}\nexport default [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];","import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapStateToPropsIsFunction(mapStateToProps) {\n return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;\n}\nexport function whenMapStateToPropsIsMissing(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(function () {\n return {};\n }) : undefined;\n}\nexport default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport verifyPlainObject from '../utils/verifyPlainObject';\nexport function defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return _extends({}, ownProps, stateProps, dispatchProps);\n}\nexport function wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, _ref) {\n var displayName = _ref.displayName,\n pure = _ref.pure,\n areMergedPropsEqual = _ref.areMergedPropsEqual;\n var hasRunOnce = false;\n var mergedProps;\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n if (hasRunOnce) {\n if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps');\n }\n\n return mergedProps;\n };\n };\n}\nexport function whenMergePropsIsFunction(mergeProps) {\n return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\nexport function whenMergePropsIsOmitted(mergeProps) {\n return !mergeProps ? function () {\n return defaultMergeProps;\n } : undefined;\n}\nexport default [whenMergePropsIsFunction, whenMergePropsIsOmitted];","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport verifySubselectors from './verifySubselectors';\nexport function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n return function impureFinalPropsSelector(state, ownProps) {\n return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n };\n}\nexport function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n var areStatesEqual = _ref.areStatesEqual,\n areOwnPropsEqual = _ref.areOwnPropsEqual,\n areStatePropsEqual = _ref.areStatePropsEqual;\n var hasRunAtLeastOnce = false;\n var state;\n var ownProps;\n var stateProps;\n var dispatchProps;\n var mergedProps;\n\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewState() {\n var nextStateProps = mapStateToProps(state, ownProps);\n var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleSubsequentCalls(nextState, nextOwnProps) {\n var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n var stateChanged = !areStatesEqual(nextState, state);\n state = nextState;\n ownProps = nextOwnProps;\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n} // TODO: Add more comments\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nexport default function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutPropertiesLoose(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport connectAdvanced from '../components/connectAdvanced';\nimport shallowEqual from '../utils/shallowEqual';\nimport defaultMapDispatchToPropsFactories from './mapDispatchToProps';\nimport defaultMapStateToPropsFactories from './mapStateToProps';\nimport defaultMergePropsFactories from './mergeProps';\nimport defaultSelectorFactory from './selectorFactory';\n/*\n connect is a facade over connectAdvanced. It turns its args into a compatible\n selectorFactory, which has the signature:\n\n (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n \n connect passes its args to connectAdvanced as options, which will in turn pass them to\n selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n selectorFactory returns a final props selector from its mapStateToProps,\n mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n mergePropsFactories, and pure args.\n\n The resulting final props selector is called by the Connect component instance whenever\n it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n for (var i = factories.length - 1; i >= 0; i--) {\n var result = factories[i](arg);\n if (result) return result;\n }\n\n return function (dispatch, options) {\n throw new Error(\"Invalid value of type \" + _typeof(arg) + \" for \" + name + \" argument when connecting component \" + options.wrappedComponentName + \".\");\n };\n}\n\nfunction strictEqual(a, b) {\n return a === b;\n} // createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\n\n\nexport function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? defaultSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}\nexport default /*#__PURE__*/createConnect();","import { useReducer, useRef, useMemo, useContext, useDebugValue } from 'react';\nimport { useReduxContext as useDefaultReduxContext } from './useReduxContext';\nimport Subscription from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\nimport { ReactReduxContext } from '../components/Context';\n\nvar refEquality = function refEquality(a, b) {\n return a === b;\n};\n\nfunction useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) {\n var _useReducer = useReducer(function (s) {\n return s + 1;\n }, 0),\n forceRender = _useReducer[1];\n\n var subscription = useMemo(function () {\n return new Subscription(store, contextSub);\n }, [store, contextSub]);\n var latestSubscriptionCallbackError = useRef();\n var latestSelector = useRef();\n var latestStoreState = useRef();\n var latestSelectedState = useRef();\n var storeState = store.getState();\n var selectedState;\n\n try {\n if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) {\n selectedState = selector(storeState);\n } else {\n selectedState = latestSelectedState.current;\n }\n } catch (err) {\n if (latestSubscriptionCallbackError.current) {\n err.message += \"\\nThe error may be correlated with this previous error:\\n\" + latestSubscriptionCallbackError.current.stack + \"\\n\\n\";\n }\n\n throw err;\n }\n\n useIsomorphicLayoutEffect(function () {\n latestSelector.current = selector;\n latestStoreState.current = storeState;\n latestSelectedState.current = selectedState;\n latestSubscriptionCallbackError.current = undefined;\n });\n useIsomorphicLayoutEffect(function () {\n function checkForUpdates() {\n try {\n var newSelectedState = latestSelector.current(store.getState());\n\n if (equalityFn(newSelectedState, latestSelectedState.current)) {\n return;\n }\n\n latestSelectedState.current = newSelectedState;\n } catch (err) {\n // we ignore all errors here, since when the component\n // is re-rendered, the selectors are called again, and\n // will throw again, if neither props nor store state\n // changed\n latestSubscriptionCallbackError.current = err;\n }\n\n forceRender();\n }\n\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe();\n checkForUpdates();\n return function () {\n return subscription.tryUnsubscribe();\n };\n }, [store, subscription]);\n return selectedState;\n}\n/**\n * Hook factory, which creates a `useSelector` hook bound to a given context.\n *\n * @param {React.Context} [context=ReactReduxContext] Context passed to your ``.\n * @returns {Function} A `useSelector` hook bound to the specified context.\n */\n\n\nexport function createSelectorHook(context) {\n if (context === void 0) {\n context = ReactReduxContext;\n }\n\n var useReduxContext = context === ReactReduxContext ? useDefaultReduxContext : function () {\n return useContext(context);\n };\n return function useSelector(selector, equalityFn) {\n if (equalityFn === void 0) {\n equalityFn = refEquality;\n }\n\n if (process.env.NODE_ENV !== 'production' && !selector) {\n throw new Error(\"You must pass a selector to useSelector\");\n }\n\n var _useReduxContext = useReduxContext(),\n store = _useReduxContext.store,\n contextSub = _useReduxContext.subscription;\n\n var selectedState = useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub);\n useDebugValue(selectedState);\n return selectedState;\n };\n}\n/**\n * A hook to access the redux store's state. This hook takes a selector function\n * as an argument. The selector is called with the store state.\n *\n * This hook takes an optional equality comparison function as the second parameter\n * that allows you to customize the way the selected state is compared to determine\n * whether the component needs to be re-rendered.\n *\n * @param {Function} selector the selector function\n * @param {Function=} equalityFn the function that will be used to determine equality\n *\n * @returns {any} the selected state\n *\n * @example\n *\n * import React from 'react'\n * import { useSelector } from 'react-redux'\n *\n * export const CounterComponent = () => {\n * const counter = useSelector(state => state.counter)\n * return {counter}
\n * }\n */\n\nexport var useSelector = /*#__PURE__*/createSelectorHook();","import { useState, useRef, useEffect } from 'react';\n\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n\n for (var i = 0; i < newInputs.length; i++) {\n if (newInputs[i] !== lastInputs[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction useMemoOne(getResult, inputs) {\n var initial = useState(function () {\n return {\n inputs: inputs,\n result: getResult()\n };\n })[0];\n var committed = useRef(initial);\n var isInputMatch = Boolean(inputs && committed.current.inputs && areInputsEqual(inputs, committed.current.inputs));\n var cache = isInputMatch ? committed.current : {\n inputs: inputs,\n result: getResult()\n };\n useEffect(function () {\n committed.current = cache;\n }, [cache]);\n return cache.result;\n}\n\nfunction useCallbackOne(callback, inputs) {\n return useMemoOne(function () {\n return callback;\n }, inputs);\n}\n\nvar useMemo = useMemoOne;\nvar useCallback = useCallbackOne;\nexport { useCallback, useCallbackOne, useMemo, useMemoOne };","import Provider from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport { ReactReduxContext } from './components/Context';\nimport connect from './connect/connect';\nimport { useDispatch, createDispatchHook } from './hooks/useDispatch';\nimport { useSelector, createSelectorHook } from './hooks/useSelector';\nimport { useStore, createStoreHook } from './hooks/useStore';\nimport { setBatch } from './utils/batch';\nimport { unstable_batchedUpdates as batch } from './utils/reactBatchedUpdates';\nimport shallowEqual from './utils/shallowEqual';\nsetBatch(batch);\nexport { Provider, connectAdvanced, ReactReduxContext, connect, batch, useDispatch, createDispatchHook, useSelector, createSelectorHook, useStore, createStoreHook, shallowEqual };","import invariant from 'tiny-invariant';\n\nvar getRect = function getRect(_ref) {\n var top = _ref.top,\n right = _ref.right,\n bottom = _ref.bottom,\n left = _ref.left;\n var width = right - left;\n var height = bottom - top;\n var rect = {\n top: top,\n right: right,\n bottom: bottom,\n left: left,\n width: width,\n height: height,\n x: left,\n y: top,\n center: {\n x: (right + left) / 2,\n y: (bottom + top) / 2\n }\n };\n return rect;\n};\n\nvar expand = function expand(target, expandBy) {\n return {\n top: target.top - expandBy.top,\n left: target.left - expandBy.left,\n bottom: target.bottom + expandBy.bottom,\n right: target.right + expandBy.right\n };\n};\n\nvar shrink = function shrink(target, shrinkBy) {\n return {\n top: target.top + shrinkBy.top,\n left: target.left + shrinkBy.left,\n bottom: target.bottom - shrinkBy.bottom,\n right: target.right - shrinkBy.right\n };\n};\n\nvar shift = function shift(target, shiftBy) {\n return {\n top: target.top + shiftBy.y,\n left: target.left + shiftBy.x,\n bottom: target.bottom + shiftBy.y,\n right: target.right + shiftBy.x\n };\n};\n\nvar noSpacing = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n};\n\nvar createBox = function createBox(_ref2) {\n var borderBox = _ref2.borderBox,\n _ref2$margin = _ref2.margin,\n margin = _ref2$margin === void 0 ? noSpacing : _ref2$margin,\n _ref2$border = _ref2.border,\n border = _ref2$border === void 0 ? noSpacing : _ref2$border,\n _ref2$padding = _ref2.padding,\n padding = _ref2$padding === void 0 ? noSpacing : _ref2$padding;\n var marginBox = getRect(expand(borderBox, margin));\n var paddingBox = getRect(shrink(borderBox, border));\n var contentBox = getRect(shrink(paddingBox, padding));\n return {\n marginBox: marginBox,\n borderBox: getRect(borderBox),\n paddingBox: paddingBox,\n contentBox: contentBox,\n margin: margin,\n border: border,\n padding: padding\n };\n};\n\nvar parse = function parse(raw) {\n var value = raw.slice(0, -2);\n var suffix = raw.slice(-2);\n\n if (suffix !== 'px') {\n return 0;\n }\n\n var result = Number(value);\n !!isNaN(result) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Could not parse value [raw: \" + raw + \", without suffix: \" + value + \"]\") : invariant(false) : void 0;\n return result;\n};\n\nvar getWindowScroll = function getWindowScroll() {\n return {\n x: window.pageXOffset,\n y: window.pageYOffset\n };\n};\n\nvar offset = function offset(original, change) {\n var borderBox = original.borderBox,\n border = original.border,\n margin = original.margin,\n padding = original.padding;\n var shifted = shift(borderBox, change);\n return createBox({\n borderBox: shifted,\n border: border,\n margin: margin,\n padding: padding\n });\n};\n\nvar withScroll = function withScroll(original, scroll) {\n if (scroll === void 0) {\n scroll = getWindowScroll();\n }\n\n return offset(original, scroll);\n};\n\nvar calculateBox = function calculateBox(borderBox, styles) {\n var margin = {\n top: parse(styles.marginTop),\n right: parse(styles.marginRight),\n bottom: parse(styles.marginBottom),\n left: parse(styles.marginLeft)\n };\n var padding = {\n top: parse(styles.paddingTop),\n right: parse(styles.paddingRight),\n bottom: parse(styles.paddingBottom),\n left: parse(styles.paddingLeft)\n };\n var border = {\n top: parse(styles.borderTopWidth),\n right: parse(styles.borderRightWidth),\n bottom: parse(styles.borderBottomWidth),\n left: parse(styles.borderLeftWidth)\n };\n return createBox({\n borderBox: borderBox,\n margin: margin,\n padding: padding,\n border: border\n });\n};\n\nvar getBox = function getBox(el) {\n var borderBox = el.getBoundingClientRect();\n var styles = window.getComputedStyle(el);\n return calculateBox(borderBox, styles);\n};\n\nexport { calculateBox, createBox, expand, getBox, getRect, offset, shrink, withScroll };","var rafSchd = function rafSchd(fn) {\n var lastArgs = [];\n var frameId = null;\n\n var wrapperFn = function wrapperFn() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n lastArgs = args;\n\n if (frameId) {\n return;\n }\n\n frameId = requestAnimationFrame(function () {\n frameId = null;\n fn.apply(void 0, lastArgs);\n });\n };\n\n wrapperFn.cancel = function () {\n if (!frameId) {\n return;\n }\n\n cancelAnimationFrame(frameId);\n frameId = null;\n };\n\n return wrapperFn;\n};\n\nexport default rafSchd;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport React, { useLayoutEffect, useEffect, useRef, useState, useContext } from 'react';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport { createStore as createStore$1, applyMiddleware, compose, bindActionCreators } from 'redux';\nimport { Provider, connect } from 'react-redux';\nimport { useMemo, useCallback } from 'use-memo-one';\nimport { getRect, expand, offset, withScroll, getBox, createBox, calculateBox } from 'css-box-model';\nimport memoizeOne from 'memoize-one';\nimport rafSchd from 'raf-schd';\nimport ReactDOM from 'react-dom';\nvar isProduction = process.env.NODE_ENV === 'production';\nvar spacesAndTabs = /[ \\t]{2,}/g;\nvar lineStartWithSpaces = /^[ \\t]*/gm;\n\nvar clean = function clean(value) {\n return value.replace(spacesAndTabs, ' ').replace(lineStartWithSpaces, '').trim();\n};\n\nvar getDevMessage = function getDevMessage(message) {\n return clean(\"\\n %creact-beautiful-dnd\\n\\n %c\" + clean(message) + \"\\n\\n %c\\uD83D\\uDC77\\u200D This is a development only message. It will be removed in production builds.\\n\");\n};\n\nvar getFormattedMessage = function getFormattedMessage(message) {\n return [getDevMessage(message), 'color: #00C584; font-size: 1.2em; font-weight: bold;', 'line-height: 1.5', 'color: #723874;'];\n};\n\nvar isDisabledFlag = '__react-beautiful-dnd-disable-dev-warnings';\n\nfunction log(type, message) {\n var _console;\n\n if (isProduction) {\n return;\n }\n\n if (typeof window !== 'undefined' && window[isDisabledFlag]) {\n return;\n }\n\n (_console = console)[type].apply(_console, getFormattedMessage(message));\n}\n\nvar warning = log.bind(null, 'warn');\nvar error = log.bind(null, 'error');\n\nfunction noop() {}\n\nfunction getOptions(shared, fromBinding) {\n return _extends({}, shared, {}, fromBinding);\n}\n\nfunction bindEvents(el, bindings, sharedOptions) {\n var unbindings = bindings.map(function (binding) {\n var options = getOptions(sharedOptions, binding.options);\n el.addEventListener(binding.eventName, binding.fn, options);\n return function unbind() {\n el.removeEventListener(binding.eventName, binding.fn, options);\n };\n });\n return function unbindAll() {\n unbindings.forEach(function (unbind) {\n unbind();\n });\n };\n}\n\nvar isProduction$1 = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\n\nfunction RbdInvariant(message) {\n this.message = message;\n}\n\nRbdInvariant.prototype.toString = function toString() {\n return this.message;\n};\n\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n\n if (isProduction$1) {\n throw new RbdInvariant(prefix);\n } else {\n throw new RbdInvariant(prefix + \": \" + (message || ''));\n }\n}\n\nvar ErrorBoundary = function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.callbacks = null;\n _this.unbind = noop;\n\n _this.onWindowError = function (event) {\n var callbacks = _this.getCallbacks();\n\n if (callbacks.isDragging()) {\n callbacks.tryAbort();\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n An error was caught by our window 'error' event listener while a drag was occurring.\\n The active drag has been aborted.\\n \") : void 0;\n }\n\n var err = event.error;\n\n if (err instanceof RbdInvariant) {\n event.preventDefault();\n\n if (process.env.NODE_ENV !== 'production') {\n error(err.message);\n }\n }\n };\n\n _this.getCallbacks = function () {\n if (!_this.callbacks) {\n throw new Error('Unable to find AppCallbacks in ');\n }\n\n return _this.callbacks;\n };\n\n _this.setCallbacks = function (callbacks) {\n _this.callbacks = callbacks;\n };\n\n return _this;\n }\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.unbind = bindEvents(window, [{\n eventName: 'error',\n fn: this.onWindowError\n }]);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.unbind();\n };\n\n _proto.componentDidCatch = function componentDidCatch(err) {\n if (err instanceof RbdInvariant) {\n if (process.env.NODE_ENV !== 'production') {\n error(err.message);\n }\n\n this.setState({});\n return;\n }\n\n throw err;\n };\n\n _proto.render = function render() {\n return this.props.children(this.setCallbacks);\n };\n\n return ErrorBoundary;\n}(React.Component);\n\nvar dragHandleUsageInstructions = \"\\n Press space bar to start a drag.\\n When dragging you can use the arrow keys to move the item around and escape to cancel.\\n Some screen readers may require you to be in focus mode or to use your pass through key\\n\";\n\nvar position = function position(index) {\n return index + 1;\n};\n\nvar onDragStart = function onDragStart(start) {\n return \"\\n You have lifted an item in position \" + position(start.source.index) + \"\\n\";\n};\n\nvar withLocation = function withLocation(source, destination) {\n var isInHomeList = source.droppableId === destination.droppableId;\n var startPosition = position(source.index);\n var endPosition = position(destination.index);\n\n if (isInHomeList) {\n return \"\\n You have moved the item from position \" + startPosition + \"\\n to position \" + endPosition + \"\\n \";\n }\n\n return \"\\n You have moved the item from position \" + startPosition + \"\\n in list \" + source.droppableId + \"\\n to list \" + destination.droppableId + \"\\n in position \" + endPosition + \"\\n \";\n};\n\nvar withCombine = function withCombine(id, source, combine) {\n var inHomeList = source.droppableId === combine.droppableId;\n\n if (inHomeList) {\n return \"\\n The item \" + id + \"\\n has been combined with \" + combine.draggableId;\n }\n\n return \"\\n The item \" + id + \"\\n in list \" + source.droppableId + \"\\n has been combined with \" + combine.draggableId + \"\\n in list \" + combine.droppableId + \"\\n \";\n};\n\nvar onDragUpdate = function onDragUpdate(update) {\n var location = update.destination;\n\n if (location) {\n return withLocation(update.source, location);\n }\n\n var combine = update.combine;\n\n if (combine) {\n return withCombine(update.draggableId, update.source, combine);\n }\n\n return 'You are over an area that cannot be dropped on';\n};\n\nvar returnedToStart = function returnedToStart(source) {\n return \"\\n The item has returned to its starting position\\n of \" + position(source.index) + \"\\n\";\n};\n\nvar onDragEnd = function onDragEnd(result) {\n if (result.reason === 'CANCEL') {\n return \"\\n Movement cancelled.\\n \" + returnedToStart(result.source) + \"\\n \";\n }\n\n var location = result.destination;\n var combine = result.combine;\n\n if (location) {\n return \"\\n You have dropped the item.\\n \" + withLocation(result.source, location) + \"\\n \";\n }\n\n if (combine) {\n return \"\\n You have dropped the item.\\n \" + withCombine(result.draggableId, result.source, combine) + \"\\n \";\n }\n\n return \"\\n The item has been dropped while not over a drop area.\\n \" + returnedToStart(result.source) + \"\\n \";\n};\n\nvar preset = {\n dragHandleUsageInstructions: dragHandleUsageInstructions,\n onDragStart: onDragStart,\n onDragUpdate: onDragUpdate,\n onDragEnd: onDragEnd\n};\nvar origin = {\n x: 0,\n y: 0\n};\n\nvar add = function add(point1, point2) {\n return {\n x: point1.x + point2.x,\n y: point1.y + point2.y\n };\n};\n\nvar subtract = function subtract(point1, point2) {\n return {\n x: point1.x - point2.x,\n y: point1.y - point2.y\n };\n};\n\nvar isEqual = function isEqual(point1, point2) {\n return point1.x === point2.x && point1.y === point2.y;\n};\n\nvar negate = function negate(point) {\n return {\n x: point.x !== 0 ? -point.x : 0,\n y: point.y !== 0 ? -point.y : 0\n };\n};\n\nvar patch = function patch(line, value, otherValue) {\n var _ref;\n\n if (otherValue === void 0) {\n otherValue = 0;\n }\n\n return _ref = {}, _ref[line] = value, _ref[line === 'x' ? 'y' : 'x'] = otherValue, _ref;\n};\n\nvar distance = function distance(point1, point2) {\n return Math.sqrt(Math.pow(point2.x - point1.x, 2) + Math.pow(point2.y - point1.y, 2));\n};\n\nvar closest = function closest(target, points) {\n return Math.min.apply(Math, points.map(function (point) {\n return distance(target, point);\n }));\n};\n\nvar apply = function apply(fn) {\n return function (point) {\n return {\n x: fn(point.x),\n y: fn(point.y)\n };\n };\n};\n\nvar executeClip = function executeClip(frame, subject) {\n var result = getRect({\n top: Math.max(subject.top, frame.top),\n right: Math.min(subject.right, frame.right),\n bottom: Math.min(subject.bottom, frame.bottom),\n left: Math.max(subject.left, frame.left)\n });\n\n if (result.width <= 0 || result.height <= 0) {\n return null;\n }\n\n return result;\n};\n\nvar offsetByPosition = function offsetByPosition(spacing, point) {\n return {\n top: spacing.top + point.y,\n left: spacing.left + point.x,\n bottom: spacing.bottom + point.y,\n right: spacing.right + point.x\n };\n};\n\nvar getCorners = function getCorners(spacing) {\n return [{\n x: spacing.left,\n y: spacing.top\n }, {\n x: spacing.right,\n y: spacing.top\n }, {\n x: spacing.left,\n y: spacing.bottom\n }, {\n x: spacing.right,\n y: spacing.bottom\n }];\n};\n\nvar noSpacing = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n};\n\nvar scroll = function scroll(target, frame) {\n if (!frame) {\n return target;\n }\n\n return offsetByPosition(target, frame.scroll.diff.displacement);\n};\n\nvar increase = function increase(target, axis, withPlaceholder) {\n if (withPlaceholder && withPlaceholder.increasedBy) {\n var _extends2;\n\n return _extends({}, target, (_extends2 = {}, _extends2[axis.end] = target[axis.end] + withPlaceholder.increasedBy[axis.line], _extends2));\n }\n\n return target;\n};\n\nvar clip = function clip(target, frame) {\n if (frame && frame.shouldClipSubject) {\n return executeClip(frame.pageMarginBox, target);\n }\n\n return getRect(target);\n};\n\nvar getSubject = function getSubject(_ref) {\n var page = _ref.page,\n withPlaceholder = _ref.withPlaceholder,\n axis = _ref.axis,\n frame = _ref.frame;\n var scrolled = scroll(page.marginBox, frame);\n var increased = increase(scrolled, axis, withPlaceholder);\n var clipped = clip(increased, frame);\n return {\n page: page,\n withPlaceholder: withPlaceholder,\n active: clipped\n };\n};\n\nvar scrollDroppable = function scrollDroppable(droppable, newScroll) {\n !droppable.frame ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n var scrollable = droppable.frame;\n var scrollDiff = subtract(newScroll, scrollable.scroll.initial);\n var scrollDisplacement = negate(scrollDiff);\n\n var frame = _extends({}, scrollable, {\n scroll: {\n initial: scrollable.scroll.initial,\n current: newScroll,\n diff: {\n value: scrollDiff,\n displacement: scrollDisplacement\n },\n max: scrollable.scroll.max\n }\n });\n\n var subject = getSubject({\n page: droppable.subject.page,\n withPlaceholder: droppable.subject.withPlaceholder,\n axis: droppable.axis,\n frame: frame\n });\n\n var result = _extends({}, droppable, {\n frame: frame,\n subject: subject\n });\n\n return result;\n};\n\nfunction isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}\n\nfunction values(map) {\n if (Object.values) {\n return Object.values(map);\n }\n\n return Object.keys(map).map(function (key) {\n return map[key];\n });\n}\n\nfunction findIndex(list, predicate) {\n if (list.findIndex) {\n return list.findIndex(predicate);\n }\n\n for (var i = 0; i < list.length; i++) {\n if (predicate(list[i])) {\n return i;\n }\n }\n\n return -1;\n}\n\nfunction find(list, predicate) {\n if (list.find) {\n return list.find(predicate);\n }\n\n var index = findIndex(list, predicate);\n\n if (index !== -1) {\n return list[index];\n }\n\n return undefined;\n}\n\nfunction toArray(list) {\n return Array.prototype.slice.call(list);\n}\n\nvar toDroppableMap = memoizeOne(function (droppables) {\n return droppables.reduce(function (previous, current) {\n previous[current.descriptor.id] = current;\n return previous;\n }, {});\n});\nvar toDraggableMap = memoizeOne(function (draggables) {\n return draggables.reduce(function (previous, current) {\n previous[current.descriptor.id] = current;\n return previous;\n }, {});\n});\nvar toDroppableList = memoizeOne(function (droppables) {\n return values(droppables);\n});\nvar toDraggableList = memoizeOne(function (draggables) {\n return values(draggables);\n});\nvar getDraggablesInsideDroppable = memoizeOne(function (droppableId, draggables) {\n var result = toDraggableList(draggables).filter(function (draggable) {\n return droppableId === draggable.descriptor.droppableId;\n }).sort(function (a, b) {\n return a.descriptor.index - b.descriptor.index;\n });\n return result;\n});\n\nfunction tryGetDestination(impact) {\n if (impact.at && impact.at.type === 'REORDER') {\n return impact.at.destination;\n }\n\n return null;\n}\n\nfunction tryGetCombine(impact) {\n if (impact.at && impact.at.type === 'COMBINE') {\n return impact.at.combine;\n }\n\n return null;\n}\n\nvar removeDraggableFromList = memoizeOne(function (remove, list) {\n return list.filter(function (item) {\n return item.descriptor.id !== remove.descriptor.id;\n });\n});\n\nvar moveToNextCombine = function moveToNextCombine(_ref) {\n var isMovingForward = _ref.isMovingForward,\n draggable = _ref.draggable,\n destination = _ref.destination,\n insideDestination = _ref.insideDestination,\n previousImpact = _ref.previousImpact;\n\n if (!destination.isCombineEnabled) {\n return null;\n }\n\n var location = tryGetDestination(previousImpact);\n\n if (!location) {\n return null;\n }\n\n function getImpact(target) {\n var at = {\n type: 'COMBINE',\n combine: {\n draggableId: target,\n droppableId: destination.descriptor.id\n }\n };\n return _extends({}, previousImpact, {\n at: at\n });\n }\n\n var all = previousImpact.displaced.all;\n var closestId = all.length ? all[0] : null;\n\n if (isMovingForward) {\n return closestId ? getImpact(closestId) : null;\n }\n\n var withoutDraggable = removeDraggableFromList(draggable, insideDestination);\n\n if (!closestId) {\n if (!withoutDraggable.length) {\n return null;\n }\n\n var last = withoutDraggable[withoutDraggable.length - 1];\n return getImpact(last.descriptor.id);\n }\n\n var indexOfClosest = findIndex(withoutDraggable, function (d) {\n return d.descriptor.id === closestId;\n });\n !(indexOfClosest !== -1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Could not find displaced item in set') : invariant(false) : void 0;\n var proposedIndex = indexOfClosest - 1;\n\n if (proposedIndex < 0) {\n return null;\n }\n\n var before = withoutDraggable[proposedIndex];\n return getImpact(before.descriptor.id);\n};\n\nvar isHomeOf = function isHomeOf(draggable, destination) {\n return draggable.descriptor.droppableId === destination.descriptor.id;\n};\n\nvar noDisplacedBy = {\n point: origin,\n value: 0\n};\nvar emptyGroups = {\n invisible: {},\n visible: {},\n all: []\n};\nvar noImpact = {\n displaced: emptyGroups,\n displacedBy: noDisplacedBy,\n at: null\n};\n\nvar isWithin = function isWithin(lowerBound, upperBound) {\n return function (value) {\n return lowerBound <= value && value <= upperBound;\n };\n};\n\nvar isPartiallyVisibleThroughFrame = function isPartiallyVisibleThroughFrame(frame) {\n var isWithinVertical = isWithin(frame.top, frame.bottom);\n var isWithinHorizontal = isWithin(frame.left, frame.right);\n return function (subject) {\n var isContained = isWithinVertical(subject.top) && isWithinVertical(subject.bottom) && isWithinHorizontal(subject.left) && isWithinHorizontal(subject.right);\n\n if (isContained) {\n return true;\n }\n\n var isPartiallyVisibleVertically = isWithinVertical(subject.top) || isWithinVertical(subject.bottom);\n var isPartiallyVisibleHorizontally = isWithinHorizontal(subject.left) || isWithinHorizontal(subject.right);\n var isPartiallyContained = isPartiallyVisibleVertically && isPartiallyVisibleHorizontally;\n\n if (isPartiallyContained) {\n return true;\n }\n\n var isBiggerVertically = subject.top < frame.top && subject.bottom > frame.bottom;\n var isBiggerHorizontally = subject.left < frame.left && subject.right > frame.right;\n var isTargetBiggerThanFrame = isBiggerVertically && isBiggerHorizontally;\n\n if (isTargetBiggerThanFrame) {\n return true;\n }\n\n var isTargetBiggerOnOneAxis = isBiggerVertically && isPartiallyVisibleHorizontally || isBiggerHorizontally && isPartiallyVisibleVertically;\n return isTargetBiggerOnOneAxis;\n };\n};\n\nvar isTotallyVisibleThroughFrame = function isTotallyVisibleThroughFrame(frame) {\n var isWithinVertical = isWithin(frame.top, frame.bottom);\n var isWithinHorizontal = isWithin(frame.left, frame.right);\n return function (subject) {\n var isContained = isWithinVertical(subject.top) && isWithinVertical(subject.bottom) && isWithinHorizontal(subject.left) && isWithinHorizontal(subject.right);\n return isContained;\n };\n};\n\nvar vertical = {\n direction: 'vertical',\n line: 'y',\n crossAxisLine: 'x',\n start: 'top',\n end: 'bottom',\n size: 'height',\n crossAxisStart: 'left',\n crossAxisEnd: 'right',\n crossAxisSize: 'width'\n};\nvar horizontal = {\n direction: 'horizontal',\n line: 'x',\n crossAxisLine: 'y',\n start: 'left',\n end: 'right',\n size: 'width',\n crossAxisStart: 'top',\n crossAxisEnd: 'bottom',\n crossAxisSize: 'height'\n};\n\nvar isTotallyVisibleThroughFrameOnAxis = function isTotallyVisibleThroughFrameOnAxis(axis) {\n return function (frame) {\n var isWithinVertical = isWithin(frame.top, frame.bottom);\n var isWithinHorizontal = isWithin(frame.left, frame.right);\n return function (subject) {\n if (axis === vertical) {\n return isWithinVertical(subject.top) && isWithinVertical(subject.bottom);\n }\n\n return isWithinHorizontal(subject.left) && isWithinHorizontal(subject.right);\n };\n };\n};\n\nvar getDroppableDisplaced = function getDroppableDisplaced(target, destination) {\n var displacement = destination.frame ? destination.frame.scroll.diff.displacement : origin;\n return offsetByPosition(target, displacement);\n};\n\nvar isVisibleInDroppable = function isVisibleInDroppable(target, destination, isVisibleThroughFrameFn) {\n if (!destination.subject.active) {\n return false;\n }\n\n return isVisibleThroughFrameFn(destination.subject.active)(target);\n};\n\nvar isVisibleInViewport = function isVisibleInViewport(target, viewport, isVisibleThroughFrameFn) {\n return isVisibleThroughFrameFn(viewport)(target);\n};\n\nvar isVisible = function isVisible(_ref) {\n var toBeDisplaced = _ref.target,\n destination = _ref.destination,\n viewport = _ref.viewport,\n withDroppableDisplacement = _ref.withDroppableDisplacement,\n isVisibleThroughFrameFn = _ref.isVisibleThroughFrameFn;\n var displacedTarget = withDroppableDisplacement ? getDroppableDisplaced(toBeDisplaced, destination) : toBeDisplaced;\n return isVisibleInDroppable(displacedTarget, destination, isVisibleThroughFrameFn) && isVisibleInViewport(displacedTarget, viewport, isVisibleThroughFrameFn);\n};\n\nvar isPartiallyVisible = function isPartiallyVisible(args) {\n return isVisible(_extends({}, args, {\n isVisibleThroughFrameFn: isPartiallyVisibleThroughFrame\n }));\n};\n\nvar isTotallyVisible = function isTotallyVisible(args) {\n return isVisible(_extends({}, args, {\n isVisibleThroughFrameFn: isTotallyVisibleThroughFrame\n }));\n};\n\nvar isTotallyVisibleOnAxis = function isTotallyVisibleOnAxis(args) {\n return isVisible(_extends({}, args, {\n isVisibleThroughFrameFn: isTotallyVisibleThroughFrameOnAxis(args.destination.axis)\n }));\n};\n\nvar getShouldAnimate = function getShouldAnimate(id, last, forceShouldAnimate) {\n if (typeof forceShouldAnimate === 'boolean') {\n return forceShouldAnimate;\n }\n\n if (!last) {\n return true;\n }\n\n var invisible = last.invisible,\n visible = last.visible;\n\n if (invisible[id]) {\n return false;\n }\n\n var previous = visible[id];\n return previous ? previous.shouldAnimate : true;\n};\n\nfunction getTarget(draggable, displacedBy) {\n var marginBox = draggable.page.marginBox;\n var expandBy = {\n top: displacedBy.point.y,\n right: 0,\n bottom: 0,\n left: displacedBy.point.x\n };\n return getRect(expand(marginBox, expandBy));\n}\n\nfunction getDisplacementGroups(_ref) {\n var afterDragging = _ref.afterDragging,\n destination = _ref.destination,\n displacedBy = _ref.displacedBy,\n viewport = _ref.viewport,\n forceShouldAnimate = _ref.forceShouldAnimate,\n last = _ref.last;\n return afterDragging.reduce(function process(groups, draggable) {\n var target = getTarget(draggable, displacedBy);\n var id = draggable.descriptor.id;\n groups.all.push(id);\n var isVisible = isPartiallyVisible({\n target: target,\n destination: destination,\n viewport: viewport,\n withDroppableDisplacement: true\n });\n\n if (!isVisible) {\n groups.invisible[draggable.descriptor.id] = true;\n return groups;\n }\n\n var shouldAnimate = getShouldAnimate(id, last, forceShouldAnimate);\n var displacement = {\n draggableId: id,\n shouldAnimate: shouldAnimate\n };\n groups.visible[id] = displacement;\n return groups;\n }, {\n all: [],\n visible: {},\n invisible: {}\n });\n}\n\nfunction getIndexOfLastItem(draggables, options) {\n if (!draggables.length) {\n return 0;\n }\n\n var indexOfLastItem = draggables[draggables.length - 1].descriptor.index;\n return options.inHomeList ? indexOfLastItem : indexOfLastItem + 1;\n}\n\nfunction goAtEnd(_ref) {\n var insideDestination = _ref.insideDestination,\n inHomeList = _ref.inHomeList,\n displacedBy = _ref.displacedBy,\n destination = _ref.destination;\n var newIndex = getIndexOfLastItem(insideDestination, {\n inHomeList: inHomeList\n });\n return {\n displaced: emptyGroups,\n displacedBy: displacedBy,\n at: {\n type: 'REORDER',\n destination: {\n droppableId: destination.descriptor.id,\n index: newIndex\n }\n }\n };\n}\n\nfunction calculateReorderImpact(_ref2) {\n var draggable = _ref2.draggable,\n insideDestination = _ref2.insideDestination,\n destination = _ref2.destination,\n viewport = _ref2.viewport,\n displacedBy = _ref2.displacedBy,\n last = _ref2.last,\n index = _ref2.index,\n forceShouldAnimate = _ref2.forceShouldAnimate;\n var inHomeList = isHomeOf(draggable, destination);\n\n if (index == null) {\n return goAtEnd({\n insideDestination: insideDestination,\n inHomeList: inHomeList,\n displacedBy: displacedBy,\n destination: destination\n });\n }\n\n var match = find(insideDestination, function (item) {\n return item.descriptor.index === index;\n });\n\n if (!match) {\n return goAtEnd({\n insideDestination: insideDestination,\n inHomeList: inHomeList,\n displacedBy: displacedBy,\n destination: destination\n });\n }\n\n var withoutDragging = removeDraggableFromList(draggable, insideDestination);\n var sliceFrom = insideDestination.indexOf(match);\n var impacted = withoutDragging.slice(sliceFrom);\n var displaced = getDisplacementGroups({\n afterDragging: impacted,\n destination: destination,\n displacedBy: displacedBy,\n last: last,\n viewport: viewport.frame,\n forceShouldAnimate: forceShouldAnimate\n });\n return {\n displaced: displaced,\n displacedBy: displacedBy,\n at: {\n type: 'REORDER',\n destination: {\n droppableId: destination.descriptor.id,\n index: index\n }\n }\n };\n}\n\nfunction didStartAfterCritical(draggableId, afterCritical) {\n return Boolean(afterCritical.effected[draggableId]);\n}\n\nvar fromCombine = function fromCombine(_ref) {\n var isMovingForward = _ref.isMovingForward,\n destination = _ref.destination,\n draggables = _ref.draggables,\n combine = _ref.combine,\n afterCritical = _ref.afterCritical;\n\n if (!destination.isCombineEnabled) {\n return null;\n }\n\n var combineId = combine.draggableId;\n var combineWith = draggables[combineId];\n var combineWithIndex = combineWith.descriptor.index;\n var didCombineWithStartAfterCritical = didStartAfterCritical(combineId, afterCritical);\n\n if (didCombineWithStartAfterCritical) {\n if (isMovingForward) {\n return combineWithIndex;\n }\n\n return combineWithIndex - 1;\n }\n\n if (isMovingForward) {\n return combineWithIndex + 1;\n }\n\n return combineWithIndex;\n};\n\nvar fromReorder = function fromReorder(_ref) {\n var isMovingForward = _ref.isMovingForward,\n isInHomeList = _ref.isInHomeList,\n insideDestination = _ref.insideDestination,\n location = _ref.location;\n\n if (!insideDestination.length) {\n return null;\n }\n\n var currentIndex = location.index;\n var proposedIndex = isMovingForward ? currentIndex + 1 : currentIndex - 1;\n var firstIndex = insideDestination[0].descriptor.index;\n var lastIndex = insideDestination[insideDestination.length - 1].descriptor.index;\n var upperBound = isInHomeList ? lastIndex : lastIndex + 1;\n\n if (proposedIndex < firstIndex) {\n return null;\n }\n\n if (proposedIndex > upperBound) {\n return null;\n }\n\n return proposedIndex;\n};\n\nvar moveToNextIndex = function moveToNextIndex(_ref) {\n var isMovingForward = _ref.isMovingForward,\n isInHomeList = _ref.isInHomeList,\n draggable = _ref.draggable,\n draggables = _ref.draggables,\n destination = _ref.destination,\n insideDestination = _ref.insideDestination,\n previousImpact = _ref.previousImpact,\n viewport = _ref.viewport,\n afterCritical = _ref.afterCritical;\n var wasAt = previousImpact.at;\n !wasAt ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot move in direction without previous impact location') : invariant(false) : void 0;\n\n if (wasAt.type === 'REORDER') {\n var _newIndex = fromReorder({\n isMovingForward: isMovingForward,\n isInHomeList: isInHomeList,\n location: wasAt.destination,\n insideDestination: insideDestination\n });\n\n if (_newIndex == null) {\n return null;\n }\n\n return calculateReorderImpact({\n draggable: draggable,\n insideDestination: insideDestination,\n destination: destination,\n viewport: viewport,\n last: previousImpact.displaced,\n displacedBy: previousImpact.displacedBy,\n index: _newIndex\n });\n }\n\n var newIndex = fromCombine({\n isMovingForward: isMovingForward,\n destination: destination,\n displaced: previousImpact.displaced,\n draggables: draggables,\n combine: wasAt.combine,\n afterCritical: afterCritical\n });\n\n if (newIndex == null) {\n return null;\n }\n\n return calculateReorderImpact({\n draggable: draggable,\n insideDestination: insideDestination,\n destination: destination,\n viewport: viewport,\n last: previousImpact.displaced,\n displacedBy: previousImpact.displacedBy,\n index: newIndex\n });\n};\n\nvar getCombinedItemDisplacement = function getCombinedItemDisplacement(_ref) {\n var displaced = _ref.displaced,\n afterCritical = _ref.afterCritical,\n combineWith = _ref.combineWith,\n displacedBy = _ref.displacedBy;\n var isDisplaced = Boolean(displaced.visible[combineWith] || displaced.invisible[combineWith]);\n\n if (didStartAfterCritical(combineWith, afterCritical)) {\n return isDisplaced ? origin : negate(displacedBy.point);\n }\n\n return isDisplaced ? displacedBy.point : origin;\n};\n\nvar whenCombining = function whenCombining(_ref) {\n var afterCritical = _ref.afterCritical,\n impact = _ref.impact,\n draggables = _ref.draggables;\n var combine = tryGetCombine(impact);\n !combine ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n var combineWith = combine.draggableId;\n var center = draggables[combineWith].page.borderBox.center;\n var displaceBy = getCombinedItemDisplacement({\n displaced: impact.displaced,\n afterCritical: afterCritical,\n combineWith: combineWith,\n displacedBy: impact.displacedBy\n });\n return add(center, displaceBy);\n};\n\nvar distanceFromStartToBorderBoxCenter = function distanceFromStartToBorderBoxCenter(axis, box) {\n return box.margin[axis.start] + box.borderBox[axis.size] / 2;\n};\n\nvar distanceFromEndToBorderBoxCenter = function distanceFromEndToBorderBoxCenter(axis, box) {\n return box.margin[axis.end] + box.borderBox[axis.size] / 2;\n};\n\nvar getCrossAxisBorderBoxCenter = function getCrossAxisBorderBoxCenter(axis, target, isMoving) {\n return target[axis.crossAxisStart] + isMoving.margin[axis.crossAxisStart] + isMoving.borderBox[axis.crossAxisSize] / 2;\n};\n\nvar goAfter = function goAfter(_ref) {\n var axis = _ref.axis,\n moveRelativeTo = _ref.moveRelativeTo,\n isMoving = _ref.isMoving;\n return patch(axis.line, moveRelativeTo.marginBox[axis.end] + distanceFromStartToBorderBoxCenter(axis, isMoving), getCrossAxisBorderBoxCenter(axis, moveRelativeTo.marginBox, isMoving));\n};\n\nvar goBefore = function goBefore(_ref2) {\n var axis = _ref2.axis,\n moveRelativeTo = _ref2.moveRelativeTo,\n isMoving = _ref2.isMoving;\n return patch(axis.line, moveRelativeTo.marginBox[axis.start] - distanceFromEndToBorderBoxCenter(axis, isMoving), getCrossAxisBorderBoxCenter(axis, moveRelativeTo.marginBox, isMoving));\n};\n\nvar goIntoStart = function goIntoStart(_ref3) {\n var axis = _ref3.axis,\n moveInto = _ref3.moveInto,\n isMoving = _ref3.isMoving;\n return patch(axis.line, moveInto.contentBox[axis.start] + distanceFromStartToBorderBoxCenter(axis, isMoving), getCrossAxisBorderBoxCenter(axis, moveInto.contentBox, isMoving));\n};\n\nvar whenReordering = function whenReordering(_ref) {\n var impact = _ref.impact,\n draggable = _ref.draggable,\n draggables = _ref.draggables,\n droppable = _ref.droppable,\n afterCritical = _ref.afterCritical;\n var insideDestination = getDraggablesInsideDroppable(droppable.descriptor.id, draggables);\n var draggablePage = draggable.page;\n var axis = droppable.axis;\n\n if (!insideDestination.length) {\n return goIntoStart({\n axis: axis,\n moveInto: droppable.page,\n isMoving: draggablePage\n });\n }\n\n var displaced = impact.displaced,\n displacedBy = impact.displacedBy;\n var closestAfter = displaced.all[0];\n\n if (closestAfter) {\n var closest = draggables[closestAfter];\n\n if (didStartAfterCritical(closestAfter, afterCritical)) {\n return goBefore({\n axis: axis,\n moveRelativeTo: closest.page,\n isMoving: draggablePage\n });\n }\n\n var withDisplacement = offset(closest.page, displacedBy.point);\n return goBefore({\n axis: axis,\n moveRelativeTo: withDisplacement,\n isMoving: draggablePage\n });\n }\n\n var last = insideDestination[insideDestination.length - 1];\n\n if (last.descriptor.id === draggable.descriptor.id) {\n return draggablePage.borderBox.center;\n }\n\n if (didStartAfterCritical(last.descriptor.id, afterCritical)) {\n var page = offset(last.page, negate(afterCritical.displacedBy.point));\n return goAfter({\n axis: axis,\n moveRelativeTo: page,\n isMoving: draggablePage\n });\n }\n\n return goAfter({\n axis: axis,\n moveRelativeTo: last.page,\n isMoving: draggablePage\n });\n};\n\nvar withDroppableDisplacement = function withDroppableDisplacement(droppable, point) {\n var frame = droppable.frame;\n\n if (!frame) {\n return point;\n }\n\n return add(point, frame.scroll.diff.displacement);\n};\n\nvar getResultWithoutDroppableDisplacement = function getResultWithoutDroppableDisplacement(_ref) {\n var impact = _ref.impact,\n draggable = _ref.draggable,\n droppable = _ref.droppable,\n draggables = _ref.draggables,\n afterCritical = _ref.afterCritical;\n var original = draggable.page.borderBox.center;\n var at = impact.at;\n\n if (!droppable) {\n return original;\n }\n\n if (!at) {\n return original;\n }\n\n if (at.type === 'REORDER') {\n return whenReordering({\n impact: impact,\n draggable: draggable,\n draggables: draggables,\n droppable: droppable,\n afterCritical: afterCritical\n });\n }\n\n return whenCombining({\n impact: impact,\n draggables: draggables,\n afterCritical: afterCritical\n });\n};\n\nvar getPageBorderBoxCenterFromImpact = function getPageBorderBoxCenterFromImpact(args) {\n var withoutDisplacement = getResultWithoutDroppableDisplacement(args);\n var droppable = args.droppable;\n var withDisplacement = droppable ? withDroppableDisplacement(droppable, withoutDisplacement) : withoutDisplacement;\n return withDisplacement;\n};\n\nvar scrollViewport = function scrollViewport(viewport, newScroll) {\n var diff = subtract(newScroll, viewport.scroll.initial);\n var displacement = negate(diff);\n var frame = getRect({\n top: newScroll.y,\n bottom: newScroll.y + viewport.frame.height,\n left: newScroll.x,\n right: newScroll.x + viewport.frame.width\n });\n var updated = {\n frame: frame,\n scroll: {\n initial: viewport.scroll.initial,\n max: viewport.scroll.max,\n current: newScroll,\n diff: {\n value: diff,\n displacement: displacement\n }\n }\n };\n return updated;\n};\n\nfunction getDraggables(ids, draggables) {\n return ids.map(function (id) {\n return draggables[id];\n });\n}\n\nfunction tryGetVisible(id, groups) {\n for (var i = 0; i < groups.length; i++) {\n var displacement = groups[i].visible[id];\n\n if (displacement) {\n return displacement;\n }\n }\n\n return null;\n}\n\nvar speculativelyIncrease = function speculativelyIncrease(_ref) {\n var impact = _ref.impact,\n viewport = _ref.viewport,\n destination = _ref.destination,\n draggables = _ref.draggables,\n maxScrollChange = _ref.maxScrollChange;\n var scrolledViewport = scrollViewport(viewport, add(viewport.scroll.current, maxScrollChange));\n var scrolledDroppable = destination.frame ? scrollDroppable(destination, add(destination.frame.scroll.current, maxScrollChange)) : destination;\n var last = impact.displaced;\n var withViewportScroll = getDisplacementGroups({\n afterDragging: getDraggables(last.all, draggables),\n destination: destination,\n displacedBy: impact.displacedBy,\n viewport: scrolledViewport.frame,\n last: last,\n forceShouldAnimate: false\n });\n var withDroppableScroll = getDisplacementGroups({\n afterDragging: getDraggables(last.all, draggables),\n destination: scrolledDroppable,\n displacedBy: impact.displacedBy,\n viewport: viewport.frame,\n last: last,\n forceShouldAnimate: false\n });\n var invisible = {};\n var visible = {};\n var groups = [last, withViewportScroll, withDroppableScroll];\n last.all.forEach(function (id) {\n var displacement = tryGetVisible(id, groups);\n\n if (displacement) {\n visible[id] = displacement;\n return;\n }\n\n invisible[id] = true;\n });\n\n var newImpact = _extends({}, impact, {\n displaced: {\n all: last.all,\n invisible: invisible,\n visible: visible\n }\n });\n\n return newImpact;\n};\n\nvar withViewportDisplacement = function withViewportDisplacement(viewport, point) {\n return add(viewport.scroll.diff.displacement, point);\n};\n\nvar getClientFromPageBorderBoxCenter = function getClientFromPageBorderBoxCenter(_ref) {\n var pageBorderBoxCenter = _ref.pageBorderBoxCenter,\n draggable = _ref.draggable,\n viewport = _ref.viewport;\n var withoutPageScrollChange = withViewportDisplacement(viewport, pageBorderBoxCenter);\n var offset = subtract(withoutPageScrollChange, draggable.page.borderBox.center);\n return add(draggable.client.borderBox.center, offset);\n};\n\nvar isTotallyVisibleInNewLocation = function isTotallyVisibleInNewLocation(_ref) {\n var draggable = _ref.draggable,\n destination = _ref.destination,\n newPageBorderBoxCenter = _ref.newPageBorderBoxCenter,\n viewport = _ref.viewport,\n withDroppableDisplacement = _ref.withDroppableDisplacement,\n _ref$onlyOnMainAxis = _ref.onlyOnMainAxis,\n onlyOnMainAxis = _ref$onlyOnMainAxis === void 0 ? false : _ref$onlyOnMainAxis;\n var changeNeeded = subtract(newPageBorderBoxCenter, draggable.page.borderBox.center);\n var shifted = offsetByPosition(draggable.page.borderBox, changeNeeded);\n var args = {\n target: shifted,\n destination: destination,\n withDroppableDisplacement: withDroppableDisplacement,\n viewport: viewport\n };\n return onlyOnMainAxis ? isTotallyVisibleOnAxis(args) : isTotallyVisible(args);\n};\n\nvar moveToNextPlace = function moveToNextPlace(_ref) {\n var isMovingForward = _ref.isMovingForward,\n draggable = _ref.draggable,\n destination = _ref.destination,\n draggables = _ref.draggables,\n previousImpact = _ref.previousImpact,\n viewport = _ref.viewport,\n previousPageBorderBoxCenter = _ref.previousPageBorderBoxCenter,\n previousClientSelection = _ref.previousClientSelection,\n afterCritical = _ref.afterCritical;\n\n if (!destination.isEnabled) {\n return null;\n }\n\n var insideDestination = getDraggablesInsideDroppable(destination.descriptor.id, draggables);\n var isInHomeList = isHomeOf(draggable, destination);\n var impact = moveToNextCombine({\n isMovingForward: isMovingForward,\n draggable: draggable,\n destination: destination,\n insideDestination: insideDestination,\n previousImpact: previousImpact\n }) || moveToNextIndex({\n isMovingForward: isMovingForward,\n isInHomeList: isInHomeList,\n draggable: draggable,\n draggables: draggables,\n destination: destination,\n insideDestination: insideDestination,\n previousImpact: previousImpact,\n viewport: viewport,\n afterCritical: afterCritical\n });\n\n if (!impact) {\n return null;\n }\n\n var pageBorderBoxCenter = getPageBorderBoxCenterFromImpact({\n impact: impact,\n draggable: draggable,\n droppable: destination,\n draggables: draggables,\n afterCritical: afterCritical\n });\n var isVisibleInNewLocation = isTotallyVisibleInNewLocation({\n draggable: draggable,\n destination: destination,\n newPageBorderBoxCenter: pageBorderBoxCenter,\n viewport: viewport.frame,\n withDroppableDisplacement: false,\n onlyOnMainAxis: true\n });\n\n if (isVisibleInNewLocation) {\n var clientSelection = getClientFromPageBorderBoxCenter({\n pageBorderBoxCenter: pageBorderBoxCenter,\n draggable: draggable,\n viewport: viewport\n });\n return {\n clientSelection: clientSelection,\n impact: impact,\n scrollJumpRequest: null\n };\n }\n\n var distance = subtract(pageBorderBoxCenter, previousPageBorderBoxCenter);\n var cautious = speculativelyIncrease({\n impact: impact,\n viewport: viewport,\n destination: destination,\n draggables: draggables,\n maxScrollChange: distance\n });\n return {\n clientSelection: previousClientSelection,\n impact: cautious,\n scrollJumpRequest: distance\n };\n};\n\nvar getKnownActive = function getKnownActive(droppable) {\n var rect = droppable.subject.active;\n !rect ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot get clipped area from droppable') : invariant(false) : void 0;\n return rect;\n};\n\nvar getBestCrossAxisDroppable = function getBestCrossAxisDroppable(_ref) {\n var isMovingForward = _ref.isMovingForward,\n pageBorderBoxCenter = _ref.pageBorderBoxCenter,\n source = _ref.source,\n droppables = _ref.droppables,\n viewport = _ref.viewport;\n var active = source.subject.active;\n\n if (!active) {\n return null;\n }\n\n var axis = source.axis;\n var isBetweenSourceClipped = isWithin(active[axis.start], active[axis.end]);\n var candidates = toDroppableList(droppables).filter(function (droppable) {\n return droppable !== source;\n }).filter(function (droppable) {\n return droppable.isEnabled;\n }).filter(function (droppable) {\n return Boolean(droppable.subject.active);\n }).filter(function (droppable) {\n return isPartiallyVisibleThroughFrame(viewport.frame)(getKnownActive(droppable));\n }).filter(function (droppable) {\n var activeOfTarget = getKnownActive(droppable);\n\n if (isMovingForward) {\n return active[axis.crossAxisEnd] < activeOfTarget[axis.crossAxisEnd];\n }\n\n return activeOfTarget[axis.crossAxisStart] < active[axis.crossAxisStart];\n }).filter(function (droppable) {\n var activeOfTarget = getKnownActive(droppable);\n var isBetweenDestinationClipped = isWithin(activeOfTarget[axis.start], activeOfTarget[axis.end]);\n return isBetweenSourceClipped(activeOfTarget[axis.start]) || isBetweenSourceClipped(activeOfTarget[axis.end]) || isBetweenDestinationClipped(active[axis.start]) || isBetweenDestinationClipped(active[axis.end]);\n }).sort(function (a, b) {\n var first = getKnownActive(a)[axis.crossAxisStart];\n var second = getKnownActive(b)[axis.crossAxisStart];\n\n if (isMovingForward) {\n return first - second;\n }\n\n return second - first;\n }).filter(function (droppable, index, array) {\n return getKnownActive(droppable)[axis.crossAxisStart] === getKnownActive(array[0])[axis.crossAxisStart];\n });\n\n if (!candidates.length) {\n return null;\n }\n\n if (candidates.length === 1) {\n return candidates[0];\n }\n\n var contains = candidates.filter(function (droppable) {\n var isWithinDroppable = isWithin(getKnownActive(droppable)[axis.start], getKnownActive(droppable)[axis.end]);\n return isWithinDroppable(pageBorderBoxCenter[axis.line]);\n });\n\n if (contains.length === 1) {\n return contains[0];\n }\n\n if (contains.length > 1) {\n return contains.sort(function (a, b) {\n return getKnownActive(a)[axis.start] - getKnownActive(b)[axis.start];\n })[0];\n }\n\n return candidates.sort(function (a, b) {\n var first = closest(pageBorderBoxCenter, getCorners(getKnownActive(a)));\n var second = closest(pageBorderBoxCenter, getCorners(getKnownActive(b)));\n\n if (first !== second) {\n return first - second;\n }\n\n return getKnownActive(a)[axis.start] - getKnownActive(b)[axis.start];\n })[0];\n};\n\nvar getCurrentPageBorderBoxCenter = function getCurrentPageBorderBoxCenter(draggable, afterCritical) {\n var original = draggable.page.borderBox.center;\n return didStartAfterCritical(draggable.descriptor.id, afterCritical) ? subtract(original, afterCritical.displacedBy.point) : original;\n};\n\nvar getCurrentPageBorderBox = function getCurrentPageBorderBox(draggable, afterCritical) {\n var original = draggable.page.borderBox;\n return didStartAfterCritical(draggable.descriptor.id, afterCritical) ? offsetByPosition(original, negate(afterCritical.displacedBy.point)) : original;\n};\n\nvar getClosestDraggable = function getClosestDraggable(_ref) {\n var pageBorderBoxCenter = _ref.pageBorderBoxCenter,\n viewport = _ref.viewport,\n destination = _ref.destination,\n insideDestination = _ref.insideDestination,\n afterCritical = _ref.afterCritical;\n var sorted = insideDestination.filter(function (draggable) {\n return isTotallyVisible({\n target: getCurrentPageBorderBox(draggable, afterCritical),\n destination: destination,\n viewport: viewport.frame,\n withDroppableDisplacement: true\n });\n }).sort(function (a, b) {\n var distanceToA = distance(pageBorderBoxCenter, withDroppableDisplacement(destination, getCurrentPageBorderBoxCenter(a, afterCritical)));\n var distanceToB = distance(pageBorderBoxCenter, withDroppableDisplacement(destination, getCurrentPageBorderBoxCenter(b, afterCritical)));\n\n if (distanceToA < distanceToB) {\n return -1;\n }\n\n if (distanceToB < distanceToA) {\n return 1;\n }\n\n return a.descriptor.index - b.descriptor.index;\n });\n return sorted[0] || null;\n};\n\nvar getDisplacedBy = memoizeOne(function getDisplacedBy(axis, displaceBy) {\n var displacement = displaceBy[axis.line];\n return {\n value: displacement,\n point: patch(axis.line, displacement)\n };\n});\n\nvar getRequiredGrowthForPlaceholder = function getRequiredGrowthForPlaceholder(droppable, placeholderSize, draggables) {\n var axis = droppable.axis;\n\n if (droppable.descriptor.mode === 'virtual') {\n return patch(axis.line, placeholderSize[axis.line]);\n }\n\n var availableSpace = droppable.subject.page.contentBox[axis.size];\n var insideDroppable = getDraggablesInsideDroppable(droppable.descriptor.id, draggables);\n var spaceUsed = insideDroppable.reduce(function (sum, dimension) {\n return sum + dimension.client.marginBox[axis.size];\n }, 0);\n var requiredSpace = spaceUsed + placeholderSize[axis.line];\n var needsToGrowBy = requiredSpace - availableSpace;\n\n if (needsToGrowBy <= 0) {\n return null;\n }\n\n return patch(axis.line, needsToGrowBy);\n};\n\nvar withMaxScroll = function withMaxScroll(frame, max) {\n return _extends({}, frame, {\n scroll: _extends({}, frame.scroll, {\n max: max\n })\n });\n};\n\nvar addPlaceholder = function addPlaceholder(droppable, draggable, draggables) {\n var frame = droppable.frame;\n !!isHomeOf(draggable, droppable) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Should not add placeholder space to home list') : invariant(false) : void 0;\n !!droppable.subject.withPlaceholder ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot add placeholder size to a subject when it already has one') : invariant(false) : void 0;\n var placeholderSize = getDisplacedBy(droppable.axis, draggable.displaceBy).point;\n var requiredGrowth = getRequiredGrowthForPlaceholder(droppable, placeholderSize, draggables);\n var added = {\n placeholderSize: placeholderSize,\n increasedBy: requiredGrowth,\n oldFrameMaxScroll: droppable.frame ? droppable.frame.scroll.max : null\n };\n\n if (!frame) {\n var _subject = getSubject({\n page: droppable.subject.page,\n withPlaceholder: added,\n axis: droppable.axis,\n frame: droppable.frame\n });\n\n return _extends({}, droppable, {\n subject: _subject\n });\n }\n\n var maxScroll = requiredGrowth ? add(frame.scroll.max, requiredGrowth) : frame.scroll.max;\n var newFrame = withMaxScroll(frame, maxScroll);\n var subject = getSubject({\n page: droppable.subject.page,\n withPlaceholder: added,\n axis: droppable.axis,\n frame: newFrame\n });\n return _extends({}, droppable, {\n subject: subject,\n frame: newFrame\n });\n};\n\nvar removePlaceholder = function removePlaceholder(droppable) {\n var added = droppable.subject.withPlaceholder;\n !added ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot remove placeholder form subject when there was none') : invariant(false) : void 0;\n var frame = droppable.frame;\n\n if (!frame) {\n var _subject2 = getSubject({\n page: droppable.subject.page,\n axis: droppable.axis,\n frame: null,\n withPlaceholder: null\n });\n\n return _extends({}, droppable, {\n subject: _subject2\n });\n }\n\n var oldMaxScroll = added.oldFrameMaxScroll;\n !oldMaxScroll ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Expected droppable with frame to have old max frame scroll when removing placeholder') : invariant(false) : void 0;\n var newFrame = withMaxScroll(frame, oldMaxScroll);\n var subject = getSubject({\n page: droppable.subject.page,\n axis: droppable.axis,\n frame: newFrame,\n withPlaceholder: null\n });\n return _extends({}, droppable, {\n subject: subject,\n frame: newFrame\n });\n};\n\nvar moveToNewDroppable = function moveToNewDroppable(_ref) {\n var previousPageBorderBoxCenter = _ref.previousPageBorderBoxCenter,\n moveRelativeTo = _ref.moveRelativeTo,\n insideDestination = _ref.insideDestination,\n draggable = _ref.draggable,\n draggables = _ref.draggables,\n destination = _ref.destination,\n viewport = _ref.viewport,\n afterCritical = _ref.afterCritical;\n\n if (!moveRelativeTo) {\n if (insideDestination.length) {\n return null;\n }\n\n var proposed = {\n displaced: emptyGroups,\n displacedBy: noDisplacedBy,\n at: {\n type: 'REORDER',\n destination: {\n droppableId: destination.descriptor.id,\n index: 0\n }\n }\n };\n var proposedPageBorderBoxCenter = getPageBorderBoxCenterFromImpact({\n impact: proposed,\n draggable: draggable,\n droppable: destination,\n draggables: draggables,\n afterCritical: afterCritical\n });\n var withPlaceholder = isHomeOf(draggable, destination) ? destination : addPlaceholder(destination, draggable, draggables);\n var isVisibleInNewLocation = isTotallyVisibleInNewLocation({\n draggable: draggable,\n destination: withPlaceholder,\n newPageBorderBoxCenter: proposedPageBorderBoxCenter,\n viewport: viewport.frame,\n withDroppableDisplacement: false,\n onlyOnMainAxis: true\n });\n return isVisibleInNewLocation ? proposed : null;\n }\n\n var isGoingBeforeTarget = Boolean(previousPageBorderBoxCenter[destination.axis.line] <= moveRelativeTo.page.borderBox.center[destination.axis.line]);\n\n var proposedIndex = function () {\n var relativeTo = moveRelativeTo.descriptor.index;\n\n if (moveRelativeTo.descriptor.id === draggable.descriptor.id) {\n return relativeTo;\n }\n\n if (isGoingBeforeTarget) {\n return relativeTo;\n }\n\n return relativeTo + 1;\n }();\n\n var displacedBy = getDisplacedBy(destination.axis, draggable.displaceBy);\n return calculateReorderImpact({\n draggable: draggable,\n insideDestination: insideDestination,\n destination: destination,\n viewport: viewport,\n displacedBy: displacedBy,\n last: emptyGroups,\n index: proposedIndex\n });\n};\n\nvar moveCrossAxis = function moveCrossAxis(_ref) {\n var isMovingForward = _ref.isMovingForward,\n previousPageBorderBoxCenter = _ref.previousPageBorderBoxCenter,\n draggable = _ref.draggable,\n isOver = _ref.isOver,\n draggables = _ref.draggables,\n droppables = _ref.droppables,\n viewport = _ref.viewport,\n afterCritical = _ref.afterCritical;\n var destination = getBestCrossAxisDroppable({\n isMovingForward: isMovingForward,\n pageBorderBoxCenter: previousPageBorderBoxCenter,\n source: isOver,\n droppables: droppables,\n viewport: viewport\n });\n\n if (!destination) {\n return null;\n }\n\n var insideDestination = getDraggablesInsideDroppable(destination.descriptor.id, draggables);\n var moveRelativeTo = getClosestDraggable({\n pageBorderBoxCenter: previousPageBorderBoxCenter,\n viewport: viewport,\n destination: destination,\n insideDestination: insideDestination,\n afterCritical: afterCritical\n });\n var impact = moveToNewDroppable({\n previousPageBorderBoxCenter: previousPageBorderBoxCenter,\n destination: destination,\n draggable: draggable,\n draggables: draggables,\n moveRelativeTo: moveRelativeTo,\n insideDestination: insideDestination,\n viewport: viewport,\n afterCritical: afterCritical\n });\n\n if (!impact) {\n return null;\n }\n\n var pageBorderBoxCenter = getPageBorderBoxCenterFromImpact({\n impact: impact,\n draggable: draggable,\n droppable: destination,\n draggables: draggables,\n afterCritical: afterCritical\n });\n var clientSelection = getClientFromPageBorderBoxCenter({\n pageBorderBoxCenter: pageBorderBoxCenter,\n draggable: draggable,\n viewport: viewport\n });\n return {\n clientSelection: clientSelection,\n impact: impact,\n scrollJumpRequest: null\n };\n};\n\nvar whatIsDraggedOver = function whatIsDraggedOver(impact) {\n var at = impact.at;\n\n if (!at) {\n return null;\n }\n\n if (at.type === 'REORDER') {\n return at.destination.droppableId;\n }\n\n return at.combine.droppableId;\n};\n\nvar getDroppableOver = function getDroppableOver(impact, droppables) {\n var id = whatIsDraggedOver(impact);\n return id ? droppables[id] : null;\n};\n\nvar moveInDirection = function moveInDirection(_ref) {\n var state = _ref.state,\n type = _ref.type;\n var isActuallyOver = getDroppableOver(state.impact, state.dimensions.droppables);\n var isMainAxisMovementAllowed = Boolean(isActuallyOver);\n var home = state.dimensions.droppables[state.critical.droppable.id];\n var isOver = isActuallyOver || home;\n var direction = isOver.axis.direction;\n var isMovingOnMainAxis = direction === 'vertical' && (type === 'MOVE_UP' || type === 'MOVE_DOWN') || direction === 'horizontal' && (type === 'MOVE_LEFT' || type === 'MOVE_RIGHT');\n\n if (isMovingOnMainAxis && !isMainAxisMovementAllowed) {\n return null;\n }\n\n var isMovingForward = type === 'MOVE_DOWN' || type === 'MOVE_RIGHT';\n var draggable = state.dimensions.draggables[state.critical.draggable.id];\n var previousPageBorderBoxCenter = state.current.page.borderBoxCenter;\n var _state$dimensions = state.dimensions,\n draggables = _state$dimensions.draggables,\n droppables = _state$dimensions.droppables;\n return isMovingOnMainAxis ? moveToNextPlace({\n isMovingForward: isMovingForward,\n previousPageBorderBoxCenter: previousPageBorderBoxCenter,\n draggable: draggable,\n destination: isOver,\n draggables: draggables,\n viewport: state.viewport,\n previousClientSelection: state.current.client.selection,\n previousImpact: state.impact,\n afterCritical: state.afterCritical\n }) : moveCrossAxis({\n isMovingForward: isMovingForward,\n previousPageBorderBoxCenter: previousPageBorderBoxCenter,\n draggable: draggable,\n isOver: isOver,\n draggables: draggables,\n droppables: droppables,\n viewport: state.viewport,\n afterCritical: state.afterCritical\n });\n};\n\nfunction isMovementAllowed(state) {\n return state.phase === 'DRAGGING' || state.phase === 'COLLECTING';\n}\n\nfunction isPositionInFrame(frame) {\n var isWithinVertical = isWithin(frame.top, frame.bottom);\n var isWithinHorizontal = isWithin(frame.left, frame.right);\n return function run(point) {\n return isWithinVertical(point.y) && isWithinHorizontal(point.x);\n };\n}\n\nfunction getHasOverlap(first, second) {\n return first.left < second.right && first.right > second.left && first.top < second.bottom && first.bottom > second.top;\n}\n\nfunction getFurthestAway(_ref) {\n var pageBorderBox = _ref.pageBorderBox,\n draggable = _ref.draggable,\n candidates = _ref.candidates;\n var startCenter = draggable.page.borderBox.center;\n var sorted = candidates.map(function (candidate) {\n var axis = candidate.axis;\n var target = patch(candidate.axis.line, pageBorderBox.center[axis.line], candidate.page.borderBox.center[axis.crossAxisLine]);\n return {\n id: candidate.descriptor.id,\n distance: distance(startCenter, target)\n };\n }).sort(function (a, b) {\n return b.distance - a.distance;\n });\n return sorted[0] ? sorted[0].id : null;\n}\n\nfunction getDroppableOver$1(_ref2) {\n var pageBorderBox = _ref2.pageBorderBox,\n draggable = _ref2.draggable,\n droppables = _ref2.droppables;\n var candidates = toDroppableList(droppables).filter(function (item) {\n if (!item.isEnabled) {\n return false;\n }\n\n var active = item.subject.active;\n\n if (!active) {\n return false;\n }\n\n if (!getHasOverlap(pageBorderBox, active)) {\n return false;\n }\n\n if (isPositionInFrame(active)(pageBorderBox.center)) {\n return true;\n }\n\n var axis = item.axis;\n var childCenter = active.center[axis.crossAxisLine];\n var crossAxisStart = pageBorderBox[axis.crossAxisStart];\n var crossAxisEnd = pageBorderBox[axis.crossAxisEnd];\n var isContained = isWithin(active[axis.crossAxisStart], active[axis.crossAxisEnd]);\n var isStartContained = isContained(crossAxisStart);\n var isEndContained = isContained(crossAxisEnd);\n\n if (!isStartContained && !isEndContained) {\n return true;\n }\n\n if (isStartContained) {\n return crossAxisStart < childCenter;\n }\n\n return crossAxisEnd > childCenter;\n });\n\n if (!candidates.length) {\n return null;\n }\n\n if (candidates.length === 1) {\n return candidates[0].descriptor.id;\n }\n\n return getFurthestAway({\n pageBorderBox: pageBorderBox,\n draggable: draggable,\n candidates: candidates\n });\n}\n\nvar offsetRectByPosition = function offsetRectByPosition(rect, point) {\n return getRect(offsetByPosition(rect, point));\n};\n\nvar withDroppableScroll = function withDroppableScroll(droppable, area) {\n var frame = droppable.frame;\n\n if (!frame) {\n return area;\n }\n\n return offsetRectByPosition(area, frame.scroll.diff.value);\n};\n\nfunction getIsDisplaced(_ref) {\n var displaced = _ref.displaced,\n id = _ref.id;\n return Boolean(displaced.visible[id] || displaced.invisible[id]);\n}\n\nfunction atIndex(_ref) {\n var draggable = _ref.draggable,\n closest = _ref.closest,\n inHomeList = _ref.inHomeList;\n\n if (!closest) {\n return null;\n }\n\n if (!inHomeList) {\n return closest.descriptor.index;\n }\n\n if (closest.descriptor.index > draggable.descriptor.index) {\n return closest.descriptor.index - 1;\n }\n\n return closest.descriptor.index;\n}\n\nvar getReorderImpact = function getReorderImpact(_ref2) {\n var targetRect = _ref2.pageBorderBoxWithDroppableScroll,\n draggable = _ref2.draggable,\n destination = _ref2.destination,\n insideDestination = _ref2.insideDestination,\n last = _ref2.last,\n viewport = _ref2.viewport,\n afterCritical = _ref2.afterCritical;\n var axis = destination.axis;\n var displacedBy = getDisplacedBy(destination.axis, draggable.displaceBy);\n var displacement = displacedBy.value;\n var targetStart = targetRect[axis.start];\n var targetEnd = targetRect[axis.end];\n var withoutDragging = removeDraggableFromList(draggable, insideDestination);\n var closest = find(withoutDragging, function (child) {\n var id = child.descriptor.id;\n var childCenter = child.page.borderBox.center[axis.line];\n var didStartAfterCritical$1 = didStartAfterCritical(id, afterCritical);\n var isDisplaced = getIsDisplaced({\n displaced: last,\n id: id\n });\n\n if (didStartAfterCritical$1) {\n if (isDisplaced) {\n return targetEnd <= childCenter;\n }\n\n return targetStart < childCenter - displacement;\n }\n\n if (isDisplaced) {\n return targetEnd <= childCenter + displacement;\n }\n\n return targetStart < childCenter;\n });\n var newIndex = atIndex({\n draggable: draggable,\n closest: closest,\n inHomeList: isHomeOf(draggable, destination)\n });\n return calculateReorderImpact({\n draggable: draggable,\n insideDestination: insideDestination,\n destination: destination,\n viewport: viewport,\n last: last,\n displacedBy: displacedBy,\n index: newIndex\n });\n};\n\nvar combineThresholdDivisor = 4;\n\nvar getCombineImpact = function getCombineImpact(_ref) {\n var draggable = _ref.draggable,\n targetRect = _ref.pageBorderBoxWithDroppableScroll,\n previousImpact = _ref.previousImpact,\n destination = _ref.destination,\n insideDestination = _ref.insideDestination,\n afterCritical = _ref.afterCritical;\n\n if (!destination.isCombineEnabled) {\n return null;\n }\n\n var axis = destination.axis;\n var displacedBy = getDisplacedBy(destination.axis, draggable.displaceBy);\n var displacement = displacedBy.value;\n var targetStart = targetRect[axis.start];\n var targetEnd = targetRect[axis.end];\n var withoutDragging = removeDraggableFromList(draggable, insideDestination);\n var combineWith = find(withoutDragging, function (child) {\n var id = child.descriptor.id;\n var childRect = child.page.borderBox;\n var childSize = childRect[axis.size];\n var threshold = childSize / combineThresholdDivisor;\n var didStartAfterCritical$1 = didStartAfterCritical(id, afterCritical);\n var isDisplaced = getIsDisplaced({\n displaced: previousImpact.displaced,\n id: id\n });\n\n if (didStartAfterCritical$1) {\n if (isDisplaced) {\n return targetEnd > childRect[axis.start] + threshold && targetEnd < childRect[axis.end] - threshold;\n }\n\n return targetStart > childRect[axis.start] - displacement + threshold && targetStart < childRect[axis.end] - displacement - threshold;\n }\n\n if (isDisplaced) {\n return targetEnd > childRect[axis.start] + displacement + threshold && targetEnd < childRect[axis.end] + displacement - threshold;\n }\n\n return targetStart > childRect[axis.start] + threshold && targetStart < childRect[axis.end] - threshold;\n });\n\n if (!combineWith) {\n return null;\n }\n\n var impact = {\n displacedBy: displacedBy,\n displaced: previousImpact.displaced,\n at: {\n type: 'COMBINE',\n combine: {\n draggableId: combineWith.descriptor.id,\n droppableId: destination.descriptor.id\n }\n }\n };\n return impact;\n};\n\nvar getDragImpact = function getDragImpact(_ref) {\n var pageOffset = _ref.pageOffset,\n draggable = _ref.draggable,\n draggables = _ref.draggables,\n droppables = _ref.droppables,\n previousImpact = _ref.previousImpact,\n viewport = _ref.viewport,\n afterCritical = _ref.afterCritical;\n var pageBorderBox = offsetRectByPosition(draggable.page.borderBox, pageOffset);\n var destinationId = getDroppableOver$1({\n pageBorderBox: pageBorderBox,\n draggable: draggable,\n droppables: droppables\n });\n\n if (!destinationId) {\n return noImpact;\n }\n\n var destination = droppables[destinationId];\n var insideDestination = getDraggablesInsideDroppable(destination.descriptor.id, draggables);\n var pageBorderBoxWithDroppableScroll = withDroppableScroll(destination, pageBorderBox);\n return getCombineImpact({\n pageBorderBoxWithDroppableScroll: pageBorderBoxWithDroppableScroll,\n draggable: draggable,\n previousImpact: previousImpact,\n destination: destination,\n insideDestination: insideDestination,\n afterCritical: afterCritical\n }) || getReorderImpact({\n pageBorderBoxWithDroppableScroll: pageBorderBoxWithDroppableScroll,\n draggable: draggable,\n destination: destination,\n insideDestination: insideDestination,\n last: previousImpact.displaced,\n viewport: viewport,\n afterCritical: afterCritical\n });\n};\n\nvar patchDroppableMap = function patchDroppableMap(droppables, updated) {\n var _extends2;\n\n return _extends({}, droppables, (_extends2 = {}, _extends2[updated.descriptor.id] = updated, _extends2));\n};\n\nvar clearUnusedPlaceholder = function clearUnusedPlaceholder(_ref) {\n var previousImpact = _ref.previousImpact,\n impact = _ref.impact,\n droppables = _ref.droppables;\n var last = whatIsDraggedOver(previousImpact);\n var now = whatIsDraggedOver(impact);\n\n if (!last) {\n return droppables;\n }\n\n if (last === now) {\n return droppables;\n }\n\n var lastDroppable = droppables[last];\n\n if (!lastDroppable.subject.withPlaceholder) {\n return droppables;\n }\n\n var updated = removePlaceholder(lastDroppable);\n return patchDroppableMap(droppables, updated);\n};\n\nvar recomputePlaceholders = function recomputePlaceholders(_ref2) {\n var draggable = _ref2.draggable,\n draggables = _ref2.draggables,\n droppables = _ref2.droppables,\n previousImpact = _ref2.previousImpact,\n impact = _ref2.impact;\n var cleaned = clearUnusedPlaceholder({\n previousImpact: previousImpact,\n impact: impact,\n droppables: droppables\n });\n var isOver = whatIsDraggedOver(impact);\n\n if (!isOver) {\n return cleaned;\n }\n\n var droppable = droppables[isOver];\n\n if (isHomeOf(draggable, droppable)) {\n return cleaned;\n }\n\n if (droppable.subject.withPlaceholder) {\n return cleaned;\n }\n\n var patched = addPlaceholder(droppable, draggable, draggables);\n return patchDroppableMap(cleaned, patched);\n};\n\nvar update = function update(_ref) {\n var state = _ref.state,\n forcedClientSelection = _ref.clientSelection,\n forcedDimensions = _ref.dimensions,\n forcedViewport = _ref.viewport,\n forcedImpact = _ref.impact,\n scrollJumpRequest = _ref.scrollJumpRequest;\n var viewport = forcedViewport || state.viewport;\n var dimensions = forcedDimensions || state.dimensions;\n var clientSelection = forcedClientSelection || state.current.client.selection;\n var offset = subtract(clientSelection, state.initial.client.selection);\n var client = {\n offset: offset,\n selection: clientSelection,\n borderBoxCenter: add(state.initial.client.borderBoxCenter, offset)\n };\n var page = {\n selection: add(client.selection, viewport.scroll.current),\n borderBoxCenter: add(client.borderBoxCenter, viewport.scroll.current),\n offset: add(client.offset, viewport.scroll.diff.value)\n };\n var current = {\n client: client,\n page: page\n };\n\n if (state.phase === 'COLLECTING') {\n return _extends({\n phase: 'COLLECTING'\n }, state, {\n dimensions: dimensions,\n viewport: viewport,\n current: current\n });\n }\n\n var draggable = dimensions.draggables[state.critical.draggable.id];\n var newImpact = forcedImpact || getDragImpact({\n pageOffset: page.offset,\n draggable: draggable,\n draggables: dimensions.draggables,\n droppables: dimensions.droppables,\n previousImpact: state.impact,\n viewport: viewport,\n afterCritical: state.afterCritical\n });\n var withUpdatedPlaceholders = recomputePlaceholders({\n draggable: draggable,\n impact: newImpact,\n previousImpact: state.impact,\n draggables: dimensions.draggables,\n droppables: dimensions.droppables\n });\n\n var result = _extends({}, state, {\n current: current,\n dimensions: {\n draggables: dimensions.draggables,\n droppables: withUpdatedPlaceholders\n },\n impact: newImpact,\n viewport: viewport,\n scrollJumpRequest: scrollJumpRequest || null,\n forceShouldAnimate: scrollJumpRequest ? false : null\n });\n\n return result;\n};\n\nfunction getDraggables$1(ids, draggables) {\n return ids.map(function (id) {\n return draggables[id];\n });\n}\n\nvar recompute = function recompute(_ref) {\n var impact = _ref.impact,\n viewport = _ref.viewport,\n draggables = _ref.draggables,\n destination = _ref.destination,\n forceShouldAnimate = _ref.forceShouldAnimate;\n var last = impact.displaced;\n var afterDragging = getDraggables$1(last.all, draggables);\n var displaced = getDisplacementGroups({\n afterDragging: afterDragging,\n destination: destination,\n displacedBy: impact.displacedBy,\n viewport: viewport.frame,\n forceShouldAnimate: forceShouldAnimate,\n last: last\n });\n return _extends({}, impact, {\n displaced: displaced\n });\n};\n\nvar getClientBorderBoxCenter = function getClientBorderBoxCenter(_ref) {\n var impact = _ref.impact,\n draggable = _ref.draggable,\n droppable = _ref.droppable,\n draggables = _ref.draggables,\n viewport = _ref.viewport,\n afterCritical = _ref.afterCritical;\n var pageBorderBoxCenter = getPageBorderBoxCenterFromImpact({\n impact: impact,\n draggable: draggable,\n draggables: draggables,\n droppable: droppable,\n afterCritical: afterCritical\n });\n return getClientFromPageBorderBoxCenter({\n pageBorderBoxCenter: pageBorderBoxCenter,\n draggable: draggable,\n viewport: viewport\n });\n};\n\nvar refreshSnap = function refreshSnap(_ref) {\n var state = _ref.state,\n forcedDimensions = _ref.dimensions,\n forcedViewport = _ref.viewport;\n !(state.movementMode === 'SNAP') ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n var needsVisibilityCheck = state.impact;\n var viewport = forcedViewport || state.viewport;\n var dimensions = forcedDimensions || state.dimensions;\n var draggables = dimensions.draggables,\n droppables = dimensions.droppables;\n var draggable = draggables[state.critical.draggable.id];\n var isOver = whatIsDraggedOver(needsVisibilityCheck);\n !isOver ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Must be over a destination in SNAP movement mode') : invariant(false) : void 0;\n var destination = droppables[isOver];\n var impact = recompute({\n impact: needsVisibilityCheck,\n viewport: viewport,\n destination: destination,\n draggables: draggables\n });\n var clientSelection = getClientBorderBoxCenter({\n impact: impact,\n draggable: draggable,\n droppable: destination,\n draggables: draggables,\n viewport: viewport,\n afterCritical: state.afterCritical\n });\n return update({\n impact: impact,\n clientSelection: clientSelection,\n state: state,\n dimensions: dimensions,\n viewport: viewport\n });\n};\n\nvar getHomeLocation = function getHomeLocation(descriptor) {\n return {\n index: descriptor.index,\n droppableId: descriptor.droppableId\n };\n};\n\nvar getLiftEffect = function getLiftEffect(_ref) {\n var draggable = _ref.draggable,\n home = _ref.home,\n draggables = _ref.draggables,\n viewport = _ref.viewport;\n var displacedBy = getDisplacedBy(home.axis, draggable.displaceBy);\n var insideHome = getDraggablesInsideDroppable(home.descriptor.id, draggables);\n var rawIndex = insideHome.indexOf(draggable);\n !(rawIndex !== -1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Expected draggable to be inside home list') : invariant(false) : void 0;\n var afterDragging = insideHome.slice(rawIndex + 1);\n var effected = afterDragging.reduce(function (previous, item) {\n previous[item.descriptor.id] = true;\n return previous;\n }, {});\n var afterCritical = {\n inVirtualList: home.descriptor.mode === 'virtual',\n displacedBy: displacedBy,\n effected: effected\n };\n var displaced = getDisplacementGroups({\n afterDragging: afterDragging,\n destination: home,\n displacedBy: displacedBy,\n last: null,\n viewport: viewport.frame,\n forceShouldAnimate: false\n });\n var impact = {\n displaced: displaced,\n displacedBy: displacedBy,\n at: {\n type: 'REORDER',\n destination: getHomeLocation(draggable.descriptor)\n }\n };\n return {\n impact: impact,\n afterCritical: afterCritical\n };\n};\n\nvar patchDimensionMap = function patchDimensionMap(dimensions, updated) {\n return {\n draggables: dimensions.draggables,\n droppables: patchDroppableMap(dimensions.droppables, updated)\n };\n};\n\nvar start = function start(key) {\n if (process.env.NODE_ENV !== 'production') {\n {\n return;\n }\n }\n};\n\nvar finish = function finish(key) {\n if (process.env.NODE_ENV !== 'production') {\n {\n return;\n }\n }\n};\n\nvar offsetDraggable = function offsetDraggable(_ref) {\n var draggable = _ref.draggable,\n offset$1 = _ref.offset,\n initialWindowScroll = _ref.initialWindowScroll;\n var client = offset(draggable.client, offset$1);\n var page = withScroll(client, initialWindowScroll);\n\n var moved = _extends({}, draggable, {\n placeholder: _extends({}, draggable.placeholder, {\n client: client\n }),\n client: client,\n page: page\n });\n\n return moved;\n};\n\nvar getFrame = function getFrame(droppable) {\n var frame = droppable.frame;\n !frame ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Expected Droppable to have a frame') : invariant(false) : void 0;\n return frame;\n};\n\nvar adjustAdditionsForScrollChanges = function adjustAdditionsForScrollChanges(_ref) {\n var additions = _ref.additions,\n updatedDroppables = _ref.updatedDroppables,\n viewport = _ref.viewport;\n var windowScrollChange = viewport.scroll.diff.value;\n return additions.map(function (draggable) {\n var droppableId = draggable.descriptor.droppableId;\n var modified = updatedDroppables[droppableId];\n var frame = getFrame(modified);\n var droppableScrollChange = frame.scroll.diff.value;\n var totalChange = add(windowScrollChange, droppableScrollChange);\n var moved = offsetDraggable({\n draggable: draggable,\n offset: totalChange,\n initialWindowScroll: viewport.scroll.initial\n });\n return moved;\n });\n};\n\nvar publishWhileDraggingInVirtual = function publishWhileDraggingInVirtual(_ref) {\n var state = _ref.state,\n published = _ref.published;\n start();\n var withScrollChange = published.modified.map(function (update) {\n var existing = state.dimensions.droppables[update.droppableId];\n var scrolled = scrollDroppable(existing, update.scroll);\n return scrolled;\n });\n\n var droppables = _extends({}, state.dimensions.droppables, {}, toDroppableMap(withScrollChange));\n\n var updatedAdditions = toDraggableMap(adjustAdditionsForScrollChanges({\n additions: published.additions,\n updatedDroppables: droppables,\n viewport: state.viewport\n }));\n\n var draggables = _extends({}, state.dimensions.draggables, {}, updatedAdditions);\n\n published.removals.forEach(function (id) {\n delete draggables[id];\n });\n var dimensions = {\n droppables: droppables,\n draggables: draggables\n };\n var wasOverId = whatIsDraggedOver(state.impact);\n var wasOver = wasOverId ? dimensions.droppables[wasOverId] : null;\n var draggable = dimensions.draggables[state.critical.draggable.id];\n var home = dimensions.droppables[state.critical.droppable.id];\n\n var _getLiftEffect = getLiftEffect({\n draggable: draggable,\n home: home,\n draggables: draggables,\n viewport: state.viewport\n }),\n onLiftImpact = _getLiftEffect.impact,\n afterCritical = _getLiftEffect.afterCritical;\n\n var previousImpact = wasOver && wasOver.isCombineEnabled ? state.impact : onLiftImpact;\n var impact = getDragImpact({\n pageOffset: state.current.page.offset,\n draggable: dimensions.draggables[state.critical.draggable.id],\n draggables: dimensions.draggables,\n droppables: dimensions.droppables,\n previousImpact: previousImpact,\n viewport: state.viewport,\n afterCritical: afterCritical\n });\n finish();\n\n var draggingState = _extends({\n phase: 'DRAGGING'\n }, state, {\n phase: 'DRAGGING',\n impact: impact,\n onLiftImpact: onLiftImpact,\n dimensions: dimensions,\n afterCritical: afterCritical,\n forceShouldAnimate: false\n });\n\n if (state.phase === 'COLLECTING') {\n return draggingState;\n }\n\n var dropPending = _extends({\n phase: 'DROP_PENDING'\n }, draggingState, {\n phase: 'DROP_PENDING',\n reason: state.reason,\n isWaiting: false\n });\n\n return dropPending;\n};\n\nvar isSnapping = function isSnapping(state) {\n return state.movementMode === 'SNAP';\n};\n\nvar postDroppableChange = function postDroppableChange(state, updated, isEnabledChanging) {\n var dimensions = patchDimensionMap(state.dimensions, updated);\n\n if (!isSnapping(state) || isEnabledChanging) {\n return update({\n state: state,\n dimensions: dimensions\n });\n }\n\n return refreshSnap({\n state: state,\n dimensions: dimensions\n });\n};\n\nfunction removeScrollJumpRequest(state) {\n if (state.isDragging && state.movementMode === 'SNAP') {\n return _extends({\n phase: 'DRAGGING'\n }, state, {\n scrollJumpRequest: null\n });\n }\n\n return state;\n}\n\nvar idle = {\n phase: 'IDLE',\n completed: null,\n shouldFlush: false\n};\n\nvar reducer = function reducer(state, action) {\n if (state === void 0) {\n state = idle;\n }\n\n if (action.type === 'FLUSH') {\n return _extends({}, idle, {\n shouldFlush: true\n });\n }\n\n if (action.type === 'INITIAL_PUBLISH') {\n !(state.phase === 'IDLE') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'INITIAL_PUBLISH must come after a IDLE phase') : invariant(false) : void 0;\n var _action$payload = action.payload,\n critical = _action$payload.critical,\n clientSelection = _action$payload.clientSelection,\n viewport = _action$payload.viewport,\n dimensions = _action$payload.dimensions,\n movementMode = _action$payload.movementMode;\n var draggable = dimensions.draggables[critical.draggable.id];\n var home = dimensions.droppables[critical.droppable.id];\n var client = {\n selection: clientSelection,\n borderBoxCenter: draggable.client.borderBox.center,\n offset: origin\n };\n var initial = {\n client: client,\n page: {\n selection: add(client.selection, viewport.scroll.initial),\n borderBoxCenter: add(client.selection, viewport.scroll.initial),\n offset: add(client.selection, viewport.scroll.diff.value)\n }\n };\n var isWindowScrollAllowed = toDroppableList(dimensions.droppables).every(function (item) {\n return !item.isFixedOnPage;\n });\n\n var _getLiftEffect = getLiftEffect({\n draggable: draggable,\n home: home,\n draggables: dimensions.draggables,\n viewport: viewport\n }),\n impact = _getLiftEffect.impact,\n afterCritical = _getLiftEffect.afterCritical;\n\n var result = {\n phase: 'DRAGGING',\n isDragging: true,\n critical: critical,\n movementMode: movementMode,\n dimensions: dimensions,\n initial: initial,\n current: initial,\n isWindowScrollAllowed: isWindowScrollAllowed,\n impact: impact,\n afterCritical: afterCritical,\n onLiftImpact: impact,\n viewport: viewport,\n scrollJumpRequest: null,\n forceShouldAnimate: null\n };\n return result;\n }\n\n if (action.type === 'COLLECTION_STARTING') {\n if (state.phase === 'COLLECTING' || state.phase === 'DROP_PENDING') {\n return state;\n }\n\n !(state.phase === 'DRAGGING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Collection cannot start from phase \" + state.phase) : invariant(false) : void 0;\n\n var _result = _extends({\n phase: 'COLLECTING'\n }, state, {\n phase: 'COLLECTING'\n });\n\n return _result;\n }\n\n if (action.type === 'PUBLISH_WHILE_DRAGGING') {\n !(state.phase === 'COLLECTING' || state.phase === 'DROP_PENDING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Unexpected \" + action.type + \" received in phase \" + state.phase) : invariant(false) : void 0;\n return publishWhileDraggingInVirtual({\n state: state,\n published: action.payload\n });\n }\n\n if (action.type === 'MOVE') {\n if (state.phase === 'DROP_PENDING') {\n return state;\n }\n\n !isMovementAllowed(state) ? process.env.NODE_ENV !== \"production\" ? invariant(false, action.type + \" not permitted in phase \" + state.phase) : invariant(false) : void 0;\n var _clientSelection = action.payload.client;\n\n if (isEqual(_clientSelection, state.current.client.selection)) {\n return state;\n }\n\n return update({\n state: state,\n clientSelection: _clientSelection,\n impact: isSnapping(state) ? state.impact : null\n });\n }\n\n if (action.type === 'UPDATE_DROPPABLE_SCROLL') {\n if (state.phase === 'DROP_PENDING') {\n return removeScrollJumpRequest(state);\n }\n\n if (state.phase === 'COLLECTING') {\n return removeScrollJumpRequest(state);\n }\n\n !isMovementAllowed(state) ? process.env.NODE_ENV !== \"production\" ? invariant(false, action.type + \" not permitted in phase \" + state.phase) : invariant(false) : void 0;\n var _action$payload2 = action.payload,\n id = _action$payload2.id,\n newScroll = _action$payload2.newScroll;\n var target = state.dimensions.droppables[id];\n\n if (!target) {\n return state;\n }\n\n var scrolled = scrollDroppable(target, newScroll);\n return postDroppableChange(state, scrolled, false);\n }\n\n if (action.type === 'UPDATE_DROPPABLE_IS_ENABLED') {\n if (state.phase === 'DROP_PENDING') {\n return state;\n }\n\n !isMovementAllowed(state) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Attempting to move in an unsupported phase \" + state.phase) : invariant(false) : void 0;\n var _action$payload3 = action.payload,\n _id = _action$payload3.id,\n isEnabled = _action$payload3.isEnabled;\n var _target = state.dimensions.droppables[_id];\n !_target ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot find Droppable[id: \" + _id + \"] to toggle its enabled state\") : invariant(false) : void 0;\n !(_target.isEnabled !== isEnabled) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Trying to set droppable isEnabled to \" + String(isEnabled) + \"\\n but it is already \" + String(_target.isEnabled)) : invariant(false) : void 0;\n\n var updated = _extends({}, _target, {\n isEnabled: isEnabled\n });\n\n return postDroppableChange(state, updated, true);\n }\n\n if (action.type === 'UPDATE_DROPPABLE_IS_COMBINE_ENABLED') {\n if (state.phase === 'DROP_PENDING') {\n return state;\n }\n\n !isMovementAllowed(state) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Attempting to move in an unsupported phase \" + state.phase) : invariant(false) : void 0;\n var _action$payload4 = action.payload,\n _id2 = _action$payload4.id,\n isCombineEnabled = _action$payload4.isCombineEnabled;\n var _target2 = state.dimensions.droppables[_id2];\n !_target2 ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot find Droppable[id: \" + _id2 + \"] to toggle its isCombineEnabled state\") : invariant(false) : void 0;\n !(_target2.isCombineEnabled !== isCombineEnabled) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Trying to set droppable isCombineEnabled to \" + String(isCombineEnabled) + \"\\n but it is already \" + String(_target2.isCombineEnabled)) : invariant(false) : void 0;\n\n var _updated = _extends({}, _target2, {\n isCombineEnabled: isCombineEnabled\n });\n\n return postDroppableChange(state, _updated, true);\n }\n\n if (action.type === 'MOVE_BY_WINDOW_SCROLL') {\n if (state.phase === 'DROP_PENDING' || state.phase === 'DROP_ANIMATING') {\n return state;\n }\n\n !isMovementAllowed(state) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot move by window in phase \" + state.phase) : invariant(false) : void 0;\n !state.isWindowScrollAllowed ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Window scrolling is currently not supported for fixed lists') : invariant(false) : void 0;\n var _newScroll = action.payload.newScroll;\n\n if (isEqual(state.viewport.scroll.current, _newScroll)) {\n return removeScrollJumpRequest(state);\n }\n\n var _viewport = scrollViewport(state.viewport, _newScroll);\n\n if (isSnapping(state)) {\n return refreshSnap({\n state: state,\n viewport: _viewport\n });\n }\n\n return update({\n state: state,\n viewport: _viewport\n });\n }\n\n if (action.type === 'UPDATE_VIEWPORT_MAX_SCROLL') {\n if (!isMovementAllowed(state)) {\n return state;\n }\n\n var maxScroll = action.payload.maxScroll;\n\n if (isEqual(maxScroll, state.viewport.scroll.max)) {\n return state;\n }\n\n var withMaxScroll = _extends({}, state.viewport, {\n scroll: _extends({}, state.viewport.scroll, {\n max: maxScroll\n })\n });\n\n return _extends({\n phase: 'DRAGGING'\n }, state, {\n viewport: withMaxScroll\n });\n }\n\n if (action.type === 'MOVE_UP' || action.type === 'MOVE_DOWN' || action.type === 'MOVE_LEFT' || action.type === 'MOVE_RIGHT') {\n if (state.phase === 'COLLECTING' || state.phase === 'DROP_PENDING') {\n return state;\n }\n\n !(state.phase === 'DRAGGING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, action.type + \" received while not in DRAGGING phase\") : invariant(false) : void 0;\n\n var _result2 = moveInDirection({\n state: state,\n type: action.type\n });\n\n if (!_result2) {\n return state;\n }\n\n return update({\n state: state,\n impact: _result2.impact,\n clientSelection: _result2.clientSelection,\n scrollJumpRequest: _result2.scrollJumpRequest\n });\n }\n\n if (action.type === 'DROP_PENDING') {\n var reason = action.payload.reason;\n !(state.phase === 'COLLECTING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Can only move into the DROP_PENDING phase from the COLLECTING phase') : invariant(false) : void 0;\n\n var newState = _extends({\n phase: 'DROP_PENDING'\n }, state, {\n phase: 'DROP_PENDING',\n isWaiting: true,\n reason: reason\n });\n\n return newState;\n }\n\n if (action.type === 'DROP_ANIMATE') {\n var _action$payload5 = action.payload,\n completed = _action$payload5.completed,\n dropDuration = _action$payload5.dropDuration,\n newHomeClientOffset = _action$payload5.newHomeClientOffset;\n !(state.phase === 'DRAGGING' || state.phase === 'DROP_PENDING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot animate drop from phase \" + state.phase) : invariant(false) : void 0;\n var _result3 = {\n phase: 'DROP_ANIMATING',\n completed: completed,\n dropDuration: dropDuration,\n newHomeClientOffset: newHomeClientOffset,\n dimensions: state.dimensions\n };\n return _result3;\n }\n\n if (action.type === 'DROP_COMPLETE') {\n var _completed = action.payload.completed;\n return {\n phase: 'IDLE',\n completed: _completed,\n shouldFlush: false\n };\n }\n\n return state;\n};\n\nvar beforeInitialCapture = function beforeInitialCapture(args) {\n return {\n type: 'BEFORE_INITIAL_CAPTURE',\n payload: args\n };\n};\n\nvar lift = function lift(args) {\n return {\n type: 'LIFT',\n payload: args\n };\n};\n\nvar initialPublish = function initialPublish(args) {\n return {\n type: 'INITIAL_PUBLISH',\n payload: args\n };\n};\n\nvar publishWhileDragging = function publishWhileDragging(args) {\n return {\n type: 'PUBLISH_WHILE_DRAGGING',\n payload: args\n };\n};\n\nvar collectionStarting = function collectionStarting() {\n return {\n type: 'COLLECTION_STARTING',\n payload: null\n };\n};\n\nvar updateDroppableScroll = function updateDroppableScroll(args) {\n return {\n type: 'UPDATE_DROPPABLE_SCROLL',\n payload: args\n };\n};\n\nvar updateDroppableIsEnabled = function updateDroppableIsEnabled(args) {\n return {\n type: 'UPDATE_DROPPABLE_IS_ENABLED',\n payload: args\n };\n};\n\nvar updateDroppableIsCombineEnabled = function updateDroppableIsCombineEnabled(args) {\n return {\n type: 'UPDATE_DROPPABLE_IS_COMBINE_ENABLED',\n payload: args\n };\n};\n\nvar move = function move(args) {\n return {\n type: 'MOVE',\n payload: args\n };\n};\n\nvar moveByWindowScroll = function moveByWindowScroll(args) {\n return {\n type: 'MOVE_BY_WINDOW_SCROLL',\n payload: args\n };\n};\n\nvar updateViewportMaxScroll = function updateViewportMaxScroll(args) {\n return {\n type: 'UPDATE_VIEWPORT_MAX_SCROLL',\n payload: args\n };\n};\n\nvar moveUp = function moveUp() {\n return {\n type: 'MOVE_UP',\n payload: null\n };\n};\n\nvar moveDown = function moveDown() {\n return {\n type: 'MOVE_DOWN',\n payload: null\n };\n};\n\nvar moveRight = function moveRight() {\n return {\n type: 'MOVE_RIGHT',\n payload: null\n };\n};\n\nvar moveLeft = function moveLeft() {\n return {\n type: 'MOVE_LEFT',\n payload: null\n };\n};\n\nvar flush = function flush() {\n return {\n type: 'FLUSH',\n payload: null\n };\n};\n\nvar animateDrop = function animateDrop(args) {\n return {\n type: 'DROP_ANIMATE',\n payload: args\n };\n};\n\nvar completeDrop = function completeDrop(args) {\n return {\n type: 'DROP_COMPLETE',\n payload: args\n };\n};\n\nvar drop = function drop(args) {\n return {\n type: 'DROP',\n payload: args\n };\n};\n\nvar dropPending = function dropPending(args) {\n return {\n type: 'DROP_PENDING',\n payload: args\n };\n};\n\nvar dropAnimationFinished = function dropAnimationFinished() {\n return {\n type: 'DROP_ANIMATION_FINISHED',\n payload: null\n };\n};\n\nfunction checkIndexes(insideDestination) {\n if (insideDestination.length <= 1) {\n return;\n }\n\n var indexes = insideDestination.map(function (d) {\n return d.descriptor.index;\n });\n var errors = {};\n\n for (var i = 1; i < indexes.length; i++) {\n var current = indexes[i];\n var previous = indexes[i - 1];\n\n if (current !== previous + 1) {\n errors[current] = true;\n }\n }\n\n if (!Object.keys(errors).length) {\n return;\n }\n\n var formatted = indexes.map(function (index) {\n var hasError = Boolean(errors[index]);\n return hasError ? \"[\\uD83D\\uDD25\" + index + \"]\" : \"\" + index;\n }).join(', ');\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n Detected non-consecutive indexes.\\n\\n (This can cause unexpected bugs)\\n\\n \" + formatted + \"\\n \") : void 0;\n}\n\nfunction validateDimensions(critical, dimensions) {\n if (process.env.NODE_ENV !== 'production') {\n var insideDestination = getDraggablesInsideDroppable(critical.droppable.id, dimensions.draggables);\n checkIndexes(insideDestination);\n }\n}\n\nvar lift$1 = function lift$1(marshal) {\n return function (_ref) {\n var getState = _ref.getState,\n dispatch = _ref.dispatch;\n return function (next) {\n return function (action) {\n if (action.type !== 'LIFT') {\n next(action);\n return;\n }\n\n var _action$payload = action.payload,\n id = _action$payload.id,\n clientSelection = _action$payload.clientSelection,\n movementMode = _action$payload.movementMode;\n var initial = getState();\n\n if (initial.phase === 'DROP_ANIMATING') {\n dispatch(completeDrop({\n completed: initial.completed\n }));\n }\n\n !(getState().phase === 'IDLE') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Unexpected phase to start a drag') : invariant(false) : void 0;\n dispatch(flush());\n dispatch(beforeInitialCapture({\n draggableId: id,\n movementMode: movementMode\n }));\n var scrollOptions = {\n shouldPublishImmediately: movementMode === 'SNAP'\n };\n var request = {\n draggableId: id,\n scrollOptions: scrollOptions\n };\n\n var _marshal$startPublish = marshal.startPublishing(request),\n critical = _marshal$startPublish.critical,\n dimensions = _marshal$startPublish.dimensions,\n viewport = _marshal$startPublish.viewport;\n\n validateDimensions(critical, dimensions);\n dispatch(initialPublish({\n critical: critical,\n dimensions: dimensions,\n clientSelection: clientSelection,\n movementMode: movementMode,\n viewport: viewport\n }));\n };\n };\n };\n};\n\nvar style = function style(marshal) {\n return function () {\n return function (next) {\n return function (action) {\n if (action.type === 'INITIAL_PUBLISH') {\n marshal.dragging();\n }\n\n if (action.type === 'DROP_ANIMATE') {\n marshal.dropping(action.payload.completed.result.reason);\n }\n\n if (action.type === 'FLUSH' || action.type === 'DROP_COMPLETE') {\n marshal.resting();\n }\n\n next(action);\n };\n };\n };\n};\n\nvar curves = {\n outOfTheWay: 'cubic-bezier(0.2, 0, 0, 1)',\n drop: 'cubic-bezier(.2,1,.1,1)'\n};\nvar combine = {\n opacity: {\n drop: 0,\n combining: 0.7\n },\n scale: {\n drop: 0.75\n }\n};\nvar timings = {\n outOfTheWay: 0.2,\n minDropTime: 0.33,\n maxDropTime: 0.55\n};\nvar outOfTheWayTiming = timings.outOfTheWay + \"s \" + curves.outOfTheWay;\nvar transitions = {\n fluid: \"opacity \" + outOfTheWayTiming,\n snap: \"transform \" + outOfTheWayTiming + \", opacity \" + outOfTheWayTiming,\n drop: function drop(duration) {\n var timing = duration + \"s \" + curves.drop;\n return \"transform \" + timing + \", opacity \" + timing;\n },\n outOfTheWay: \"transform \" + outOfTheWayTiming,\n placeholder: \"height \" + outOfTheWayTiming + \", width \" + outOfTheWayTiming + \", margin \" + outOfTheWayTiming\n};\n\nvar moveTo = function moveTo(offset) {\n return isEqual(offset, origin) ? null : \"translate(\" + offset.x + \"px, \" + offset.y + \"px)\";\n};\n\nvar transforms = {\n moveTo: moveTo,\n drop: function drop(offset, isCombining) {\n var translate = moveTo(offset);\n\n if (!translate) {\n return null;\n }\n\n if (!isCombining) {\n return translate;\n }\n\n return translate + \" scale(\" + combine.scale.drop + \")\";\n }\n};\nvar minDropTime = timings.minDropTime,\n maxDropTime = timings.maxDropTime;\nvar dropTimeRange = maxDropTime - minDropTime;\nvar maxDropTimeAtDistance = 1500;\nvar cancelDropModifier = 0.6;\n\nvar getDropDuration = function getDropDuration(_ref) {\n var current = _ref.current,\n destination = _ref.destination,\n reason = _ref.reason;\n var distance$1 = distance(current, destination);\n\n if (distance$1 <= 0) {\n return minDropTime;\n }\n\n if (distance$1 >= maxDropTimeAtDistance) {\n return maxDropTime;\n }\n\n var percentage = distance$1 / maxDropTimeAtDistance;\n var duration = minDropTime + dropTimeRange * percentage;\n var withDuration = reason === 'CANCEL' ? duration * cancelDropModifier : duration;\n return Number(withDuration.toFixed(2));\n};\n\nvar getNewHomeClientOffset = function getNewHomeClientOffset(_ref) {\n var impact = _ref.impact,\n draggable = _ref.draggable,\n dimensions = _ref.dimensions,\n viewport = _ref.viewport,\n afterCritical = _ref.afterCritical;\n var draggables = dimensions.draggables,\n droppables = dimensions.droppables;\n var droppableId = whatIsDraggedOver(impact);\n var destination = droppableId ? droppables[droppableId] : null;\n var home = droppables[draggable.descriptor.droppableId];\n var newClientCenter = getClientBorderBoxCenter({\n impact: impact,\n draggable: draggable,\n draggables: draggables,\n afterCritical: afterCritical,\n droppable: destination || home,\n viewport: viewport\n });\n var offset = subtract(newClientCenter, draggable.client.borderBox.center);\n return offset;\n};\n\nvar getDropImpact = function getDropImpact(_ref) {\n var draggables = _ref.draggables,\n reason = _ref.reason,\n lastImpact = _ref.lastImpact,\n home = _ref.home,\n viewport = _ref.viewport,\n onLiftImpact = _ref.onLiftImpact;\n\n if (!lastImpact.at || reason !== 'DROP') {\n var recomputedHomeImpact = recompute({\n draggables: draggables,\n impact: onLiftImpact,\n destination: home,\n viewport: viewport,\n forceShouldAnimate: true\n });\n return {\n impact: recomputedHomeImpact,\n didDropInsideDroppable: false\n };\n }\n\n if (lastImpact.at.type === 'REORDER') {\n return {\n impact: lastImpact,\n didDropInsideDroppable: true\n };\n }\n\n var withoutMovement = _extends({}, lastImpact, {\n displaced: emptyGroups\n });\n\n return {\n impact: withoutMovement,\n didDropInsideDroppable: true\n };\n};\n\nvar drop$1 = function drop$1(_ref) {\n var getState = _ref.getState,\n dispatch = _ref.dispatch;\n return function (next) {\n return function (action) {\n if (action.type !== 'DROP') {\n next(action);\n return;\n }\n\n var state = getState();\n var reason = action.payload.reason;\n\n if (state.phase === 'COLLECTING') {\n dispatch(dropPending({\n reason: reason\n }));\n return;\n }\n\n if (state.phase === 'IDLE') {\n return;\n }\n\n var isWaitingForDrop = state.phase === 'DROP_PENDING' && state.isWaiting;\n !!isWaitingForDrop ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'A DROP action occurred while DROP_PENDING and still waiting') : invariant(false) : void 0;\n !(state.phase === 'DRAGGING' || state.phase === 'DROP_PENDING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot drop in phase: \" + state.phase) : invariant(false) : void 0;\n var critical = state.critical;\n var dimensions = state.dimensions;\n var draggable = dimensions.draggables[state.critical.draggable.id];\n\n var _getDropImpact = getDropImpact({\n reason: reason,\n lastImpact: state.impact,\n afterCritical: state.afterCritical,\n onLiftImpact: state.onLiftImpact,\n home: state.dimensions.droppables[state.critical.droppable.id],\n viewport: state.viewport,\n draggables: state.dimensions.draggables\n }),\n impact = _getDropImpact.impact,\n didDropInsideDroppable = _getDropImpact.didDropInsideDroppable;\n\n var destination = didDropInsideDroppable ? tryGetDestination(impact) : null;\n var combine = didDropInsideDroppable ? tryGetCombine(impact) : null;\n var source = {\n index: critical.draggable.index,\n droppableId: critical.droppable.id\n };\n var result = {\n draggableId: draggable.descriptor.id,\n type: draggable.descriptor.type,\n source: source,\n reason: reason,\n mode: state.movementMode,\n destination: destination,\n combine: combine\n };\n var newHomeClientOffset = getNewHomeClientOffset({\n impact: impact,\n draggable: draggable,\n dimensions: dimensions,\n viewport: state.viewport,\n afterCritical: state.afterCritical\n });\n var completed = {\n critical: state.critical,\n afterCritical: state.afterCritical,\n result: result,\n impact: impact\n };\n var isAnimationRequired = !isEqual(state.current.client.offset, newHomeClientOffset) || Boolean(result.combine);\n\n if (!isAnimationRequired) {\n dispatch(completeDrop({\n completed: completed\n }));\n return;\n }\n\n var dropDuration = getDropDuration({\n current: state.current.client.offset,\n destination: newHomeClientOffset,\n reason: reason\n });\n var args = {\n newHomeClientOffset: newHomeClientOffset,\n dropDuration: dropDuration,\n completed: completed\n };\n dispatch(animateDrop(args));\n };\n };\n};\n\nvar getWindowScroll = function getWindowScroll() {\n return {\n x: window.pageXOffset,\n y: window.pageYOffset\n };\n};\n\nfunction getWindowScrollBinding(update) {\n return {\n eventName: 'scroll',\n options: {\n passive: true,\n capture: false\n },\n fn: function fn(event) {\n if (event.target !== window && event.target !== window.document) {\n return;\n }\n\n update();\n }\n };\n}\n\nfunction getScrollListener(_ref) {\n var onWindowScroll = _ref.onWindowScroll;\n\n function updateScroll() {\n onWindowScroll(getWindowScroll());\n }\n\n var scheduled = rafSchd(updateScroll);\n var binding = getWindowScrollBinding(scheduled);\n var unbind = noop;\n\n function isActive() {\n return unbind !== noop;\n }\n\n function start() {\n !!isActive() ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot start scroll listener when already active') : invariant(false) : void 0;\n unbind = bindEvents(window, [binding]);\n }\n\n function stop() {\n !isActive() ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot stop scroll listener when not active') : invariant(false) : void 0;\n scheduled.cancel();\n unbind();\n unbind = noop;\n }\n\n return {\n start: start,\n stop: stop,\n isActive: isActive\n };\n}\n\nvar shouldEnd = function shouldEnd(action) {\n return action.type === 'DROP_COMPLETE' || action.type === 'DROP_ANIMATE' || action.type === 'FLUSH';\n};\n\nvar scrollListener = function scrollListener(store) {\n var listener = getScrollListener({\n onWindowScroll: function onWindowScroll(newScroll) {\n store.dispatch(moveByWindowScroll({\n newScroll: newScroll\n }));\n }\n });\n return function (next) {\n return function (action) {\n if (!listener.isActive() && action.type === 'INITIAL_PUBLISH') {\n listener.start();\n }\n\n if (listener.isActive() && shouldEnd(action)) {\n listener.stop();\n }\n\n next(action);\n };\n };\n};\n\nvar getExpiringAnnounce = function getExpiringAnnounce(announce) {\n var wasCalled = false;\n var isExpired = false;\n var timeoutId = setTimeout(function () {\n isExpired = true;\n });\n\n var result = function result(message) {\n if (wasCalled) {\n process.env.NODE_ENV !== \"production\" ? warning('Announcement already made. Not making a second announcement') : void 0;\n return;\n }\n\n if (isExpired) {\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n Announcements cannot be made asynchronously.\\n Default message has already been announced.\\n \") : void 0;\n return;\n }\n\n wasCalled = true;\n announce(message);\n clearTimeout(timeoutId);\n };\n\n result.wasCalled = function () {\n return wasCalled;\n };\n\n return result;\n};\n\nvar getAsyncMarshal = function getAsyncMarshal() {\n var entries = [];\n\n var execute = function execute(timerId) {\n var index = findIndex(entries, function (item) {\n return item.timerId === timerId;\n });\n !(index !== -1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Could not find timer') : invariant(false) : void 0;\n\n var _entries$splice = entries.splice(index, 1),\n entry = _entries$splice[0];\n\n entry.callback();\n };\n\n var add = function add(fn) {\n var timerId = setTimeout(function () {\n return execute(timerId);\n });\n var entry = {\n timerId: timerId,\n callback: fn\n };\n entries.push(entry);\n };\n\n var flush = function flush() {\n if (!entries.length) {\n return;\n }\n\n var shallow = [].concat(entries);\n entries.length = 0;\n shallow.forEach(function (entry) {\n clearTimeout(entry.timerId);\n entry.callback();\n });\n };\n\n return {\n add: add,\n flush: flush\n };\n};\n\nvar areLocationsEqual = function areLocationsEqual(first, second) {\n if (first == null && second == null) {\n return true;\n }\n\n if (first == null || second == null) {\n return false;\n }\n\n return first.droppableId === second.droppableId && first.index === second.index;\n};\n\nvar isCombineEqual = function isCombineEqual(first, second) {\n if (first == null && second == null) {\n return true;\n }\n\n if (first == null || second == null) {\n return false;\n }\n\n return first.draggableId === second.draggableId && first.droppableId === second.droppableId;\n};\n\nvar isCriticalEqual = function isCriticalEqual(first, second) {\n if (first === second) {\n return true;\n }\n\n var isDraggableEqual = first.draggable.id === second.draggable.id && first.draggable.droppableId === second.draggable.droppableId && first.draggable.type === second.draggable.type && first.draggable.index === second.draggable.index;\n var isDroppableEqual = first.droppable.id === second.droppable.id && first.droppable.type === second.droppable.type;\n return isDraggableEqual && isDroppableEqual;\n};\n\nvar withTimings = function withTimings(key, fn) {\n start();\n fn();\n finish();\n};\n\nvar getDragStart = function getDragStart(critical, mode) {\n return {\n draggableId: critical.draggable.id,\n type: critical.droppable.type,\n source: {\n droppableId: critical.droppable.id,\n index: critical.draggable.index\n },\n mode: mode\n };\n};\n\nvar execute = function execute(responder, data, announce, getDefaultMessage) {\n if (!responder) {\n announce(getDefaultMessage(data));\n return;\n }\n\n var willExpire = getExpiringAnnounce(announce);\n var provided = {\n announce: willExpire\n };\n responder(data, provided);\n\n if (!willExpire.wasCalled()) {\n announce(getDefaultMessage(data));\n }\n};\n\nvar getPublisher = function getPublisher(getResponders, announce) {\n var asyncMarshal = getAsyncMarshal();\n var dragging = null;\n\n var beforeCapture = function beforeCapture(draggableId, mode) {\n !!dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot fire onBeforeCapture as a drag start has already been published') : invariant(false) : void 0;\n withTimings('onBeforeCapture', function () {\n var fn = getResponders().onBeforeCapture;\n\n if (fn) {\n var before = {\n draggableId: draggableId,\n mode: mode\n };\n fn(before);\n }\n });\n };\n\n var beforeStart = function beforeStart(critical, mode) {\n !!dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot fire onBeforeDragStart as a drag start has already been published') : invariant(false) : void 0;\n withTimings('onBeforeDragStart', function () {\n var fn = getResponders().onBeforeDragStart;\n\n if (fn) {\n fn(getDragStart(critical, mode));\n }\n });\n };\n\n var start = function start(critical, mode) {\n !!dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot fire onBeforeDragStart as a drag start has already been published') : invariant(false) : void 0;\n var data = getDragStart(critical, mode);\n dragging = {\n mode: mode,\n lastCritical: critical,\n lastLocation: data.source,\n lastCombine: null\n };\n asyncMarshal.add(function () {\n withTimings('onDragStart', function () {\n return execute(getResponders().onDragStart, data, announce, preset.onDragStart);\n });\n });\n };\n\n var update = function update(critical, impact) {\n var location = tryGetDestination(impact);\n var combine = tryGetCombine(impact);\n !dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot fire onDragMove when onDragStart has not been called') : invariant(false) : void 0;\n var hasCriticalChanged = !isCriticalEqual(critical, dragging.lastCritical);\n\n if (hasCriticalChanged) {\n dragging.lastCritical = critical;\n }\n\n var hasLocationChanged = !areLocationsEqual(dragging.lastLocation, location);\n\n if (hasLocationChanged) {\n dragging.lastLocation = location;\n }\n\n var hasGroupingChanged = !isCombineEqual(dragging.lastCombine, combine);\n\n if (hasGroupingChanged) {\n dragging.lastCombine = combine;\n }\n\n if (!hasCriticalChanged && !hasLocationChanged && !hasGroupingChanged) {\n return;\n }\n\n var data = _extends({}, getDragStart(critical, dragging.mode), {\n combine: combine,\n destination: location\n });\n\n asyncMarshal.add(function () {\n withTimings('onDragUpdate', function () {\n return execute(getResponders().onDragUpdate, data, announce, preset.onDragUpdate);\n });\n });\n };\n\n var flush = function flush() {\n !dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Can only flush responders while dragging') : invariant(false) : void 0;\n asyncMarshal.flush();\n };\n\n var drop = function drop(result) {\n !dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot fire onDragEnd when there is no matching onDragStart') : invariant(false) : void 0;\n dragging = null;\n withTimings('onDragEnd', function () {\n return execute(getResponders().onDragEnd, result, announce, preset.onDragEnd);\n });\n };\n\n var abort = function abort() {\n if (!dragging) {\n return;\n }\n\n var result = _extends({}, getDragStart(dragging.lastCritical, dragging.mode), {\n combine: null,\n destination: null,\n reason: 'CANCEL'\n });\n\n drop(result);\n };\n\n return {\n beforeCapture: beforeCapture,\n beforeStart: beforeStart,\n start: start,\n update: update,\n flush: flush,\n drop: drop,\n abort: abort\n };\n};\n\nvar responders = function responders(getResponders, announce) {\n var publisher = getPublisher(getResponders, announce);\n return function (store) {\n return function (next) {\n return function (action) {\n if (action.type === 'BEFORE_INITIAL_CAPTURE') {\n publisher.beforeCapture(action.payload.draggableId, action.payload.movementMode);\n return;\n }\n\n if (action.type === 'INITIAL_PUBLISH') {\n var critical = action.payload.critical;\n publisher.beforeStart(critical, action.payload.movementMode);\n next(action);\n publisher.start(critical, action.payload.movementMode);\n return;\n }\n\n if (action.type === 'DROP_COMPLETE') {\n var result = action.payload.completed.result;\n publisher.flush();\n next(action);\n publisher.drop(result);\n return;\n }\n\n next(action);\n\n if (action.type === 'FLUSH') {\n publisher.abort();\n return;\n }\n\n var state = store.getState();\n\n if (state.phase === 'DRAGGING') {\n publisher.update(state.critical, state.impact);\n }\n };\n };\n };\n};\n\nvar dropAnimationFinish = function dropAnimationFinish(store) {\n return function (next) {\n return function (action) {\n if (action.type !== 'DROP_ANIMATION_FINISHED') {\n next(action);\n return;\n }\n\n var state = store.getState();\n !(state.phase === 'DROP_ANIMATING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot finish a drop animating when no drop is occurring') : invariant(false) : void 0;\n store.dispatch(completeDrop({\n completed: state.completed\n }));\n };\n };\n};\n\nvar dropAnimationFlushOnScroll = function dropAnimationFlushOnScroll(store) {\n var unbind = null;\n var frameId = null;\n\n function clear() {\n if (frameId) {\n cancelAnimationFrame(frameId);\n frameId = null;\n }\n\n if (unbind) {\n unbind();\n unbind = null;\n }\n }\n\n return function (next) {\n return function (action) {\n if (action.type === 'FLUSH' || action.type === 'DROP_COMPLETE' || action.type === 'DROP_ANIMATION_FINISHED') {\n clear();\n }\n\n next(action);\n\n if (action.type !== 'DROP_ANIMATE') {\n return;\n }\n\n var binding = {\n eventName: 'scroll',\n options: {\n capture: true,\n passive: false,\n once: true\n },\n fn: function flushDropAnimation() {\n var state = store.getState();\n\n if (state.phase === 'DROP_ANIMATING') {\n store.dispatch(dropAnimationFinished());\n }\n }\n };\n frameId = requestAnimationFrame(function () {\n frameId = null;\n unbind = bindEvents(window, [binding]);\n });\n };\n };\n};\n\nvar dimensionMarshalStopper = function dimensionMarshalStopper(marshal) {\n return function () {\n return function (next) {\n return function (action) {\n if (action.type === 'DROP_COMPLETE' || action.type === 'FLUSH' || action.type === 'DROP_ANIMATE') {\n marshal.stopPublishing();\n }\n\n next(action);\n };\n };\n };\n};\n\nvar focus = function focus(marshal) {\n var isWatching = false;\n return function () {\n return function (next) {\n return function (action) {\n if (action.type === 'INITIAL_PUBLISH') {\n isWatching = true;\n marshal.tryRecordFocus(action.payload.critical.draggable.id);\n next(action);\n marshal.tryRestoreFocusRecorded();\n return;\n }\n\n next(action);\n\n if (!isWatching) {\n return;\n }\n\n if (action.type === 'FLUSH') {\n isWatching = false;\n marshal.tryRestoreFocusRecorded();\n return;\n }\n\n if (action.type === 'DROP_COMPLETE') {\n isWatching = false;\n var result = action.payload.completed.result;\n\n if (result.combine) {\n marshal.tryShiftRecord(result.draggableId, result.combine.draggableId);\n }\n\n marshal.tryRestoreFocusRecorded();\n }\n };\n };\n };\n};\n\nvar shouldStop = function shouldStop(action) {\n return action.type === 'DROP_COMPLETE' || action.type === 'DROP_ANIMATE' || action.type === 'FLUSH';\n};\n\nvar autoScroll = function autoScroll(autoScroller) {\n return function (store) {\n return function (next) {\n return function (action) {\n if (shouldStop(action)) {\n autoScroller.stop();\n next(action);\n return;\n }\n\n if (action.type === 'INITIAL_PUBLISH') {\n next(action);\n var state = store.getState();\n !(state.phase === 'DRAGGING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Expected phase to be DRAGGING after INITIAL_PUBLISH') : invariant(false) : void 0;\n autoScroller.start(state);\n return;\n }\n\n next(action);\n autoScroller.scroll(store.getState());\n };\n };\n };\n};\n\nvar pendingDrop = function pendingDrop(store) {\n return function (next) {\n return function (action) {\n next(action);\n\n if (action.type !== 'PUBLISH_WHILE_DRAGGING') {\n return;\n }\n\n var postActionState = store.getState();\n\n if (postActionState.phase !== 'DROP_PENDING') {\n return;\n }\n\n if (postActionState.isWaiting) {\n return;\n }\n\n store.dispatch(drop({\n reason: postActionState.reason\n }));\n };\n };\n};\n\nvar composeEnhancers = process.env.NODE_ENV !== 'production' && typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : compose;\n\nvar createStore = function createStore(_ref) {\n var dimensionMarshal = _ref.dimensionMarshal,\n focusMarshal = _ref.focusMarshal,\n styleMarshal = _ref.styleMarshal,\n getResponders = _ref.getResponders,\n announce = _ref.announce,\n autoScroller = _ref.autoScroller;\n return createStore$1(reducer, composeEnhancers(applyMiddleware(style(styleMarshal), dimensionMarshalStopper(dimensionMarshal), lift$1(dimensionMarshal), drop$1, dropAnimationFinish, dropAnimationFlushOnScroll, pendingDrop, autoScroll(autoScroller), scrollListener, focus(focusMarshal), responders(getResponders, announce))));\n};\n\nvar clean$1 = function clean() {\n return {\n additions: {},\n removals: {},\n modified: {}\n };\n};\n\nfunction createPublisher(_ref) {\n var registry = _ref.registry,\n callbacks = _ref.callbacks;\n var staging = clean$1();\n var frameId = null;\n\n var collect = function collect() {\n if (frameId) {\n return;\n }\n\n callbacks.collectionStarting();\n frameId = requestAnimationFrame(function () {\n frameId = null;\n start();\n var _staging = staging,\n additions = _staging.additions,\n removals = _staging.removals,\n modified = _staging.modified;\n var added = Object.keys(additions).map(function (id) {\n return registry.draggable.getById(id).getDimension(origin);\n }).sort(function (a, b) {\n return a.descriptor.index - b.descriptor.index;\n });\n var updated = Object.keys(modified).map(function (id) {\n var entry = registry.droppable.getById(id);\n var scroll = entry.callbacks.getScrollWhileDragging();\n return {\n droppableId: id,\n scroll: scroll\n };\n });\n var result = {\n additions: added,\n removals: Object.keys(removals),\n modified: updated\n };\n staging = clean$1();\n finish();\n callbacks.publish(result);\n });\n };\n\n var add = function add(entry) {\n var id = entry.descriptor.id;\n staging.additions[id] = entry;\n staging.modified[entry.descriptor.droppableId] = true;\n\n if (staging.removals[id]) {\n delete staging.removals[id];\n }\n\n collect();\n };\n\n var remove = function remove(entry) {\n var descriptor = entry.descriptor;\n staging.removals[descriptor.id] = true;\n staging.modified[descriptor.droppableId] = true;\n\n if (staging.additions[descriptor.id]) {\n delete staging.additions[descriptor.id];\n }\n\n collect();\n };\n\n var stop = function stop() {\n if (!frameId) {\n return;\n }\n\n cancelAnimationFrame(frameId);\n frameId = null;\n staging = clean$1();\n };\n\n return {\n add: add,\n remove: remove,\n stop: stop\n };\n}\n\nvar getMaxScroll = function getMaxScroll(_ref) {\n var scrollHeight = _ref.scrollHeight,\n scrollWidth = _ref.scrollWidth,\n height = _ref.height,\n width = _ref.width;\n var maxScroll = subtract({\n x: scrollWidth,\n y: scrollHeight\n }, {\n x: width,\n y: height\n });\n var adjustedMaxScroll = {\n x: Math.max(0, maxScroll.x),\n y: Math.max(0, maxScroll.y)\n };\n return adjustedMaxScroll;\n};\n\nvar getDocumentElement = function getDocumentElement() {\n var doc = document.documentElement;\n !doc ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot find document.documentElement') : invariant(false) : void 0;\n return doc;\n};\n\nvar getMaxWindowScroll = function getMaxWindowScroll() {\n var doc = getDocumentElement();\n var maxScroll = getMaxScroll({\n scrollHeight: doc.scrollHeight,\n scrollWidth: doc.scrollWidth,\n width: doc.clientWidth,\n height: doc.clientHeight\n });\n return maxScroll;\n};\n\nvar getViewport = function getViewport() {\n var scroll = getWindowScroll();\n var maxScroll = getMaxWindowScroll();\n var top = scroll.y;\n var left = scroll.x;\n var doc = getDocumentElement();\n var width = doc.clientWidth;\n var height = doc.clientHeight;\n var right = left + width;\n var bottom = top + height;\n var frame = getRect({\n top: top,\n left: left,\n right: right,\n bottom: bottom\n });\n var viewport = {\n frame: frame,\n scroll: {\n initial: scroll,\n current: scroll,\n max: maxScroll,\n diff: {\n value: origin,\n displacement: origin\n }\n }\n };\n return viewport;\n};\n\nvar getInitialPublish = function getInitialPublish(_ref) {\n var critical = _ref.critical,\n scrollOptions = _ref.scrollOptions,\n registry = _ref.registry;\n start();\n var viewport = getViewport();\n var windowScroll = viewport.scroll.current;\n var home = critical.droppable;\n var droppables = registry.droppable.getAllByType(home.type).map(function (entry) {\n return entry.callbacks.getDimensionAndWatchScroll(windowScroll, scrollOptions);\n });\n var draggables = registry.draggable.getAllByType(critical.draggable.type).map(function (entry) {\n return entry.getDimension(windowScroll);\n });\n var dimensions = {\n draggables: toDraggableMap(draggables),\n droppables: toDroppableMap(droppables)\n };\n finish();\n var result = {\n dimensions: dimensions,\n critical: critical,\n viewport: viewport\n };\n return result;\n};\n\nfunction shouldPublishUpdate(registry, dragging, entry) {\n if (entry.descriptor.id === dragging.id) {\n return false;\n }\n\n if (entry.descriptor.type !== dragging.type) {\n return false;\n }\n\n var home = registry.droppable.getById(entry.descriptor.droppableId);\n\n if (home.descriptor.mode !== 'virtual') {\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n You are attempting to add or remove a Draggable [id: \" + entry.descriptor.id + \"]\\n while a drag is occurring. This is only supported for virtual lists.\\n\\n See https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/patterns/virtual-lists.md\\n \") : void 0;\n return false;\n }\n\n return true;\n}\n\nvar createDimensionMarshal = function createDimensionMarshal(registry, callbacks) {\n var collection = null;\n var publisher = createPublisher({\n callbacks: {\n publish: callbacks.publishWhileDragging,\n collectionStarting: callbacks.collectionStarting\n },\n registry: registry\n });\n\n var updateDroppableIsEnabled = function updateDroppableIsEnabled(id, isEnabled) {\n !registry.droppable.exists(id) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot update is enabled flag of Droppable \" + id + \" as it is not registered\") : invariant(false) : void 0;\n\n if (!collection) {\n return;\n }\n\n callbacks.updateDroppableIsEnabled({\n id: id,\n isEnabled: isEnabled\n });\n };\n\n var updateDroppableIsCombineEnabled = function updateDroppableIsCombineEnabled(id, isCombineEnabled) {\n if (!collection) {\n return;\n }\n\n !registry.droppable.exists(id) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot update isCombineEnabled flag of Droppable \" + id + \" as it is not registered\") : invariant(false) : void 0;\n callbacks.updateDroppableIsCombineEnabled({\n id: id,\n isCombineEnabled: isCombineEnabled\n });\n };\n\n var updateDroppableScroll = function updateDroppableScroll(id, newScroll) {\n if (!collection) {\n return;\n }\n\n !registry.droppable.exists(id) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot update the scroll on Droppable \" + id + \" as it is not registered\") : invariant(false) : void 0;\n callbacks.updateDroppableScroll({\n id: id,\n newScroll: newScroll\n });\n };\n\n var scrollDroppable = function scrollDroppable(id, change) {\n if (!collection) {\n return;\n }\n\n registry.droppable.getById(id).callbacks.scroll(change);\n };\n\n var stopPublishing = function stopPublishing() {\n if (!collection) {\n return;\n }\n\n publisher.stop();\n var home = collection.critical.droppable;\n registry.droppable.getAllByType(home.type).forEach(function (entry) {\n return entry.callbacks.dragStopped();\n });\n collection.unsubscribe();\n collection = null;\n };\n\n var subscriber = function subscriber(event) {\n !collection ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Should only be subscribed when a collection is occurring') : invariant(false) : void 0;\n var dragging = collection.critical.draggable;\n\n if (event.type === 'ADDITION') {\n if (shouldPublishUpdate(registry, dragging, event.value)) {\n publisher.add(event.value);\n }\n }\n\n if (event.type === 'REMOVAL') {\n if (shouldPublishUpdate(registry, dragging, event.value)) {\n publisher.remove(event.value);\n }\n }\n };\n\n var startPublishing = function startPublishing(request) {\n !!collection ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot start capturing critical dimensions as there is already a collection') : invariant(false) : void 0;\n var entry = registry.draggable.getById(request.draggableId);\n var home = registry.droppable.getById(entry.descriptor.droppableId);\n var critical = {\n draggable: entry.descriptor,\n droppable: home.descriptor\n };\n var unsubscribe = registry.subscribe(subscriber);\n collection = {\n critical: critical,\n unsubscribe: unsubscribe\n };\n return getInitialPublish({\n critical: critical,\n registry: registry,\n scrollOptions: request.scrollOptions\n });\n };\n\n var marshal = {\n updateDroppableIsEnabled: updateDroppableIsEnabled,\n updateDroppableIsCombineEnabled: updateDroppableIsCombineEnabled,\n scrollDroppable: scrollDroppable,\n updateDroppableScroll: updateDroppableScroll,\n startPublishing: startPublishing,\n stopPublishing: stopPublishing\n };\n return marshal;\n};\n\nvar canStartDrag = function canStartDrag(state, id) {\n if (state.phase === 'IDLE') {\n return true;\n }\n\n if (state.phase !== 'DROP_ANIMATING') {\n return false;\n }\n\n if (state.completed.result.draggableId === id) {\n return false;\n }\n\n return state.completed.result.reason === 'DROP';\n};\n\nvar scrollWindow = function scrollWindow(change) {\n window.scrollBy(change.x, change.y);\n};\n\nvar getScrollableDroppables = memoizeOne(function (droppables) {\n return toDroppableList(droppables).filter(function (droppable) {\n if (!droppable.isEnabled) {\n return false;\n }\n\n if (!droppable.frame) {\n return false;\n }\n\n return true;\n });\n});\n\nvar getScrollableDroppableOver = function getScrollableDroppableOver(target, droppables) {\n var maybe = find(getScrollableDroppables(droppables), function (droppable) {\n !droppable.frame ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid result') : invariant(false) : void 0;\n return isPositionInFrame(droppable.frame.pageMarginBox)(target);\n });\n return maybe;\n};\n\nvar getBestScrollableDroppable = function getBestScrollableDroppable(_ref) {\n var center = _ref.center,\n destination = _ref.destination,\n droppables = _ref.droppables;\n\n if (destination) {\n var _dimension = droppables[destination];\n\n if (!_dimension.frame) {\n return null;\n }\n\n return _dimension;\n }\n\n var dimension = getScrollableDroppableOver(center, droppables);\n return dimension;\n};\n\nvar config = {\n startFromPercentage: 0.25,\n maxScrollAtPercentage: 0.05,\n maxPixelScroll: 28,\n ease: function ease(percentage) {\n return Math.pow(percentage, 2);\n },\n durationDampening: {\n stopDampeningAt: 1200,\n accelerateAt: 360\n }\n};\n\nvar getDistanceThresholds = function getDistanceThresholds(container, axis) {\n var startScrollingFrom = container[axis.size] * config.startFromPercentage;\n var maxScrollValueAt = container[axis.size] * config.maxScrollAtPercentage;\n var thresholds = {\n startScrollingFrom: startScrollingFrom,\n maxScrollValueAt: maxScrollValueAt\n };\n return thresholds;\n};\n\nvar getPercentage = function getPercentage(_ref) {\n var startOfRange = _ref.startOfRange,\n endOfRange = _ref.endOfRange,\n current = _ref.current;\n var range = endOfRange - startOfRange;\n\n if (range === 0) {\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n Detected distance range of 0 in the fluid auto scroller\\n This is unexpected and would cause a divide by 0 issue.\\n Not allowing an auto scroll\\n \") : void 0;\n return 0;\n }\n\n var currentInRange = current - startOfRange;\n var percentage = currentInRange / range;\n return percentage;\n};\n\nvar minScroll = 1;\n\nvar getValueFromDistance = function getValueFromDistance(distanceToEdge, thresholds) {\n if (distanceToEdge > thresholds.startScrollingFrom) {\n return 0;\n }\n\n if (distanceToEdge <= thresholds.maxScrollValueAt) {\n return config.maxPixelScroll;\n }\n\n if (distanceToEdge === thresholds.startScrollingFrom) {\n return minScroll;\n }\n\n var percentageFromMaxScrollValueAt = getPercentage({\n startOfRange: thresholds.maxScrollValueAt,\n endOfRange: thresholds.startScrollingFrom,\n current: distanceToEdge\n });\n var percentageFromStartScrollingFrom = 1 - percentageFromMaxScrollValueAt;\n var scroll = config.maxPixelScroll * config.ease(percentageFromStartScrollingFrom);\n return Math.ceil(scroll);\n};\n\nvar accelerateAt = config.durationDampening.accelerateAt;\nvar stopAt = config.durationDampening.stopDampeningAt;\n\nvar dampenValueByTime = function dampenValueByTime(proposedScroll, dragStartTime) {\n var startOfRange = dragStartTime;\n var endOfRange = stopAt;\n var now = Date.now();\n var runTime = now - startOfRange;\n\n if (runTime >= stopAt) {\n return proposedScroll;\n }\n\n if (runTime < accelerateAt) {\n return minScroll;\n }\n\n var betweenAccelerateAtAndStopAtPercentage = getPercentage({\n startOfRange: accelerateAt,\n endOfRange: endOfRange,\n current: runTime\n });\n var scroll = proposedScroll * config.ease(betweenAccelerateAtAndStopAtPercentage);\n return Math.ceil(scroll);\n};\n\nvar getValue = function getValue(_ref) {\n var distanceToEdge = _ref.distanceToEdge,\n thresholds = _ref.thresholds,\n dragStartTime = _ref.dragStartTime,\n shouldUseTimeDampening = _ref.shouldUseTimeDampening;\n var scroll = getValueFromDistance(distanceToEdge, thresholds);\n\n if (scroll === 0) {\n return 0;\n }\n\n if (!shouldUseTimeDampening) {\n return scroll;\n }\n\n return Math.max(dampenValueByTime(scroll, dragStartTime), minScroll);\n};\n\nvar getScrollOnAxis = function getScrollOnAxis(_ref) {\n var container = _ref.container,\n distanceToEdges = _ref.distanceToEdges,\n dragStartTime = _ref.dragStartTime,\n axis = _ref.axis,\n shouldUseTimeDampening = _ref.shouldUseTimeDampening;\n var thresholds = getDistanceThresholds(container, axis);\n var isCloserToEnd = distanceToEdges[axis.end] < distanceToEdges[axis.start];\n\n if (isCloserToEnd) {\n return getValue({\n distanceToEdge: distanceToEdges[axis.end],\n thresholds: thresholds,\n dragStartTime: dragStartTime,\n shouldUseTimeDampening: shouldUseTimeDampening\n });\n }\n\n return -1 * getValue({\n distanceToEdge: distanceToEdges[axis.start],\n thresholds: thresholds,\n dragStartTime: dragStartTime,\n shouldUseTimeDampening: shouldUseTimeDampening\n });\n};\n\nvar adjustForSizeLimits = function adjustForSizeLimits(_ref) {\n var container = _ref.container,\n subject = _ref.subject,\n proposedScroll = _ref.proposedScroll;\n var isTooBigVertically = subject.height > container.height;\n var isTooBigHorizontally = subject.width > container.width;\n\n if (!isTooBigHorizontally && !isTooBigVertically) {\n return proposedScroll;\n }\n\n if (isTooBigHorizontally && isTooBigVertically) {\n return null;\n }\n\n return {\n x: isTooBigHorizontally ? 0 : proposedScroll.x,\n y: isTooBigVertically ? 0 : proposedScroll.y\n };\n};\n\nvar clean$2 = apply(function (value) {\n return value === 0 ? 0 : value;\n});\n\nvar getScroll = function getScroll(_ref) {\n var dragStartTime = _ref.dragStartTime,\n container = _ref.container,\n subject = _ref.subject,\n center = _ref.center,\n shouldUseTimeDampening = _ref.shouldUseTimeDampening;\n var distanceToEdges = {\n top: center.y - container.top,\n right: container.right - center.x,\n bottom: container.bottom - center.y,\n left: center.x - container.left\n };\n var y = getScrollOnAxis({\n container: container,\n distanceToEdges: distanceToEdges,\n dragStartTime: dragStartTime,\n axis: vertical,\n shouldUseTimeDampening: shouldUseTimeDampening\n });\n var x = getScrollOnAxis({\n container: container,\n distanceToEdges: distanceToEdges,\n dragStartTime: dragStartTime,\n axis: horizontal,\n shouldUseTimeDampening: shouldUseTimeDampening\n });\n var required = clean$2({\n x: x,\n y: y\n });\n\n if (isEqual(required, origin)) {\n return null;\n }\n\n var limited = adjustForSizeLimits({\n container: container,\n subject: subject,\n proposedScroll: required\n });\n\n if (!limited) {\n return null;\n }\n\n return isEqual(limited, origin) ? null : limited;\n};\n\nvar smallestSigned = apply(function (value) {\n if (value === 0) {\n return 0;\n }\n\n return value > 0 ? 1 : -1;\n});\n\nvar getOverlap = function () {\n var getRemainder = function getRemainder(target, max) {\n if (target < 0) {\n return target;\n }\n\n if (target > max) {\n return target - max;\n }\n\n return 0;\n };\n\n return function (_ref) {\n var current = _ref.current,\n max = _ref.max,\n change = _ref.change;\n var targetScroll = add(current, change);\n var overlap = {\n x: getRemainder(targetScroll.x, max.x),\n y: getRemainder(targetScroll.y, max.y)\n };\n\n if (isEqual(overlap, origin)) {\n return null;\n }\n\n return overlap;\n };\n}();\n\nvar canPartiallyScroll = function canPartiallyScroll(_ref2) {\n var rawMax = _ref2.max,\n current = _ref2.current,\n change = _ref2.change;\n var max = {\n x: Math.max(current.x, rawMax.x),\n y: Math.max(current.y, rawMax.y)\n };\n var smallestChange = smallestSigned(change);\n var overlap = getOverlap({\n max: max,\n current: current,\n change: smallestChange\n });\n\n if (!overlap) {\n return true;\n }\n\n if (smallestChange.x !== 0 && overlap.x === 0) {\n return true;\n }\n\n if (smallestChange.y !== 0 && overlap.y === 0) {\n return true;\n }\n\n return false;\n};\n\nvar canScrollWindow = function canScrollWindow(viewport, change) {\n return canPartiallyScroll({\n current: viewport.scroll.current,\n max: viewport.scroll.max,\n change: change\n });\n};\n\nvar getWindowOverlap = function getWindowOverlap(viewport, change) {\n if (!canScrollWindow(viewport, change)) {\n return null;\n }\n\n var max = viewport.scroll.max;\n var current = viewport.scroll.current;\n return getOverlap({\n current: current,\n max: max,\n change: change\n });\n};\n\nvar canScrollDroppable = function canScrollDroppable(droppable, change) {\n var frame = droppable.frame;\n\n if (!frame) {\n return false;\n }\n\n return canPartiallyScroll({\n current: frame.scroll.current,\n max: frame.scroll.max,\n change: change\n });\n};\n\nvar getDroppableOverlap = function getDroppableOverlap(droppable, change) {\n var frame = droppable.frame;\n\n if (!frame) {\n return null;\n }\n\n if (!canScrollDroppable(droppable, change)) {\n return null;\n }\n\n return getOverlap({\n current: frame.scroll.current,\n max: frame.scroll.max,\n change: change\n });\n};\n\nvar getWindowScrollChange = function getWindowScrollChange(_ref) {\n var viewport = _ref.viewport,\n subject = _ref.subject,\n center = _ref.center,\n dragStartTime = _ref.dragStartTime,\n shouldUseTimeDampening = _ref.shouldUseTimeDampening;\n var scroll = getScroll({\n dragStartTime: dragStartTime,\n container: viewport.frame,\n subject: subject,\n center: center,\n shouldUseTimeDampening: shouldUseTimeDampening\n });\n return scroll && canScrollWindow(viewport, scroll) ? scroll : null;\n};\n\nvar getDroppableScrollChange = function getDroppableScrollChange(_ref) {\n var droppable = _ref.droppable,\n subject = _ref.subject,\n center = _ref.center,\n dragStartTime = _ref.dragStartTime,\n shouldUseTimeDampening = _ref.shouldUseTimeDampening;\n var frame = droppable.frame;\n\n if (!frame) {\n return null;\n }\n\n var scroll = getScroll({\n dragStartTime: dragStartTime,\n container: frame.pageMarginBox,\n subject: subject,\n center: center,\n shouldUseTimeDampening: shouldUseTimeDampening\n });\n return scroll && canScrollDroppable(droppable, scroll) ? scroll : null;\n};\n\nvar scroll$1 = function scroll$1(_ref) {\n var state = _ref.state,\n dragStartTime = _ref.dragStartTime,\n shouldUseTimeDampening = _ref.shouldUseTimeDampening,\n scrollWindow = _ref.scrollWindow,\n scrollDroppable = _ref.scrollDroppable;\n var center = state.current.page.borderBoxCenter;\n var draggable = state.dimensions.draggables[state.critical.draggable.id];\n var subject = draggable.page.marginBox;\n\n if (state.isWindowScrollAllowed) {\n var viewport = state.viewport;\n\n var _change = getWindowScrollChange({\n dragStartTime: dragStartTime,\n viewport: viewport,\n subject: subject,\n center: center,\n shouldUseTimeDampening: shouldUseTimeDampening\n });\n\n if (_change) {\n scrollWindow(_change);\n return;\n }\n }\n\n var droppable = getBestScrollableDroppable({\n center: center,\n destination: whatIsDraggedOver(state.impact),\n droppables: state.dimensions.droppables\n });\n\n if (!droppable) {\n return;\n }\n\n var change = getDroppableScrollChange({\n dragStartTime: dragStartTime,\n droppable: droppable,\n subject: subject,\n center: center,\n shouldUseTimeDampening: shouldUseTimeDampening\n });\n\n if (change) {\n scrollDroppable(droppable.descriptor.id, change);\n }\n};\n\nvar createFluidScroller = function createFluidScroller(_ref) {\n var scrollWindow = _ref.scrollWindow,\n scrollDroppable = _ref.scrollDroppable;\n var scheduleWindowScroll = rafSchd(scrollWindow);\n var scheduleDroppableScroll = rafSchd(scrollDroppable);\n var dragging = null;\n\n var tryScroll = function tryScroll(state) {\n !dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot fluid scroll if not dragging') : invariant(false) : void 0;\n var _dragging = dragging,\n shouldUseTimeDampening = _dragging.shouldUseTimeDampening,\n dragStartTime = _dragging.dragStartTime;\n scroll$1({\n state: state,\n scrollWindow: scheduleWindowScroll,\n scrollDroppable: scheduleDroppableScroll,\n dragStartTime: dragStartTime,\n shouldUseTimeDampening: shouldUseTimeDampening\n });\n };\n\n var start$1 = function start$1(state) {\n start();\n !!dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot start auto scrolling when already started') : invariant(false) : void 0;\n var dragStartTime = Date.now();\n var wasScrollNeeded = false;\n\n var fakeScrollCallback = function fakeScrollCallback() {\n wasScrollNeeded = true;\n };\n\n scroll$1({\n state: state,\n dragStartTime: 0,\n shouldUseTimeDampening: false,\n scrollWindow: fakeScrollCallback,\n scrollDroppable: fakeScrollCallback\n });\n dragging = {\n dragStartTime: dragStartTime,\n shouldUseTimeDampening: wasScrollNeeded\n };\n finish();\n\n if (wasScrollNeeded) {\n tryScroll(state);\n }\n };\n\n var stop = function stop() {\n if (!dragging) {\n return;\n }\n\n scheduleWindowScroll.cancel();\n scheduleDroppableScroll.cancel();\n dragging = null;\n };\n\n return {\n start: start$1,\n stop: stop,\n scroll: tryScroll\n };\n};\n\nvar createJumpScroller = function createJumpScroller(_ref) {\n var move = _ref.move,\n scrollDroppable = _ref.scrollDroppable,\n scrollWindow = _ref.scrollWindow;\n\n var moveByOffset = function moveByOffset(state, offset) {\n var client = add(state.current.client.selection, offset);\n move({\n client: client\n });\n };\n\n var scrollDroppableAsMuchAsItCan = function scrollDroppableAsMuchAsItCan(droppable, change) {\n if (!canScrollDroppable(droppable, change)) {\n return change;\n }\n\n var overlap = getDroppableOverlap(droppable, change);\n\n if (!overlap) {\n scrollDroppable(droppable.descriptor.id, change);\n return null;\n }\n\n var whatTheDroppableCanScroll = subtract(change, overlap);\n scrollDroppable(droppable.descriptor.id, whatTheDroppableCanScroll);\n var remainder = subtract(change, whatTheDroppableCanScroll);\n return remainder;\n };\n\n var scrollWindowAsMuchAsItCan = function scrollWindowAsMuchAsItCan(isWindowScrollAllowed, viewport, change) {\n if (!isWindowScrollAllowed) {\n return change;\n }\n\n if (!canScrollWindow(viewport, change)) {\n return change;\n }\n\n var overlap = getWindowOverlap(viewport, change);\n\n if (!overlap) {\n scrollWindow(change);\n return null;\n }\n\n var whatTheWindowCanScroll = subtract(change, overlap);\n scrollWindow(whatTheWindowCanScroll);\n var remainder = subtract(change, whatTheWindowCanScroll);\n return remainder;\n };\n\n var jumpScroller = function jumpScroller(state) {\n var request = state.scrollJumpRequest;\n\n if (!request) {\n return;\n }\n\n var destination = whatIsDraggedOver(state.impact);\n !destination ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot perform a jump scroll when there is no destination') : invariant(false) : void 0;\n var droppableRemainder = scrollDroppableAsMuchAsItCan(state.dimensions.droppables[destination], request);\n\n if (!droppableRemainder) {\n return;\n }\n\n var viewport = state.viewport;\n var windowRemainder = scrollWindowAsMuchAsItCan(state.isWindowScrollAllowed, viewport, droppableRemainder);\n\n if (!windowRemainder) {\n return;\n }\n\n moveByOffset(state, windowRemainder);\n };\n\n return jumpScroller;\n};\n\nvar createAutoScroller = function createAutoScroller(_ref) {\n var scrollDroppable = _ref.scrollDroppable,\n scrollWindow = _ref.scrollWindow,\n move = _ref.move;\n var fluidScroller = createFluidScroller({\n scrollWindow: scrollWindow,\n scrollDroppable: scrollDroppable\n });\n var jumpScroll = createJumpScroller({\n move: move,\n scrollWindow: scrollWindow,\n scrollDroppable: scrollDroppable\n });\n\n var scroll = function scroll(state) {\n if (state.phase !== 'DRAGGING') {\n return;\n }\n\n if (state.movementMode === 'FLUID') {\n fluidScroller.scroll(state);\n return;\n }\n\n if (!state.scrollJumpRequest) {\n return;\n }\n\n jumpScroll(state);\n };\n\n var scroller = {\n scroll: scroll,\n start: fluidScroller.start,\n stop: fluidScroller.stop\n };\n return scroller;\n};\n\nvar prefix$1 = 'data-rbd';\n\nvar dragHandle = function () {\n var base = prefix$1 + \"-drag-handle\";\n return {\n base: base,\n draggableId: base + \"-draggable-id\",\n contextId: base + \"-context-id\"\n };\n}();\n\nvar draggable = function () {\n var base = prefix$1 + \"-draggable\";\n return {\n base: base,\n contextId: base + \"-context-id\",\n id: base + \"-id\"\n };\n}();\n\nvar droppable = function () {\n var base = prefix$1 + \"-droppable\";\n return {\n base: base,\n contextId: base + \"-context-id\",\n id: base + \"-id\"\n };\n}();\n\nvar scrollContainer = {\n contextId: prefix$1 + \"-scroll-container-context-id\"\n};\n\nvar makeGetSelector = function makeGetSelector(context) {\n return function (attribute) {\n return \"[\" + attribute + \"=\\\"\" + context + \"\\\"]\";\n };\n};\n\nvar getStyles = function getStyles(rules, property) {\n return rules.map(function (rule) {\n var value = rule.styles[property];\n\n if (!value) {\n return '';\n }\n\n return rule.selector + \" { \" + value + \" }\";\n }).join(' ');\n};\n\nvar noPointerEvents = 'pointer-events: none;';\n\nvar getStyles$1 = function getStyles$1(contextId) {\n var getSelector = makeGetSelector(contextId);\n\n var dragHandle$1 = function () {\n var grabCursor = \"\\n cursor: -webkit-grab;\\n cursor: grab;\\n \";\n return {\n selector: getSelector(dragHandle.contextId),\n styles: {\n always: \"\\n -webkit-touch-callout: none;\\n -webkit-tap-highlight-color: rgba(0,0,0,0);\\n touch-action: manipulation;\\n \",\n resting: grabCursor,\n dragging: noPointerEvents,\n dropAnimating: grabCursor\n }\n };\n }();\n\n var draggable$1 = function () {\n var transition = \"\\n transition: \" + transitions.outOfTheWay + \";\\n \";\n return {\n selector: getSelector(draggable.contextId),\n styles: {\n dragging: transition,\n dropAnimating: transition,\n userCancel: transition\n }\n };\n }();\n\n var droppable$1 = {\n selector: getSelector(droppable.contextId),\n styles: {\n always: \"overflow-anchor: none;\"\n }\n };\n var body = {\n selector: 'body',\n styles: {\n dragging: \"\\n cursor: grabbing;\\n cursor: -webkit-grabbing;\\n user-select: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n overflow-anchor: none;\\n \"\n }\n };\n var rules = [draggable$1, dragHandle$1, droppable$1, body];\n return {\n always: getStyles(rules, 'always'),\n resting: getStyles(rules, 'resting'),\n dragging: getStyles(rules, 'dragging'),\n dropAnimating: getStyles(rules, 'dropAnimating'),\n userCancel: getStyles(rules, 'userCancel')\n };\n};\n\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;\n\nvar getHead = function getHead() {\n var head = document.querySelector('head');\n !head ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot find the head to append a style to') : invariant(false) : void 0;\n return head;\n};\n\nvar createStyleEl = function createStyleEl(nonce) {\n var el = document.createElement('style');\n\n if (nonce) {\n el.setAttribute('nonce', nonce);\n }\n\n el.type = 'text/css';\n return el;\n};\n\nfunction useStyleMarshal(contextId, nonce) {\n var styles = useMemo(function () {\n return getStyles$1(contextId);\n }, [contextId]);\n var alwaysRef = useRef(null);\n var dynamicRef = useRef(null);\n var setDynamicStyle = useCallback(memoizeOne(function (proposed) {\n var el = dynamicRef.current;\n !el ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot set dynamic style element if it is not set') : invariant(false) : void 0;\n el.textContent = proposed;\n }), []);\n var setAlwaysStyle = useCallback(function (proposed) {\n var el = alwaysRef.current;\n !el ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot set dynamic style element if it is not set') : invariant(false) : void 0;\n el.textContent = proposed;\n }, []);\n useIsomorphicLayoutEffect(function () {\n !(!alwaysRef.current && !dynamicRef.current) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'style elements already mounted') : invariant(false) : void 0;\n var always = createStyleEl(nonce);\n var dynamic = createStyleEl(nonce);\n alwaysRef.current = always;\n dynamicRef.current = dynamic;\n always.setAttribute(prefix$1 + \"-always\", contextId);\n dynamic.setAttribute(prefix$1 + \"-dynamic\", contextId);\n getHead().appendChild(always);\n getHead().appendChild(dynamic);\n setAlwaysStyle(styles.always);\n setDynamicStyle(styles.resting);\n return function () {\n var remove = function remove(ref) {\n var current = ref.current;\n !current ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot unmount ref as it is not set') : invariant(false) : void 0;\n getHead().removeChild(current);\n ref.current = null;\n };\n\n remove(alwaysRef);\n remove(dynamicRef);\n };\n }, [nonce, setAlwaysStyle, setDynamicStyle, styles.always, styles.resting, contextId]);\n var dragging = useCallback(function () {\n return setDynamicStyle(styles.dragging);\n }, [setDynamicStyle, styles.dragging]);\n var dropping = useCallback(function (reason) {\n if (reason === 'DROP') {\n setDynamicStyle(styles.dropAnimating);\n return;\n }\n\n setDynamicStyle(styles.userCancel);\n }, [setDynamicStyle, styles.dropAnimating, styles.userCancel]);\n var resting = useCallback(function () {\n if (!dynamicRef.current) {\n return;\n }\n\n setDynamicStyle(styles.resting);\n }, [setDynamicStyle, styles.resting]);\n var marshal = useMemo(function () {\n return {\n dragging: dragging,\n dropping: dropping,\n resting: resting\n };\n }, [dragging, dropping, resting]);\n return marshal;\n}\n\nvar getWindowFromEl = function getWindowFromEl(el) {\n return el && el.ownerDocument ? el.ownerDocument.defaultView : window;\n};\n\nfunction isHtmlElement(el) {\n return el instanceof getWindowFromEl(el).HTMLElement;\n}\n\nfunction findDragHandle(contextId, draggableId) {\n var selector = \"[\" + dragHandle.contextId + \"=\\\"\" + contextId + \"\\\"]\";\n var possible = toArray(document.querySelectorAll(selector));\n\n if (!possible.length) {\n process.env.NODE_ENV !== \"production\" ? warning(\"Unable to find any drag handles in the context \\\"\" + contextId + \"\\\"\") : void 0;\n return null;\n }\n\n var handle = find(possible, function (el) {\n return el.getAttribute(dragHandle.draggableId) === draggableId;\n });\n\n if (!handle) {\n process.env.NODE_ENV !== \"production\" ? warning(\"Unable to find drag handle with id \\\"\" + draggableId + \"\\\" as no handle with a matching id was found\") : void 0;\n return null;\n }\n\n if (!isHtmlElement(handle)) {\n process.env.NODE_ENV !== \"production\" ? warning('drag handle needs to be a HTMLElement') : void 0;\n return null;\n }\n\n return handle;\n}\n\nfunction useFocusMarshal(contextId) {\n var entriesRef = useRef({});\n var recordRef = useRef(null);\n var restoreFocusFrameRef = useRef(null);\n var isMountedRef = useRef(false);\n var register = useCallback(function register(id, focus) {\n var entry = {\n id: id,\n focus: focus\n };\n entriesRef.current[id] = entry;\n return function unregister() {\n var entries = entriesRef.current;\n var current = entries[id];\n\n if (current !== entry) {\n delete entries[id];\n }\n };\n }, []);\n var tryGiveFocus = useCallback(function tryGiveFocus(tryGiveFocusTo) {\n var handle = findDragHandle(contextId, tryGiveFocusTo);\n\n if (handle && handle !== document.activeElement) {\n handle.focus();\n }\n }, [contextId]);\n var tryShiftRecord = useCallback(function tryShiftRecord(previous, redirectTo) {\n if (recordRef.current === previous) {\n recordRef.current = redirectTo;\n }\n }, []);\n var tryRestoreFocusRecorded = useCallback(function tryRestoreFocusRecorded() {\n if (restoreFocusFrameRef.current) {\n return;\n }\n\n if (!isMountedRef.current) {\n return;\n }\n\n restoreFocusFrameRef.current = requestAnimationFrame(function () {\n restoreFocusFrameRef.current = null;\n var record = recordRef.current;\n\n if (record) {\n tryGiveFocus(record);\n }\n });\n }, [tryGiveFocus]);\n var tryRecordFocus = useCallback(function tryRecordFocus(id) {\n recordRef.current = null;\n var focused = document.activeElement;\n\n if (!focused) {\n return;\n }\n\n if (focused.getAttribute(dragHandle.draggableId) !== id) {\n return;\n }\n\n recordRef.current = id;\n }, []);\n useIsomorphicLayoutEffect(function () {\n isMountedRef.current = true;\n return function clearFrameOnUnmount() {\n isMountedRef.current = false;\n var frameId = restoreFocusFrameRef.current;\n\n if (frameId) {\n cancelAnimationFrame(frameId);\n }\n };\n }, []);\n var marshal = useMemo(function () {\n return {\n register: register,\n tryRecordFocus: tryRecordFocus,\n tryRestoreFocusRecorded: tryRestoreFocusRecorded,\n tryShiftRecord: tryShiftRecord\n };\n }, [register, tryRecordFocus, tryRestoreFocusRecorded, tryShiftRecord]);\n return marshal;\n}\n\nfunction createRegistry() {\n var entries = {\n draggables: {},\n droppables: {}\n };\n var subscribers = [];\n\n function subscribe(cb) {\n subscribers.push(cb);\n return function unsubscribe() {\n var index = subscribers.indexOf(cb);\n\n if (index === -1) {\n return;\n }\n\n subscribers.splice(index, 1);\n };\n }\n\n function notify(event) {\n if (subscribers.length) {\n subscribers.forEach(function (cb) {\n return cb(event);\n });\n }\n }\n\n function findDraggableById(id) {\n return entries.draggables[id] || null;\n }\n\n function getDraggableById(id) {\n var entry = findDraggableById(id);\n !entry ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot find draggable entry with id [\" + id + \"]\") : invariant(false) : void 0;\n return entry;\n }\n\n var draggableAPI = {\n register: function register(entry) {\n entries.draggables[entry.descriptor.id] = entry;\n notify({\n type: 'ADDITION',\n value: entry\n });\n },\n update: function update(entry, last) {\n var current = entries.draggables[last.descriptor.id];\n\n if (!current) {\n return;\n }\n\n if (current.uniqueId !== entry.uniqueId) {\n return;\n }\n\n delete entries.draggables[last.descriptor.id];\n entries.draggables[entry.descriptor.id] = entry;\n },\n unregister: function unregister(entry) {\n var draggableId = entry.descriptor.id;\n var current = findDraggableById(draggableId);\n\n if (!current) {\n return;\n }\n\n if (entry.uniqueId !== current.uniqueId) {\n return;\n }\n\n delete entries.draggables[draggableId];\n notify({\n type: 'REMOVAL',\n value: entry\n });\n },\n getById: getDraggableById,\n findById: findDraggableById,\n exists: function exists(id) {\n return Boolean(findDraggableById(id));\n },\n getAllByType: function getAllByType(type) {\n return values(entries.draggables).filter(function (entry) {\n return entry.descriptor.type === type;\n });\n }\n };\n\n function findDroppableById(id) {\n return entries.droppables[id] || null;\n }\n\n function getDroppableById(id) {\n var entry = findDroppableById(id);\n !entry ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot find droppable entry with id [\" + id + \"]\") : invariant(false) : void 0;\n return entry;\n }\n\n var droppableAPI = {\n register: function register(entry) {\n entries.droppables[entry.descriptor.id] = entry;\n },\n unregister: function unregister(entry) {\n var current = findDroppableById(entry.descriptor.id);\n\n if (!current) {\n return;\n }\n\n if (entry.uniqueId !== current.uniqueId) {\n return;\n }\n\n delete entries.droppables[entry.descriptor.id];\n },\n getById: getDroppableById,\n findById: findDroppableById,\n exists: function exists(id) {\n return Boolean(findDroppableById(id));\n },\n getAllByType: function getAllByType(type) {\n return values(entries.droppables).filter(function (entry) {\n return entry.descriptor.type === type;\n });\n }\n };\n\n function clean() {\n entries.draggables = {};\n entries.droppables = {};\n subscribers.length = 0;\n }\n\n return {\n draggable: draggableAPI,\n droppable: droppableAPI,\n subscribe: subscribe,\n clean: clean\n };\n}\n\nfunction useRegistry() {\n var registry = useMemo(createRegistry, []);\n useEffect(function () {\n return function unmount() {\n requestAnimationFrame(registry.clean);\n };\n }, [registry]);\n return registry;\n}\n\nvar StoreContext = /*#__PURE__*/React.createContext(null);\n\nvar getBodyElement = function getBodyElement() {\n var body = document.body;\n !body ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot find document.body') : invariant(false) : void 0;\n return body;\n};\n\nvar visuallyHidden = {\n position: 'absolute',\n width: '1px',\n height: '1px',\n margin: '-1px',\n border: '0',\n padding: '0',\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n 'clip-path': 'inset(100%)'\n};\n\nvar getId = function getId(contextId) {\n return \"rbd-announcement-\" + contextId;\n};\n\nfunction useAnnouncer(contextId) {\n var id = useMemo(function () {\n return getId(contextId);\n }, [contextId]);\n var ref = useRef(null);\n useEffect(function setup() {\n var el = document.createElement('div');\n ref.current = el;\n el.id = id;\n el.setAttribute('aria-live', 'assertive');\n el.setAttribute('aria-atomic', 'true');\n\n _extends(el.style, visuallyHidden);\n\n getBodyElement().appendChild(el);\n return function cleanup() {\n setTimeout(function remove() {\n var body = getBodyElement();\n\n if (body.contains(el)) {\n body.removeChild(el);\n }\n\n if (el === ref.current) {\n ref.current = null;\n }\n });\n };\n }, [id]);\n var announce = useCallback(function (message) {\n var el = ref.current;\n\n if (el) {\n el.textContent = message;\n return;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n A screen reader message was trying to be announced but it was unable to do so.\\n This can occur if you unmount your in your onDragEnd.\\n Consider calling provided.announce() before the unmount so that the instruction will\\n not be lost for users relying on a screen reader.\\n\\n Message not passed to screen reader:\\n\\n \\\"\" + message + \"\\\"\\n \") : void 0;\n }, []);\n return announce;\n}\n\nvar count = 0;\nvar defaults = {\n separator: '::'\n};\n\nfunction reset() {\n count = 0;\n}\n\nfunction useUniqueId(prefix, options) {\n if (options === void 0) {\n options = defaults;\n }\n\n return useMemo(function () {\n return \"\" + prefix + options.separator + count++;\n }, [options.separator, prefix]);\n}\n\nfunction getElementId(_ref) {\n var contextId = _ref.contextId,\n uniqueId = _ref.uniqueId;\n return \"rbd-hidden-text-\" + contextId + \"-\" + uniqueId;\n}\n\nfunction useHiddenTextElement(_ref2) {\n var contextId = _ref2.contextId,\n text = _ref2.text;\n var uniqueId = useUniqueId('hidden-text', {\n separator: '-'\n });\n var id = useMemo(function () {\n return getElementId({\n contextId: contextId,\n uniqueId: uniqueId\n });\n }, [uniqueId, contextId]);\n useEffect(function mount() {\n var el = document.createElement('div');\n el.id = id;\n el.textContent = text;\n el.style.display = 'none';\n getBodyElement().appendChild(el);\n return function unmount() {\n var body = getBodyElement();\n\n if (body.contains(el)) {\n body.removeChild(el);\n }\n };\n }, [id, text]);\n return id;\n}\n\nvar AppContext = /*#__PURE__*/React.createContext(null);\nvar peerDependencies = {\n react: \"^16.8.5\",\n \"react-dom\": \"^16.8.5\"\n};\nvar semver = /(\\d+)\\.(\\d+)\\.(\\d+)/;\n\nvar getVersion = function getVersion(value) {\n var result = semver.exec(value);\n !(result != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Unable to parse React version \" + value) : invariant(false) : void 0;\n var major = Number(result[1]);\n var minor = Number(result[2]);\n var patch = Number(result[3]);\n return {\n major: major,\n minor: minor,\n patch: patch,\n raw: value\n };\n};\n\nvar isSatisfied = function isSatisfied(expected, actual) {\n if (actual.major > expected.major) {\n return true;\n }\n\n if (actual.major < expected.major) {\n return false;\n }\n\n if (actual.minor > expected.minor) {\n return true;\n }\n\n if (actual.minor < expected.minor) {\n return false;\n }\n\n return actual.patch >= expected.patch;\n};\n\nvar checkReactVersion = function checkReactVersion(peerDepValue, actualValue) {\n var peerDep = getVersion(peerDepValue);\n var actual = getVersion(actualValue);\n\n if (isSatisfied(peerDep, actual)) {\n return;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n React version: [\" + actual.raw + \"]\\n does not satisfy expected peer dependency version: [\" + peerDep.raw + \"]\\n\\n This can result in run time bugs, and even fatal crashes\\n \") : void 0;\n};\n\nvar suffix = \"\\n We expect a html5 doctype: \\n This is to ensure consistent browser layout and measurement\\n\\n More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md\\n\";\n\nvar checkDoctype = function checkDoctype(doc) {\n var doctype = doc.doctype;\n\n if (!doctype) {\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n No found.\\n\\n \" + suffix + \"\\n \") : void 0;\n return;\n }\n\n if (doctype.name.toLowerCase() !== 'html') {\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n Unexpected found: (\" + doctype.name + \")\\n\\n \" + suffix + \"\\n \") : void 0;\n }\n\n if (doctype.publicId !== '') {\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n Unexpected publicId found: (\" + doctype.publicId + \")\\n A html5 doctype does not have a publicId\\n\\n \" + suffix + \"\\n \") : void 0;\n }\n};\n\nfunction useDev(useHook) {\n if (process.env.NODE_ENV !== 'production') {\n useHook();\n }\n}\n\nfunction useDevSetupWarning(fn, inputs) {\n useDev(function () {\n useEffect(function () {\n try {\n fn();\n } catch (e) {\n error(\"\\n A setup problem was encountered.\\n\\n > \" + e.message + \"\\n \");\n }\n }, inputs);\n });\n}\n\nfunction useStartupValidation() {\n useDevSetupWarning(function () {\n checkReactVersion(peerDependencies.react, React.version);\n checkDoctype(document);\n }, []);\n}\n\nfunction usePrevious(current) {\n var ref = useRef(current);\n useEffect(function () {\n ref.current = current;\n });\n return ref;\n}\n\nfunction create() {\n var lock = null;\n\n function isClaimed() {\n return Boolean(lock);\n }\n\n function isActive(value) {\n return value === lock;\n }\n\n function claim(abandon) {\n !!lock ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot claim lock as it is already claimed') : invariant(false) : void 0;\n var newLock = {\n abandon: abandon\n };\n lock = newLock;\n return newLock;\n }\n\n function release() {\n !lock ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot release lock when there is no lock') : invariant(false) : void 0;\n lock = null;\n }\n\n function tryAbandon() {\n if (lock) {\n lock.abandon();\n release();\n }\n }\n\n return {\n isClaimed: isClaimed,\n isActive: isActive,\n claim: claim,\n release: release,\n tryAbandon: tryAbandon\n };\n}\n\nvar tab = 9;\nvar enter = 13;\nvar escape = 27;\nvar space = 32;\nvar pageUp = 33;\nvar pageDown = 34;\nvar end = 35;\nvar home = 36;\nvar arrowLeft = 37;\nvar arrowUp = 38;\nvar arrowRight = 39;\nvar arrowDown = 40;\n\nvar _preventedKeys;\n\nvar preventedKeys = (_preventedKeys = {}, _preventedKeys[enter] = true, _preventedKeys[tab] = true, _preventedKeys);\n\nvar preventStandardKeyEvents = function preventStandardKeyEvents(event) {\n if (preventedKeys[event.keyCode]) {\n event.preventDefault();\n }\n};\n\nvar supportedEventName = function () {\n var base = 'visibilitychange';\n\n if (typeof document === 'undefined') {\n return base;\n }\n\n var candidates = [base, \"ms\" + base, \"webkit\" + base, \"moz\" + base, \"o\" + base];\n var supported = find(candidates, function (eventName) {\n return \"on\" + eventName in document;\n });\n return supported || base;\n}();\n\nvar primaryButton = 0;\nvar sloppyClickThreshold = 5;\n\nfunction isSloppyClickThresholdExceeded(original, current) {\n return Math.abs(current.x - original.x) >= sloppyClickThreshold || Math.abs(current.y - original.y) >= sloppyClickThreshold;\n}\n\nvar idle$1 = {\n type: 'IDLE'\n};\n\nfunction getCaptureBindings(_ref) {\n var cancel = _ref.cancel,\n completed = _ref.completed,\n getPhase = _ref.getPhase,\n setPhase = _ref.setPhase;\n return [{\n eventName: 'mousemove',\n fn: function fn(event) {\n var button = event.button,\n clientX = event.clientX,\n clientY = event.clientY;\n\n if (button !== primaryButton) {\n return;\n }\n\n var point = {\n x: clientX,\n y: clientY\n };\n var phase = getPhase();\n\n if (phase.type === 'DRAGGING') {\n event.preventDefault();\n phase.actions.move(point);\n return;\n }\n\n !(phase.type === 'PENDING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot be IDLE') : invariant(false) : void 0;\n var pending = phase.point;\n\n if (!isSloppyClickThresholdExceeded(pending, point)) {\n return;\n }\n\n event.preventDefault();\n var actions = phase.actions.fluidLift(point);\n setPhase({\n type: 'DRAGGING',\n actions: actions\n });\n }\n }, {\n eventName: 'mouseup',\n fn: function fn(event) {\n var phase = getPhase();\n\n if (phase.type !== 'DRAGGING') {\n cancel();\n return;\n }\n\n event.preventDefault();\n phase.actions.drop({\n shouldBlockNextClick: true\n });\n completed();\n }\n }, {\n eventName: 'mousedown',\n fn: function fn(event) {\n if (getPhase().type === 'DRAGGING') {\n event.preventDefault();\n }\n\n cancel();\n }\n }, {\n eventName: 'keydown',\n fn: function fn(event) {\n var phase = getPhase();\n\n if (phase.type === 'PENDING') {\n cancel();\n return;\n }\n\n if (event.keyCode === escape) {\n event.preventDefault();\n cancel();\n return;\n }\n\n preventStandardKeyEvents(event);\n }\n }, {\n eventName: 'resize',\n fn: cancel\n }, {\n eventName: 'scroll',\n options: {\n passive: true,\n capture: false\n },\n fn: function fn() {\n if (getPhase().type === 'PENDING') {\n cancel();\n }\n }\n }, {\n eventName: 'webkitmouseforcedown',\n fn: function fn(event) {\n var phase = getPhase();\n !(phase.type !== 'IDLE') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Unexpected phase') : invariant(false) : void 0;\n\n if (phase.actions.shouldRespectForcePress()) {\n cancel();\n return;\n }\n\n event.preventDefault();\n }\n }, {\n eventName: supportedEventName,\n fn: cancel\n }];\n}\n\nfunction useMouseSensor(api) {\n var phaseRef = useRef(idle$1);\n var unbindEventsRef = useRef(noop);\n var startCaptureBinding = useMemo(function () {\n return {\n eventName: 'mousedown',\n fn: function onMouseDown(event) {\n if (event.defaultPrevented) {\n return;\n }\n\n if (event.button !== primaryButton) {\n return;\n }\n\n if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) {\n return;\n }\n\n var draggableId = api.findClosestDraggableId(event);\n\n if (!draggableId) {\n return;\n }\n\n var actions = api.tryGetLock(draggableId, stop, {\n sourceEvent: event\n });\n\n if (!actions) {\n return;\n }\n\n event.preventDefault();\n var point = {\n x: event.clientX,\n y: event.clientY\n };\n unbindEventsRef.current();\n startPendingDrag(actions, point);\n }\n };\n }, [api]);\n var preventForcePressBinding = useMemo(function () {\n return {\n eventName: 'webkitmouseforcewillbegin',\n fn: function fn(event) {\n if (event.defaultPrevented) {\n return;\n }\n\n var id = api.findClosestDraggableId(event);\n\n if (!id) {\n return;\n }\n\n var options = api.findOptionsForDraggable(id);\n\n if (!options) {\n return;\n }\n\n if (options.shouldRespectForcePress) {\n return;\n }\n\n if (!api.canGetLock(id)) {\n return;\n }\n\n event.preventDefault();\n }\n };\n }, [api]);\n var listenForCapture = useCallback(function listenForCapture() {\n var options = {\n passive: false,\n capture: true\n };\n unbindEventsRef.current = bindEvents(window, [preventForcePressBinding, startCaptureBinding], options);\n }, [preventForcePressBinding, startCaptureBinding]);\n var stop = useCallback(function () {\n var current = phaseRef.current;\n\n if (current.type === 'IDLE') {\n return;\n }\n\n phaseRef.current = idle$1;\n unbindEventsRef.current();\n listenForCapture();\n }, [listenForCapture]);\n var cancel = useCallback(function () {\n var phase = phaseRef.current;\n stop();\n\n if (phase.type === 'DRAGGING') {\n phase.actions.cancel({\n shouldBlockNextClick: true\n });\n }\n\n if (phase.type === 'PENDING') {\n phase.actions.abort();\n }\n }, [stop]);\n var bindCapturingEvents = useCallback(function bindCapturingEvents() {\n var options = {\n capture: true,\n passive: false\n };\n var bindings = getCaptureBindings({\n cancel: cancel,\n completed: stop,\n getPhase: function getPhase() {\n return phaseRef.current;\n },\n setPhase: function setPhase(phase) {\n phaseRef.current = phase;\n }\n });\n unbindEventsRef.current = bindEvents(window, bindings, options);\n }, [cancel, stop]);\n var startPendingDrag = useCallback(function startPendingDrag(actions, point) {\n !(phaseRef.current.type === 'IDLE') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Expected to move from IDLE to PENDING drag') : invariant(false) : void 0;\n phaseRef.current = {\n type: 'PENDING',\n point: point,\n actions: actions\n };\n bindCapturingEvents();\n }, [bindCapturingEvents]);\n useIsomorphicLayoutEffect(function mount() {\n listenForCapture();\n return function unmount() {\n unbindEventsRef.current();\n };\n }, [listenForCapture]);\n}\n\nvar _scrollJumpKeys;\n\nfunction noop$1() {}\n\nvar scrollJumpKeys = (_scrollJumpKeys = {}, _scrollJumpKeys[pageDown] = true, _scrollJumpKeys[pageUp] = true, _scrollJumpKeys[home] = true, _scrollJumpKeys[end] = true, _scrollJumpKeys);\n\nfunction getDraggingBindings(actions, stop) {\n function cancel() {\n stop();\n actions.cancel();\n }\n\n function drop() {\n stop();\n actions.drop();\n }\n\n return [{\n eventName: 'keydown',\n fn: function fn(event) {\n if (event.keyCode === escape) {\n event.preventDefault();\n cancel();\n return;\n }\n\n if (event.keyCode === space) {\n event.preventDefault();\n drop();\n return;\n }\n\n if (event.keyCode === arrowDown) {\n event.preventDefault();\n actions.moveDown();\n return;\n }\n\n if (event.keyCode === arrowUp) {\n event.preventDefault();\n actions.moveUp();\n return;\n }\n\n if (event.keyCode === arrowRight) {\n event.preventDefault();\n actions.moveRight();\n return;\n }\n\n if (event.keyCode === arrowLeft) {\n event.preventDefault();\n actions.moveLeft();\n return;\n }\n\n if (scrollJumpKeys[event.keyCode]) {\n event.preventDefault();\n return;\n }\n\n preventStandardKeyEvents(event);\n }\n }, {\n eventName: 'mousedown',\n fn: cancel\n }, {\n eventName: 'mouseup',\n fn: cancel\n }, {\n eventName: 'click',\n fn: cancel\n }, {\n eventName: 'touchstart',\n fn: cancel\n }, {\n eventName: 'resize',\n fn: cancel\n }, {\n eventName: 'wheel',\n fn: cancel,\n options: {\n passive: true\n }\n }, {\n eventName: supportedEventName,\n fn: cancel\n }];\n}\n\nfunction useKeyboardSensor(api) {\n var unbindEventsRef = useRef(noop$1);\n var startCaptureBinding = useMemo(function () {\n return {\n eventName: 'keydown',\n fn: function onKeyDown(event) {\n if (event.defaultPrevented) {\n return;\n }\n\n if (event.keyCode !== space) {\n return;\n }\n\n var draggableId = api.findClosestDraggableId(event);\n\n if (!draggableId) {\n return;\n }\n\n var preDrag = api.tryGetLock(draggableId, stop, {\n sourceEvent: event\n });\n\n if (!preDrag) {\n return;\n }\n\n event.preventDefault();\n var isCapturing = true;\n var actions = preDrag.snapLift();\n unbindEventsRef.current();\n\n function stop() {\n !isCapturing ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot stop capturing a keyboard drag when not capturing') : invariant(false) : void 0;\n isCapturing = false;\n unbindEventsRef.current();\n listenForCapture();\n }\n\n unbindEventsRef.current = bindEvents(window, getDraggingBindings(actions, stop), {\n capture: true,\n passive: false\n });\n }\n };\n }, [api]);\n var listenForCapture = useCallback(function tryStartCapture() {\n var options = {\n passive: false,\n capture: true\n };\n unbindEventsRef.current = bindEvents(window, [startCaptureBinding], options);\n }, [startCaptureBinding]);\n useIsomorphicLayoutEffect(function mount() {\n listenForCapture();\n return function unmount() {\n unbindEventsRef.current();\n };\n }, [listenForCapture]);\n}\n\nvar idle$2 = {\n type: 'IDLE'\n};\nvar timeForLongPress = 120;\nvar forcePressThreshold = 0.15;\n\nfunction getWindowBindings(_ref) {\n var cancel = _ref.cancel,\n getPhase = _ref.getPhase;\n return [{\n eventName: 'orientationchange',\n fn: cancel\n }, {\n eventName: 'resize',\n fn: cancel\n }, {\n eventName: 'contextmenu',\n fn: function fn(event) {\n event.preventDefault();\n }\n }, {\n eventName: 'keydown',\n fn: function fn(event) {\n if (getPhase().type !== 'DRAGGING') {\n cancel();\n return;\n }\n\n if (event.keyCode === escape) {\n event.preventDefault();\n }\n\n cancel();\n }\n }, {\n eventName: supportedEventName,\n fn: cancel\n }];\n}\n\nfunction getHandleBindings(_ref2) {\n var cancel = _ref2.cancel,\n completed = _ref2.completed,\n getPhase = _ref2.getPhase;\n return [{\n eventName: 'touchmove',\n options: {\n capture: false\n },\n fn: function fn(event) {\n var phase = getPhase();\n\n if (phase.type !== 'DRAGGING') {\n cancel();\n return;\n }\n\n phase.hasMoved = true;\n var _event$touches$ = event.touches[0],\n clientX = _event$touches$.clientX,\n clientY = _event$touches$.clientY;\n var point = {\n x: clientX,\n y: clientY\n };\n event.preventDefault();\n phase.actions.move(point);\n }\n }, {\n eventName: 'touchend',\n fn: function fn(event) {\n var phase = getPhase();\n\n if (phase.type !== 'DRAGGING') {\n cancel();\n return;\n }\n\n event.preventDefault();\n phase.actions.drop({\n shouldBlockNextClick: true\n });\n completed();\n }\n }, {\n eventName: 'touchcancel',\n fn: function fn(event) {\n if (getPhase().type !== 'DRAGGING') {\n cancel();\n return;\n }\n\n event.preventDefault();\n cancel();\n }\n }, {\n eventName: 'touchforcechange',\n fn: function fn(event) {\n var phase = getPhase();\n !(phase.type !== 'IDLE') ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n var touch = event.touches[0];\n\n if (!touch) {\n return;\n }\n\n var isForcePress = touch.force >= forcePressThreshold;\n\n if (!isForcePress) {\n return;\n }\n\n var shouldRespect = phase.actions.shouldRespectForcePress();\n\n if (phase.type === 'PENDING') {\n if (shouldRespect) {\n cancel();\n }\n\n return;\n }\n\n if (shouldRespect) {\n if (phase.hasMoved) {\n event.preventDefault();\n return;\n }\n\n cancel();\n return;\n }\n\n event.preventDefault();\n }\n }, {\n eventName: supportedEventName,\n fn: cancel\n }];\n}\n\nfunction useMouseSensor$1(api) {\n var phaseRef = useRef(idle$2);\n var unbindEventsRef = useRef(noop);\n var getPhase = useCallback(function getPhase() {\n return phaseRef.current;\n }, []);\n var setPhase = useCallback(function setPhase(phase) {\n phaseRef.current = phase;\n }, []);\n var startCaptureBinding = useMemo(function () {\n return {\n eventName: 'touchstart',\n fn: function onTouchStart(event) {\n if (event.defaultPrevented) {\n return;\n }\n\n var draggableId = api.findClosestDraggableId(event);\n\n if (!draggableId) {\n return;\n }\n\n var actions = api.tryGetLock(draggableId, stop, {\n sourceEvent: event\n });\n\n if (!actions) {\n return;\n }\n\n var touch = event.touches[0];\n var clientX = touch.clientX,\n clientY = touch.clientY;\n var point = {\n x: clientX,\n y: clientY\n };\n unbindEventsRef.current();\n startPendingDrag(actions, point);\n }\n };\n }, [api]);\n var listenForCapture = useCallback(function listenForCapture() {\n var options = {\n capture: true,\n passive: false\n };\n unbindEventsRef.current = bindEvents(window, [startCaptureBinding], options);\n }, [startCaptureBinding]);\n var stop = useCallback(function () {\n var current = phaseRef.current;\n\n if (current.type === 'IDLE') {\n return;\n }\n\n if (current.type === 'PENDING') {\n clearTimeout(current.longPressTimerId);\n }\n\n setPhase(idle$2);\n unbindEventsRef.current();\n listenForCapture();\n }, [listenForCapture, setPhase]);\n var cancel = useCallback(function () {\n var phase = phaseRef.current;\n stop();\n\n if (phase.type === 'DRAGGING') {\n phase.actions.cancel({\n shouldBlockNextClick: true\n });\n }\n\n if (phase.type === 'PENDING') {\n phase.actions.abort();\n }\n }, [stop]);\n var bindCapturingEvents = useCallback(function bindCapturingEvents() {\n var options = {\n capture: true,\n passive: false\n };\n var args = {\n cancel: cancel,\n completed: stop,\n getPhase: getPhase\n };\n var unbindTarget = bindEvents(window, getHandleBindings(args), options);\n var unbindWindow = bindEvents(window, getWindowBindings(args), options);\n\n unbindEventsRef.current = function unbindAll() {\n unbindTarget();\n unbindWindow();\n };\n }, [cancel, getPhase, stop]);\n var startDragging = useCallback(function startDragging() {\n var phase = getPhase();\n !(phase.type === 'PENDING') ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot start dragging from phase \" + phase.type) : invariant(false) : void 0;\n var actions = phase.actions.fluidLift(phase.point);\n setPhase({\n type: 'DRAGGING',\n actions: actions,\n hasMoved: false\n });\n }, [getPhase, setPhase]);\n var startPendingDrag = useCallback(function startPendingDrag(actions, point) {\n !(getPhase().type === 'IDLE') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Expected to move from IDLE to PENDING drag') : invariant(false) : void 0;\n var longPressTimerId = setTimeout(startDragging, timeForLongPress);\n setPhase({\n type: 'PENDING',\n point: point,\n actions: actions,\n longPressTimerId: longPressTimerId\n });\n bindCapturingEvents();\n }, [bindCapturingEvents, getPhase, setPhase, startDragging]);\n useIsomorphicLayoutEffect(function mount() {\n listenForCapture();\n return function unmount() {\n unbindEventsRef.current();\n var phase = getPhase();\n\n if (phase.type === 'PENDING') {\n clearTimeout(phase.longPressTimerId);\n setPhase(idle$2);\n }\n };\n }, [getPhase, listenForCapture, setPhase]);\n useIsomorphicLayoutEffect(function webkitHack() {\n var unbind = bindEvents(window, [{\n eventName: 'touchmove',\n fn: function fn() {},\n options: {\n capture: false,\n passive: false\n }\n }]);\n return unbind;\n }, []);\n}\n\nfunction useValidateSensorHooks(sensorHooks) {\n useDev(function () {\n var previousRef = usePrevious(sensorHooks);\n useDevSetupWarning(function () {\n !(previousRef.current.length === sensorHooks.length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot change the amount of sensor hooks after mounting') : invariant(false) : void 0;\n });\n });\n}\n\nvar interactiveTagNames = {\n input: true,\n button: true,\n textarea: true,\n select: true,\n option: true,\n optgroup: true,\n video: true,\n audio: true\n};\n\nfunction isAnInteractiveElement(parent, current) {\n if (current == null) {\n return false;\n }\n\n var hasAnInteractiveTag = Boolean(interactiveTagNames[current.tagName.toLowerCase()]);\n\n if (hasAnInteractiveTag) {\n return true;\n }\n\n var attribute = current.getAttribute('contenteditable');\n\n if (attribute === 'true' || attribute === '') {\n return true;\n }\n\n if (current === parent) {\n return false;\n }\n\n return isAnInteractiveElement(parent, current.parentElement);\n}\n\nfunction isEventInInteractiveElement(draggable, event) {\n var target = event.target;\n\n if (!isHtmlElement(target)) {\n return false;\n }\n\n return isAnInteractiveElement(draggable, target);\n}\n\nvar getBorderBoxCenterPosition = function getBorderBoxCenterPosition(el) {\n return getRect(el.getBoundingClientRect()).center;\n};\n\nfunction isElement(el) {\n return el instanceof getWindowFromEl(el).Element;\n}\n\nvar supportedMatchesName = function () {\n var base = 'matches';\n\n if (typeof document === 'undefined') {\n return base;\n }\n\n var candidates = [base, 'msMatchesSelector', 'webkitMatchesSelector'];\n var value = find(candidates, function (name) {\n return name in Element.prototype;\n });\n return value || base;\n}();\n\nfunction closestPonyfill(el, selector) {\n if (el == null) {\n return null;\n }\n\n if (el[supportedMatchesName](selector)) {\n return el;\n }\n\n return closestPonyfill(el.parentElement, selector);\n}\n\nfunction closest$1(el, selector) {\n if (el.closest) {\n return el.closest(selector);\n }\n\n return closestPonyfill(el, selector);\n}\n\nfunction getSelector(contextId) {\n return \"[\" + dragHandle.contextId + \"=\\\"\" + contextId + \"\\\"]\";\n}\n\nfunction findClosestDragHandleFromEvent(contextId, event) {\n var target = event.target;\n\n if (!isElement(target)) {\n process.env.NODE_ENV !== \"production\" ? warning('event.target must be a Element') : void 0;\n return null;\n }\n\n var selector = getSelector(contextId);\n var handle = closest$1(target, selector);\n\n if (!handle) {\n return null;\n }\n\n if (!isHtmlElement(handle)) {\n process.env.NODE_ENV !== \"production\" ? warning('drag handle must be a HTMLElement') : void 0;\n return null;\n }\n\n return handle;\n}\n\nfunction tryGetClosestDraggableIdFromEvent(contextId, event) {\n var handle = findClosestDragHandleFromEvent(contextId, event);\n\n if (!handle) {\n return null;\n }\n\n return handle.getAttribute(dragHandle.draggableId);\n}\n\nfunction findDraggable(contextId, draggableId) {\n var selector = \"[\" + draggable.contextId + \"=\\\"\" + contextId + \"\\\"]\";\n var possible = toArray(document.querySelectorAll(selector));\n var draggable$1 = find(possible, function (el) {\n return el.getAttribute(draggable.id) === draggableId;\n });\n\n if (!draggable$1) {\n return null;\n }\n\n if (!isHtmlElement(draggable$1)) {\n process.env.NODE_ENV !== \"production\" ? warning('Draggable element is not a HTMLElement') : void 0;\n return null;\n }\n\n return draggable$1;\n}\n\nfunction preventDefault(event) {\n event.preventDefault();\n}\n\nfunction _isActive(_ref) {\n var expected = _ref.expected,\n phase = _ref.phase,\n isLockActive = _ref.isLockActive,\n shouldWarn = _ref.shouldWarn;\n\n if (!isLockActive()) {\n if (shouldWarn) {\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n Cannot perform action.\\n The sensor no longer has an action lock.\\n\\n Tips:\\n\\n - Throw away your action handlers when forceStop() is called\\n - Check actions.isActive() if you really need to\\n \") : void 0;\n }\n\n return false;\n }\n\n if (expected !== phase) {\n if (shouldWarn) {\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n Cannot perform action.\\n The actions you used belong to an outdated phase\\n\\n Current phase: \" + expected + \"\\n You called an action from outdated phase: \" + phase + \"\\n\\n Tips:\\n\\n - Do not use preDragActions actions after calling preDragActions.lift()\\n \") : void 0;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction canStart(_ref2) {\n var lockAPI = _ref2.lockAPI,\n store = _ref2.store,\n registry = _ref2.registry,\n draggableId = _ref2.draggableId;\n\n if (lockAPI.isClaimed()) {\n return false;\n }\n\n var entry = registry.draggable.findById(draggableId);\n\n if (!entry) {\n process.env.NODE_ENV !== \"production\" ? warning(\"Unable to find draggable with id: \" + draggableId) : void 0;\n return false;\n }\n\n if (!entry.options.isEnabled) {\n return false;\n }\n\n if (!canStartDrag(store.getState(), draggableId)) {\n return false;\n }\n\n return true;\n}\n\nfunction tryStart(_ref3) {\n var lockAPI = _ref3.lockAPI,\n contextId = _ref3.contextId,\n store = _ref3.store,\n registry = _ref3.registry,\n draggableId = _ref3.draggableId,\n forceSensorStop = _ref3.forceSensorStop,\n sourceEvent = _ref3.sourceEvent;\n var shouldStart = canStart({\n lockAPI: lockAPI,\n store: store,\n registry: registry,\n draggableId: draggableId\n });\n\n if (!shouldStart) {\n return null;\n }\n\n var entry = registry.draggable.getById(draggableId);\n var el = findDraggable(contextId, entry.descriptor.id);\n\n if (!el) {\n process.env.NODE_ENV !== \"production\" ? warning(\"Unable to find draggable element with id: \" + draggableId) : void 0;\n return null;\n }\n\n if (sourceEvent && !entry.options.canDragInteractiveElements && isEventInInteractiveElement(el, sourceEvent)) {\n return null;\n }\n\n var lock = lockAPI.claim(forceSensorStop || noop);\n var phase = 'PRE_DRAG';\n\n function getShouldRespectForcePress() {\n return entry.options.shouldRespectForcePress;\n }\n\n function isLockActive() {\n return lockAPI.isActive(lock);\n }\n\n function tryDispatch(expected, getAction) {\n if (_isActive({\n expected: expected,\n phase: phase,\n isLockActive: isLockActive,\n shouldWarn: true\n })) {\n store.dispatch(getAction());\n }\n }\n\n var tryDispatchWhenDragging = tryDispatch.bind(null, 'DRAGGING');\n\n function lift$1(args) {\n function completed() {\n lockAPI.release();\n phase = 'COMPLETED';\n }\n\n if (phase !== 'PRE_DRAG') {\n completed();\n !(phase === 'PRE_DRAG') ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot lift in phase \" + phase) : invariant(false) : void 0;\n }\n\n store.dispatch(lift(args.liftActionArgs));\n phase = 'DRAGGING';\n\n function finish(reason, options) {\n if (options === void 0) {\n options = {\n shouldBlockNextClick: false\n };\n }\n\n args.cleanup();\n\n if (options.shouldBlockNextClick) {\n var unbind = bindEvents(window, [{\n eventName: 'click',\n fn: preventDefault,\n options: {\n once: true,\n passive: false,\n capture: true\n }\n }]);\n setTimeout(unbind);\n }\n\n completed();\n store.dispatch(drop({\n reason: reason\n }));\n }\n\n return _extends({\n isActive: function isActive() {\n return _isActive({\n expected: 'DRAGGING',\n phase: phase,\n isLockActive: isLockActive,\n shouldWarn: false\n });\n },\n shouldRespectForcePress: getShouldRespectForcePress,\n drop: function drop(options) {\n return finish('DROP', options);\n },\n cancel: function cancel(options) {\n return finish('CANCEL', options);\n }\n }, args.actions);\n }\n\n function fluidLift(clientSelection) {\n var move$1 = rafSchd(function (client) {\n tryDispatchWhenDragging(function () {\n return move({\n client: client\n });\n });\n });\n var api = lift$1({\n liftActionArgs: {\n id: draggableId,\n clientSelection: clientSelection,\n movementMode: 'FLUID'\n },\n cleanup: function cleanup() {\n return move$1.cancel();\n },\n actions: {\n move: move$1\n }\n });\n return _extends({}, api, {\n move: move$1\n });\n }\n\n function snapLift() {\n var actions = {\n moveUp: function moveUp$1() {\n return tryDispatchWhenDragging(moveUp);\n },\n moveRight: function moveRight$1() {\n return tryDispatchWhenDragging(moveRight);\n },\n moveDown: function moveDown$1() {\n return tryDispatchWhenDragging(moveDown);\n },\n moveLeft: function moveLeft$1() {\n return tryDispatchWhenDragging(moveLeft);\n }\n };\n return lift$1({\n liftActionArgs: {\n id: draggableId,\n clientSelection: getBorderBoxCenterPosition(el),\n movementMode: 'SNAP'\n },\n cleanup: noop,\n actions: actions\n });\n }\n\n function abortPreDrag() {\n var shouldRelease = _isActive({\n expected: 'PRE_DRAG',\n phase: phase,\n isLockActive: isLockActive,\n shouldWarn: true\n });\n\n if (shouldRelease) {\n lockAPI.release();\n }\n }\n\n var preDrag = {\n isActive: function isActive() {\n return _isActive({\n expected: 'PRE_DRAG',\n phase: phase,\n isLockActive: isLockActive,\n shouldWarn: false\n });\n },\n shouldRespectForcePress: getShouldRespectForcePress,\n fluidLift: fluidLift,\n snapLift: snapLift,\n abort: abortPreDrag\n };\n return preDrag;\n}\n\nvar defaultSensors = [useMouseSensor, useKeyboardSensor, useMouseSensor$1];\n\nfunction useSensorMarshal(_ref4) {\n var contextId = _ref4.contextId,\n store = _ref4.store,\n registry = _ref4.registry,\n customSensors = _ref4.customSensors,\n enableDefaultSensors = _ref4.enableDefaultSensors;\n var useSensors = [].concat(enableDefaultSensors ? defaultSensors : [], customSensors || []);\n var lockAPI = useState(function () {\n return create();\n })[0];\n var tryAbandonLock = useCallback(function tryAbandonLock(previous, current) {\n if (previous.isDragging && !current.isDragging) {\n lockAPI.tryAbandon();\n }\n }, [lockAPI]);\n useIsomorphicLayoutEffect(function listenToStore() {\n var previous = store.getState();\n var unsubscribe = store.subscribe(function () {\n var current = store.getState();\n tryAbandonLock(previous, current);\n previous = current;\n });\n return unsubscribe;\n }, [lockAPI, store, tryAbandonLock]);\n useIsomorphicLayoutEffect(function () {\n return lockAPI.tryAbandon;\n }, [lockAPI.tryAbandon]);\n var canGetLock = useCallback(function (draggableId) {\n return canStart({\n lockAPI: lockAPI,\n registry: registry,\n store: store,\n draggableId: draggableId\n });\n }, [lockAPI, registry, store]);\n var tryGetLock = useCallback(function (draggableId, forceStop, options) {\n return tryStart({\n lockAPI: lockAPI,\n registry: registry,\n contextId: contextId,\n store: store,\n draggableId: draggableId,\n forceSensorStop: forceStop,\n sourceEvent: options && options.sourceEvent ? options.sourceEvent : null\n });\n }, [contextId, lockAPI, registry, store]);\n var findClosestDraggableId = useCallback(function (event) {\n return tryGetClosestDraggableIdFromEvent(contextId, event);\n }, [contextId]);\n var findOptionsForDraggable = useCallback(function (id) {\n var entry = registry.draggable.findById(id);\n return entry ? entry.options : null;\n }, [registry.draggable]);\n var tryReleaseLock = useCallback(function tryReleaseLock() {\n if (!lockAPI.isClaimed()) {\n return;\n }\n\n lockAPI.tryAbandon();\n\n if (store.getState().phase !== 'IDLE') {\n store.dispatch(flush());\n }\n }, [lockAPI, store]);\n var isLockClaimed = useCallback(lockAPI.isClaimed, [lockAPI]);\n var api = useMemo(function () {\n return {\n canGetLock: canGetLock,\n tryGetLock: tryGetLock,\n findClosestDraggableId: findClosestDraggableId,\n findOptionsForDraggable: findOptionsForDraggable,\n tryReleaseLock: tryReleaseLock,\n isLockClaimed: isLockClaimed\n };\n }, [canGetLock, tryGetLock, findClosestDraggableId, findOptionsForDraggable, tryReleaseLock, isLockClaimed]);\n useValidateSensorHooks(useSensors);\n\n for (var i = 0; i < useSensors.length; i++) {\n useSensors[i](api);\n }\n}\n\nvar createResponders = function createResponders(props) {\n return {\n onBeforeCapture: props.onBeforeCapture,\n onBeforeDragStart: props.onBeforeDragStart,\n onDragStart: props.onDragStart,\n onDragEnd: props.onDragEnd,\n onDragUpdate: props.onDragUpdate\n };\n};\n\nfunction getStore(lazyRef) {\n !lazyRef.current ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Could not find store from lazy ref') : invariant(false) : void 0;\n return lazyRef.current;\n}\n\nfunction App(props) {\n var contextId = props.contextId,\n setCallbacks = props.setCallbacks,\n sensors = props.sensors,\n nonce = props.nonce,\n dragHandleUsageInstructions = props.dragHandleUsageInstructions;\n var lazyStoreRef = useRef(null);\n useStartupValidation();\n var lastPropsRef = usePrevious(props);\n var getResponders = useCallback(function () {\n return createResponders(lastPropsRef.current);\n }, [lastPropsRef]);\n var announce = useAnnouncer(contextId);\n var dragHandleUsageInstructionsId = useHiddenTextElement({\n contextId: contextId,\n text: dragHandleUsageInstructions\n });\n var styleMarshal = useStyleMarshal(contextId, nonce);\n var lazyDispatch = useCallback(function (action) {\n getStore(lazyStoreRef).dispatch(action);\n }, []);\n var marshalCallbacks = useMemo(function () {\n return bindActionCreators({\n publishWhileDragging: publishWhileDragging,\n updateDroppableScroll: updateDroppableScroll,\n updateDroppableIsEnabled: updateDroppableIsEnabled,\n updateDroppableIsCombineEnabled: updateDroppableIsCombineEnabled,\n collectionStarting: collectionStarting\n }, lazyDispatch);\n }, [lazyDispatch]);\n var registry = useRegistry();\n var dimensionMarshal = useMemo(function () {\n return createDimensionMarshal(registry, marshalCallbacks);\n }, [registry, marshalCallbacks]);\n var autoScroller = useMemo(function () {\n return createAutoScroller(_extends({\n scrollWindow: scrollWindow,\n scrollDroppable: dimensionMarshal.scrollDroppable\n }, bindActionCreators({\n move: move\n }, lazyDispatch)));\n }, [dimensionMarshal.scrollDroppable, lazyDispatch]);\n var focusMarshal = useFocusMarshal(contextId);\n var store = useMemo(function () {\n return createStore({\n announce: announce,\n autoScroller: autoScroller,\n dimensionMarshal: dimensionMarshal,\n focusMarshal: focusMarshal,\n getResponders: getResponders,\n styleMarshal: styleMarshal\n });\n }, [announce, autoScroller, dimensionMarshal, focusMarshal, getResponders, styleMarshal]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (lazyStoreRef.current && lazyStoreRef.current !== store) {\n process.env.NODE_ENV !== \"production\" ? warning('unexpected store change') : void 0;\n }\n }\n\n lazyStoreRef.current = store;\n var tryResetStore = useCallback(function () {\n var current = getStore(lazyStoreRef);\n var state = current.getState();\n\n if (state.phase !== 'IDLE') {\n current.dispatch(flush());\n }\n }, []);\n var isDragging = useCallback(function () {\n var state = getStore(lazyStoreRef).getState();\n return state.isDragging || state.phase === 'DROP_ANIMATING';\n }, []);\n var appCallbacks = useMemo(function () {\n return {\n isDragging: isDragging,\n tryAbort: tryResetStore\n };\n }, [isDragging, tryResetStore]);\n setCallbacks(appCallbacks);\n var getCanLift = useCallback(function (id) {\n return canStartDrag(getStore(lazyStoreRef).getState(), id);\n }, []);\n var getIsMovementAllowed = useCallback(function () {\n return isMovementAllowed(getStore(lazyStoreRef).getState());\n }, []);\n var appContext = useMemo(function () {\n return {\n marshal: dimensionMarshal,\n focus: focusMarshal,\n contextId: contextId,\n canLift: getCanLift,\n isMovementAllowed: getIsMovementAllowed,\n dragHandleUsageInstructionsId: dragHandleUsageInstructionsId,\n registry: registry\n };\n }, [contextId, dimensionMarshal, dragHandleUsageInstructionsId, focusMarshal, getCanLift, getIsMovementAllowed, registry]);\n useSensorMarshal({\n contextId: contextId,\n store: store,\n registry: registry,\n customSensors: sensors,\n enableDefaultSensors: props.enableDefaultSensors !== false\n });\n useEffect(function () {\n return tryResetStore;\n }, [tryResetStore]);\n return /*#__PURE__*/React.createElement(AppContext.Provider, {\n value: appContext\n }, /*#__PURE__*/React.createElement(Provider, {\n context: StoreContext,\n store: store\n }, props.children));\n}\n\nvar count$1 = 0;\n\nfunction reset$1() {\n count$1 = 0;\n}\n\nfunction useInstanceCount() {\n return useMemo(function () {\n return \"\" + count$1++;\n }, []);\n}\n\nfunction resetServerContext() {\n reset$1();\n reset();\n}\n\nfunction DragDropContext(props) {\n var contextId = useInstanceCount();\n var dragHandleUsageInstructions = props.dragHandleUsageInstructions || preset.dragHandleUsageInstructions;\n return /*#__PURE__*/React.createElement(ErrorBoundary, null, function (setCallbacks) {\n return /*#__PURE__*/React.createElement(App, {\n nonce: props.nonce,\n contextId: contextId,\n setCallbacks: setCallbacks,\n dragHandleUsageInstructions: dragHandleUsageInstructions,\n enableDefaultSensors: props.enableDefaultSensors,\n sensors: props.sensors,\n onBeforeCapture: props.onBeforeCapture,\n onBeforeDragStart: props.onBeforeDragStart,\n onDragStart: props.onDragStart,\n onDragUpdate: props.onDragUpdate,\n onDragEnd: props.onDragEnd\n }, props.children);\n });\n}\n\nvar isEqual$1 = function isEqual(base) {\n return function (value) {\n return base === value;\n };\n};\n\nvar isScroll = isEqual$1('scroll');\nvar isAuto = isEqual$1('auto');\nvar isVisible$1 = isEqual$1('visible');\n\nvar isEither = function isEither(overflow, fn) {\n return fn(overflow.overflowX) || fn(overflow.overflowY);\n};\n\nvar isBoth = function isBoth(overflow, fn) {\n return fn(overflow.overflowX) && fn(overflow.overflowY);\n};\n\nvar isElementScrollable = function isElementScrollable(el) {\n var style = window.getComputedStyle(el);\n var overflow = {\n overflowX: style.overflowX,\n overflowY: style.overflowY\n };\n return isEither(overflow, isScroll) || isEither(overflow, isAuto);\n};\n\nvar isBodyScrollable = function isBodyScrollable() {\n if (process.env.NODE_ENV === 'production') {\n return false;\n }\n\n var body = getBodyElement();\n var html = document.documentElement;\n !html ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n\n if (!isElementScrollable(body)) {\n return false;\n }\n\n var htmlStyle = window.getComputedStyle(html);\n var htmlOverflow = {\n overflowX: htmlStyle.overflowX,\n overflowY: htmlStyle.overflowY\n };\n\n if (isBoth(htmlOverflow, isVisible$1)) {\n return false;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n We have detected that your element might be a scroll container.\\n We have found no reliable way of detecting whether the element is a scroll container.\\n Under most circumstances a scroll bar will be on the element (document.documentElement)\\n\\n Because we cannot determine if the is a scroll container, and generally it is not one,\\n we will be treating the as *not* a scroll container\\n\\n More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/how-we-detect-scroll-containers.md\\n \") : void 0;\n return false;\n};\n\nvar getClosestScrollable = function getClosestScrollable(el) {\n if (el == null) {\n return null;\n }\n\n if (el === document.body) {\n return isBodyScrollable() ? el : null;\n }\n\n if (el === document.documentElement) {\n return null;\n }\n\n if (!isElementScrollable(el)) {\n return getClosestScrollable(el.parentElement);\n }\n\n return el;\n};\n\nvar checkForNestedScrollContainers = function checkForNestedScrollContainers(scrollable) {\n if (!scrollable) {\n return;\n }\n\n var anotherScrollParent = getClosestScrollable(scrollable.parentElement);\n\n if (!anotherScrollParent) {\n return;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n Droppable: unsupported nested scroll container detected.\\n A Droppable can only have one scroll parent (which can be itself)\\n Nested scroll containers are currently not supported.\\n\\n We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131\\n \") : void 0;\n};\n\nvar getScroll$1 = function getScroll$1(el) {\n return {\n x: el.scrollLeft,\n y: el.scrollTop\n };\n};\n\nvar getIsFixed = function getIsFixed(el) {\n if (!el) {\n return false;\n }\n\n var style = window.getComputedStyle(el);\n\n if (style.position === 'fixed') {\n return true;\n }\n\n return getIsFixed(el.parentElement);\n};\n\nvar getEnv = function getEnv(start) {\n var closestScrollable = getClosestScrollable(start);\n var isFixedOnPage = getIsFixed(start);\n return {\n closestScrollable: closestScrollable,\n isFixedOnPage: isFixedOnPage\n };\n};\n\nvar getDroppableDimension = function getDroppableDimension(_ref) {\n var descriptor = _ref.descriptor,\n isEnabled = _ref.isEnabled,\n isCombineEnabled = _ref.isCombineEnabled,\n isFixedOnPage = _ref.isFixedOnPage,\n direction = _ref.direction,\n client = _ref.client,\n page = _ref.page,\n closest = _ref.closest;\n\n var frame = function () {\n if (!closest) {\n return null;\n }\n\n var scrollSize = closest.scrollSize,\n frameClient = closest.client;\n var maxScroll = getMaxScroll({\n scrollHeight: scrollSize.scrollHeight,\n scrollWidth: scrollSize.scrollWidth,\n height: frameClient.paddingBox.height,\n width: frameClient.paddingBox.width\n });\n return {\n pageMarginBox: closest.page.marginBox,\n frameClient: frameClient,\n scrollSize: scrollSize,\n shouldClipSubject: closest.shouldClipSubject,\n scroll: {\n initial: closest.scroll,\n current: closest.scroll,\n max: maxScroll,\n diff: {\n value: origin,\n displacement: origin\n }\n }\n };\n }();\n\n var axis = direction === 'vertical' ? vertical : horizontal;\n var subject = getSubject({\n page: page,\n withPlaceholder: null,\n axis: axis,\n frame: frame\n });\n var dimension = {\n descriptor: descriptor,\n isCombineEnabled: isCombineEnabled,\n isFixedOnPage: isFixedOnPage,\n axis: axis,\n isEnabled: isEnabled,\n client: client,\n page: page,\n frame: frame,\n subject: subject\n };\n return dimension;\n};\n\nvar getClient = function getClient(targetRef, closestScrollable) {\n var base = getBox(targetRef);\n\n if (!closestScrollable) {\n return base;\n }\n\n if (targetRef !== closestScrollable) {\n return base;\n }\n\n var top = base.paddingBox.top - closestScrollable.scrollTop;\n var left = base.paddingBox.left - closestScrollable.scrollLeft;\n var bottom = top + closestScrollable.scrollHeight;\n var right = left + closestScrollable.scrollWidth;\n var paddingBox = {\n top: top,\n right: right,\n bottom: bottom,\n left: left\n };\n var borderBox = expand(paddingBox, base.border);\n var client = createBox({\n borderBox: borderBox,\n margin: base.margin,\n border: base.border,\n padding: base.padding\n });\n return client;\n};\n\nvar getDimension = function getDimension(_ref) {\n var ref = _ref.ref,\n descriptor = _ref.descriptor,\n env = _ref.env,\n windowScroll = _ref.windowScroll,\n direction = _ref.direction,\n isDropDisabled = _ref.isDropDisabled,\n isCombineEnabled = _ref.isCombineEnabled,\n shouldClipSubject = _ref.shouldClipSubject;\n var closestScrollable = env.closestScrollable;\n var client = getClient(ref, closestScrollable);\n var page = withScroll(client, windowScroll);\n\n var closest = function () {\n if (!closestScrollable) {\n return null;\n }\n\n var frameClient = getBox(closestScrollable);\n var scrollSize = {\n scrollHeight: closestScrollable.scrollHeight,\n scrollWidth: closestScrollable.scrollWidth\n };\n return {\n client: frameClient,\n page: withScroll(frameClient, windowScroll),\n scroll: getScroll$1(closestScrollable),\n scrollSize: scrollSize,\n shouldClipSubject: shouldClipSubject\n };\n }();\n\n var dimension = getDroppableDimension({\n descriptor: descriptor,\n isEnabled: !isDropDisabled,\n isCombineEnabled: isCombineEnabled,\n isFixedOnPage: env.isFixedOnPage,\n direction: direction,\n client: client,\n page: page,\n closest: closest\n });\n return dimension;\n};\n\nvar immediate = {\n passive: false\n};\nvar delayed = {\n passive: true\n};\n\nvar getListenerOptions = function getListenerOptions(options) {\n return options.shouldPublishImmediately ? immediate : delayed;\n};\n\nfunction useRequiredContext(Context) {\n var result = useContext(Context);\n !result ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Could not find required context') : invariant(false) : void 0;\n return result;\n}\n\nvar getClosestScrollableFromDrag = function getClosestScrollableFromDrag(dragging) {\n return dragging && dragging.env.closestScrollable || null;\n};\n\nfunction useDroppablePublisher(args) {\n var whileDraggingRef = useRef(null);\n var appContext = useRequiredContext(AppContext);\n var uniqueId = useUniqueId('droppable');\n var registry = appContext.registry,\n marshal = appContext.marshal;\n var previousRef = usePrevious(args);\n var descriptor = useMemo(function () {\n return {\n id: args.droppableId,\n type: args.type,\n mode: args.mode\n };\n }, [args.droppableId, args.mode, args.type]);\n var publishedDescriptorRef = useRef(descriptor);\n var memoizedUpdateScroll = useMemo(function () {\n return memoizeOne(function (x, y) {\n !whileDraggingRef.current ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Can only update scroll when dragging') : invariant(false) : void 0;\n var scroll = {\n x: x,\n y: y\n };\n marshal.updateDroppableScroll(descriptor.id, scroll);\n });\n }, [descriptor.id, marshal]);\n var getClosestScroll = useCallback(function () {\n var dragging = whileDraggingRef.current;\n\n if (!dragging || !dragging.env.closestScrollable) {\n return origin;\n }\n\n return getScroll$1(dragging.env.closestScrollable);\n }, []);\n var updateScroll = useCallback(function () {\n var scroll = getClosestScroll();\n memoizedUpdateScroll(scroll.x, scroll.y);\n }, [getClosestScroll, memoizedUpdateScroll]);\n var scheduleScrollUpdate = useMemo(function () {\n return rafSchd(updateScroll);\n }, [updateScroll]);\n var onClosestScroll = useCallback(function () {\n var dragging = whileDraggingRef.current;\n var closest = getClosestScrollableFromDrag(dragging);\n !(dragging && closest) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Could not find scroll options while scrolling') : invariant(false) : void 0;\n var options = dragging.scrollOptions;\n\n if (options.shouldPublishImmediately) {\n updateScroll();\n return;\n }\n\n scheduleScrollUpdate();\n }, [scheduleScrollUpdate, updateScroll]);\n var getDimensionAndWatchScroll = useCallback(function (windowScroll, options) {\n !!whileDraggingRef.current ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot collect a droppable while a drag is occurring') : invariant(false) : void 0;\n var previous = previousRef.current;\n var ref = previous.getDroppableRef();\n !ref ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot collect without a droppable ref') : invariant(false) : void 0;\n var env = getEnv(ref);\n var dragging = {\n ref: ref,\n descriptor: descriptor,\n env: env,\n scrollOptions: options\n };\n whileDraggingRef.current = dragging;\n var dimension = getDimension({\n ref: ref,\n descriptor: descriptor,\n env: env,\n windowScroll: windowScroll,\n direction: previous.direction,\n isDropDisabled: previous.isDropDisabled,\n isCombineEnabled: previous.isCombineEnabled,\n shouldClipSubject: !previous.ignoreContainerClipping\n });\n var scrollable = env.closestScrollable;\n\n if (scrollable) {\n scrollable.setAttribute(scrollContainer.contextId, appContext.contextId);\n scrollable.addEventListener('scroll', onClosestScroll, getListenerOptions(dragging.scrollOptions));\n\n if (process.env.NODE_ENV !== 'production') {\n checkForNestedScrollContainers(scrollable);\n }\n }\n\n return dimension;\n }, [appContext.contextId, descriptor, onClosestScroll, previousRef]);\n var getScrollWhileDragging = useCallback(function () {\n var dragging = whileDraggingRef.current;\n var closest = getClosestScrollableFromDrag(dragging);\n !(dragging && closest) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Can only recollect Droppable client for Droppables that have a scroll container') : invariant(false) : void 0;\n return getScroll$1(closest);\n }, []);\n var dragStopped = useCallback(function () {\n var dragging = whileDraggingRef.current;\n !dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot stop drag when no active drag') : invariant(false) : void 0;\n var closest = getClosestScrollableFromDrag(dragging);\n whileDraggingRef.current = null;\n\n if (!closest) {\n return;\n }\n\n scheduleScrollUpdate.cancel();\n closest.removeAttribute(scrollContainer.contextId);\n closest.removeEventListener('scroll', onClosestScroll, getListenerOptions(dragging.scrollOptions));\n }, [onClosestScroll, scheduleScrollUpdate]);\n var scroll = useCallback(function (change) {\n var dragging = whileDraggingRef.current;\n !dragging ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot scroll when there is no drag') : invariant(false) : void 0;\n var closest = getClosestScrollableFromDrag(dragging);\n !closest ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot scroll a droppable with no closest scrollable') : invariant(false) : void 0;\n closest.scrollTop += change.y;\n closest.scrollLeft += change.x;\n }, []);\n var callbacks = useMemo(function () {\n return {\n getDimensionAndWatchScroll: getDimensionAndWatchScroll,\n getScrollWhileDragging: getScrollWhileDragging,\n dragStopped: dragStopped,\n scroll: scroll\n };\n }, [dragStopped, getDimensionAndWatchScroll, getScrollWhileDragging, scroll]);\n var entry = useMemo(function () {\n return {\n uniqueId: uniqueId,\n descriptor: descriptor,\n callbacks: callbacks\n };\n }, [callbacks, descriptor, uniqueId]);\n useIsomorphicLayoutEffect(function () {\n publishedDescriptorRef.current = entry.descriptor;\n registry.droppable.register(entry);\n return function () {\n if (whileDraggingRef.current) {\n process.env.NODE_ENV !== \"production\" ? warning('Unsupported: changing the droppableId or type of a Droppable during a drag') : void 0;\n dragStopped();\n }\n\n registry.droppable.unregister(entry);\n };\n }, [callbacks, descriptor, dragStopped, entry, marshal, registry.droppable]);\n useIsomorphicLayoutEffect(function () {\n if (!whileDraggingRef.current) {\n return;\n }\n\n marshal.updateDroppableIsEnabled(publishedDescriptorRef.current.id, !args.isDropDisabled);\n }, [args.isDropDisabled, marshal]);\n useIsomorphicLayoutEffect(function () {\n if (!whileDraggingRef.current) {\n return;\n }\n\n marshal.updateDroppableIsCombineEnabled(publishedDescriptorRef.current.id, args.isCombineEnabled);\n }, [args.isCombineEnabled, marshal]);\n}\n\nfunction noop$2() {}\n\nvar empty = {\n width: 0,\n height: 0,\n margin: noSpacing\n};\n\nvar getSize = function getSize(_ref) {\n var isAnimatingOpenOnMount = _ref.isAnimatingOpenOnMount,\n placeholder = _ref.placeholder,\n animate = _ref.animate;\n\n if (isAnimatingOpenOnMount) {\n return empty;\n }\n\n if (animate === 'close') {\n return empty;\n }\n\n return {\n height: placeholder.client.borderBox.height,\n width: placeholder.client.borderBox.width,\n margin: placeholder.client.margin\n };\n};\n\nvar getStyle = function getStyle(_ref2) {\n var isAnimatingOpenOnMount = _ref2.isAnimatingOpenOnMount,\n placeholder = _ref2.placeholder,\n animate = _ref2.animate;\n var size = getSize({\n isAnimatingOpenOnMount: isAnimatingOpenOnMount,\n placeholder: placeholder,\n animate: animate\n });\n return {\n display: placeholder.display,\n boxSizing: 'border-box',\n width: size.width,\n height: size.height,\n marginTop: size.margin.top,\n marginRight: size.margin.right,\n marginBottom: size.margin.bottom,\n marginLeft: size.margin.left,\n flexShrink: '0',\n flexGrow: '0',\n pointerEvents: 'none',\n transition: animate !== 'none' ? transitions.placeholder : null\n };\n};\n\nfunction Placeholder(props) {\n var animateOpenTimerRef = useRef(null);\n var tryClearAnimateOpenTimer = useCallback(function () {\n if (!animateOpenTimerRef.current) {\n return;\n }\n\n clearTimeout(animateOpenTimerRef.current);\n animateOpenTimerRef.current = null;\n }, []);\n var animate = props.animate,\n onTransitionEnd = props.onTransitionEnd,\n onClose = props.onClose,\n contextId = props.contextId;\n\n var _useState = useState(props.animate === 'open'),\n isAnimatingOpenOnMount = _useState[0],\n setIsAnimatingOpenOnMount = _useState[1];\n\n useEffect(function () {\n if (!isAnimatingOpenOnMount) {\n return noop$2;\n }\n\n if (animate !== 'open') {\n tryClearAnimateOpenTimer();\n setIsAnimatingOpenOnMount(false);\n return noop$2;\n }\n\n if (animateOpenTimerRef.current) {\n return noop$2;\n }\n\n animateOpenTimerRef.current = setTimeout(function () {\n animateOpenTimerRef.current = null;\n setIsAnimatingOpenOnMount(false);\n });\n return tryClearAnimateOpenTimer;\n }, [animate, isAnimatingOpenOnMount, tryClearAnimateOpenTimer]);\n var onSizeChangeEnd = useCallback(function (event) {\n if (event.propertyName !== 'height') {\n return;\n }\n\n onTransitionEnd();\n\n if (animate === 'close') {\n onClose();\n }\n }, [animate, onClose, onTransitionEnd]);\n var style = getStyle({\n isAnimatingOpenOnMount: isAnimatingOpenOnMount,\n animate: props.animate,\n placeholder: props.placeholder\n });\n return /*#__PURE__*/React.createElement(props.placeholder.tagName, {\n style: style,\n 'data-rbd-placeholder-context-id': contextId,\n onTransitionEnd: onSizeChangeEnd,\n ref: props.innerRef\n });\n}\n\nvar Placeholder$1 = /*#__PURE__*/React.memo(Placeholder);\nvar DroppableContext = /*#__PURE__*/React.createContext(null);\n\nfunction checkIsValidInnerRef(el) {\n !(el && isHtmlElement(el)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"\\n provided.innerRef has not been provided with a HTMLElement.\\n\\n You can find a guide on using the innerRef callback functions at:\\n https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/using-inner-ref.md\\n \") : invariant(false) : void 0;\n}\n\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\n\nfunction runChecks(args, checks) {\n checks.forEach(function (check) {\n return check(args);\n });\n}\n\nvar shared = [function required(_ref) {\n var props = _ref.props;\n !props.droppableId ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'A Droppable requires a droppableId prop') : invariant(false) : void 0;\n !(typeof props.droppableId === 'string') ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"A Droppable requires a [string] droppableId. Provided: [\" + _typeof(props.droppableId) + \"]\") : invariant(false) : void 0;\n}, function _boolean(_ref2) {\n var props = _ref2.props;\n !isBoolean(props.isDropDisabled) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'isDropDisabled must be a boolean') : invariant(false) : void 0;\n !isBoolean(props.isCombineEnabled) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'isCombineEnabled must be a boolean') : invariant(false) : void 0;\n !isBoolean(props.ignoreContainerClipping) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'ignoreContainerClipping must be a boolean') : invariant(false) : void 0;\n}, function ref(_ref3) {\n var getDroppableRef = _ref3.getDroppableRef;\n checkIsValidInnerRef(getDroppableRef());\n}];\nvar standard = [function placeholder(_ref4) {\n var props = _ref4.props,\n getPlaceholderRef = _ref4.getPlaceholderRef;\n\n if (!props.placeholder) {\n return;\n }\n\n var ref = getPlaceholderRef();\n\n if (ref) {\n return;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n Droppable setup issue [droppableId: \\\"\" + props.droppableId + \"\\\"]:\\n DroppableProvided > placeholder could not be found.\\n\\n Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.\\n More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/api/droppable.md\\n \") : void 0;\n}];\nvar virtual = [function hasClone(_ref5) {\n var props = _ref5.props;\n !props.renderClone ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Must provide a clone render function (renderClone) for virtual lists') : invariant(false) : void 0;\n}, function hasNoPlaceholder(_ref6) {\n var getPlaceholderRef = _ref6.getPlaceholderRef;\n !!getPlaceholderRef() ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Expected virtual list to not have a placeholder') : invariant(false) : void 0;\n}];\n\nfunction useValidation(args) {\n useDevSetupWarning(function () {\n runChecks(args, shared);\n\n if (args.props.mode === 'standard') {\n runChecks(args, standard);\n }\n\n if (args.props.mode === 'virtual') {\n runChecks(args, virtual);\n }\n });\n}\n\nvar AnimateInOut = function (_React$PureComponent) {\n _inheritsLoose(AnimateInOut, _React$PureComponent);\n\n function AnimateInOut() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n _this.state = {\n isVisible: Boolean(_this.props.on),\n data: _this.props.on,\n animate: _this.props.shouldAnimate && _this.props.on ? 'open' : 'none'\n };\n\n _this.onClose = function () {\n if (_this.state.animate !== 'close') {\n return;\n }\n\n _this.setState({\n isVisible: false\n });\n };\n\n return _this;\n }\n\n AnimateInOut.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n if (!props.shouldAnimate) {\n return {\n isVisible: Boolean(props.on),\n data: props.on,\n animate: 'none'\n };\n }\n\n if (props.on) {\n return {\n isVisible: true,\n data: props.on,\n animate: 'open'\n };\n }\n\n if (state.isVisible) {\n return {\n isVisible: true,\n data: state.data,\n animate: 'close'\n };\n }\n\n return {\n isVisible: false,\n animate: 'close',\n data: null\n };\n };\n\n var _proto = AnimateInOut.prototype;\n\n _proto.render = function render() {\n if (!this.state.isVisible) {\n return null;\n }\n\n var provided = {\n onClose: this.onClose,\n data: this.state.data,\n animate: this.state.animate\n };\n return this.props.children(provided);\n };\n\n return AnimateInOut;\n}(React.PureComponent);\n\nvar zIndexOptions = {\n dragging: 5000,\n dropAnimating: 4500\n};\n\nvar getDraggingTransition = function getDraggingTransition(shouldAnimateDragMovement, dropping) {\n if (dropping) {\n return transitions.drop(dropping.duration);\n }\n\n if (shouldAnimateDragMovement) {\n return transitions.snap;\n }\n\n return transitions.fluid;\n};\n\nvar getDraggingOpacity = function getDraggingOpacity(isCombining, isDropAnimating) {\n if (!isCombining) {\n return null;\n }\n\n return isDropAnimating ? combine.opacity.drop : combine.opacity.combining;\n};\n\nvar getShouldDraggingAnimate = function getShouldDraggingAnimate(dragging) {\n if (dragging.forceShouldAnimate != null) {\n return dragging.forceShouldAnimate;\n }\n\n return dragging.mode === 'SNAP';\n};\n\nfunction getDraggingStyle(dragging) {\n var dimension = dragging.dimension;\n var box = dimension.client;\n var offset = dragging.offset,\n combineWith = dragging.combineWith,\n dropping = dragging.dropping;\n var isCombining = Boolean(combineWith);\n var shouldAnimate = getShouldDraggingAnimate(dragging);\n var isDropAnimating = Boolean(dropping);\n var transform = isDropAnimating ? transforms.drop(offset, isCombining) : transforms.moveTo(offset);\n var style = {\n position: 'fixed',\n top: box.marginBox.top,\n left: box.marginBox.left,\n boxSizing: 'border-box',\n width: box.borderBox.width,\n height: box.borderBox.height,\n transition: getDraggingTransition(shouldAnimate, dropping),\n transform: transform,\n opacity: getDraggingOpacity(isCombining, isDropAnimating),\n zIndex: isDropAnimating ? zIndexOptions.dropAnimating : zIndexOptions.dragging,\n pointerEvents: 'none'\n };\n return style;\n}\n\nfunction getSecondaryStyle(secondary) {\n return {\n transform: transforms.moveTo(secondary.offset),\n transition: secondary.shouldAnimateDisplacement ? null : 'none'\n };\n}\n\nfunction getStyle$1(mapped) {\n return mapped.type === 'DRAGGING' ? getDraggingStyle(mapped) : getSecondaryStyle(mapped);\n}\n\nfunction getDimension$1(descriptor, el, windowScroll) {\n if (windowScroll === void 0) {\n windowScroll = origin;\n }\n\n var computedStyles = window.getComputedStyle(el);\n var borderBox = el.getBoundingClientRect();\n var client = calculateBox(borderBox, computedStyles);\n var page = withScroll(client, windowScroll);\n var placeholder = {\n client: client,\n tagName: el.tagName.toLowerCase(),\n display: computedStyles.display\n };\n var displaceBy = {\n x: client.marginBox.width,\n y: client.marginBox.height\n };\n var dimension = {\n descriptor: descriptor,\n placeholder: placeholder,\n displaceBy: displaceBy,\n client: client,\n page: page\n };\n return dimension;\n}\n\nfunction useDraggablePublisher(args) {\n var uniqueId = useUniqueId('draggable');\n var descriptor = args.descriptor,\n registry = args.registry,\n getDraggableRef = args.getDraggableRef,\n canDragInteractiveElements = args.canDragInteractiveElements,\n shouldRespectForcePress = args.shouldRespectForcePress,\n isEnabled = args.isEnabled;\n var options = useMemo(function () {\n return {\n canDragInteractiveElements: canDragInteractiveElements,\n shouldRespectForcePress: shouldRespectForcePress,\n isEnabled: isEnabled\n };\n }, [canDragInteractiveElements, isEnabled, shouldRespectForcePress]);\n var getDimension = useCallback(function (windowScroll) {\n var el = getDraggableRef();\n !el ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Cannot get dimension when no ref is set') : invariant(false) : void 0;\n return getDimension$1(descriptor, el, windowScroll);\n }, [descriptor, getDraggableRef]);\n var entry = useMemo(function () {\n return {\n uniqueId: uniqueId,\n descriptor: descriptor,\n options: options,\n getDimension: getDimension\n };\n }, [descriptor, getDimension, options, uniqueId]);\n var publishedRef = useRef(entry);\n var isFirstPublishRef = useRef(true);\n useIsomorphicLayoutEffect(function () {\n registry.draggable.register(publishedRef.current);\n return function () {\n return registry.draggable.unregister(publishedRef.current);\n };\n }, [registry.draggable]);\n useIsomorphicLayoutEffect(function () {\n if (isFirstPublishRef.current) {\n isFirstPublishRef.current = false;\n return;\n }\n\n var last = publishedRef.current;\n publishedRef.current = entry;\n registry.draggable.update(entry, last);\n }, [entry, registry.draggable]);\n}\n\nfunction useValidation$1(props, contextId, getRef) {\n useDevSetupWarning(function () {\n function prefix(id) {\n return \"Draggable[id: \" + id + \"]: \";\n }\n\n var id = props.draggableId;\n !id ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Draggable requires a draggableId') : invariant(false) : void 0;\n !(typeof id === 'string') ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Draggable requires a [string] draggableId.\\n Provided: [type: \" + _typeof(id) + \"] (value: \" + id + \")\") : invariant(false) : void 0;\n !isInteger(props.index) ? process.env.NODE_ENV !== \"production\" ? invariant(false, prefix(id) + \" requires an integer index prop\") : invariant(false) : void 0;\n\n if (props.mapped.type === 'DRAGGING') {\n return;\n }\n\n checkIsValidInnerRef(getRef());\n\n if (props.isEnabled) {\n !findDragHandle(contextId, id) ? process.env.NODE_ENV !== \"production\" ? invariant(false, prefix(id) + \" Unable to find drag handle\") : invariant(false) : void 0;\n }\n });\n}\n\nfunction useClonePropValidation(isClone) {\n useDev(function () {\n var initialRef = useRef(isClone);\n useDevSetupWarning(function () {\n !(isClone === initialRef.current) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Draggable isClone prop value changed during component life') : invariant(false) : void 0;\n }, [isClone]);\n });\n}\n\nfunction preventHtml5Dnd(event) {\n event.preventDefault();\n}\n\nfunction Draggable(props) {\n var ref = useRef(null);\n var setRef = useCallback(function (el) {\n ref.current = el;\n }, []);\n var getRef = useCallback(function () {\n return ref.current;\n }, []);\n\n var _useRequiredContext = useRequiredContext(AppContext),\n contextId = _useRequiredContext.contextId,\n dragHandleUsageInstructionsId = _useRequiredContext.dragHandleUsageInstructionsId,\n registry = _useRequiredContext.registry;\n\n var _useRequiredContext2 = useRequiredContext(DroppableContext),\n type = _useRequiredContext2.type,\n droppableId = _useRequiredContext2.droppableId;\n\n var descriptor = useMemo(function () {\n return {\n id: props.draggableId,\n index: props.index,\n type: type,\n droppableId: droppableId\n };\n }, [props.draggableId, props.index, type, droppableId]);\n var children = props.children,\n draggableId = props.draggableId,\n isEnabled = props.isEnabled,\n shouldRespectForcePress = props.shouldRespectForcePress,\n canDragInteractiveElements = props.canDragInteractiveElements,\n isClone = props.isClone,\n mapped = props.mapped,\n dropAnimationFinishedAction = props.dropAnimationFinished;\n useValidation$1(props, contextId, getRef);\n useClonePropValidation(isClone);\n\n if (!isClone) {\n var forPublisher = useMemo(function () {\n return {\n descriptor: descriptor,\n registry: registry,\n getDraggableRef: getRef,\n canDragInteractiveElements: canDragInteractiveElements,\n shouldRespectForcePress: shouldRespectForcePress,\n isEnabled: isEnabled\n };\n }, [descriptor, registry, getRef, canDragInteractiveElements, shouldRespectForcePress, isEnabled]);\n useDraggablePublisher(forPublisher);\n }\n\n var dragHandleProps = useMemo(function () {\n return isEnabled ? {\n tabIndex: 0,\n role: 'button',\n 'aria-describedby': dragHandleUsageInstructionsId,\n 'data-rbd-drag-handle-draggable-id': draggableId,\n 'data-rbd-drag-handle-context-id': contextId,\n draggable: false,\n onDragStart: preventHtml5Dnd\n } : null;\n }, [contextId, dragHandleUsageInstructionsId, draggableId, isEnabled]);\n var onMoveEnd = useCallback(function (event) {\n if (mapped.type !== 'DRAGGING') {\n return;\n }\n\n if (!mapped.dropping) {\n return;\n }\n\n if (event.propertyName !== 'transform') {\n return;\n }\n\n dropAnimationFinishedAction();\n }, [dropAnimationFinishedAction, mapped]);\n var provided = useMemo(function () {\n var style = getStyle$1(mapped);\n var onTransitionEnd = mapped.type === 'DRAGGING' && mapped.dropping ? onMoveEnd : null;\n var result = {\n innerRef: setRef,\n draggableProps: {\n 'data-rbd-draggable-context-id': contextId,\n 'data-rbd-draggable-id': draggableId,\n style: style,\n onTransitionEnd: onTransitionEnd\n },\n dragHandleProps: dragHandleProps\n };\n return result;\n }, [contextId, dragHandleProps, draggableId, mapped, onMoveEnd, setRef]);\n var rubric = useMemo(function () {\n return {\n draggableId: descriptor.id,\n type: descriptor.type,\n source: {\n index: descriptor.index,\n droppableId: descriptor.droppableId\n }\n };\n }, [descriptor.droppableId, descriptor.id, descriptor.index, descriptor.type]);\n return children(provided, mapped.snapshot, rubric);\n}\n\nvar isStrictEqual = function isStrictEqual(a, b) {\n return a === b;\n};\n\nvar whatIsDraggedOverFromResult = function whatIsDraggedOverFromResult(result) {\n var combine = result.combine,\n destination = result.destination;\n\n if (destination) {\n return destination.droppableId;\n }\n\n if (combine) {\n return combine.droppableId;\n }\n\n return null;\n};\n\nvar getCombineWithFromResult = function getCombineWithFromResult(result) {\n return result.combine ? result.combine.draggableId : null;\n};\n\nvar getCombineWithFromImpact = function getCombineWithFromImpact(impact) {\n return impact.at && impact.at.type === 'COMBINE' ? impact.at.combine.draggableId : null;\n};\n\nfunction getDraggableSelector() {\n var memoizedOffset = memoizeOne(function (x, y) {\n return {\n x: x,\n y: y\n };\n });\n var getMemoizedSnapshot = memoizeOne(function (mode, isClone, draggingOver, combineWith, dropping) {\n return {\n isDragging: true,\n isClone: isClone,\n isDropAnimating: Boolean(dropping),\n dropAnimation: dropping,\n mode: mode,\n draggingOver: draggingOver,\n combineWith: combineWith,\n combineTargetFor: null\n };\n });\n var getMemoizedProps = memoizeOne(function (offset, mode, dimension, isClone, draggingOver, combineWith, forceShouldAnimate) {\n return {\n mapped: {\n type: 'DRAGGING',\n dropping: null,\n draggingOver: draggingOver,\n combineWith: combineWith,\n mode: mode,\n offset: offset,\n dimension: dimension,\n forceShouldAnimate: forceShouldAnimate,\n snapshot: getMemoizedSnapshot(mode, isClone, draggingOver, combineWith, null)\n }\n };\n });\n\n var selector = function selector(state, ownProps) {\n if (state.isDragging) {\n if (state.critical.draggable.id !== ownProps.draggableId) {\n return null;\n }\n\n var offset = state.current.client.offset;\n var dimension = state.dimensions.draggables[ownProps.draggableId];\n var draggingOver = whatIsDraggedOver(state.impact);\n var combineWith = getCombineWithFromImpact(state.impact);\n var forceShouldAnimate = state.forceShouldAnimate;\n return getMemoizedProps(memoizedOffset(offset.x, offset.y), state.movementMode, dimension, ownProps.isClone, draggingOver, combineWith, forceShouldAnimate);\n }\n\n if (state.phase === 'DROP_ANIMATING') {\n var completed = state.completed;\n\n if (completed.result.draggableId !== ownProps.draggableId) {\n return null;\n }\n\n var isClone = ownProps.isClone;\n var _dimension = state.dimensions.draggables[ownProps.draggableId];\n var result = completed.result;\n var mode = result.mode;\n\n var _draggingOver = whatIsDraggedOverFromResult(result);\n\n var _combineWith = getCombineWithFromResult(result);\n\n var duration = state.dropDuration;\n var dropping = {\n duration: duration,\n curve: curves.drop,\n moveTo: state.newHomeClientOffset,\n opacity: _combineWith ? combine.opacity.drop : null,\n scale: _combineWith ? combine.scale.drop : null\n };\n return {\n mapped: {\n type: 'DRAGGING',\n offset: state.newHomeClientOffset,\n dimension: _dimension,\n dropping: dropping,\n draggingOver: _draggingOver,\n combineWith: _combineWith,\n mode: mode,\n forceShouldAnimate: null,\n snapshot: getMemoizedSnapshot(mode, isClone, _draggingOver, _combineWith, dropping)\n }\n };\n }\n\n return null;\n };\n\n return selector;\n}\n\nfunction getSecondarySnapshot(combineTargetFor) {\n return {\n isDragging: false,\n isDropAnimating: false,\n isClone: false,\n dropAnimation: null,\n mode: null,\n draggingOver: null,\n combineTargetFor: combineTargetFor,\n combineWith: null\n };\n}\n\nvar atRest = {\n mapped: {\n type: 'SECONDARY',\n offset: origin,\n combineTargetFor: null,\n shouldAnimateDisplacement: true,\n snapshot: getSecondarySnapshot(null)\n }\n};\n\nfunction getSecondarySelector() {\n var memoizedOffset = memoizeOne(function (x, y) {\n return {\n x: x,\n y: y\n };\n });\n var getMemoizedSnapshot = memoizeOne(getSecondarySnapshot);\n var getMemoizedProps = memoizeOne(function (offset, combineTargetFor, shouldAnimateDisplacement) {\n if (combineTargetFor === void 0) {\n combineTargetFor = null;\n }\n\n return {\n mapped: {\n type: 'SECONDARY',\n offset: offset,\n combineTargetFor: combineTargetFor,\n shouldAnimateDisplacement: shouldAnimateDisplacement,\n snapshot: getMemoizedSnapshot(combineTargetFor)\n }\n };\n });\n\n var getFallback = function getFallback(combineTargetFor) {\n return combineTargetFor ? getMemoizedProps(origin, combineTargetFor, true) : null;\n };\n\n var getProps = function getProps(ownId, draggingId, impact, afterCritical) {\n var visualDisplacement = impact.displaced.visible[ownId];\n var isAfterCriticalInVirtualList = Boolean(afterCritical.inVirtualList && afterCritical.effected[ownId]);\n var combine = tryGetCombine(impact);\n var combineTargetFor = combine && combine.draggableId === ownId ? draggingId : null;\n\n if (!visualDisplacement) {\n if (!isAfterCriticalInVirtualList) {\n return getFallback(combineTargetFor);\n }\n\n if (impact.displaced.invisible[ownId]) {\n return null;\n }\n\n var change = negate(afterCritical.displacedBy.point);\n\n var _offset = memoizedOffset(change.x, change.y);\n\n return getMemoizedProps(_offset, combineTargetFor, true);\n }\n\n if (isAfterCriticalInVirtualList) {\n return getFallback(combineTargetFor);\n }\n\n var displaceBy = impact.displacedBy.point;\n var offset = memoizedOffset(displaceBy.x, displaceBy.y);\n return getMemoizedProps(offset, combineTargetFor, visualDisplacement.shouldAnimate);\n };\n\n var selector = function selector(state, ownProps) {\n if (state.isDragging) {\n if (state.critical.draggable.id === ownProps.draggableId) {\n return null;\n }\n\n return getProps(ownProps.draggableId, state.critical.draggable.id, state.impact, state.afterCritical);\n }\n\n if (state.phase === 'DROP_ANIMATING') {\n var completed = state.completed;\n\n if (completed.result.draggableId === ownProps.draggableId) {\n return null;\n }\n\n return getProps(ownProps.draggableId, completed.result.draggableId, completed.impact, completed.afterCritical);\n }\n\n return null;\n };\n\n return selector;\n}\n\nvar makeMapStateToProps = function makeMapStateToProps() {\n var draggingSelector = getDraggableSelector();\n var secondarySelector = getSecondarySelector();\n\n var selector = function selector(state, ownProps) {\n return draggingSelector(state, ownProps) || secondarySelector(state, ownProps) || atRest;\n };\n\n return selector;\n};\n\nvar mapDispatchToProps = {\n dropAnimationFinished: dropAnimationFinished\n};\nvar ConnectedDraggable = connect(makeMapStateToProps, mapDispatchToProps, null, {\n context: StoreContext,\n pure: true,\n areStatePropsEqual: isStrictEqual\n})(Draggable);\n\nfunction PrivateDraggable(props) {\n var droppableContext = useRequiredContext(DroppableContext);\n var isUsingCloneFor = droppableContext.isUsingCloneFor;\n\n if (isUsingCloneFor === props.draggableId && !props.isClone) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(ConnectedDraggable, props);\n}\n\nfunction PublicDraggable(props) {\n var isEnabled = typeof props.isDragDisabled === 'boolean' ? !props.isDragDisabled : true;\n var canDragInteractiveElements = Boolean(props.disableInteractiveElementBlocking);\n var shouldRespectForcePress = Boolean(props.shouldRespectForcePress);\n return /*#__PURE__*/React.createElement(PrivateDraggable, _extends({}, props, {\n isClone: false,\n isEnabled: isEnabled,\n canDragInteractiveElements: canDragInteractiveElements,\n shouldRespectForcePress: shouldRespectForcePress\n }));\n}\n\nfunction Droppable(props) {\n var appContext = useContext(AppContext);\n !appContext ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Could not find app context') : invariant(false) : void 0;\n var contextId = appContext.contextId,\n isMovementAllowed = appContext.isMovementAllowed;\n var droppableRef = useRef(null);\n var placeholderRef = useRef(null);\n var children = props.children,\n droppableId = props.droppableId,\n type = props.type,\n mode = props.mode,\n direction = props.direction,\n ignoreContainerClipping = props.ignoreContainerClipping,\n isDropDisabled = props.isDropDisabled,\n isCombineEnabled = props.isCombineEnabled,\n snapshot = props.snapshot,\n useClone = props.useClone,\n updateViewportMaxScroll = props.updateViewportMaxScroll,\n getContainerForClone = props.getContainerForClone;\n var getDroppableRef = useCallback(function () {\n return droppableRef.current;\n }, []);\n var setDroppableRef = useCallback(function (value) {\n droppableRef.current = value;\n }, []);\n var getPlaceholderRef = useCallback(function () {\n return placeholderRef.current;\n }, []);\n var setPlaceholderRef = useCallback(function (value) {\n placeholderRef.current = value;\n }, []);\n useValidation({\n props: props,\n getDroppableRef: getDroppableRef,\n getPlaceholderRef: getPlaceholderRef\n });\n var onPlaceholderTransitionEnd = useCallback(function () {\n if (isMovementAllowed()) {\n updateViewportMaxScroll({\n maxScroll: getMaxWindowScroll()\n });\n }\n }, [isMovementAllowed, updateViewportMaxScroll]);\n useDroppablePublisher({\n droppableId: droppableId,\n type: type,\n mode: mode,\n direction: direction,\n isDropDisabled: isDropDisabled,\n isCombineEnabled: isCombineEnabled,\n ignoreContainerClipping: ignoreContainerClipping,\n getDroppableRef: getDroppableRef\n });\n var placeholder = /*#__PURE__*/React.createElement(AnimateInOut, {\n on: props.placeholder,\n shouldAnimate: props.shouldAnimatePlaceholder\n }, function (_ref) {\n var onClose = _ref.onClose,\n data = _ref.data,\n animate = _ref.animate;\n return /*#__PURE__*/React.createElement(Placeholder$1, {\n placeholder: data,\n onClose: onClose,\n innerRef: setPlaceholderRef,\n animate: animate,\n contextId: contextId,\n onTransitionEnd: onPlaceholderTransitionEnd\n });\n });\n var provided = useMemo(function () {\n return {\n innerRef: setDroppableRef,\n placeholder: placeholder,\n droppableProps: {\n 'data-rbd-droppable-id': droppableId,\n 'data-rbd-droppable-context-id': contextId\n }\n };\n }, [contextId, droppableId, placeholder, setDroppableRef]);\n var isUsingCloneFor = useClone ? useClone.dragging.draggableId : null;\n var droppableContext = useMemo(function () {\n return {\n droppableId: droppableId,\n type: type,\n isUsingCloneFor: isUsingCloneFor\n };\n }, [droppableId, isUsingCloneFor, type]);\n\n function getClone() {\n if (!useClone) {\n return null;\n }\n\n var dragging = useClone.dragging,\n render = useClone.render;\n var node = /*#__PURE__*/React.createElement(PrivateDraggable, {\n draggableId: dragging.draggableId,\n index: dragging.source.index,\n isClone: true,\n isEnabled: true,\n shouldRespectForcePress: false,\n canDragInteractiveElements: true\n }, function (draggableProvided, draggableSnapshot) {\n return render(draggableProvided, draggableSnapshot, dragging);\n });\n return /*#__PURE__*/ReactDOM.createPortal(node, getContainerForClone());\n }\n\n return /*#__PURE__*/React.createElement(DroppableContext.Provider, {\n value: droppableContext\n }, children(provided, snapshot), getClone());\n}\n\nvar isMatchingType = function isMatchingType(type, critical) {\n return type === critical.droppable.type;\n};\n\nvar getDraggable = function getDraggable(critical, dimensions) {\n return dimensions.draggables[critical.draggable.id];\n};\n\nvar makeMapStateToProps$1 = function makeMapStateToProps() {\n var idleWithAnimation = {\n placeholder: null,\n shouldAnimatePlaceholder: true,\n snapshot: {\n isDraggingOver: false,\n draggingOverWith: null,\n draggingFromThisWith: null,\n isUsingPlaceholder: false\n },\n useClone: null\n };\n\n var idleWithoutAnimation = _extends({}, idleWithAnimation, {\n shouldAnimatePlaceholder: false\n });\n\n var getDraggableRubric = memoizeOne(function (descriptor) {\n return {\n draggableId: descriptor.id,\n type: descriptor.type,\n source: {\n index: descriptor.index,\n droppableId: descriptor.droppableId\n }\n };\n });\n var getMapProps = memoizeOne(function (id, isEnabled, isDraggingOverForConsumer, isDraggingOverForImpact, dragging, renderClone) {\n var draggableId = dragging.descriptor.id;\n var isHome = dragging.descriptor.droppableId === id;\n\n if (isHome) {\n var useClone = renderClone ? {\n render: renderClone,\n dragging: getDraggableRubric(dragging.descriptor)\n } : null;\n var _snapshot = {\n isDraggingOver: isDraggingOverForConsumer,\n draggingOverWith: isDraggingOverForConsumer ? draggableId : null,\n draggingFromThisWith: draggableId,\n isUsingPlaceholder: true\n };\n return {\n placeholder: dragging.placeholder,\n shouldAnimatePlaceholder: false,\n snapshot: _snapshot,\n useClone: useClone\n };\n }\n\n if (!isEnabled) {\n return idleWithoutAnimation;\n }\n\n if (!isDraggingOverForImpact) {\n return idleWithAnimation;\n }\n\n var snapshot = {\n isDraggingOver: isDraggingOverForConsumer,\n draggingOverWith: draggableId,\n draggingFromThisWith: null,\n isUsingPlaceholder: true\n };\n return {\n placeholder: dragging.placeholder,\n shouldAnimatePlaceholder: true,\n snapshot: snapshot,\n useClone: null\n };\n });\n\n var selector = function selector(state, ownProps) {\n var id = ownProps.droppableId;\n var type = ownProps.type;\n var isEnabled = !ownProps.isDropDisabled;\n var renderClone = ownProps.renderClone;\n\n if (state.isDragging) {\n var critical = state.critical;\n\n if (!isMatchingType(type, critical)) {\n return idleWithoutAnimation;\n }\n\n var dragging = getDraggable(critical, state.dimensions);\n var isDraggingOver = whatIsDraggedOver(state.impact) === id;\n return getMapProps(id, isEnabled, isDraggingOver, isDraggingOver, dragging, renderClone);\n }\n\n if (state.phase === 'DROP_ANIMATING') {\n var completed = state.completed;\n\n if (!isMatchingType(type, completed.critical)) {\n return idleWithoutAnimation;\n }\n\n var _dragging = getDraggable(completed.critical, state.dimensions);\n\n return getMapProps(id, isEnabled, whatIsDraggedOverFromResult(completed.result) === id, whatIsDraggedOver(completed.impact) === id, _dragging, renderClone);\n }\n\n if (state.phase === 'IDLE' && state.completed && !state.shouldFlush) {\n var _completed = state.completed;\n\n if (!isMatchingType(type, _completed.critical)) {\n return idleWithoutAnimation;\n }\n\n var wasOver = whatIsDraggedOver(_completed.impact) === id;\n var wasCombining = Boolean(_completed.impact.at && _completed.impact.at.type === 'COMBINE');\n var isHome = _completed.critical.droppable.id === id;\n\n if (wasOver) {\n return wasCombining ? idleWithAnimation : idleWithoutAnimation;\n }\n\n if (isHome) {\n return idleWithAnimation;\n }\n\n return idleWithoutAnimation;\n }\n\n return idleWithoutAnimation;\n };\n\n return selector;\n};\n\nvar mapDispatchToProps$1 = {\n updateViewportMaxScroll: updateViewportMaxScroll\n};\n\nfunction getBody() {\n !document.body ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'document.body is not ready') : invariant(false) : void 0;\n return document.body;\n}\n\nvar defaultProps = {\n mode: 'standard',\n type: 'DEFAULT',\n direction: 'vertical',\n isDropDisabled: false,\n isCombineEnabled: false,\n ignoreContainerClipping: false,\n renderClone: null,\n getContainerForClone: getBody\n};\nvar ConnectedDroppable = connect(makeMapStateToProps$1, mapDispatchToProps$1, null, {\n context: StoreContext,\n pure: true,\n areStatePropsEqual: isStrictEqual\n})(Droppable);\nConnectedDroppable.defaultProps = defaultProps;\nexport { DragDropContext, PublicDraggable as Draggable, ConnectedDroppable as Droppable, resetServerContext };","var isProduction = process.env.NODE_ENV === 'production';\n\nfunction warning(condition, message) {\n if (!isProduction) {\n if (condition) {\n return;\n }\n\n var text = \"Warning: \" + message;\n\n if (typeof console !== 'undefined') {\n console.warn(text);\n }\n\n try {\n throw Error(text);\n } catch (x) {}\n }\n}\n\nexport default warning;","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar defineBuiltIn = require('../internals/define-built-in');\nvar anObject = require('../internals/an-object');\nvar $toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar n$ToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var pattern = $toString(R.source);\n var flags = $toString(getRegExpFlags(R));\n return '/' + pattern + '/' + flags;\n }, { unsafe: true });\n}\n","function _typeof2(obj) { \"@babel/helpers - typeof\"; return _typeof2 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof2(obj); }\n\n/*! @license DOMPurify 2.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.5/LICENSE */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof2(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.DOMPurify = factory());\n})(this, function () {\n 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n }\n\n function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return _construct(Func, _toConsumableArray(args));\n };\n }\n\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringToString = unapply(String.prototype.toString);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n var regExpTest = unapply(RegExp.prototype.test);\n var typeErrorCreate = unconstruct(TypeError);\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n /* Add properties to a lookup table */\n\n\n function addToSet(set, array, transformCaseFunc) {\n transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase;\n\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n\n while (l--) {\n var element = array[l];\n\n if (typeof element === 'string') {\n var lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n /* Shallow clone an object */\n\n\n function clone(object) {\n var newObject = create(null);\n var property;\n\n for (property in object) {\n if (apply(hasOwnProperty, object, [property]) === true) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n\n\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n var html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\n var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n\n var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n var mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n var text = freeze(['#text']);\n var html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n var mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n var MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n var ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n var TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n var DOCTYPE_NAME = seal(/^html$/i);\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n\n\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html) {\n return html;\n },\n createScriptURL: function createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n\n DOMPurify.version = '2.4.5';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n HTMLFormElement = window.HTMLFormElement,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n var ElementPrototype = Element.prototype;\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n\n var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment,\n getElementsByTagName = _document.getElementsByTagName;\n var importNode = originalDocument.importNode;\n var documentMode = {};\n\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n ERB_EXPR$1 = ERB_EXPR,\n TMPLIT_EXPR$1 = TMPLIT_EXPR,\n DATA_ATTR$1 = DATA_ATTR,\n ARIA_ATTR$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));\n /* Allowed attribute names */\n\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n var FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n var FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n var ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n var ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n\n var ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n var SAFE_FOR_TEMPLATES = false;\n /* Decide if document with ... should be returned */\n\n var WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n var SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n var FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n var RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n var RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n var RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n\n var SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n\n var SANITIZE_NAMED_PROPS = false;\n var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n\n var KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n var IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n var USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n var FORBID_CONTENTS = null;\n var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n var NAMESPACE = HTML_NAMESPACE;\n var IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n\n var ALLOWED_NAMESPACES = null;\n var DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n /* Parsing of strict XHTML documents */\n\n var PARSER_MEDIA_TYPE;\n var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n var transformCaseFunc;\n /* Keep a reference to config to pass to hooks */\n\n var CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n var isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n\n if (!cfg || _typeof(cfg) !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));\n ALLOWED_ATTR = [];\n\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n var ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n var ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via