{"version":3,"file":"js/application-ac745038257e6b246ae4.js","sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/channels sync _channel\\.js$","webpack:///./app/javascript/channels/index.js","webpack:///./app/javascript/packs/accordion.js","webpack:///./app/javascript/packs/application.js","webpack:///./app/javascript/packs/checkout.js","webpack:///./app/javascript/packs/cookiebanner.js","webpack:///./app/javascript/packs/icons.js","webpack:///./app/javascript/packs/navigation.js","webpack:///./app/javascript/packs/nouislider.js","webpack:///./app/javascript/packs/product_counter.js","webpack:///./app/javascript/packs/product_to_cart.js","webpack:///./app/javascript/packs/search.js","webpack:///./app/javascript/packs/shopping_cart.js","webpack:///./app/javascript/packs/shopping_cart_modal.js","webpack:///./app/javascript/packs/shopping_cart_overview.js","webpack:///./app/javascript/packs/utils.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/@lit/reactive-element/css-tag.js","webpack:///./node_modules/@lit/reactive-element/reactive-element.js","webpack:///./node_modules/@rails/activestorage/app/assets/javascripts/activestorage.js","webpack:///./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js","webpack:///./node_modules/nouislider/dist/nouislider.css","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/lit-element/lit-element.js","webpack:///./node_modules/lit-html/lit-html.js","webpack:///./node_modules/lit/index.js","webpack:///./node_modules/nouislider/dist/nouislider.css?5bc4","webpack:///./node_modules/nouislider/dist/nouislider.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack:///(webpack)/buildin/module.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/javascript/packs/application.js\");\n","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = \"./app/javascript/channels sync recursive _channel\\\\.js$\";","// Load all the channels within this directory and all subdirectories.\n// Channel files must be named *_channel.js.\n\nconst channels = require.context('.', true, /_channel\\.js$/)\nchannels.keys().forEach(channels)\n","class AccordionToggle {\n constructor(target, id, notify) {\n this.container = target;\n this.header = target.querySelector('[data-accordion=\"header\"]');\n this.body = target.querySelector('[data-accordion=\"body\"]');\n this.inner = target.querySelector('[data-accordion=\"body\"] > *:first-child');\n this.id = id;\n this.open = false;\n this.header.addEventListener(\"click\", () => notify(this.open ? -1 : this.id))\n }\n\n animate(height) {\n this.body.style.height = `${height}px`\n }\n\n toggle(activeId) {\n if (this.id === activeId) {\n if (!this.active) {\n this.container.classList.add(\"open\")\n }\n this.open = true;\n this.animate(this.inner.offsetHeight)\n } else {\n if (this.open) {\n this.container.classList.add(\"closing\")\n }\n this.container.classList.remove(\"open\")\n\n setTimeout(() => {\n this.container.classList.remove(\"closing\")\n }, \"400\")\n this.open = false;\n this.animate(0)\n }\n }\n}\n\nclass Accordion {\n constructor(target) {\n this.target = target;\n this.active = null;\n this.containers = [...target.querySelectorAll('[data-accordion=\"container\"]')].map(((elm, i) => {\n return new AccordionToggle(elm, i, (id) => this.notify(id))\n }));\n }\n\n notify(id) {\n this.containers.forEach(c => {\n c.toggle(id)\n })\n }\n}\n\nwindow.addEventListener(\"DOMContentLoaded\", function () {\n document.querySelectorAll('[data-accordion=\"list\"]').forEach((elm) => {\n new Accordion(elm)\n });\n});\n","import Rails from \"@rails/ujs\"\n// import Turbolinks from \"turbolinks\"\nimport * as ActiveStorage from \"@rails/activestorage\"\nimport \"channels\"\nimport { initNavigation } from \"./navigation\";\nimport './shopping_cart.js';\nimport \"./checkout.js\"\nimport \"./accordion.js\"\nimport { initSearchForm } from \"./search\";\nimport { initNoUiSlider } from \"./nouislider\"\nimport { initCookieBanner } from \"./cookiebanner\"\nimport productToCart from \"./product_to_cart\"\n\nRails.start()\n// Turbolinks.start()\nActiveStorage.start()\n\ninitNavigation();\ninitSearchForm();\ninitNoUiSlider();\ninitCookieBanner();\n","import { useFetchJson, handleError } from \"./utils\";\n\nclass PaymentMethodHandler {\n constructor(target) {\n this.container = target;\n this.toggles = target.querySelectorAll(\"[data-payment]\");\n this.tabItems = target.querySelectorAll(\"[data-method]\");\n this.targetUrl = target.dataset.targetUrl;\n\n this.toggles.forEach((elm) => {\n elm.addEventListener(\"click\", this.handleClick);\n });\n }\n\n handleClick = async (event) => {\n useFetchJson(this.targetUrl, {\n order: {\n payment_method: event.currentTarget.dataset.payment,\n },\n })\n .then((data) => {\n // TODO: Return entire cart and pass to overview component\n document.querySelectorAll(\"cart-overview\").forEach((elm) => {\n elm.loadData();\n });\n document\n .querySelectorAll(\"[data-method], [data-payment]\")\n .forEach((elm) => {\n if (\n elm.dataset.method === data.payment_method ||\n elm.dataset.payment === data.payment_method\n ) {\n elm.classList.add(\"active\");\n } else {\n elm.classList.remove(\"active\");\n }\n });\n })\n .catch((e) => {\n handleError({ message: e });\n });\n };\n}\n\nconst initPaymentMethodToggle = () => {\n const target = document.getElementById(\"payment-method-select\");\n if (target) {\n new PaymentMethodHandler(target);\n }\n};\n\nconst termsSelector = \"terms_and_conditions-paypal\";\n\nconst initPayPal = () => {\n if (document.querySelector(\"#paypal-button-container\")) {\n paypal\n .Buttons({\n createOrder: async function (data, actions) {\n const response = await useFetchJson(\n \"/checkout/paypal/create\",\n {},\n \"POST\"\n )\n .then((data) => {\n return data;\n })\n .catch((e) => {\n handleError({ message: e });\n });\n return response.table.id;\n },\n onApprove: async function (data, actions) {\n return actions.order.capture().then((details) => {\n return useFetchJson(\"/checkout/paypal/submit\", {\n paypal: {\n data,\n details,\n },\n terms_and_conditions:\n document.getElementById(termsSelector).checked,\n })\n .then((res) => {\n window.location.replace(res.redirect_path);\n })\n .catch((e) => {\n console.error(e);\n });\n });\n },\n onInit: function (data, actions) {\n actions.disable();\n document\n .getElementById(termsSelector)\n .addEventListener(\"change\", function (e) {\n if (e.target.checked) {\n actions.enable();\n } else {\n actions.disable();\n }\n });\n },\n onClick: function () {\n if (!document.getElementById(termsSelector).checked) {\n document\n .getElementById(\"paypal-terms-error\")\n .classList.remove(\"hidden\");\n }\n },\n onError: function (err) {\n // console.error(err)\n },\n })\n .render(\"#paypal-button-container\");\n }\n};\n\n// Addresses toggle\nconst toggleInputDisabled = (nodes, disabled) => {\n for (let i = 0; i < nodes.length; i++) {\n nodes[i].disabled = disabled;\n }\n};\n\nexport const initAddressToggle = () => {\n const target = document.getElementById(\"order_identical_billing_address\");\n if (target) {\n target.addEventListener(\"change\", (event) => {\n const nodes = document.querySelectorAll(\n '[name*=\"[billing_address_attributes]\"'\n );\n if (event.currentTarget.checked) {\n toggleInputDisabled(nodes, true);\n } else {\n toggleInputDisabled(nodes, false);\n }\n });\n }\n};\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n initAddressToggle();\n initPaymentMethodToggle();\n initPayPal();\n});\n","\nimport { html, LitElement } from \"lit\";\n\nconst cookieName = \"user_cookie_consent\";\nconst tagName = \"cookie-banner\"\nfunction setCookie(cname, cvalue, exdays) {\n const d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n let expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}\n\nfunction deleteCookie(cname) {\n const d = new Date();\n d.setTime(d.getTime() + (24 * 60 * 60 * 1000));\n let expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=;\" + expires + \";path=/\";\n}\n\nfunction getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return false;\n}\n\nfunction acceptCookieConsent() {\n deleteCookie(cookieName);\n setCookie(cookieName, 1, 30);\n}\n\nclass CookieBanner extends LitElement {\n constructor() {\n super();\n this.value = parseInt(this.getAttribute('value'));\n }\n\n createRenderRoot() {\n return this;\n }\n\n acceptHandler() {\n acceptCookieConsent();\n document.querySelectorAll(tagName).forEach(elm => elm.remove())\n }\n\n declineHandler() {\n window.history.back()\n }\n\n render() {\n return html`\n
\n
\n

Wir verwenden Cookies zur Unterstürzung der Benutzerfreundlichkeit und Funktionalität der Website. Wenn Sie auf der Website weitersurfen, stimmen Sie der Cookie-Nutzung zu.

\n
\n
\n Mehr Infos zu unserer Datenschutzerklärung\n
\n
\n \n \n
\n
\n
\n
`;\n }\n}\n\nwindow.customElements.define(tagName, CookieBanner);\n\nexport function initCookieBanner() {\n window.addEventListener(\"DOMContentLoaded\", function () {\n const accepted = getCookie(cookieName);\n if (!accepted) {\n const banner = document.createElement(tagName);\n document.body.appendChild(banner);\n }\n });\n}\n","import { html } from \"lit\";\n\nexport const plusIcon = html`\n\n \n`\n\nexport const minusIcon = html`\n\n \n`\n\nexport const loadingSpinner = html`\n
\n \n \n \n \n \n
`\n\n\n\nexport const cartIcon = (onClick) => html`\n
onClick()}>\n \n Cart\n \n \n \n \n \n
\n`;\n\nexport const closeIcon = (onClick, large = false) => {\n const iconClass = large ? ' large' : '';\n return html`\n \n`;\n}\n\nexport const trashIcon = html`\n\n \n`\n\nexport const moreBtton = (url, title, disabled = false, classname = \"more\") => {\n const buttoClass = `btn has-icon ${classname}`;\n const inner = html`\n \n \n \n \n \n ${title}`\n if (disabled) {\n return html`\n \n ${inner}\n `;\n } else {\n return html`\n \n ${inner}\n `;\n }\n};\n","class Navigation {\n constructor(target) {\n this.active = false;\n this.target = document.getElementById(target);\n }\n\n handleChange(active) {\n this.active = active;\n this.target.classList.toggle(\"active\");\n const body = document.querySelector(\"body\");\n if (active) {\n body.dataset.noscroll = \"true\"\n } else {\n delete body.dataset.noscroll\n }\n }\n}\n\nexport const initNavigation = () => {\n // turbolinks:load\n document.addEventListener('DOMContentLoaded', () => {\n const trigger = document.getElementById(\"toggle-menu\");\n const nav = new Navigation(\"toggled-menu\");\n trigger.addEventListener(\"change\", (event) => {\n nav.handleChange(event.target.checked);\n });\n });\n};\n","import * as noUiSlider from \"nouislider\";\nimport styles from \"../../../node_modules/nouislider/dist/nouislider.css\"\n\nconst equalObjects = (obj1, obj2) => {\n let changed = true;\n for (const [key, value] of Object.entries(obj1)) {\n if (obj2[key] !== value) {\n changed = false;\n };\n }\n return changed\n}\n\nconst getFormValues = (form, targets) => {\n let values = {}\n if (form) {\n targets.forEach(target => {\n const field = form.querySelector(`[name=\"${target}\"]`);\n if (field) {\n values[target] = field.value;\n }\n })\n }\n return values\n}\n\nexport const initNoUiSlider = () => {\n document.addEventListener(\"DOMContentLoaded\", function () {\n const observedFields = [\"product_category_id\", \"product_brand_id\"]\n document.querySelectorAll(\".range-slider\").forEach(slider => {\n const { min, max, name, selectedMin, selectedMax } = slider.dataset;\n const originalValues = getFormValues(slider.closest(\"form\"), observedFields)\n const minInput = document.createElement('input');\n const maxInput = document.createElement('input');\n [{ e: minInput, key: \"min\" }, { e: maxInput, key: \"max\" }].forEach(({ e, key }) => {\n e.style.display = \"none\";\n e.setAttribute(\"name\", `${name}_${key}`)\n slider.appendChild(e)\n })\n noUiSlider.create(slider, {\n start: [0, parseFloat(max)],\n handleAttributes: [\n { 'aria-label': 'Preis von' },\n { 'aria-label': 'Preis bis' },\n ],\n connect: true,\n range: {\n min: parseFloat(min || 0.0),\n max: parseFloat(max || 0.0)\n },\n tooltips: true,\n });\n slider.noUiSlider.set([selectedMin || null, selectedMax || null])\n let form = slider.closest(\"form\");\n\n if (form) {\n form.addEventListener(\"submit\", (e) => {\n if (equalObjects(originalValues, getFormValues(form, observedFields))) {\n const sliderValues = slider.noUiSlider.get();\n minInput.value = sliderValues[0]\n maxInput.value = sliderValues[1]\n } else {\n minInput.remove()\n maxInput.remove()\n }\n })\n }\n })\n })\n};\n","import { html, LitElement } from \"lit\";\nimport { minusIcon, plusIcon } from \"./icons.js\";\nimport { useFetchJson, formattedAmount } from \"./utils\";\n\nexport class ProductCounter extends LitElement {\n static get properties() {\n return {\n value: Number,\n min: Number,\n max: Number,\n item: Number,\n loading: Boolean,\n total: Number,\n target: String,\n };\n }\n\n constructor() {\n super();\n this.item = this.getAttribute(\"item\");\n this.value = parseInt(this.getAttribute(\"value\"));\n this.min = parseInt(this.getAttribute(\"min\")) || 0;\n this.max = parseInt(this.getAttribute(\"max\"));\n this.error = false;\n this.loading = false;\n }\n\n createRenderRoot() {\n return this;\n }\n\n async toggleCount(change) {\n const count = parseInt(this.value) + parseInt(change);\n if (this.max && this.max < count) {\n return;\n } else {\n this.loading = true;\n const response = await useFetchJson(\n `/api/order_items/${this.item}`,\n { amount: count },\n \"PUT\"\n );\n const { message, item } = response.update;\n const dispatchEvent = new CustomEvent(\"update\", {\n detail: {\n id: this.item,\n response: response,\n },\n });\n this.dispatchEvent(dispatchEvent);\n this.error = message;\n this.value = item ? item.amount : 0;\n this.loading = false;\n }\n }\n\n render() {\n const plusDiabled = this.loading || (this.max && this.max <= this.value);\n return html`
\n
\n this.toggleCount(-1)}\n >\n ${minusIcon} \n
\n \n (plusDiabled ? null : this.toggleCount(1))}\n >\n ${plusIcon} \n
\n
\n ${this.error ? html`
${this.error}
` : null}\n
`;\n }\n}\n\nwindow.customElements.define(\"product-counter\", ProductCounter);\n","import { useFetchJson } from \"./utils\";\n\nclass ProductToCart {\n constructor(target) {\n this.target = target;\n this.options = target.querySelector(\"[name='product_variation']\");\n this.optionId = this.options ? this.options.value : false;\n this.total = target.querySelector(\"[data-total]\");\n this.productId = this.target.dataset.id;\n this.init();\n }\n\n async addToCart() {\n let params = {\n product_id: this.productId,\n };\n if (this.optionId) {\n params.product_variation_id = this.optionId;\n }\n const response = await useFetchJson(`/api/order_items/`, params, \"POST\");\n const { update } = response;\n console.log(update);\n if (update.event === \"updated\") {\n document.querySelectorAll(\"shopping-cart-modal\").forEach((elm) => {\n elm.setVisibility(true);\n elm.querySelector(\"cart-overview\").updateValues(response);\n });\n } else {\n }\n }\n\n init() {\n if (this.options) {\n this.options.addEventListener(\"change\", (e) => {\n const { selectedOptions, value } = e.currentTarget;\n this.optionId = value;\n const price = selectedOptions.item(0).dataset.price;\n this.total.innerHTML = price;\n });\n }\n\n this.target.addEventListener(\"submit\", (e) => {\n e.preventDefault();\n this.addToCart();\n });\n }\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n document.querySelectorAll(\".product-cart-form\").forEach((elm) => {\n new ProductToCart(elm);\n });\n});\n","import { html, LitElement } from \"lit\";\nimport { useFetchJson } from \"./utils\";\n\nconst resultRowItem = (title, url) => {\n return html`${title}`;\n};\n\nconst resultRow = ({ items, title }) => {\n return items.length\n ? html`
\n

${title}

\n
\n ${items.map(({ title, url }) => resultRowItem(title, url))}\n
`\n : null;\n};\n\nconst searchResults = ({ no_results_text, items }) => {\n const content =\n items.length <= 0\n ? html`

${no_results_text}

`\n : html`\n
\n ${items.map(resultRow)}\n
\n `;\n return content;\n};\n\nexport class SearchForm extends LitElement {\n static get properties() {\n return {\n active: Boolean,\n data: Object,\n placeholder: String,\n toggler: String,\n };\n }\n\n constructor() {\n super();\n this.active = false;\n this.apiUrl = \"/api/search\";\n this.timeoutAmount = 300;\n this.timeoutID = undefined;\n this.data = undefined;\n this.placeholder = this.getAttribute('placeholder');\n this.toggler = this.getAttribute('toggler');\n this.error = undefined;\n this.listening = false;\n this.toggler = undefined;\n }\n\n createRenderRoot() {\n return this;\n }\n\n setVisibility(state) {\n this.active = state;\n if (state) {\n [...document.getElementsByTagName('shopping-cart-modal')].forEach((elm) => {\n elm.setVisibility(false)\n })\n }\n }\n\n toggleVisibility() {\n this.setVisibility(!this.active);\n }\n\n async updateSearchValue(e) {\n if (typeof this.timeoutID === \"number\") {\n clearTimeout(this.timeoutID);\n }\n this.timeoutID = setTimeout(\n async function () {\n if (e.target.value !== \"\") {\n const response = await useFetchJson(\n this.apiUrl,\n {\n search: e.target.value,\n },\n \"POST\"\n );\n this.data = response.data;\n } else {\n this.data = undefined;\n }\n }.bind(this),\n this.timeoutAmount\n );\n }\n\n listen() {\n const elm = document.getElementById(this.toggler);\n if (elm) {\n elm.addEventListener(\"click\", () => this.toggleVisibility())\n }\n this.listening = true;\n }\n\n render() {\n if (!this.listening && this.toggler) {\n this.listen();\n }\n return html`\n \n `;\n }\n}\n\nexport const initSearchForm = () => {\n window.customElements.define(\"search-form\", SearchForm);\n};\n","\nimport './shopping_cart_modal.js';\nimport './shopping_cart_overview';\nimport './product_counter.js';\n","import { html, LitElement } from \"lit\";\nimport './product_counter.js';\nimport { cartIcon, closeIcon, moreBtton } from \"./icons.js\"\n\nclass ShoppingCartModal extends LitElement {\n static get properties() {\n return {\n active: Boolean,\n };\n }\n\n constructor() {\n super();\n this.active = false;\n }\n\n createRenderRoot() {\n return this;\n }\n\n setVisibility(state) {\n this.active = state\n if (state) {\n [...document.getElementsByTagName('search-form')].forEach((elm) => {\n elm.setVisibility(false)\n })\n }\n }\n\n toggleVisibility() {\n this.setVisibility(!this.active)\n }\n\n render() {\n const modal =\n html`\n
\n this.toggleVisibility()}\n >\n \n
\n
\n
\n ${closeIcon(() => this.active = false, true)}\n \n
\n
\n
`;\n\n return html`${cartIcon(() => this.toggleVisibility())} ${modal}`;\n }\n}\n\nwindow.customElements.define(\"shopping-cart-modal\", ShoppingCartModal);\n","import { html, LitElement } from \"lit\";\nimport {\n useFetchJson,\n formattedAmount,\n formattedDiscountValue,\n formattedDiscountRate,\n shoppingCartItemStock,\n} from \"./utils\";\nimport { trashIcon } from \"./icons\";\nimport \"./product_counter.js\";\nimport { moreBtton, loadingSpinner } from \"./icons.js\";\n\nconst itemTitle = (item) => html`\n
\n ${item.product.title} (${item.amount}x)\n ${item.product_variation\n ? html`${item.product_variation.title}`\n : null}\n
`;\n\nconst interactiveCartItemRow = (\n item,\n currency,\n updateCart,\n removeItem,\n isModal\n) => {\n const classnames = \"stack-sm inset vertical border-bottom\";\n if (item.fadeOut) {\n return html`
${item.message}
`;\n } else {\n const stock = shoppingCartItemStock(item);\n return html`\n
\n ${itemTitle(item)}\n
\n
\n
removeItem()}>\n ${trashIcon} \n ${isModal ? null : html`Entfernen`}\n
\n \n
\n
${formattedAmount(item.total, currency)}
\n
\n
\n `;\n }\n};\n\nconst staticCartItemRow = (item, currency) => {\n return html`\n
\n
${itemTitle(item)}
\n
${formattedAmount(item.total, currency)}
\n \n `;\n};\n\nconst cartDiscounts = (discounts, currency) => {\n return html`\n ${discounts.items.map((discount) => {\n return html`\n
\n
${discount.label} (${formattedDiscountRate(discount.rate)})
\n
\n ${formattedDiscountValue(discount.value, currency)}\n
\n
\n `;\n })}\n `;\n};\n\nclass CartOverview extends LitElement {\n static get properties() {\n return {\n currency: String,\n discounts: Array,\n discounted_total: Number,\n empty: Boolean,\n i18n: Object,\n items: Array,\n loadingId: Number,\n loading: Boolean,\n present: Boolean,\n total: Number,\n vat_amount: Number,\n };\n }\n\n constructor() {\n super();\n this.loadingId = null;\n this.loading = false;\n this.empty = false;\n this.discounts = false;\n this.items = [];\n this.active = false;\n this.modal = Boolean(this.getAttribute(\"modal\"));\n this.payment = Boolean(this.getAttribute(\"payment\"));\n this.layout = this.defineLayout();\n this.loadData();\n }\n\n createRenderRoot() {\n return this;\n }\n\n defineLayout() {\n if (this.modal) {\n return \"modal\";\n } else if (this.payment) {\n return \"payment\";\n } else {\n return \"overview\";\n }\n }\n\n async loadData() {\n this.loading = true;\n const response = await useFetchJson(\"/api/orders\", false, \"GET\");\n this.updateValues(response);\n this.loading = false;\n }\n\n updateValues(response) {\n const { currency, i18n, shopping_cart, present } = response;\n this.present = present;\n this.items = shopping_cart?.items || [];\n this.total = shopping_cart?.total || 0;\n this.shipping_cost = shopping_cart?.shipping_cost || 0;\n this.total_with_shipping = shopping_cart?.total_with_shipping || 0;\n this.discounted_total = shopping_cart?.discounted_total || this.total;\n this.discounts =\n shopping_cart.discounts && shopping_cart.discounts.items.length\n ? shopping_cart.discounts\n : false;\n this.vat_amount = shopping_cart?.vat_amount || 0;\n this.discounted_vat_amount =\n shopping_cart?.discounted_vat_amount || this.vat_amount;\n this.empty = shopping_cart?.empty;\n this.i18n = i18n;\n this.currency = currency;\n const counter = document.getElementById(\"item-count\");\n if (counter) {\n counter.innerHTML = this.items.length;\n }\n }\n\n updateCart(e) {\n const { id, response } = e.detail;\n this.updateValues(response);\n this.requestUpdate();\n }\n\n async removeItem(id) {\n if (this.loadingId) {\n return;\n } else {\n this.loadingId = id;\n const response = await useFetchJson(\n `/api/order_items/${id}`,\n {},\n \"DELETE\"\n );\n this.updateValues(response);\n this.loadingId = null;\n }\n }\n\n renderShippingCost(shipping_cost) {\n return html`\n
\n
\n ${this.i18n.shipping_cost}\n ${formattedAmount(shipping_cost, this.currency)} \n
\n
\n `\n }\n\n renderTotal(total_with_shipping) {\n return html`\n
\n Total\n ${formattedAmount(total_with_shipping, this.currency)}\n
\n \n ${this.i18n.shipping_method_hint}\n \n `;\n }\n\n renderCartTotal(amount, vat_amount) {\n return html`\n
\n
\n ${formattedAmount(amount, this.currency)} \n
\n
\n ${this.i18n.incl_vat} ${formattedAmount(vat_amount, this.currency)}\n
\n
\n `;\n }\n\n cartTable() {\n let itemsHtml;\n if (this.layout === \"payment\") {\n itemsHtml = this.items.map((item) => staticCartItemRow(item, this.currency));\n } else {\n itemsHtml = html`
${this.items.map((item) =>\n interactiveCartItemRow(\n item,\n this.currency,\n this.updateCart,\n () => this.removeItem(item.id),\n this.modal\n )\n )}
`\n }\n return html`\n
\n ${itemsHtml}\n ${this.discounts ? cartDiscounts(this.discounts, this.currency) : null}\n ${this.renderCartTotal(this.discounted_total, this.discounted_vat_amount)}\n
\n `;\n }\n\n renderDiscounts() {\n if (this.discounts) {\n return html`\n \n \n \n ${this.i18n.discounts}\n \n \n
\n `\n } else {\n return null\n }\n }\n\n renderCartContent() {\n if (this.empty || this.items.length === 0) {\n return html`

${this.i18n.empty_msg}

`;\n } else {\n let button = false;\n switch (this.layout) {\n case \"modal\":\n button = moreBtton(\n this.i18n.checkout_path,\n this.i18n.checkout_link_text,\n this.empty,\n \"more\"\n );\n break;\n case \"overview\":\n button = moreBtton(\n this.i18n.addresses_path,\n this.i18n.addresses_link_text,\n this.empty,\n \"border\"\n );\n break;\n }\n\n return html`
\n ${this.cartTable()}\n ${this.renderShippingCost(this.shipping_cost)}\n ${this.renderTotal(this.total_with_shipping)}\n ${button\n ? html`
${button}
`\n : null}\n
`;\n }\n }\n\n render() {\n return this.loading ? loadingSpinner : this.renderCartContent();\n }\n}\n\nwindow.customElements.define(\"cart-overview\", CartOverview);\n","const defaultErrorText =\n \"Ein Fehler ist aufgetreten. Bitte versuchen Sie es später erneut.\";\nconst authToken = document.querySelector(\"meta[name='csrf-token']\").content;\n\nconst createNotification = (message, style) => {\n const div = document.createElement(\"div\");\n div.classList.add(\"alert\", style);\n div.innerHTML = message;\n document.querySelector(\"body\").append(div);\n}\n\nexport function handleError(error) {\n const { message, redirect } = error;\n const text = message || defaultErrorText;\n if (redirect) {\n window.location.href = redirect;\n } else {\n createNotification(text, \"error\")\n }\n}\n\nexport function handleSuccessMessage(message) {\n createNotification(message, \"success\")\n}\n\nexport async function useFetchJson(url = \"\", data = false, method = \"POST\") {\n let request = {\n method,\n mode: \"cors\",\n cache: \"no-cache\",\n credentials: \"same-origin\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n },\n redirect: \"follow\",\n referrerPolicy: \"no-referrer\",\n };\n if (data) {\n request = {\n ...request,\n body: JSON.stringify({\n ...data,\n authenticity_token: authToken,\n }),\n };\n }\n return fetch(url, request)\n .then(async (response) => {\n const data = await response.json();\n if (!response.ok) {\n const message = data.error || data.message || response.statusText || \"Ein Fehler ist aufgetreten.\"\n handleError({ message });\n } else {\n return data;\n }\n })\n .catch((error) => {\n handleError({ message: error });\n });\n}\n\nexport const shoppingCartItemStock = (item) => {\n let stock;\n if (item.product_variation) {\n stock = item.product_variation.stock || item.stock;\n } else {\n stock = item.stock;\n }\n return stock;\n};\n\nexport const formattedAmount = (value, currency) => {\n return `${currency} ${value.toFixed(2)}`;\n};\n\nexport const formattedDiscountValue = (value, currency) => {\n return `- ${formattedAmount(value, currency)}`;\n};\n\nexport const formattedDiscountRate = (rate) => {\n return `-${(rate * 100).toFixed(1)}%`;\n};\n","module.exports = require(\"regenerator-runtime\");\n","function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\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 _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); return Constructor; }\n\n/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && \"adoptedStyleSheets\" in Document.prototype && \"replace\" in CSSStyleSheet.prototype,\n e = Symbol(),\n n = new Map();\n\nvar s = /*#__PURE__*/function () {\n function s(t, n) {\n _classCallCheck(this, s);\n\n if (this._$cssResult$ = !0, n !== e) throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");\n this.cssText = t;\n }\n\n _createClass(s, [{\n key: \"styleSheet\",\n get: function get() {\n var e = n.get(this.cssText);\n return t && void 0 === e && (n.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n return this.cssText;\n }\n }]);\n\n return s;\n}();\n\nvar o = function o(t) {\n return new s(\"string\" == typeof t ? t : t + \"\", e);\n},\n r = function r(t) {\n for (var _len = arguments.length, n = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n n[_key - 1] = arguments[_key];\n }\n\n var o = 1 === t.length ? t[0] : n.reduce(function (e, n, s) {\n return e + function (t) {\n if (!0 === t._$cssResult$) return t.cssText;\n if (\"number\" == typeof t) return t;\n throw Error(\"Value passed to 'css' function must be a 'css' function result: \" + t + \". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\");\n }(n) + t[s + 1];\n }, t[0]);\n return new s(o, e);\n},\n i = function i(e, n) {\n t ? e.adoptedStyleSheets = n.map(function (t) {\n return t instanceof CSSStyleSheet ? t : t.styleSheet;\n }) : n.forEach(function (t) {\n var n = document.createElement(\"style\"),\n s = window.litNonce;\n void 0 !== s && n.setAttribute(\"nonce\", s), n.textContent = t.cssText, e.appendChild(n);\n });\n},\n S = t ? function (t) {\n return t;\n} : function (t) {\n return t instanceof CSSStyleSheet ? function (t) {\n var e = \"\";\n\n var _iterator = _createForOfIteratorHelper(t.cssRules),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _n = _step.value;\n e += _n.cssText;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return o(e);\n }(t) : t;\n};\n\nexport { s as CSSResult, i as adoptStyles, r as css, S as getCompatibleStyle, t as supportsAdoptingStyleSheets, o as unsafeCSS };","function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_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 _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 _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\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 _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); return Constructor; }\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 } }); 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 { getCompatibleStyle as t, adoptStyles as i } from \"./css-tag.js\";\nexport { CSSResult, adoptStyles, css, getCompatibleStyle, supportsAdoptingStyleSheets, unsafeCSS } from \"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nvar s;\n\nvar e = window.trustedTypes,\n r = e ? e.emptyScript : \"\",\n h = window.reactiveElementPolyfillSupport,\n o = {\n toAttribute: function toAttribute(t, i) {\n switch (i) {\n case Boolean:\n t = t ? r : null;\n break;\n\n case Object:\n case Array:\n t = null == t ? t : JSON.stringify(t);\n }\n\n return t;\n },\n fromAttribute: function fromAttribute(t, i) {\n var s = t;\n\n switch (i) {\n case Boolean:\n s = null !== t;\n break;\n\n case Number:\n s = null === t ? null : Number(t);\n break;\n\n case Object:\n case Array:\n try {\n s = JSON.parse(t);\n } catch (t) {\n s = null;\n }\n\n }\n\n return s;\n }\n},\n n = function n(t, i) {\n return i !== t && (i == i || t == t);\n},\n l = {\n attribute: !0,\n type: String,\n converter: o,\n reflect: !1,\n hasChanged: n\n};\n\nvar a = /*#__PURE__*/function (_HTMLElement) {\n _inherits(a, _HTMLElement);\n\n var _super = _createSuper(a);\n\n function a() {\n var _this;\n\n _classCallCheck(this, a);\n\n _this = _super.call(this), _this._$Et = new Map(), _this.isUpdatePending = !1, _this.hasUpdated = !1, _this._$Ei = null, _this.o();\n return _this;\n }\n\n _createClass(a, [{\n key: \"o\",\n value: function o() {\n var _this2 = this;\n\n var t;\n this._$Ep = new Promise(function (t) {\n return _this2.enableUpdating = t;\n }), this._$AL = new Map(), this._$Em(), this.requestUpdate(), null === (t = this.constructor.l) || void 0 === t || t.forEach(function (t) {\n return t(_this2);\n });\n }\n }, {\n key: \"addController\",\n value: function addController(t) {\n var i, s;\n (null !== (i = this._$Eg) && void 0 !== i ? i : this._$Eg = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));\n }\n }, {\n key: \"removeController\",\n value: function removeController(t) {\n var i;\n null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);\n }\n }, {\n key: \"_$Em\",\n value: function _$Em() {\n var _this3 = this;\n\n this.constructor.elementProperties.forEach(function (t, i) {\n _this3.hasOwnProperty(i) && (_this3._$Et.set(i, _this3[i]), delete _this3[i]);\n });\n }\n }, {\n key: \"createRenderRoot\",\n value: function createRenderRoot() {\n var t;\n var s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);\n return i(s, this.constructor.elementStyles), s;\n }\n }, {\n key: \"connectedCallback\",\n value: function connectedCallback() {\n var t;\n void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {\n var i;\n return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);\n });\n }\n }, {\n key: \"enableUpdating\",\n value: function enableUpdating(t) {}\n }, {\n key: \"disconnectedCallback\",\n value: function disconnectedCallback() {\n var t;\n null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {\n var i;\n return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);\n });\n }\n }, {\n key: \"attributeChangedCallback\",\n value: function attributeChangedCallback(t, i, s) {\n this._$AK(t, s);\n }\n }, {\n key: \"_$ES\",\n value: function _$ES(t, i) {\n var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : l;\n var e, r;\n\n var h = this.constructor._$Eh(t, s);\n\n if (void 0 !== h && !0 === s.reflect) {\n var _n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o.toAttribute)(i, s.type);\n\n this._$Ei = t, null == _n ? this.removeAttribute(h) : this.setAttribute(h, _n), this._$Ei = null;\n }\n }\n }, {\n key: \"_$AK\",\n value: function _$AK(t, i) {\n var s, e, r;\n\n var h = this.constructor,\n n = h._$Eu.get(t);\n\n if (void 0 !== n && this._$Ei !== n) {\n var _t = h.getPropertyOptions(n),\n _l = _t.converter,\n _a2 = null !== (r = null !== (e = null === (s = _l) || void 0 === s ? void 0 : s.fromAttribute) && void 0 !== e ? e : \"function\" == typeof _l ? _l : null) && void 0 !== r ? r : o.fromAttribute;\n\n this._$Ei = n, this[n] = _a2(i, _t.type), this._$Ei = null;\n }\n }\n }, {\n key: \"requestUpdate\",\n value: function requestUpdate(t, i, s) {\n var e = !0;\n void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$E_());\n }\n }, {\n key: \"_$E_\",\n value: function () {\n var _$E_2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var t;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.isUpdatePending = !0;\n _context.prev = 1;\n _context.next = 4;\n return this._$Ep;\n\n case 4:\n _context.next = 9;\n break;\n\n case 6:\n _context.prev = 6;\n _context.t0 = _context[\"catch\"](1);\n Promise.reject(_context.t0);\n\n case 9:\n t = this.scheduleUpdate();\n _context.t1 = null != t;\n\n if (!_context.t1) {\n _context.next = 14;\n break;\n }\n\n _context.next = 14;\n return t;\n\n case 14:\n return _context.abrupt(\"return\", !this.isUpdatePending);\n\n case 15:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this, [[1, 6]]);\n }));\n\n function _$E_() {\n return _$E_2.apply(this, arguments);\n }\n\n return _$E_;\n }()\n }, {\n key: \"scheduleUpdate\",\n value: function scheduleUpdate() {\n return this.performUpdate();\n }\n }, {\n key: \"performUpdate\",\n value: function performUpdate() {\n var _this4 = this;\n\n var t;\n if (!this.isUpdatePending) return;\n this.hasUpdated, this._$Et && (this._$Et.forEach(function (t, i) {\n return _this4[i] = t;\n }), this._$Et = void 0);\n var i = !1;\n var s = this._$AL;\n\n try {\n i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {\n var i;\n return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);\n }), this.update(s)) : this._$EU();\n } catch (t) {\n throw i = !1, this._$EU(), t;\n }\n\n i && this._$AE(s);\n }\n }, {\n key: \"willUpdate\",\n value: function willUpdate(t) {}\n }, {\n key: \"_$AE\",\n value: function _$AE(t) {\n var i;\n null === (i = this._$Eg) || void 0 === i || i.forEach(function (t) {\n var i;\n return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);\n }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);\n }\n }, {\n key: \"_$EU\",\n value: function _$EU() {\n this._$AL = new Map(), this.isUpdatePending = !1;\n }\n }, {\n key: \"updateComplete\",\n get: function get() {\n return this.getUpdateComplete();\n }\n }, {\n key: \"getUpdateComplete\",\n value: function getUpdateComplete() {\n return this._$Ep;\n }\n }, {\n key: \"shouldUpdate\",\n value: function shouldUpdate(t) {\n return !0;\n }\n }, {\n key: \"update\",\n value: function update(t) {\n var _this5 = this;\n\n void 0 !== this._$EC && (this._$EC.forEach(function (t, i) {\n return _this5._$ES(i, _this5[i], t);\n }), this._$EC = void 0), this._$EU();\n }\n }, {\n key: \"updated\",\n value: function updated(t) {}\n }, {\n key: \"firstUpdated\",\n value: function firstUpdated(t) {}\n }], [{\n key: \"addInitializer\",\n value: function addInitializer(t) {\n var i;\n null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);\n }\n }, {\n key: \"observedAttributes\",\n get: function get() {\n var _this6 = this;\n\n this.finalize();\n var t = [];\n return this.elementProperties.forEach(function (i, s) {\n var e = _this6._$Eh(s, i);\n\n void 0 !== e && (_this6._$Eu.set(e, s), t.push(e));\n }), t;\n }\n }, {\n key: \"createProperty\",\n value: function createProperty(t) {\n var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : l;\n\n if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {\n var _s = \"symbol\" == _typeof(t) ? Symbol() : \"__\" + t,\n _e = this.getPropertyDescriptor(t, _s, i);\n\n void 0 !== _e && Object.defineProperty(this.prototype, t, _e);\n }\n }\n }, {\n key: \"getPropertyDescriptor\",\n value: function getPropertyDescriptor(t, i, s) {\n return {\n get: function get() {\n return this[i];\n },\n set: function set(e) {\n var r = this[t];\n this[i] = e, this.requestUpdate(t, r, s);\n },\n configurable: !0,\n enumerable: !0\n };\n }\n }, {\n key: \"getPropertyOptions\",\n value: function getPropertyOptions(t) {\n return this.elementProperties.get(t) || l;\n }\n }, {\n key: \"finalize\",\n value: function finalize() {\n if (this.hasOwnProperty(\"finalized\")) return !1;\n this.finalized = !0;\n var t = Object.getPrototypeOf(this);\n\n if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty(\"properties\")) {\n var _t2 = this.properties,\n _i = [].concat(_toConsumableArray(Object.getOwnPropertyNames(_t2)), _toConsumableArray(Object.getOwnPropertySymbols(_t2)));\n\n var _iterator = _createForOfIteratorHelper(_i),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _s2 = _step.value;\n this.createProperty(_s2, _t2[_s2]);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n\n return this.elementStyles = this.finalizeStyles(this.styles), !0;\n }\n }, {\n key: \"finalizeStyles\",\n value: function finalizeStyles(i) {\n var s = [];\n\n if (Array.isArray(i)) {\n var _e2 = new Set(i.flat(1 / 0).reverse());\n\n var _iterator2 = _createForOfIteratorHelper(_e2),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _i2 = _step2.value;\n s.unshift(t(_i2));\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n } else void 0 !== i && s.push(t(i));\n\n return s;\n }\n }, {\n key: \"_$Eh\",\n value: function _$Eh(t, i) {\n var s = i.attribute;\n return !1 === s ? void 0 : \"string\" == typeof s ? s : \"string\" == typeof t ? t.toLowerCase() : void 0;\n }\n }]);\n\n return a;\n}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));\n\na.finalized = !0, a.elementProperties = new Map(), a.elementStyles = [], a.shadowRootOptions = {\n mode: \"open\"\n}, null == h || h({\n ReactiveElement: a\n}), (null !== (s = globalThis.reactiveElementVersions) && void 0 !== s ? s : globalThis.reactiveElementVersions = []).push(\"1.3.0\");\nexport { a as ReactiveElement, o as defaultConverter, n as notEqual };","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === \"object\" && typeof module !== \"undefined\" ? factory(exports) : typeof define === \"function\" && define.amd ? define([\"exports\"], factory) : factory(global.ActiveStorage = {});\n})(this, function (exports) {\n \"use strict\";\n\n function createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n }\n\n var sparkMd5 = createCommonjsModule(function (module, exports) {\n (function (factory) {\n {\n module.exports = factory();\n }\n })(function (undefined) {\n var hex_chr = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\n\n function md5cycle(x, k) {\n var a = x[0],\n b = x[1],\n c = x[2],\n d = x[3];\n a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[10] - 42063 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b ^ c ^ d) + k[5] - 378558 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n x[0] = a + x[0] | 0;\n x[1] = b + x[1] | 0;\n x[2] = c + x[2] | 0;\n x[3] = d + x[3] | 0;\n }\n\n function md5blk(s) {\n var md5blks = [],\n i;\n\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n }\n\n return md5blks;\n }\n\n function md5blk_array(a) {\n var md5blks = [],\n i;\n\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n }\n\n return md5blks;\n }\n\n function md51(s) {\n var n = s.length,\n state = [1732584193, -271733879, -1732584194, 271733878],\n i,\n length,\n tail,\n tmp,\n lo,\n hi;\n\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk(s.substring(i - 64, i)));\n }\n\n s = s.substring(i - 64);\n length = s.length;\n tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n }\n\n tail[i >> 2] |= 128 << (i % 4 << 3);\n\n if (i > 55) {\n md5cycle(state, tail);\n\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n\n function md51_array(a) {\n var n = a.length,\n state = [1732584193, -271733879, -1732584194, 271733878],\n i,\n length,\n tail,\n tmp,\n lo,\n hi;\n\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n }\n\n a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);\n length = a.length;\n tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= a[i] << (i % 4 << 3);\n }\n\n tail[i >> 2] |= 128 << (i % 4 << 3);\n\n if (i > 55) {\n md5cycle(state, tail);\n\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n\n function rhex(n) {\n var s = \"\",\n j;\n\n for (j = 0; j < 4; j += 1) {\n s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n }\n\n return s;\n }\n\n function hex(x) {\n var i;\n\n for (i = 0; i < x.length; i += 1) {\n x[i] = rhex(x[i]);\n }\n\n return x.join(\"\");\n }\n\n if (hex(md51(\"hello\")) !== \"5d41402abc4b2a76b9719d911017c592\") ;\n\n if (typeof ArrayBuffer !== \"undefined\" && !ArrayBuffer.prototype.slice) {\n (function () {\n function clamp(val, length) {\n val = val | 0 || 0;\n\n if (val < 0) {\n return Math.max(val + length, 0);\n }\n\n return Math.min(val, length);\n }\n\n ArrayBuffer.prototype.slice = function (from, to) {\n var length = this.byteLength,\n begin = clamp(from, length),\n end = length,\n num,\n target,\n targetArray,\n sourceArray;\n\n if (to !== undefined) {\n end = clamp(to, length);\n }\n\n if (begin > end) {\n return new ArrayBuffer(0);\n }\n\n num = end - begin;\n target = new ArrayBuffer(num);\n targetArray = new Uint8Array(target);\n sourceArray = new Uint8Array(this, begin, num);\n targetArray.set(sourceArray);\n return target;\n };\n })();\n }\n\n function toUtf8(str) {\n if (/[\\u0080-\\uFFFF]/.test(str)) {\n str = unescape(encodeURIComponent(str));\n }\n\n return str;\n }\n\n function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n var length = str.length,\n buff = new ArrayBuffer(length),\n arr = new Uint8Array(buff),\n i;\n\n for (i = 0; i < length; i += 1) {\n arr[i] = str.charCodeAt(i);\n }\n\n return returnUInt8Array ? arr : buff;\n }\n\n function arrayBuffer2Utf8Str(buff) {\n return String.fromCharCode.apply(null, new Uint8Array(buff));\n }\n\n function concatenateArrayBuffers(first, second, returnUInt8Array) {\n var result = new Uint8Array(first.byteLength + second.byteLength);\n result.set(new Uint8Array(first));\n result.set(new Uint8Array(second), first.byteLength);\n return returnUInt8Array ? result : result.buffer;\n }\n\n function hexToBinaryString(hex) {\n var bytes = [],\n length = hex.length,\n x;\n\n for (x = 0; x < length - 1; x += 2) {\n bytes.push(parseInt(hex.substr(x, 2), 16));\n }\n\n return String.fromCharCode.apply(String, bytes);\n }\n\n function SparkMD5() {\n this.reset();\n }\n\n SparkMD5.prototype.append = function (str) {\n this.appendBinary(toUtf8(str));\n return this;\n };\n\n SparkMD5.prototype.appendBinary = function (contents) {\n this._buff += contents;\n this._length += contents.length;\n var length = this._buff.length,\n i;\n\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n }\n\n this._buff = this._buff.substring(i - 64);\n return this;\n };\n\n SparkMD5.prototype.end = function (raw) {\n var buff = this._buff,\n length = buff.length,\n i,\n tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n ret;\n\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);\n }\n\n this._finish(tail, length);\n\n ret = hex(this._hash);\n\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n\n this.reset();\n return ret;\n };\n\n SparkMD5.prototype.reset = function () {\n this._buff = \"\";\n this._length = 0;\n this._hash = [1732584193, -271733879, -1732584194, 271733878];\n return this;\n };\n\n SparkMD5.prototype.getState = function () {\n return {\n buff: this._buff,\n length: this._length,\n hash: this._hash\n };\n };\n\n SparkMD5.prototype.setState = function (state) {\n this._buff = state.buff;\n this._length = state.length;\n this._hash = state.hash;\n return this;\n };\n\n SparkMD5.prototype.destroy = function () {\n delete this._hash;\n delete this._buff;\n delete this._length;\n };\n\n SparkMD5.prototype._finish = function (tail, length) {\n var i = length,\n tmp,\n lo,\n hi;\n tail[i >> 2] |= 128 << (i % 4 << 3);\n\n if (i > 55) {\n md5cycle(this._hash, tail);\n\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n\n tmp = this._length * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(this._hash, tail);\n };\n\n SparkMD5.hash = function (str, raw) {\n return SparkMD5.hashBinary(toUtf8(str), raw);\n };\n\n SparkMD5.hashBinary = function (content, raw) {\n var hash = md51(content),\n ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n\n SparkMD5.ArrayBuffer = function () {\n this.reset();\n };\n\n SparkMD5.ArrayBuffer.prototype.append = function (arr) {\n var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),\n length = buff.length,\n i;\n this._length += arr.byteLength;\n\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n }\n\n this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n return this;\n };\n\n SparkMD5.ArrayBuffer.prototype.end = function (raw) {\n var buff = this._buff,\n length = buff.length,\n tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n i,\n ret;\n\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff[i] << (i % 4 << 3);\n }\n\n this._finish(tail, length);\n\n ret = hex(this._hash);\n\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n\n this.reset();\n return ret;\n };\n\n SparkMD5.ArrayBuffer.prototype.reset = function () {\n this._buff = new Uint8Array(0);\n this._length = 0;\n this._hash = [1732584193, -271733879, -1732584194, 271733878];\n return this;\n };\n\n SparkMD5.ArrayBuffer.prototype.getState = function () {\n var state = SparkMD5.prototype.getState.call(this);\n state.buff = arrayBuffer2Utf8Str(state.buff);\n return state;\n };\n\n SparkMD5.ArrayBuffer.prototype.setState = function (state) {\n state.buff = utf8Str2ArrayBuffer(state.buff, true);\n return SparkMD5.prototype.setState.call(this, state);\n };\n\n SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n\n SparkMD5.ArrayBuffer.hash = function (arr, raw) {\n var hash = md51_array(new Uint8Array(arr)),\n ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n\n return SparkMD5;\n });\n });\n\n var classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n\n var createClass = function () {\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\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var fileSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;\n\n var FileChecksum = function () {\n createClass(FileChecksum, null, [{\n key: \"create\",\n value: function create(file, callback) {\n var instance = new FileChecksum(file);\n instance.create(callback);\n }\n }]);\n\n function FileChecksum(file) {\n classCallCheck(this, FileChecksum);\n this.file = file;\n this.chunkSize = 2097152;\n this.chunkCount = Math.ceil(this.file.size / this.chunkSize);\n this.chunkIndex = 0;\n }\n\n createClass(FileChecksum, [{\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n\n this.callback = callback;\n this.md5Buffer = new sparkMd5.ArrayBuffer();\n this.fileReader = new FileReader();\n this.fileReader.addEventListener(\"load\", function (event) {\n return _this.fileReaderDidLoad(event);\n });\n this.fileReader.addEventListener(\"error\", function (event) {\n return _this.fileReaderDidError(event);\n });\n this.readNextChunk();\n }\n }, {\n key: \"fileReaderDidLoad\",\n value: function fileReaderDidLoad(event) {\n this.md5Buffer.append(event.target.result);\n\n if (!this.readNextChunk()) {\n var binaryDigest = this.md5Buffer.end(true);\n var base64digest = btoa(binaryDigest);\n this.callback(null, base64digest);\n }\n }\n }, {\n key: \"fileReaderDidError\",\n value: function fileReaderDidError(event) {\n this.callback(\"Error reading \" + this.file.name);\n }\n }, {\n key: \"readNextChunk\",\n value: function readNextChunk() {\n if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {\n var start = this.chunkIndex * this.chunkSize;\n var end = Math.min(start + this.chunkSize, this.file.size);\n var bytes = fileSlice.call(this.file, start, end);\n this.fileReader.readAsArrayBuffer(bytes);\n this.chunkIndex++;\n return true;\n } else {\n return false;\n }\n }\n }]);\n return FileChecksum;\n }();\n\n function getMetaValue(name) {\n var element = findElement(document.head, 'meta[name=\"' + name + '\"]');\n\n if (element) {\n return element.getAttribute(\"content\");\n }\n }\n\n function findElements(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n\n var elements = root.querySelectorAll(selector);\n return toArray$1(elements);\n }\n\n function findElement(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n\n return root.querySelector(selector);\n }\n\n function dispatchEvent(element, type) {\n var eventInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var disabled = element.disabled;\n var bubbles = eventInit.bubbles,\n cancelable = eventInit.cancelable,\n detail = eventInit.detail;\n var event = document.createEvent(\"Event\");\n event.initEvent(type, bubbles || true, cancelable || true);\n event.detail = detail || {};\n\n try {\n element.disabled = false;\n element.dispatchEvent(event);\n } finally {\n element.disabled = disabled;\n }\n\n return event;\n }\n\n function toArray$1(value) {\n if (Array.isArray(value)) {\n return value;\n } else if (Array.from) {\n return Array.from(value);\n } else {\n return [].slice.call(value);\n }\n }\n\n var BlobRecord = function () {\n function BlobRecord(file, checksum, url) {\n var _this = this;\n\n classCallCheck(this, BlobRecord);\n this.file = file;\n this.attributes = {\n filename: file.name,\n content_type: file.type || \"application/octet-stream\",\n byte_size: file.size,\n checksum: checksum\n };\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"POST\", url, true);\n this.xhr.responseType = \"json\";\n this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n this.xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n var csrfToken = getMetaValue(\"csrf-token\");\n\n if (csrfToken != undefined) {\n this.xhr.setRequestHeader(\"X-CSRF-Token\", csrfToken);\n }\n\n this.xhr.addEventListener(\"load\", function (event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function (event) {\n return _this.requestDidError(event);\n });\n }\n\n createClass(BlobRecord, [{\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(JSON.stringify({\n blob: this.attributes\n }));\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n if (this.status >= 200 && this.status < 300) {\n var response = this.response;\n var direct_upload = response.direct_upload;\n delete response.direct_upload;\n this.attributes = response;\n this.directUploadData = direct_upload;\n this.callback(null, this.toJSON());\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error creating Blob for \"' + this.file.name + '\". Status: ' + this.status);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var result = {};\n\n for (var key in this.attributes) {\n result[key] = this.attributes[key];\n }\n\n return result;\n }\n }, {\n key: \"status\",\n get: function get$$1() {\n return this.xhr.status;\n }\n }, {\n key: \"response\",\n get: function get$$1() {\n var _xhr = this.xhr,\n responseType = _xhr.responseType,\n response = _xhr.response;\n\n if (responseType == \"json\") {\n return response;\n } else {\n return JSON.parse(response);\n }\n }\n }]);\n return BlobRecord;\n }();\n\n var BlobUpload = function () {\n function BlobUpload(blob) {\n var _this = this;\n\n classCallCheck(this, BlobUpload);\n this.blob = blob;\n this.file = blob.file;\n var _blob$directUploadDat = blob.directUploadData,\n url = _blob$directUploadDat.url,\n headers = _blob$directUploadDat.headers;\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"PUT\", url, true);\n this.xhr.responseType = \"text\";\n\n for (var key in headers) {\n this.xhr.setRequestHeader(key, headers[key]);\n }\n\n this.xhr.addEventListener(\"load\", function (event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function (event) {\n return _this.requestDidError(event);\n });\n }\n\n createClass(BlobUpload, [{\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(this.file.slice());\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n var _xhr = this.xhr,\n status = _xhr.status,\n response = _xhr.response;\n\n if (status >= 200 && status < 300) {\n this.callback(null, response);\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error storing \"' + this.file.name + '\". Status: ' + this.xhr.status);\n }\n }]);\n return BlobUpload;\n }();\n\n var id = 0;\n\n var DirectUpload = function () {\n function DirectUpload(file, url, delegate) {\n classCallCheck(this, DirectUpload);\n this.id = ++id;\n this.file = file;\n this.url = url;\n this.delegate = delegate;\n }\n\n createClass(DirectUpload, [{\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n\n FileChecksum.create(this.file, function (error, checksum) {\n if (error) {\n callback(error);\n return;\n }\n\n var blob = new BlobRecord(_this.file, checksum, _this.url);\n notify(_this.delegate, \"directUploadWillCreateBlobWithXHR\", blob.xhr);\n blob.create(function (error) {\n if (error) {\n callback(error);\n } else {\n var upload = new BlobUpload(blob);\n notify(_this.delegate, \"directUploadWillStoreFileWithXHR\", upload.xhr);\n upload.create(function (error) {\n if (error) {\n callback(error);\n } else {\n callback(null, blob.toJSON());\n }\n });\n }\n });\n });\n }\n }]);\n return DirectUpload;\n }();\n\n function notify(object, methodName) {\n if (object && typeof object[methodName] == \"function\") {\n for (var _len = arguments.length, messages = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n messages[_key - 2] = arguments[_key];\n }\n\n return object[methodName].apply(object, messages);\n }\n }\n\n var DirectUploadController = function () {\n function DirectUploadController(input, file) {\n classCallCheck(this, DirectUploadController);\n this.input = input;\n this.file = file;\n this.directUpload = new DirectUpload(this.file, this.url, this);\n this.dispatch(\"initialize\");\n }\n\n createClass(DirectUploadController, [{\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n\n var hiddenInput = document.createElement(\"input\");\n hiddenInput.type = \"hidden\";\n hiddenInput.name = this.input.name;\n this.input.insertAdjacentElement(\"beforebegin\", hiddenInput);\n this.dispatch(\"start\");\n this.directUpload.create(function (error, attributes) {\n if (error) {\n hiddenInput.parentNode.removeChild(hiddenInput);\n\n _this.dispatchError(error);\n } else {\n hiddenInput.value = attributes.signed_id;\n }\n\n _this.dispatch(\"end\");\n\n callback(error);\n });\n }\n }, {\n key: \"uploadRequestDidProgress\",\n value: function uploadRequestDidProgress(event) {\n var progress = event.loaded / event.total * 100;\n\n if (progress) {\n this.dispatch(\"progress\", {\n progress: progress\n });\n }\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n detail.file = this.file;\n detail.id = this.directUpload.id;\n return dispatchEvent(this.input, \"direct-upload:\" + name, {\n detail: detail\n });\n }\n }, {\n key: \"dispatchError\",\n value: function dispatchError(error) {\n var event = this.dispatch(\"error\", {\n error: error\n });\n\n if (!event.defaultPrevented) {\n alert(error);\n }\n }\n }, {\n key: \"directUploadWillCreateBlobWithXHR\",\n value: function directUploadWillCreateBlobWithXHR(xhr) {\n this.dispatch(\"before-blob-request\", {\n xhr: xhr\n });\n }\n }, {\n key: \"directUploadWillStoreFileWithXHR\",\n value: function directUploadWillStoreFileWithXHR(xhr) {\n var _this2 = this;\n\n this.dispatch(\"before-storage-request\", {\n xhr: xhr\n });\n xhr.upload.addEventListener(\"progress\", function (event) {\n return _this2.uploadRequestDidProgress(event);\n });\n }\n }, {\n key: \"url\",\n get: function get$$1() {\n return this.input.getAttribute(\"data-direct-upload-url\");\n }\n }]);\n return DirectUploadController;\n }();\n\n var inputSelector = \"input[type=file][data-direct-upload-url]:not([disabled])\";\n\n var DirectUploadsController = function () {\n function DirectUploadsController(form) {\n classCallCheck(this, DirectUploadsController);\n this.form = form;\n this.inputs = findElements(form, inputSelector).filter(function (input) {\n return input.files.length;\n });\n }\n\n createClass(DirectUploadsController, [{\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n\n var controllers = this.createDirectUploadControllers();\n\n var startNextController = function startNextController() {\n var controller = controllers.shift();\n\n if (controller) {\n controller.start(function (error) {\n if (error) {\n callback(error);\n\n _this.dispatch(\"end\");\n } else {\n startNextController();\n }\n });\n } else {\n callback();\n\n _this.dispatch(\"end\");\n }\n };\n\n this.dispatch(\"start\");\n startNextController();\n }\n }, {\n key: \"createDirectUploadControllers\",\n value: function createDirectUploadControllers() {\n var controllers = [];\n this.inputs.forEach(function (input) {\n toArray$1(input.files).forEach(function (file) {\n var controller = new DirectUploadController(input, file);\n controllers.push(controller);\n });\n });\n return controllers;\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return dispatchEvent(this.form, \"direct-uploads:\" + name, {\n detail: detail\n });\n }\n }]);\n return DirectUploadsController;\n }();\n\n var processingAttribute = \"data-direct-uploads-processing\";\n var submitButtonsByForm = new WeakMap();\n var started = false;\n\n function start() {\n if (!started) {\n started = true;\n document.addEventListener(\"click\", didClick, true);\n document.addEventListener(\"submit\", didSubmitForm);\n document.addEventListener(\"ajax:before\", didSubmitRemoteElement);\n }\n }\n\n function didClick(event) {\n var target = event.target;\n\n if ((target.tagName == \"INPUT\" || target.tagName == \"BUTTON\") && target.type == \"submit\" && target.form) {\n submitButtonsByForm.set(target.form, target);\n }\n }\n\n function didSubmitForm(event) {\n handleFormSubmissionEvent(event);\n }\n\n function didSubmitRemoteElement(event) {\n if (event.target.tagName == \"FORM\") {\n handleFormSubmissionEvent(event);\n }\n }\n\n function handleFormSubmissionEvent(event) {\n var form = event.target;\n\n if (form.hasAttribute(processingAttribute)) {\n event.preventDefault();\n return;\n }\n\n var controller = new DirectUploadsController(form);\n var inputs = controller.inputs;\n\n if (inputs.length) {\n event.preventDefault();\n form.setAttribute(processingAttribute, \"\");\n inputs.forEach(disable);\n controller.start(function (error) {\n form.removeAttribute(processingAttribute);\n\n if (error) {\n inputs.forEach(enable);\n } else {\n submitForm(form);\n }\n });\n }\n }\n\n function submitForm(form) {\n var button = submitButtonsByForm.get(form) || findElement(form, \"input[type=submit], button[type=submit]\");\n\n if (button) {\n var _button = button,\n disabled = _button.disabled;\n button.disabled = false;\n button.focus();\n button.click();\n button.disabled = disabled;\n } else {\n button = document.createElement(\"input\");\n button.type = \"submit\";\n button.style.display = \"none\";\n form.appendChild(button);\n button.click();\n form.removeChild(button);\n }\n\n submitButtonsByForm.delete(form);\n }\n\n function disable(input) {\n input.disabled = true;\n }\n\n function enable(input) {\n input.disabled = false;\n }\n\n function autostart() {\n if (window.ActiveStorage) {\n start();\n }\n }\n\n setTimeout(autostart, 1);\n exports.start = start;\n exports.DirectUpload = DirectUpload;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/assets/javascripts\nReleased under the MIT license\n */\n;\n(function () {\n var context = this;\n (function () {\n (function () {\n this.Rails = {\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n buttonClickSelector: {\n selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n exclude: 'form button'\n },\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n formSubmitSelector: 'form:not([data-turbo=true])',\n formInputClickSelector: 'form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n };\n }).call(this);\n }).call(context);\n var Rails = context.Rails;\n (function () {\n (function () {\n var nonce;\n nonce = null;\n\n Rails.loadCSPNonce = function () {\n var ref;\n return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n };\n\n Rails.cspNonce = function () {\n return nonce != null ? nonce : Rails.loadCSPNonce();\n };\n }).call(this);\n (function () {\n var expando, m;\n m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n Rails.matches = function (element, selector) {\n if (selector.exclude != null) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n };\n\n expando = '_ujsData';\n\n Rails.getData = function (element, key) {\n var ref;\n return (ref = element[expando]) != null ? ref[key] : void 0;\n };\n\n Rails.setData = function (element, key, value) {\n if (element[expando] == null) {\n element[expando] = {};\n }\n\n return element[expando][key] = value;\n };\n\n Rails.$ = function (selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n };\n }).call(this);\n (function () {\n var $, csrfParam, csrfToken;\n $ = Rails.$;\n\n csrfToken = Rails.csrfToken = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-token]');\n return meta && meta.content;\n };\n\n csrfParam = Rails.csrfParam = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-param]');\n return meta && meta.content;\n };\n\n Rails.CSRFProtection = function (xhr) {\n var token;\n token = csrfToken();\n\n if (token != null) {\n return xhr.setRequestHeader('X-CSRF-Token', token);\n }\n };\n\n Rails.refreshCSRFTokens = function () {\n var param, token;\n token = csrfToken();\n param = csrfParam();\n\n if (token != null && param != null) {\n return $('form input[name=\"' + param + '\"]').forEach(function (input) {\n return input.value = token;\n });\n }\n };\n }).call(this);\n (function () {\n var CustomEvent, fire, matches, preventDefault;\n matches = Rails.matches;\n CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function CustomEvent(event, params) {\n var evt;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n preventDefault = CustomEvent.prototype.preventDefault;\n\n CustomEvent.prototype.preventDefault = function () {\n var result;\n result = preventDefault.call(this);\n\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function get() {\n return true;\n }\n });\n }\n\n return result;\n };\n }\n\n fire = Rails.fire = function (obj, name, data) {\n var event;\n event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n };\n\n Rails.stopEverything = function (e) {\n fire(e.target, 'ujs:everythingStopped');\n e.preventDefault();\n e.stopPropagation();\n return e.stopImmediatePropagation();\n };\n\n Rails.delegate = function (element, selector, eventType, handler) {\n return element.addEventListener(eventType, function (e) {\n var target;\n target = e.target;\n\n while (!(!(target instanceof Element) || matches(target, selector))) {\n target = target.parentNode;\n }\n\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n return e.stopPropagation();\n }\n });\n };\n }).call(this);\n (function () {\n var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n AcceptHeaders = {\n '*': '*/*',\n text: 'text/plain',\n html: 'text/html',\n xml: 'application/xml, text/xml',\n json: 'application/json, text/javascript',\n script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n };\n\n Rails.ajax = function (options) {\n var xhr;\n options = prepareOptions(options);\n xhr = createXHR(options, function () {\n var ref, response;\n response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n });\n\n if (options.beforeSend != null && !options.beforeSend(xhr, options)) {\n return false;\n }\n\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n };\n\n prepareOptions = function prepareOptions(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n\n if (options.type === 'GET' && options.data) {\n if (options.url.indexOf('?') < 0) {\n options.url += '?' + options.data;\n } else {\n options.url += '&' + options.data;\n }\n }\n\n if (AcceptHeaders[options.dataType] == null) {\n options.dataType = '*';\n }\n\n options.accept = AcceptHeaders[options.dataType];\n\n if (options.dataType !== '*') {\n options.accept += ', */*; q=0.01';\n }\n\n return options;\n };\n\n createXHR = function createXHR(options, done) {\n var xhr;\n xhr = new XMLHttpRequest();\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader('Accept', options.accept);\n\n if (typeof options.data === 'string') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n }\n\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n CSRFProtection(xhr);\n }\n\n xhr.withCredentials = !!options.withCredentials;\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n\n return xhr;\n };\n\n processResponse = function processResponse(response, type) {\n var parser, script;\n\n if (typeof response === 'string' && typeof type === 'string') {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n script = document.createElement('script');\n script.setAttribute('nonce', cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n parser = new DOMParser();\n type = type.replace(/;.+/, '');\n\n try {\n response = parser.parseFromString(response, type);\n } catch (error) {}\n }\n }\n\n return response;\n };\n\n Rails.href = function (element) {\n return element.href;\n };\n\n Rails.isCrossDomain = function (url) {\n var e, originAnchor, urlAnchor;\n originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n urlAnchor = document.createElement('a');\n\n try {\n urlAnchor.href = url;\n return !((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host || originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host);\n } catch (error) {\n e = error;\n return true;\n }\n };\n }).call(this);\n (function () {\n var matches, toArray;\n matches = Rails.matches;\n\n toArray = function toArray(e) {\n return Array.prototype.slice.call(e);\n };\n\n Rails.serializeElement = function (element, additionalParam) {\n var inputs, params;\n inputs = [element];\n\n if (matches(element, 'form')) {\n inputs = toArray(element.elements);\n }\n\n params = [];\n inputs.forEach(function (input) {\n if (!input.name || input.disabled) {\n return;\n }\n\n if (matches(input, 'fieldset[disabled] *')) {\n return;\n }\n\n if (matches(input, 'select')) {\n return toArray(input.options).forEach(function (option) {\n if (option.selected) {\n return params.push({\n name: input.name,\n value: option.value\n });\n }\n });\n } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n return params.push({\n name: input.name,\n value: input.value\n });\n }\n });\n\n if (additionalParam) {\n params.push(additionalParam);\n }\n\n return params.map(function (param) {\n if (param.name != null) {\n return encodeURIComponent(param.name) + \"=\" + encodeURIComponent(param.value);\n } else {\n return param;\n }\n }).join('&');\n };\n\n Rails.formElements = function (form, selector) {\n if (matches(form, 'form')) {\n return toArray(form.elements).filter(function (el) {\n return matches(el, selector);\n });\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n };\n }).call(this);\n (function () {\n var allowAction, fire, stopEverything;\n fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n Rails.handleConfirm = function (e) {\n if (!allowAction(this)) {\n return stopEverything(e);\n }\n };\n\n Rails.confirm = function (message, element) {\n return confirm(message);\n };\n\n allowAction = function allowAction(element) {\n var answer, callback, message;\n message = element.getAttribute('data-confirm');\n\n if (!message) {\n return true;\n }\n\n answer = false;\n\n if (fire(element, 'confirm')) {\n try {\n answer = Rails.confirm(message, element);\n } catch (error) {}\n\n callback = fire(element, 'confirm:complete', [answer]);\n }\n\n return answer && callback;\n };\n }).call(this);\n (function () {\n var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n Rails.handleDisabledElement = function (e) {\n var element;\n element = this;\n\n if (element.disabled) {\n return stopEverything(e);\n }\n };\n\n Rails.enableElement = function (e) {\n var element;\n\n if (e instanceof Event) {\n if (isXhrRedirect(e)) {\n return;\n }\n\n element = e.target;\n } else {\n element = e;\n }\n\n if (matches(element, Rails.linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return enableFormElements(element);\n }\n };\n\n Rails.disableElement = function (e) {\n var element;\n element = e instanceof Event ? e.target : e;\n\n if (matches(element, Rails.linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return disableFormElements(element);\n }\n };\n\n disableLinkElement = function disableLinkElement(element) {\n var replacement;\n\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n }\n\n element.addEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', true);\n };\n\n enableLinkElement = function enableLinkElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, 'ujs:enable-with', null);\n }\n\n element.removeEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', null);\n };\n\n disableFormElements = function disableFormElements(form) {\n return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n };\n\n disableFormElement = function disableFormElement(element) {\n var replacement;\n\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n if (matches(element, 'button')) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, 'ujs:enable-with', element.value);\n element.value = replacement;\n }\n }\n\n element.disabled = true;\n return setData(element, 'ujs:disabled', true);\n };\n\n enableFormElements = function enableFormElements(form) {\n return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n };\n\n enableFormElement = function enableFormElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n if (matches(element, 'button')) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n\n setData(element, 'ujs:enable-with', null);\n }\n\n element.disabled = false;\n return setData(element, 'ujs:disabled', null);\n };\n\n isXhrRedirect = function isXhrRedirect(event) {\n var ref, xhr;\n xhr = (ref = event.detail) != null ? ref[0] : void 0;\n return (xhr != null ? xhr.getResponseHeader(\"X-Xhr-Redirect\") : void 0) != null;\n };\n }).call(this);\n (function () {\n var stopEverything;\n stopEverything = Rails.stopEverything;\n\n Rails.handleMethod = function (e) {\n var csrfParam, csrfToken, form, formContent, href, link, method;\n link = this;\n method = link.getAttribute('data-method');\n\n if (!method) {\n return;\n }\n\n href = Rails.href(link);\n csrfToken = Rails.csrfToken();\n csrfParam = Rails.csrfParam();\n form = document.createElement('form');\n formContent = \"\";\n\n if (csrfParam != null && csrfToken != null && !Rails.isCrossDomain(href)) {\n formContent += \"\";\n }\n\n formContent += '';\n form.method = 'post';\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = 'none';\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n return stopEverything(e);\n };\n }).call(this);\n (function () {\n var ajax,\n fire,\n getData,\n isCrossDomain,\n isRemote,\n matches,\n serializeElement,\n setData,\n stopEverything,\n slice = [].slice;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n isRemote = function isRemote(element) {\n var value;\n value = element.getAttribute('data-remote');\n return value != null && value !== 'false';\n };\n\n Rails.handleRemote = function (e) {\n var button, data, dataType, element, method, url, withCredentials;\n element = this;\n\n if (!isRemote(element)) {\n return true;\n }\n\n if (!fire(element, 'ajax:before')) {\n fire(element, 'ajax:stopped');\n return false;\n }\n\n withCredentials = element.getAttribute('data-with-credentials');\n dataType = element.getAttribute('data-type') || 'script';\n\n if (matches(element, Rails.formSubmitSelector)) {\n button = getData(element, 'ujs:submit-button');\n method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n\n if (method.toUpperCase() === 'GET') {\n url = url.replace(/\\?.*$/, '');\n }\n\n if (element.enctype === 'multipart/form-data') {\n data = new FormData(element);\n\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n\n setData(element, 'ujs:submit-button', null);\n setData(element, 'ujs:submit-button-formmethod', null);\n setData(element, 'ujs:submit-button-formaction', null);\n } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n method = element.getAttribute('data-method');\n url = element.getAttribute('data-url');\n data = serializeElement(element, element.getAttribute('data-params'));\n } else {\n method = element.getAttribute('data-method');\n url = Rails.href(element);\n data = element.getAttribute('data-params');\n }\n\n ajax({\n type: method || 'GET',\n url: url,\n data: data,\n dataType: dataType,\n beforeSend: function beforeSend(xhr, options) {\n if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n return fire(element, 'ajax:send', [xhr]);\n } else {\n fire(element, 'ajax:stopped');\n return false;\n }\n },\n success: function success() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:success', args);\n },\n error: function error() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:error', args);\n },\n complete: function complete() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:complete', args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: withCredentials != null && withCredentials !== 'false'\n });\n return stopEverything(e);\n };\n\n Rails.formSubmitButtonClick = function (e) {\n var button, form;\n button = this;\n form = button.form;\n\n if (!form) {\n return;\n }\n\n if (button.name) {\n setData(form, 'ujs:submit-button', {\n name: button.name,\n value: button.value\n });\n }\n\n setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n };\n\n Rails.preventInsignificantClick = function (e) {\n var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n link = this;\n method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n data = link.getAttribute('data-params');\n metaClick = e.metaKey || e.ctrlKey;\n insignificantMetaClick = metaClick && method === 'GET' && !data;\n nonPrimaryMouseClick = e.button != null && e.button !== 0;\n\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n return e.stopImmediatePropagation();\n }\n };\n }).call(this);\n (function () {\n var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n if (typeof jQuery !== \"undefined\" && jQuery !== null && jQuery.ajax != null) {\n if (jQuery.rails) {\n throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n }\n\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter(function (options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n });\n }\n\n Rails.start = function () {\n if (window._rails_loaded) {\n throw new Error('rails-ujs has already been loaded!');\n }\n\n window.addEventListener('pageshow', function () {\n $(Rails.formEnableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n return $(Rails.linkDisableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n });\n delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n delegate(document, Rails.linkClickSelector, 'click', disableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', function (e) {\n return setTimeout(function () {\n return disableElement(e);\n }, 13);\n });\n delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n document.addEventListener('DOMContentLoaded', loadCSPNonce);\n return window._rails_loaded = true;\n };\n\n if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n Rails.start();\n }\n }).call(this);\n }).call(this);\n\n if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === \"object\" && module.exports) {\n module.exports = Rails;\n } else if (typeof define === \"function\" && define.amd) {\n define(Rails);\n }\n}).call(this);","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \"/* Functional styling;\\n * These styles are required for noUiSlider to function.\\n * You don't need to change these rules to apply your design.\\n */\\n.noUi-target,\\n.noUi-target * {\\n -webkit-touch-callout: none;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n -webkit-user-select: none;\\n touch-action: none;\\n -ms-user-select: none;\\n -moz-user-select: none;\\n user-select: none;\\n box-sizing: border-box;\\n}\\n.noUi-target {\\n position: relative;\\n}\\n.noUi-base,\\n.noUi-connects {\\n width: 100%;\\n height: 100%;\\n position: relative;\\n z-index: 1;\\n}\\n/* Wrapper for all connect elements.\\n */\\n.noUi-connects {\\n overflow: hidden;\\n z-index: 0;\\n}\\n.noUi-connect,\\n.noUi-origin {\\n will-change: transform;\\n position: absolute;\\n z-index: 1;\\n top: 0;\\n right: 0;\\n height: 100%;\\n width: 100%;\\n -ms-transform-origin: 0 0;\\n -webkit-transform-origin: 0 0;\\n -webkit-transform-style: preserve-3d;\\n transform-origin: 0 0;\\n transform-style: flat;\\n}\\n/* Offset direction\\n */\\n.noUi-txt-dir-rtl.noUi-horizontal .noUi-origin {\\n left: 0;\\n right: auto;\\n}\\n/* Give origins 0 height/width so they don't interfere with clicking the\\n * connect elements.\\n */\\n.noUi-vertical .noUi-origin {\\n top: -100%;\\n width: 0;\\n}\\n.noUi-horizontal .noUi-origin {\\n height: 0;\\n}\\n.noUi-handle {\\n -webkit-backface-visibility: hidden;\\n backface-visibility: hidden;\\n position: absolute;\\n}\\n.noUi-touch-area {\\n height: 100%;\\n width: 100%;\\n}\\n.noUi-state-tap .noUi-connect,\\n.noUi-state-tap .noUi-origin {\\n transition: transform 0.3s;\\n}\\n.noUi-state-drag * {\\n cursor: inherit !important;\\n}\\n/* Slider size and handle placement;\\n */\\n.noUi-horizontal {\\n height: 18px;\\n}\\n.noUi-horizontal .noUi-handle {\\n width: 34px;\\n height: 28px;\\n right: -17px;\\n top: -6px;\\n}\\n.noUi-vertical {\\n width: 18px;\\n}\\n.noUi-vertical .noUi-handle {\\n width: 28px;\\n height: 34px;\\n right: -6px;\\n bottom: -17px;\\n}\\n.noUi-txt-dir-rtl.noUi-horizontal .noUi-handle {\\n left: -17px;\\n right: auto;\\n}\\n/* Styling;\\n * Giving the connect element a border radius causes issues with using transform: scale\\n */\\n.noUi-target {\\n background: #FAFAFA;\\n border-radius: 4px;\\n border: 1px solid #D3D3D3;\\n box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB;\\n}\\n.noUi-connects {\\n border-radius: 3px;\\n}\\n.noUi-connect {\\n background: #3FB8AF;\\n}\\n/* Handles and cursors;\\n */\\n.noUi-draggable {\\n cursor: ew-resize;\\n}\\n.noUi-vertical .noUi-draggable {\\n cursor: ns-resize;\\n}\\n.noUi-handle {\\n border: 1px solid #D9D9D9;\\n border-radius: 3px;\\n background: #FFF;\\n cursor: default;\\n box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #EBEBEB, 0 3px 6px -3px #BBB;\\n}\\n.noUi-active {\\n box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #DDD, 0 3px 6px -3px #BBB;\\n}\\n/* Handle stripes;\\n */\\n.noUi-handle:before,\\n.noUi-handle:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n height: 14px;\\n width: 1px;\\n background: #E8E7E6;\\n left: 14px;\\n top: 6px;\\n}\\n.noUi-handle:after {\\n left: 17px;\\n}\\n.noUi-vertical .noUi-handle:before,\\n.noUi-vertical .noUi-handle:after {\\n width: 14px;\\n height: 1px;\\n left: 6px;\\n top: 14px;\\n}\\n.noUi-vertical .noUi-handle:after {\\n top: 17px;\\n}\\n/* Disabled state;\\n */\\n[disabled] .noUi-connect {\\n background: #B8B8B8;\\n}\\n[disabled].noUi-target,\\n[disabled].noUi-handle,\\n[disabled] .noUi-handle {\\n cursor: not-allowed;\\n}\\n/* Base;\\n *\\n */\\n.noUi-pips,\\n.noUi-pips * {\\n box-sizing: border-box;\\n}\\n.noUi-pips {\\n position: absolute;\\n color: #999;\\n}\\n/* Values;\\n *\\n */\\n.noUi-value {\\n position: absolute;\\n white-space: nowrap;\\n text-align: center;\\n}\\n.noUi-value-sub {\\n color: #ccc;\\n font-size: 10px;\\n}\\n/* Markings;\\n *\\n */\\n.noUi-marker {\\n position: absolute;\\n background: #CCC;\\n}\\n.noUi-marker-sub {\\n background: #AAA;\\n}\\n.noUi-marker-large {\\n background: #AAA;\\n}\\n/* Horizontal layout;\\n *\\n */\\n.noUi-pips-horizontal {\\n padding: 10px 0;\\n height: 80px;\\n top: 100%;\\n left: 0;\\n width: 100%;\\n}\\n.noUi-value-horizontal {\\n transform: translate(-50%, 50%);\\n}\\n.noUi-rtl .noUi-value-horizontal {\\n transform: translate(50%, 50%);\\n}\\n.noUi-marker-horizontal.noUi-marker {\\n margin-left: -1px;\\n width: 2px;\\n height: 5px;\\n}\\n.noUi-marker-horizontal.noUi-marker-sub {\\n height: 10px;\\n}\\n.noUi-marker-horizontal.noUi-marker-large {\\n height: 15px;\\n}\\n/* Vertical layout;\\n *\\n */\\n.noUi-pips-vertical {\\n padding: 0 10px;\\n height: 100%;\\n top: 0;\\n left: 100%;\\n}\\n.noUi-value-vertical {\\n transform: translate(0, -50%);\\n padding-left: 25px;\\n}\\n.noUi-rtl .noUi-value-vertical {\\n transform: translate(0, 50%);\\n}\\n.noUi-marker-vertical.noUi-marker {\\n width: 5px;\\n height: 2px;\\n margin-top: -1px;\\n}\\n.noUi-marker-vertical.noUi-marker-sub {\\n width: 10px;\\n}\\n.noUi-marker-vertical.noUi-marker-large {\\n width: 15px;\\n}\\n.noUi-tooltip {\\n display: block;\\n position: absolute;\\n border: 1px solid #D9D9D9;\\n border-radius: 3px;\\n background: #fff;\\n color: #000;\\n padding: 5px;\\n text-align: center;\\n white-space: nowrap;\\n}\\n.noUi-horizontal .noUi-tooltip {\\n transform: translate(-50%, 0);\\n left: 50%;\\n bottom: 120%;\\n}\\n.noUi-vertical .noUi-tooltip {\\n transform: translate(0, -50%);\\n top: 50%;\\n right: 120%;\\n}\\n.noUi-horizontal .noUi-origin > .noUi-tooltip {\\n transform: translate(50%, 0);\\n left: auto;\\n bottom: 10px;\\n}\\n.noUi-vertical .noUi-origin > .noUi-tooltip {\\n transform: translate(0, -18px);\\n top: auto;\\n right: 28px;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"nouislider.css\"],\"names\":[],\"mappings\":\"AAAA;;;EAGE;AACF;;EAEE,2BAA2B;EAC3B,6CAA6C;EAC7C,yBAAyB;EAEzB,kBAAkB;EAClB,qBAAqB;EACrB,sBAAsB;EACtB,iBAAiB;EAEjB,sBAAsB;AACxB;AACA;EACE,kBAAkB;AACpB;AACA;;EAEE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,UAAU;AACZ;AACA;EACE;AACF;EACE,gBAAgB;EAChB,UAAU;AACZ;AACA;;EAEE,sBAAsB;EACtB,kBAAkB;EAClB,UAAU;EACV,MAAM;EACN,QAAQ;EACR,YAAY;EACZ,WAAW;EACX,yBAAyB;EACzB,6BAA6B;EAC7B,oCAAoC;EACpC,qBAAqB;EACrB,qBAAqB;AACvB;AACA;EACE;AACF;EACE,OAAO;EACP,WAAW;AACb;AACA;;EAEE;AACF;EACE,UAAU;EACV,QAAQ;AACV;AACA;EACE,SAAS;AACX;AACA;EACE,mCAAmC;EACnC,2BAA2B;EAC3B,kBAAkB;AACpB;AACA;EACE,YAAY;EACZ,WAAW;AACb;AACA;;EAGE,0BAA0B;AAC5B;AACA;EACE,0BAA0B;AAC5B;AACA;EACE;AACF;EACE,YAAY;AACd;AACA;EACE,WAAW;EACX,YAAY;EACZ,YAAY;EACZ,SAAS;AACX;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;EACX,YAAY;EACZ,WAAW;EACX,aAAa;AACf;AACA;EACE,WAAW;EACX,WAAW;AACb;AACA;;EAEE;AACF;EACE,mBAAmB;EACnB,kBAAkB;EAClB,yBAAyB;EACzB,wDAAwD;AAC1D;AACA;EACE,kBAAkB;AACpB;AACA;EACE,mBAAmB;AACrB;AACA;EACE;AACF;EACE,iBAAiB;AACnB;AACA;EACE,iBAAiB;AACnB;AACA;EACE,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,eAAe;EACf,4EAA4E;AAC9E;AACA;EACE,yEAAyE;AAC3E;AACA;EACE;AACF;;EAEE,WAAW;EACX,cAAc;EACd,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,mBAAmB;EACnB,UAAU;EACV,QAAQ;AACV;AACA;EACE,UAAU;AACZ;AACA;;EAEE,WAAW;EACX,WAAW;EACX,SAAS;EACT,SAAS;AACX;AACA;EACE,SAAS;AACX;AACA;EACE;AACF;EACE,mBAAmB;AACrB;AACA;;;EAGE,mBAAmB;AACrB;AACA;;EAEE;AACF;;EAGE,sBAAsB;AACxB;AACA;EACE,kBAAkB;EAClB,WAAW;AACb;AACA;;EAEE;AACF;EACE,kBAAkB;EAClB,mBAAmB;EACnB,kBAAkB;AACpB;AACA;EACE,WAAW;EACX,eAAe;AACjB;AACA;;EAEE;AACF;EACE,kBAAkB;EAClB,gBAAgB;AAClB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,gBAAgB;AAClB;AACA;;EAEE;AACF;EACE,eAAe;EACf,YAAY;EACZ,SAAS;EACT,OAAO;EACP,WAAW;AACb;AACA;EAEE,+BAA+B;AACjC;AACA;EAEE,8BAA8B;AAChC;AACA;EACE,iBAAiB;EACjB,UAAU;EACV,WAAW;AACb;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;;EAEE;AACF;EACE,eAAe;EACf,YAAY;EACZ,MAAM;EACN,UAAU;AACZ;AACA;EAEE,6BAA6B;EAC7B,kBAAkB;AACpB;AACA;EAEE,4BAA4B;AAC9B;AACA;EACE,UAAU;EACV,WAAW;EACX,gBAAgB;AAClB;AACA;EACE,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;EACE,cAAc;EACd,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,mBAAmB;AACrB;AACA;EAEE,6BAA6B;EAC7B,SAAS;EACT,YAAY;AACd;AACA;EAEE,6BAA6B;EAC7B,QAAQ;EACR,WAAW;AACb;AACA;EAEE,4BAA4B;EAC5B,UAAU;EACV,YAAY;AACd;AACA;EAEE,8BAA8B;EAC9B,SAAS;EACT,WAAW;AACb\",\"file\":\"nouislider.css\",\"sourcesContent\":[\"/* Functional styling;\\n * These styles are required for noUiSlider to function.\\n * You don't need to change these rules to apply your design.\\n */\\n.noUi-target,\\n.noUi-target * {\\n -webkit-touch-callout: none;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n -webkit-user-select: none;\\n -ms-touch-action: none;\\n touch-action: none;\\n -ms-user-select: none;\\n -moz-user-select: none;\\n user-select: none;\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n.noUi-target {\\n position: relative;\\n}\\n.noUi-base,\\n.noUi-connects {\\n width: 100%;\\n height: 100%;\\n position: relative;\\n z-index: 1;\\n}\\n/* Wrapper for all connect elements.\\n */\\n.noUi-connects {\\n overflow: hidden;\\n z-index: 0;\\n}\\n.noUi-connect,\\n.noUi-origin {\\n will-change: transform;\\n position: absolute;\\n z-index: 1;\\n top: 0;\\n right: 0;\\n height: 100%;\\n width: 100%;\\n -ms-transform-origin: 0 0;\\n -webkit-transform-origin: 0 0;\\n -webkit-transform-style: preserve-3d;\\n transform-origin: 0 0;\\n transform-style: flat;\\n}\\n/* Offset direction\\n */\\n.noUi-txt-dir-rtl.noUi-horizontal .noUi-origin {\\n left: 0;\\n right: auto;\\n}\\n/* Give origins 0 height/width so they don't interfere with clicking the\\n * connect elements.\\n */\\n.noUi-vertical .noUi-origin {\\n top: -100%;\\n width: 0;\\n}\\n.noUi-horizontal .noUi-origin {\\n height: 0;\\n}\\n.noUi-handle {\\n -webkit-backface-visibility: hidden;\\n backface-visibility: hidden;\\n position: absolute;\\n}\\n.noUi-touch-area {\\n height: 100%;\\n width: 100%;\\n}\\n.noUi-state-tap .noUi-connect,\\n.noUi-state-tap .noUi-origin {\\n -webkit-transition: transform 0.3s;\\n transition: transform 0.3s;\\n}\\n.noUi-state-drag * {\\n cursor: inherit !important;\\n}\\n/* Slider size and handle placement;\\n */\\n.noUi-horizontal {\\n height: 18px;\\n}\\n.noUi-horizontal .noUi-handle {\\n width: 34px;\\n height: 28px;\\n right: -17px;\\n top: -6px;\\n}\\n.noUi-vertical {\\n width: 18px;\\n}\\n.noUi-vertical .noUi-handle {\\n width: 28px;\\n height: 34px;\\n right: -6px;\\n bottom: -17px;\\n}\\n.noUi-txt-dir-rtl.noUi-horizontal .noUi-handle {\\n left: -17px;\\n right: auto;\\n}\\n/* Styling;\\n * Giving the connect element a border radius causes issues with using transform: scale\\n */\\n.noUi-target {\\n background: #FAFAFA;\\n border-radius: 4px;\\n border: 1px solid #D3D3D3;\\n box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB;\\n}\\n.noUi-connects {\\n border-radius: 3px;\\n}\\n.noUi-connect {\\n background: #3FB8AF;\\n}\\n/* Handles and cursors;\\n */\\n.noUi-draggable {\\n cursor: ew-resize;\\n}\\n.noUi-vertical .noUi-draggable {\\n cursor: ns-resize;\\n}\\n.noUi-handle {\\n border: 1px solid #D9D9D9;\\n border-radius: 3px;\\n background: #FFF;\\n cursor: default;\\n box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #EBEBEB, 0 3px 6px -3px #BBB;\\n}\\n.noUi-active {\\n box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #DDD, 0 3px 6px -3px #BBB;\\n}\\n/* Handle stripes;\\n */\\n.noUi-handle:before,\\n.noUi-handle:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n height: 14px;\\n width: 1px;\\n background: #E8E7E6;\\n left: 14px;\\n top: 6px;\\n}\\n.noUi-handle:after {\\n left: 17px;\\n}\\n.noUi-vertical .noUi-handle:before,\\n.noUi-vertical .noUi-handle:after {\\n width: 14px;\\n height: 1px;\\n left: 6px;\\n top: 14px;\\n}\\n.noUi-vertical .noUi-handle:after {\\n top: 17px;\\n}\\n/* Disabled state;\\n */\\n[disabled] .noUi-connect {\\n background: #B8B8B8;\\n}\\n[disabled].noUi-target,\\n[disabled].noUi-handle,\\n[disabled] .noUi-handle {\\n cursor: not-allowed;\\n}\\n/* Base;\\n *\\n */\\n.noUi-pips,\\n.noUi-pips * {\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n.noUi-pips {\\n position: absolute;\\n color: #999;\\n}\\n/* Values;\\n *\\n */\\n.noUi-value {\\n position: absolute;\\n white-space: nowrap;\\n text-align: center;\\n}\\n.noUi-value-sub {\\n color: #ccc;\\n font-size: 10px;\\n}\\n/* Markings;\\n *\\n */\\n.noUi-marker {\\n position: absolute;\\n background: #CCC;\\n}\\n.noUi-marker-sub {\\n background: #AAA;\\n}\\n.noUi-marker-large {\\n background: #AAA;\\n}\\n/* Horizontal layout;\\n *\\n */\\n.noUi-pips-horizontal {\\n padding: 10px 0;\\n height: 80px;\\n top: 100%;\\n left: 0;\\n width: 100%;\\n}\\n.noUi-value-horizontal {\\n -webkit-transform: translate(-50%, 50%);\\n transform: translate(-50%, 50%);\\n}\\n.noUi-rtl .noUi-value-horizontal {\\n -webkit-transform: translate(50%, 50%);\\n transform: translate(50%, 50%);\\n}\\n.noUi-marker-horizontal.noUi-marker {\\n margin-left: -1px;\\n width: 2px;\\n height: 5px;\\n}\\n.noUi-marker-horizontal.noUi-marker-sub {\\n height: 10px;\\n}\\n.noUi-marker-horizontal.noUi-marker-large {\\n height: 15px;\\n}\\n/* Vertical layout;\\n *\\n */\\n.noUi-pips-vertical {\\n padding: 0 10px;\\n height: 100%;\\n top: 0;\\n left: 100%;\\n}\\n.noUi-value-vertical {\\n -webkit-transform: translate(0, -50%);\\n transform: translate(0, -50%);\\n padding-left: 25px;\\n}\\n.noUi-rtl .noUi-value-vertical {\\n -webkit-transform: translate(0, 50%);\\n transform: translate(0, 50%);\\n}\\n.noUi-marker-vertical.noUi-marker {\\n width: 5px;\\n height: 2px;\\n margin-top: -1px;\\n}\\n.noUi-marker-vertical.noUi-marker-sub {\\n width: 10px;\\n}\\n.noUi-marker-vertical.noUi-marker-large {\\n width: 15px;\\n}\\n.noUi-tooltip {\\n display: block;\\n position: absolute;\\n border: 1px solid #D9D9D9;\\n border-radius: 3px;\\n background: #fff;\\n color: #000;\\n padding: 5px;\\n text-align: center;\\n white-space: nowrap;\\n}\\n.noUi-horizontal .noUi-tooltip {\\n -webkit-transform: translate(-50%, 0);\\n transform: translate(-50%, 0);\\n left: 50%;\\n bottom: 120%;\\n}\\n.noUi-vertical .noUi-tooltip {\\n -webkit-transform: translate(0, -50%);\\n transform: translate(0, -50%);\\n top: 50%;\\n right: 120%;\\n}\\n.noUi-horizontal .noUi-origin > .noUi-tooltip {\\n -webkit-transform: translate(50%, 0);\\n transform: translate(50%, 0);\\n left: auto;\\n bottom: 10px;\\n}\\n.noUi-vertical .noUi-origin > .noUi-tooltip {\\n -webkit-transform: translate(0, -18px);\\n transform: translate(0, -18px);\\n top: auto;\\n right: 28px;\\n}\\n\"]}]);\n// Exports\nmodule.exports = exports;\n","\"use strict\";\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\n\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\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); return Constructor; }\n\nfunction _get(target, property, receiver) { 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(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\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 } }); 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\nimport { ReactiveElement as t } from \"@lit/reactive-element\";\nexport * from \"@lit/reactive-element\";\nimport { render as e, noChange as i } from \"lit-html\";\nexport * from \"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nvar l, o;\nvar r = t;\n\nvar s = /*#__PURE__*/function (_t) {\n _inherits(s, _t);\n\n var _super = _createSuper(s);\n\n function s() {\n var _this;\n\n _classCallCheck(this, s);\n\n _this = _super.apply(this, arguments), _this.renderOptions = {\n host: _assertThisInitialized(_this)\n }, _this._$Dt = void 0;\n return _this;\n }\n\n _createClass(s, [{\n key: \"createRenderRoot\",\n value: function createRenderRoot() {\n var t, e;\n\n var i = _get(_getPrototypeOf(s.prototype), \"createRenderRoot\", this).call(this);\n\n return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;\n }\n }, {\n key: \"update\",\n value: function update(t) {\n var i = this.render();\n this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_getPrototypeOf(s.prototype), \"update\", this).call(this, t), this._$Dt = e(i, this.renderRoot, this.renderOptions);\n }\n }, {\n key: \"connectedCallback\",\n value: function connectedCallback() {\n var t;\n _get(_getPrototypeOf(s.prototype), \"connectedCallback\", this).call(this), null === (t = this._$Dt) || void 0 === t || t.setConnected(!0);\n }\n }, {\n key: \"disconnectedCallback\",\n value: function disconnectedCallback() {\n var t;\n _get(_getPrototypeOf(s.prototype), \"disconnectedCallback\", this).call(this), null === (t = this._$Dt) || void 0 === t || t.setConnected(!1);\n }\n }, {\n key: \"render\",\n value: function render() {\n return i;\n }\n }]);\n\n return s;\n}(t);\n\ns.finalized = !0, s._$litElement$ = !0, null === (l = globalThis.litElementHydrateSupport) || void 0 === l || l.call(globalThis, {\n LitElement: s\n});\nvar n = globalThis.litElementPolyfillSupport;\nnull == n || n({\n LitElement: s\n});\nvar h = {\n _$AK: function _$AK(t, e, i) {\n t._$AK(e, i);\n },\n _$AL: function _$AL(t) {\n return t._$AL;\n }\n};\n(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push(\"3.2.0\");\nexport { s as LitElement, r as UpdatingElement, h as _$LE };","function _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\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 _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 _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 _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); return Constructor; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;\n\nvar i = globalThis.trustedTypes,\n s = i ? i.createPolicy(\"lit-html\", {\n createHTML: function createHTML(t) {\n return t;\n }\n}) : void 0,\n e = \"lit$\".concat((Math.random() + \"\").slice(9), \"$\"),\n o = \"?\" + e,\n n = \"<\".concat(o, \">\"),\n l = document,\n h = function h() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n return l.createComment(t);\n},\n r = function r(t) {\n return null === t || \"object\" != _typeof(t) && \"function\" != typeof t;\n},\n d = Array.isArray,\n u = function u(t) {\n var i;\n return d(t) || \"function\" == typeof (null === (i = t) || void 0 === i ? void 0 : i[Symbol.iterator]);\n},\n c = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,\n v = /-->/g,\n a = />/g,\n f = />|[ \t\\n\f\\r](?:([^\\s\"'>=/]+)([ \t\\n\f\\r]*=[ \t\\n\f\\r]*(?:[^ \t\\n\f\\r\"'`<>=]|(\"|')|))|$)/g,\n _ = /'/g,\n m = /\"/g,\n g = /^(?:script|style|textarea|title)$/i,\n p = function p(t) {\n return function (i) {\n for (var _len = arguments.length, s = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n s[_key - 1] = arguments[_key];\n }\n\n return {\n _$litType$: t,\n strings: i,\n values: s\n };\n };\n},\n $ = p(1),\n y = p(2),\n b = Symbol.for(\"lit-noChange\"),\n w = Symbol.for(\"lit-nothing\"),\n T = new WeakMap(),\n x = function x(t, i, s) {\n var e, o;\n var n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;\n var l = n._$litPart$;\n\n if (void 0 === l) {\n var _t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;\n\n n._$litPart$ = l = new N(i.insertBefore(h(), _t), _t, void 0, null != s ? s : {});\n }\n\n return l._$AI(t), l;\n},\n A = l.createTreeWalker(l, 129, null, !1),\n C = function C(t, i) {\n var o = t.length - 1,\n l = [];\n var h,\n r = 2 === i ? \"\" : \"\",\n d = c;\n\n for (var _i = 0; _i < o; _i++) {\n var _s = t[_i];\n\n var _o = void 0,\n _u = void 0,\n _p = -1,\n _$ = 0;\n\n for (; _$ < _s.length && (d.lastIndex = _$, _u = d.exec(_s), null !== _u);) {\n _$ = d.lastIndex, d === c ? \"!--\" === _u[1] ? d = v : void 0 !== _u[1] ? d = a : void 0 !== _u[2] ? (g.test(_u[2]) && (h = RegExp(\"\" === _u[0] ? (d = null != h ? h : c, _p = -1) : void 0 === _u[1] ? _p = -2 : (_p = d.lastIndex - _u[2].length, _o = _u[1], d = void 0 === _u[3] ? f : '\"' === _u[3] ? m : _) : d === m || d === _ ? d = f : d === v || d === a ? d = c : (d = f, h = void 0);\n }\n\n var _y = d === f && t[_i + 1].startsWith(\"/>\") ? \" \" : \"\";\n\n r += d === c ? _s + n : _p >= 0 ? (l.push(_o), _s.slice(0, _p) + \"$lit$\" + _s.slice(_p) + e + _y) : _s + e + (-2 === _p ? (l.push(void 0), _i) : _y);\n }\n\n var u = r + (t[o] || \"\") + (2 === i ? \"\" : \"\");\n if (!Array.isArray(t) || !t.hasOwnProperty(\"raw\")) throw Error(\"invalid template strings array\");\n return [void 0 !== s ? s.createHTML(u) : u, l];\n};\n\nvar E = /*#__PURE__*/function () {\n function E(_ref, n) {\n var t = _ref.strings,\n s = _ref._$litType$;\n\n _classCallCheck(this, E);\n\n var l;\n this.parts = [];\n var r = 0,\n d = 0;\n\n var u = t.length - 1,\n c = this.parts,\n _C = C(t, s),\n _C2 = _slicedToArray(_C, 2),\n v = _C2[0],\n a = _C2[1];\n\n if (this.el = E.createElement(v, n), A.currentNode = this.el.content, 2 === s) {\n var _t2 = this.el.content,\n _i2 = _t2.firstChild;\n _i2.remove(), _t2.append.apply(_t2, _toConsumableArray(_i2.childNodes));\n }\n\n for (; null !== (l = A.nextNode()) && c.length < u;) {\n if (1 === l.nodeType) {\n if (l.hasAttributes()) {\n var _t3 = [];\n\n var _iterator = _createForOfIteratorHelper(l.getAttributeNames()),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _i5 = _step.value;\n\n if (_i5.endsWith(\"$lit$\") || _i5.startsWith(e)) {\n var _s2 = a[d++];\n\n if (_t3.push(_i5), void 0 !== _s2) {\n var _t5 = l.getAttribute(_s2.toLowerCase() + \"$lit$\").split(e),\n _i6 = /([.?@])?(.*)/.exec(_s2);\n\n c.push({\n type: 1,\n index: r,\n name: _i6[2],\n strings: _t5,\n ctor: \".\" === _i6[1] ? M : \"?\" === _i6[1] ? H : \"@\" === _i6[1] ? I : S\n });\n } else c.push({\n type: 6,\n index: r\n });\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n for (var _i3 = 0, _t4 = _t3; _i3 < _t4.length; _i3++) {\n var _i4 = _t4[_i3];\n l.removeAttribute(_i4);\n }\n }\n\n if (g.test(l.tagName)) {\n var _t6 = l.textContent.split(e),\n _s3 = _t6.length - 1;\n\n if (_s3 > 0) {\n l.textContent = i ? i.emptyScript : \"\";\n\n for (var _i7 = 0; _i7 < _s3; _i7++) {\n l.append(_t6[_i7], h()), A.nextNode(), c.push({\n type: 2,\n index: ++r\n });\n }\n\n l.append(_t6[_s3], h());\n }\n }\n } else if (8 === l.nodeType) if (l.data === o) c.push({\n type: 2,\n index: r\n });else {\n var _t7 = -1;\n\n for (; -1 !== (_t7 = l.data.indexOf(e, _t7 + 1));) {\n c.push({\n type: 7,\n index: r\n }), _t7 += e.length - 1;\n }\n }\n\n r++;\n }\n }\n\n _createClass(E, null, [{\n key: \"createElement\",\n value: function createElement(t, i) {\n var s = l.createElement(\"template\");\n return s.innerHTML = t, s;\n }\n }]);\n\n return E;\n}();\n\nfunction P(t, i) {\n var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : t;\n var e = arguments.length > 3 ? arguments[3] : undefined;\n var o, n, l, h;\n if (i === b) return i;\n var d = void 0 !== e ? null === (o = s._$Cl) || void 0 === o ? void 0 : o[e] : s._$Cu;\n var u = r(i) ? void 0 : i._$litDirective$;\n return (null == d ? void 0 : d.constructor) !== u && (null === (n = null == d ? void 0 : d._$AO) || void 0 === n || n.call(d, !1), void 0 === u ? d = void 0 : (d = new u(t), d._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Cl) && void 0 !== l ? l : h._$Cl = [])[e] = d : s._$Cu = d), void 0 !== d && (i = P(t, d._$AS(t, i.values), d, e)), i;\n}\n\nvar V = /*#__PURE__*/function () {\n function V(t, i) {\n _classCallCheck(this, V);\n\n this.v = [], this._$AN = void 0, this._$AD = t, this._$AM = i;\n }\n\n _createClass(V, [{\n key: \"parentNode\",\n get: function get() {\n return this._$AM.parentNode;\n }\n }, {\n key: \"_$AU\",\n get: function get() {\n return this._$AM._$AU;\n }\n }, {\n key: \"p\",\n value: function p(t) {\n var i;\n var _this$_$AD = this._$AD,\n s = _this$_$AD.el.content,\n e = _this$_$AD.parts,\n o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : l).importNode(s, !0);\n A.currentNode = o;\n var n = A.nextNode(),\n h = 0,\n r = 0,\n d = e[0];\n\n for (; void 0 !== d;) {\n if (h === d.index) {\n var _i8 = void 0;\n\n 2 === d.type ? _i8 = new N(n, n.nextSibling, this, t) : 1 === d.type ? _i8 = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (_i8 = new L(n, this, t)), this.v.push(_i8), d = e[++r];\n }\n\n h !== (null == d ? void 0 : d.index) && (n = A.nextNode(), h++);\n }\n\n return o;\n }\n }, {\n key: \"m\",\n value: function m(t) {\n var i = 0;\n\n var _iterator2 = _createForOfIteratorHelper(this.v),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _s4 = _step2.value;\n void 0 !== _s4 && (void 0 !== _s4.strings ? (_s4._$AI(t, _s4, i), i += _s4.strings.length - 2) : _s4._$AI(t[i])), i++;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n }]);\n\n return V;\n}();\n\nvar N = /*#__PURE__*/function () {\n function N(t, i, s, e) {\n _classCallCheck(this, N);\n\n var o;\n this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cg = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;\n }\n\n _createClass(N, [{\n key: \"_$AU\",\n get: function get() {\n var t, i;\n return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cg;\n }\n }, {\n key: \"parentNode\",\n get: function get() {\n var t = this._$AA.parentNode;\n var i = this._$AM;\n return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;\n }\n }, {\n key: \"startNode\",\n get: function get() {\n return this._$AA;\n }\n }, {\n key: \"endNode\",\n get: function get() {\n return this._$AB;\n }\n }, {\n key: \"_$AI\",\n value: function _$AI(t) {\n var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;\n t = P(this, t, i), r(t) ? t === w || null == t || \"\" === t ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== b && this.$(t) : void 0 !== t._$litType$ ? this.T(t) : void 0 !== t.nodeType ? this.k(t) : u(t) ? this.S(t) : this.$(t);\n }\n }, {\n key: \"A\",\n value: function A(t) {\n var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._$AB;\n return this._$AA.parentNode.insertBefore(t, i);\n }\n }, {\n key: \"k\",\n value: function k(t) {\n this._$AH !== t && (this._$AR(), this._$AH = this.A(t));\n }\n }, {\n key: \"$\",\n value: function $(t) {\n this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.k(l.createTextNode(t)), this._$AH = t;\n }\n }, {\n key: \"T\",\n value: function T(t) {\n var i;\n var s = t.values,\n e = t._$litType$,\n o = \"number\" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = E.createElement(e.h, this.options)), e);\n if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.m(s);else {\n var _t8 = new V(o, this),\n _i9 = _t8.p(this.options);\n\n _t8.m(s), this.k(_i9), this._$AH = _t8;\n }\n }\n }, {\n key: \"_$AC\",\n value: function _$AC(t) {\n var i = T.get(t.strings);\n return void 0 === i && T.set(t.strings, i = new E(t)), i;\n }\n }, {\n key: \"S\",\n value: function S(t) {\n d(this._$AH) || (this._$AH = [], this._$AR());\n var i = this._$AH;\n var s,\n e = 0;\n\n var _iterator3 = _createForOfIteratorHelper(t),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var _o2 = _step3.value;\n e === i.length ? i.push(s = new N(this.A(h()), this.A(h()), this, this.options)) : s = i[e], s._$AI(_o2), e++;\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);\n }\n }, {\n key: \"_$AR\",\n value: function _$AR() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._$AA.nextSibling;\n var i = arguments.length > 1 ? arguments[1] : undefined;\n var s;\n\n for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {\n var _i10 = t.nextSibling;\n t.remove(), t = _i10;\n }\n }\n }, {\n key: \"setConnected\",\n value: function setConnected(t) {\n var i;\n void 0 === this._$AM && (this._$Cg = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));\n }\n }]);\n\n return N;\n}();\n\nvar S = /*#__PURE__*/function () {\n function S(t, i, s, e, o) {\n _classCallCheck(this, S);\n\n this.type = 1, this._$AH = w, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || \"\" !== s[0] || \"\" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = w;\n }\n\n _createClass(S, [{\n key: \"tagName\",\n get: function get() {\n return this.element.tagName;\n }\n }, {\n key: \"_$AU\",\n get: function get() {\n return this._$AM._$AU;\n }\n }, {\n key: \"_$AI\",\n value: function _$AI(t) {\n var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;\n var s = arguments.length > 2 ? arguments[2] : undefined;\n var e = arguments.length > 3 ? arguments[3] : undefined;\n var o = this.strings;\n var n = !1;\n if (void 0 === o) t = P(this, t, i, 0), n = !r(t) || t !== this._$AH && t !== b, n && (this._$AH = t);else {\n var _e2 = t;\n\n var _l, _h;\n\n for (t = o[0], _l = 0; _l < o.length - 1; _l++) {\n _h = P(this, _e2[s + _l], i, _l), _h === b && (_h = this._$AH[_l]), n || (n = !r(_h) || _h !== this._$AH[_l]), _h === w ? t = w : t !== w && (t += (null != _h ? _h : \"\") + o[_l + 1]), this._$AH[_l] = _h;\n }\n }\n n && !e && this.C(t);\n }\n }, {\n key: \"C\",\n value: function C(t) {\n t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : \"\");\n }\n }]);\n\n return S;\n}();\n\nvar M = /*#__PURE__*/function (_S) {\n _inherits(M, _S);\n\n var _super = _createSuper(M);\n\n function M() {\n var _this;\n\n _classCallCheck(this, M);\n\n _this = _super.apply(this, arguments), _this.type = 3;\n return _this;\n }\n\n _createClass(M, [{\n key: \"C\",\n value: function C(t) {\n this.element[this.name] = t === w ? void 0 : t;\n }\n }]);\n\n return M;\n}(S);\n\nvar k = i ? i.emptyScript : \"\";\n\nvar H = /*#__PURE__*/function (_S2) {\n _inherits(H, _S2);\n\n var _super2 = _createSuper(H);\n\n function H() {\n var _this2;\n\n _classCallCheck(this, H);\n\n _this2 = _super2.apply(this, arguments), _this2.type = 4;\n return _this2;\n }\n\n _createClass(H, [{\n key: \"C\",\n value: function C(t) {\n t && t !== w ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name);\n }\n }]);\n\n return H;\n}(S);\n\nvar I = /*#__PURE__*/function (_S3) {\n _inherits(I, _S3);\n\n var _super3 = _createSuper(I);\n\n function I(t, i, s, e, o) {\n var _this3;\n\n _classCallCheck(this, I);\n\n _this3 = _super3.call(this, t, i, s, e, o), _this3.type = 5;\n return _this3;\n }\n\n _createClass(I, [{\n key: \"_$AI\",\n value: function _$AI(t) {\n var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;\n var s;\n if ((t = null !== (s = P(this, t, i, 0)) && void 0 !== s ? s : w) === b) return;\n var e = this._$AH,\n o = t === w && e !== w || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,\n n = t !== w && (e === w || o);\n o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;\n }\n }, {\n key: \"handleEvent\",\n value: function handleEvent(t) {\n var i, s;\n \"function\" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);\n }\n }]);\n\n return I;\n}(S);\n\nvar L = /*#__PURE__*/function () {\n function L(t, i, s) {\n _classCallCheck(this, L);\n\n this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;\n }\n\n _createClass(L, [{\n key: \"_$AU\",\n get: function get() {\n return this._$AM._$AU;\n }\n }, {\n key: \"_$AI\",\n value: function _$AI(t) {\n P(this, t);\n }\n }]);\n\n return L;\n}();\n\nvar R = {\n P: \"$lit$\",\n L: e,\n V: o,\n I: 1,\n N: C,\n R: V,\n D: u,\n j: P,\n H: N,\n O: S,\n F: H,\n B: I,\n W: M,\n Z: L\n},\n z = window.litHtmlPolyfillSupport;\nnull == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push(\"2.2.0\");\nexport { R as _$LH, $ as html, b as noChange, w as nothing, x as render, y as svg };","import \"@lit/reactive-element\";\nimport \"lit-html\";\nexport * from \"lit-element/lit-element.js\";","var api = require(\"!../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../css-loader/dist/cjs.js??ref--5-1!../../postcss-loader/src/index.js??ref--5-2!./nouislider.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.noUiSlider = {}));\n})(this, function (exports) {\n 'use strict';\n\n exports.PipsMode = void 0;\n\n (function (PipsMode) {\n PipsMode[\"Range\"] = \"range\";\n PipsMode[\"Steps\"] = \"steps\";\n PipsMode[\"Positions\"] = \"positions\";\n PipsMode[\"Count\"] = \"count\";\n PipsMode[\"Values\"] = \"values\";\n })(exports.PipsMode || (exports.PipsMode = {}));\n\n exports.PipsType = void 0;\n\n (function (PipsType) {\n PipsType[PipsType[\"None\"] = -1] = \"None\";\n PipsType[PipsType[\"NoValue\"] = 0] = \"NoValue\";\n PipsType[PipsType[\"LargeValue\"] = 1] = \"LargeValue\";\n PipsType[PipsType[\"SmallValue\"] = 2] = \"SmallValue\";\n })(exports.PipsType || (exports.PipsType = {})); //region Helper Methods\n\n\n function isValidFormatter(entry) {\n return isValidPartialFormatter(entry) && typeof entry.from === \"function\";\n }\n\n function isValidPartialFormatter(entry) {\n // partial formatters only need a to function and not a from function\n return _typeof(entry) === \"object\" && typeof entry.to === \"function\";\n }\n\n function removeElement(el) {\n el.parentElement.removeChild(el);\n }\n\n function isSet(value) {\n return value !== null && value !== undefined;\n } // Bindable version\n\n\n function preventDefault(e) {\n e.preventDefault();\n } // Removes duplicates from an array.\n\n\n function unique(array) {\n return array.filter(function (a) {\n return !this[a] ? this[a] = true : false;\n }, {});\n } // Round a value to the closest 'to'.\n\n\n function closest(value, to) {\n return Math.round(value / to) * to;\n } // Current position of an element relative to the document.\n\n\n function offset(elem, orientation) {\n var rect = elem.getBoundingClientRect();\n var doc = elem.ownerDocument;\n var docElem = doc.documentElement;\n var pageOffset = getPageOffset(doc); // getBoundingClientRect contains left scroll in Chrome on Android.\n // I haven't found a feature detection that proves this. Worst case\n // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.\n\n if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {\n pageOffset.x = 0;\n }\n\n return orientation ? rect.top + pageOffset.y - docElem.clientTop : rect.left + pageOffset.x - docElem.clientLeft;\n } // Checks whether a value is numerical.\n\n\n function isNumeric(a) {\n return typeof a === \"number\" && !isNaN(a) && isFinite(a);\n } // Sets a class and removes it after [duration] ms.\n\n\n function addClassFor(element, className, duration) {\n if (duration > 0) {\n addClass(element, className);\n setTimeout(function () {\n removeClass(element, className);\n }, duration);\n }\n } // Limits a value to 0 - 100\n\n\n function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n } // Wraps a variable as an array, if it isn't one yet.\n // Note that an input array is returned by reference!\n\n\n function asArray(a) {\n return Array.isArray(a) ? a : [a];\n } // Counts decimals\n\n\n function countDecimals(numStr) {\n numStr = String(numStr);\n var pieces = numStr.split(\".\");\n return pieces.length > 1 ? pieces[1].length : 0;\n } // http://youmightnotneedjquery.com/#add_class\n\n\n function addClass(el, className) {\n if (el.classList && !/\\s/.test(className)) {\n el.classList.add(className);\n } else {\n el.className += \" \" + className;\n }\n } // http://youmightnotneedjquery.com/#remove_class\n\n\n function removeClass(el, className) {\n if (el.classList && !/\\s/.test(className)) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(\"(^|\\\\b)\" + className.split(\" \").join(\"|\") + \"(\\\\b|$)\", \"gi\"), \" \");\n }\n } // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/\n\n\n function hasClass(el, className) {\n return el.classList ? el.classList.contains(className) : new RegExp(\"\\\\b\" + className + \"\\\\b\").test(el.className);\n } // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes\n\n\n function getPageOffset(doc) {\n var supportPageOffset = window.pageXOffset !== undefined;\n var isCSS1Compat = (doc.compatMode || \"\") === \"CSS1Compat\";\n var x = supportPageOffset ? window.pageXOffset : isCSS1Compat ? doc.documentElement.scrollLeft : doc.body.scrollLeft;\n var y = supportPageOffset ? window.pageYOffset : isCSS1Compat ? doc.documentElement.scrollTop : doc.body.scrollTop;\n return {\n x: x,\n y: y\n };\n } // we provide a function to compute constants instead\n // of accessing window.* as soon as the module needs it\n // so that we do not compute anything if not needed\n\n\n function getActions() {\n // Determine the events to bind. IE11 implements pointerEvents without\n // a prefix, which breaks compatibility with the IE10 implementation.\n return window.navigator.pointerEnabled ? {\n start: \"pointerdown\",\n move: \"pointermove\",\n end: \"pointerup\"\n } : window.navigator.msPointerEnabled ? {\n start: \"MSPointerDown\",\n move: \"MSPointerMove\",\n end: \"MSPointerUp\"\n } : {\n start: \"mousedown touchstart\",\n move: \"mousemove touchmove\",\n end: \"mouseup touchend\"\n };\n } // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n // Issue #785\n\n\n function getSupportsPassive() {\n var supportsPassive = false;\n /* eslint-disable */\n\n try {\n var opts = Object.defineProperty({}, \"passive\", {\n get: function get() {\n supportsPassive = true;\n }\n }); // @ts-ignore\n\n window.addEventListener(\"test\", null, opts);\n } catch (e) {}\n /* eslint-enable */\n\n\n return supportsPassive;\n }\n\n function getSupportsTouchActionNone() {\n return window.CSS && CSS.supports && CSS.supports(\"touch-action\", \"none\");\n } //endregion\n //region Range Calculation\n // Determine the size of a sub-range in relation to a full range.\n\n\n function subRangeRatio(pa, pb) {\n return 100 / (pb - pa);\n } // (percentage) How many percent is this value of this range?\n\n\n function fromPercentage(range, value, startRange) {\n return value * 100 / (range[startRange + 1] - range[startRange]);\n } // (percentage) Where is this value on this range?\n\n\n function toPercentage(range, value) {\n return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0], 0);\n } // (value) How much is this percentage on this range?\n\n\n function isPercentage(range, value) {\n return value * (range[1] - range[0]) / 100 + range[0];\n }\n\n function getJ(value, arr) {\n var j = 1;\n\n while (value >= arr[j]) {\n j += 1;\n }\n\n return j;\n } // (percentage) Input a value, find where, on a scale of 0-100, it applies.\n\n\n function toStepping(xVal, xPct, value) {\n if (value >= xVal.slice(-1)[0]) {\n return 100;\n }\n\n var j = getJ(value, xVal);\n var va = xVal[j - 1];\n var vb = xVal[j];\n var pa = xPct[j - 1];\n var pb = xPct[j];\n return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);\n } // (value) Input a percentage, find where it is on the specified range.\n\n\n function fromStepping(xVal, xPct, value) {\n // There is no range group that fits 100\n if (value >= 100) {\n return xVal.slice(-1)[0];\n }\n\n var j = getJ(value, xPct);\n var va = xVal[j - 1];\n var vb = xVal[j];\n var pa = xPct[j - 1];\n var pb = xPct[j];\n return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));\n } // (percentage) Get the step that applies at a certain value.\n\n\n function getStep(xPct, xSteps, snap, value) {\n if (value === 100) {\n return value;\n }\n\n var j = getJ(value, xPct);\n var a = xPct[j - 1];\n var b = xPct[j]; // If 'snap' is set, steps are used as fixed points on the slider.\n\n if (snap) {\n // Find the closest position, a or b.\n if (value - a > (b - a) / 2) {\n return b;\n }\n\n return a;\n }\n\n if (!xSteps[j - 1]) {\n return value;\n }\n\n return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);\n } //endregion\n //region Spectrum\n\n\n var Spectrum =\n /** @class */\n function () {\n function Spectrum(entry, snap, singleStep) {\n this.xPct = [];\n this.xVal = [];\n this.xSteps = [];\n this.xNumSteps = [];\n this.xHighestCompleteStep = [];\n this.xSteps = [singleStep || false];\n this.xNumSteps = [false];\n this.snap = snap;\n var index;\n var ordered = []; // Map the object keys to an array.\n\n Object.keys(entry).forEach(function (index) {\n ordered.push([asArray(entry[index]), index]);\n }); // Sort all entries by value (numeric sort).\n\n ordered.sort(function (a, b) {\n return a[0][0] - b[0][0];\n }); // Convert all entries to subranges.\n\n for (index = 0; index < ordered.length; index++) {\n this.handleEntryPoint(ordered[index][1], ordered[index][0]);\n } // Store the actual step values.\n // xSteps is sorted in the same order as xPct and xVal.\n\n\n this.xNumSteps = this.xSteps.slice(0); // Convert all numeric steps to the percentage of the subrange they represent.\n\n for (index = 0; index < this.xNumSteps.length; index++) {\n this.handleStepPoint(index, this.xNumSteps[index]);\n }\n }\n\n Spectrum.prototype.getDistance = function (value) {\n var distances = [];\n\n for (var index = 0; index < this.xNumSteps.length - 1; index++) {\n distances[index] = fromPercentage(this.xVal, value, index);\n }\n\n return distances;\n }; // Calculate the percentual distance over the whole scale of ranges.\n // direction: 0 = backwards / 1 = forwards\n\n\n Spectrum.prototype.getAbsoluteDistance = function (value, distances, direction) {\n var xPct_index = 0; // Calculate range where to start calculation\n\n if (value < this.xPct[this.xPct.length - 1]) {\n while (value > this.xPct[xPct_index + 1]) {\n xPct_index++;\n }\n } else if (value === this.xPct[this.xPct.length - 1]) {\n xPct_index = this.xPct.length - 2;\n } // If looking backwards and the value is exactly at a range separator then look one range further\n\n\n if (!direction && value === this.xPct[xPct_index + 1]) {\n xPct_index++;\n }\n\n if (distances === null) {\n distances = [];\n }\n\n var start_factor;\n var rest_factor = 1;\n var rest_rel_distance = distances[xPct_index];\n var range_pct = 0;\n var rel_range_distance = 0;\n var abs_distance_counter = 0;\n var range_counter = 0; // Calculate what part of the start range the value is\n\n if (direction) {\n start_factor = (value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n } else {\n start_factor = (this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n } // Do until the complete distance across ranges is calculated\n\n\n while (rest_rel_distance > 0) {\n // Calculate the percentage of total range\n range_pct = this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter]; // Detect if the margin, padding or limit is larger then the current range and calculate\n\n if (distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100) {\n // If larger then take the percentual distance of the whole range\n rel_range_distance = range_pct * start_factor; // Rest factor of relative percentual distance still to be calculated\n\n rest_factor = (rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter]; // Set start factor to 1 as for next range it does not apply.\n\n start_factor = 1;\n } else {\n // If smaller or equal then take the percentual distance of the calculate percentual part of that range\n rel_range_distance = distances[xPct_index + range_counter] * range_pct / 100 * rest_factor; // No rest left as the rest fits in current range\n\n rest_factor = 0;\n }\n\n if (direction) {\n abs_distance_counter = abs_distance_counter - rel_range_distance; // Limit range to first range when distance becomes outside of minimum range\n\n if (this.xPct.length + range_counter >= 1) {\n range_counter--;\n }\n } else {\n abs_distance_counter = abs_distance_counter + rel_range_distance; // Limit range to last range when distance becomes outside of maximum range\n\n if (this.xPct.length - range_counter >= 1) {\n range_counter++;\n }\n } // Rest of relative percentual distance still to be calculated\n\n\n rest_rel_distance = distances[xPct_index + range_counter] * rest_factor;\n }\n\n return value + abs_distance_counter;\n };\n\n Spectrum.prototype.toStepping = function (value) {\n value = toStepping(this.xVal, this.xPct, value);\n return value;\n };\n\n Spectrum.prototype.fromStepping = function (value) {\n return fromStepping(this.xVal, this.xPct, value);\n };\n\n Spectrum.prototype.getStep = function (value) {\n value = getStep(this.xPct, this.xSteps, this.snap, value);\n return value;\n };\n\n Spectrum.prototype.getDefaultStep = function (value, isDown, size) {\n var j = getJ(value, this.xPct); // When at the top or stepping down, look at the previous sub-range\n\n if (value === 100 || isDown && value === this.xPct[j - 1]) {\n j = Math.max(j - 1, 1);\n }\n\n return (this.xVal[j] - this.xVal[j - 1]) / size;\n };\n\n Spectrum.prototype.getNearbySteps = function (value) {\n var j = getJ(value, this.xPct);\n return {\n stepBefore: {\n startValue: this.xVal[j - 2],\n step: this.xNumSteps[j - 2],\n highestStep: this.xHighestCompleteStep[j - 2]\n },\n thisStep: {\n startValue: this.xVal[j - 1],\n step: this.xNumSteps[j - 1],\n highestStep: this.xHighestCompleteStep[j - 1]\n },\n stepAfter: {\n startValue: this.xVal[j],\n step: this.xNumSteps[j],\n highestStep: this.xHighestCompleteStep[j]\n }\n };\n };\n\n Spectrum.prototype.countStepDecimals = function () {\n var stepDecimals = this.xNumSteps.map(countDecimals);\n return Math.max.apply(null, stepDecimals);\n };\n\n Spectrum.prototype.hasNoSize = function () {\n return this.xVal[0] === this.xVal[this.xVal.length - 1];\n }; // Outside testing\n\n\n Spectrum.prototype.convert = function (value) {\n return this.getStep(this.toStepping(value));\n };\n\n Spectrum.prototype.handleEntryPoint = function (index, value) {\n var percentage; // Covert min/max syntax to 0 and 100.\n\n if (index === \"min\") {\n percentage = 0;\n } else if (index === \"max\") {\n percentage = 100;\n } else {\n percentage = parseFloat(index);\n } // Check for correct input.\n\n\n if (!isNumeric(percentage) || !isNumeric(value[0])) {\n throw new Error(\"noUiSlider: 'range' value isn't numeric.\");\n } // Store values.\n\n\n this.xPct.push(percentage);\n this.xVal.push(value[0]);\n var value1 = Number(value[1]); // NaN will evaluate to false too, but to keep\n // logging clear, set step explicitly. Make sure\n // not to override the 'step' setting with false.\n\n if (!percentage) {\n if (!isNaN(value1)) {\n this.xSteps[0] = value1;\n }\n } else {\n this.xSteps.push(isNaN(value1) ? false : value1);\n }\n\n this.xHighestCompleteStep.push(0);\n };\n\n Spectrum.prototype.handleStepPoint = function (i, n) {\n // Ignore 'false' stepping.\n if (!n) {\n return;\n } // Step over zero-length ranges (#948);\n\n\n if (this.xVal[i] === this.xVal[i + 1]) {\n this.xSteps[i] = this.xHighestCompleteStep[i] = this.xVal[i];\n return;\n } // Factor to range ratio\n\n\n this.xSteps[i] = fromPercentage([this.xVal[i], this.xVal[i + 1]], n, 0) / subRangeRatio(this.xPct[i], this.xPct[i + 1]);\n var totalSteps = (this.xVal[i + 1] - this.xVal[i]) / this.xNumSteps[i];\n var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);\n var step = this.xVal[i] + this.xNumSteps[i] * highestStep;\n this.xHighestCompleteStep[i] = step;\n };\n\n return Spectrum;\n }(); //endregion\n //region Options\n\n /*\tEvery input option is tested and parsed. This will prevent\n endless validation in internal methods. These tests are\n structured with an item for every option available. An\n option can be marked as required by setting the 'r' flag.\n The testing function is provided with three arguments:\n - The provided value for the option;\n - A reference to the options object;\n - The name for the option;\n The testing function returns false when an error is detected,\n or true when everything is OK. It can also modify the option\n object, to make sure all values can be correctly looped elsewhere. */\n //region Defaults\n\n\n var defaultFormatter = {\n to: function to(value) {\n return value === undefined ? \"\" : value.toFixed(2);\n },\n from: Number\n };\n var cssClasses = {\n target: \"target\",\n base: \"base\",\n origin: \"origin\",\n handle: \"handle\",\n handleLower: \"handle-lower\",\n handleUpper: \"handle-upper\",\n touchArea: \"touch-area\",\n horizontal: \"horizontal\",\n vertical: \"vertical\",\n background: \"background\",\n connect: \"connect\",\n connects: \"connects\",\n ltr: \"ltr\",\n rtl: \"rtl\",\n textDirectionLtr: \"txt-dir-ltr\",\n textDirectionRtl: \"txt-dir-rtl\",\n draggable: \"draggable\",\n drag: \"state-drag\",\n tap: \"state-tap\",\n active: \"active\",\n tooltip: \"tooltip\",\n pips: \"pips\",\n pipsHorizontal: \"pips-horizontal\",\n pipsVertical: \"pips-vertical\",\n marker: \"marker\",\n markerHorizontal: \"marker-horizontal\",\n markerVertical: \"marker-vertical\",\n markerNormal: \"marker-normal\",\n markerLarge: \"marker-large\",\n markerSub: \"marker-sub\",\n value: \"value\",\n valueHorizontal: \"value-horizontal\",\n valueVertical: \"value-vertical\",\n valueNormal: \"value-normal\",\n valueLarge: \"value-large\",\n valueSub: \"value-sub\"\n }; // Namespaces of internal event listeners\n\n var INTERNAL_EVENT_NS = {\n tooltips: \".__tooltips\",\n aria: \".__aria\"\n }; //endregion\n\n function testStep(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'step' is not numeric.\");\n } // The step option can still be used to set stepping\n // for linear sliders. Overwritten if set in 'range'.\n\n\n parsed.singleStep = entry;\n }\n\n function testKeyboardPageMultiplier(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'keyboardPageMultiplier' is not numeric.\");\n }\n\n parsed.keyboardPageMultiplier = entry;\n }\n\n function testKeyboardMultiplier(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'keyboardMultiplier' is not numeric.\");\n }\n\n parsed.keyboardMultiplier = entry;\n }\n\n function testKeyboardDefaultStep(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'keyboardDefaultStep' is not numeric.\");\n }\n\n parsed.keyboardDefaultStep = entry;\n }\n\n function testRange(parsed, entry) {\n // Filter incorrect input.\n if (_typeof(entry) !== \"object\" || Array.isArray(entry)) {\n throw new Error(\"noUiSlider: 'range' is not an object.\");\n } // Catch missing start or end.\n\n\n if (entry.min === undefined || entry.max === undefined) {\n throw new Error(\"noUiSlider: Missing 'min' or 'max' in 'range'.\");\n }\n\n parsed.spectrum = new Spectrum(entry, parsed.snap || false, parsed.singleStep);\n }\n\n function testStart(parsed, entry) {\n entry = asArray(entry); // Validate input. Values aren't tested, as the public .val method\n // will always provide a valid location.\n\n if (!Array.isArray(entry) || !entry.length) {\n throw new Error(\"noUiSlider: 'start' option is incorrect.\");\n } // Store the number of handles.\n\n\n parsed.handles = entry.length; // When the slider is initialized, the .val method will\n // be called with the start options.\n\n parsed.start = entry;\n }\n\n function testSnap(parsed, entry) {\n if (typeof entry !== \"boolean\") {\n throw new Error(\"noUiSlider: 'snap' option must be a boolean.\");\n } // Enforce 100% stepping within subranges.\n\n\n parsed.snap = entry;\n }\n\n function testAnimate(parsed, entry) {\n if (typeof entry !== \"boolean\") {\n throw new Error(\"noUiSlider: 'animate' option must be a boolean.\");\n } // Enforce 100% stepping within subranges.\n\n\n parsed.animate = entry;\n }\n\n function testAnimationDuration(parsed, entry) {\n if (typeof entry !== \"number\") {\n throw new Error(\"noUiSlider: 'animationDuration' option must be a number.\");\n }\n\n parsed.animationDuration = entry;\n }\n\n function testConnect(parsed, entry) {\n var connect = [false];\n var i; // Map legacy options\n\n if (entry === \"lower\") {\n entry = [true, false];\n } else if (entry === \"upper\") {\n entry = [false, true];\n } // Handle boolean options\n\n\n if (entry === true || entry === false) {\n for (i = 1; i < parsed.handles; i++) {\n connect.push(entry);\n }\n\n connect.push(false);\n } // Reject invalid input\n else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {\n throw new Error(\"noUiSlider: 'connect' option doesn't match handle count.\");\n } else {\n connect = entry;\n }\n\n parsed.connect = connect;\n }\n\n function testOrientation(parsed, entry) {\n // Set orientation to an a numerical value for easy\n // array selection.\n switch (entry) {\n case \"horizontal\":\n parsed.ort = 0;\n break;\n\n case \"vertical\":\n parsed.ort = 1;\n break;\n\n default:\n throw new Error(\"noUiSlider: 'orientation' option is invalid.\");\n }\n }\n\n function testMargin(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'margin' option must be numeric.\");\n } // Issue #582\n\n\n if (entry === 0) {\n return;\n }\n\n parsed.margin = parsed.spectrum.getDistance(entry);\n }\n\n function testLimit(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'limit' option must be numeric.\");\n }\n\n parsed.limit = parsed.spectrum.getDistance(entry);\n\n if (!parsed.limit || parsed.handles < 2) {\n throw new Error(\"noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.\");\n }\n }\n\n function testPadding(parsed, entry) {\n var index;\n\n if (!isNumeric(entry) && !Array.isArray(entry)) {\n throw new Error(\"noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.\");\n }\n\n if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {\n throw new Error(\"noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.\");\n }\n\n if (entry === 0) {\n return;\n }\n\n if (!Array.isArray(entry)) {\n entry = [entry, entry];\n } // 'getDistance' returns false for invalid values.\n\n\n parsed.padding = [parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];\n\n for (index = 0; index < parsed.spectrum.xNumSteps.length - 1; index++) {\n // last \"range\" can't contain step size as it is purely an endpoint.\n if (parsed.padding[0][index] < 0 || parsed.padding[1][index] < 0) {\n throw new Error(\"noUiSlider: 'padding' option must be a positive number(s).\");\n }\n }\n\n var totalPadding = entry[0] + entry[1];\n var firstValue = parsed.spectrum.xVal[0];\n var lastValue = parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];\n\n if (totalPadding / (lastValue - firstValue) > 1) {\n throw new Error(\"noUiSlider: 'padding' option must not exceed 100% of the range.\");\n }\n }\n\n function testDirection(parsed, entry) {\n // Set direction as a numerical value for easy parsing.\n // Invert connection for RTL sliders, so that the proper\n // handles get the connect/background classes.\n switch (entry) {\n case \"ltr\":\n parsed.dir = 0;\n break;\n\n case \"rtl\":\n parsed.dir = 1;\n break;\n\n default:\n throw new Error(\"noUiSlider: 'direction' option was not recognized.\");\n }\n }\n\n function testBehaviour(parsed, entry) {\n // Make sure the input is a string.\n if (typeof entry !== \"string\") {\n throw new Error(\"noUiSlider: 'behaviour' must be a string containing options.\");\n } // Check if the string contains any keywords.\n // None are required.\n\n\n var tap = entry.indexOf(\"tap\") >= 0;\n var drag = entry.indexOf(\"drag\") >= 0;\n var fixed = entry.indexOf(\"fixed\") >= 0;\n var snap = entry.indexOf(\"snap\") >= 0;\n var hover = entry.indexOf(\"hover\") >= 0;\n var unconstrained = entry.indexOf(\"unconstrained\") >= 0;\n var dragAll = entry.indexOf(\"drag-all\") >= 0;\n var smoothSteps = entry.indexOf(\"smooth-steps\") >= 0;\n\n if (fixed) {\n if (parsed.handles !== 2) {\n throw new Error(\"noUiSlider: 'fixed' behaviour must be used with 2 handles\");\n } // Use margin to enforce fixed state\n\n\n testMargin(parsed, parsed.start[1] - parsed.start[0]);\n }\n\n if (unconstrained && (parsed.margin || parsed.limit)) {\n throw new Error(\"noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit\");\n }\n\n parsed.events = {\n tap: tap || snap,\n drag: drag,\n dragAll: dragAll,\n smoothSteps: smoothSteps,\n fixed: fixed,\n snap: snap,\n hover: hover,\n unconstrained: unconstrained\n };\n }\n\n function testTooltips(parsed, entry) {\n if (entry === false) {\n return;\n }\n\n if (entry === true || isValidPartialFormatter(entry)) {\n parsed.tooltips = [];\n\n for (var i = 0; i < parsed.handles; i++) {\n parsed.tooltips.push(entry);\n }\n } else {\n entry = asArray(entry);\n\n if (entry.length !== parsed.handles) {\n throw new Error(\"noUiSlider: must pass a formatter for all handles.\");\n }\n\n entry.forEach(function (formatter) {\n if (typeof formatter !== \"boolean\" && !isValidPartialFormatter(formatter)) {\n throw new Error(\"noUiSlider: 'tooltips' must be passed a formatter or 'false'.\");\n }\n });\n parsed.tooltips = entry;\n }\n }\n\n function testHandleAttributes(parsed, entry) {\n if (entry.length !== parsed.handles) {\n throw new Error(\"noUiSlider: must pass a attributes for all handles.\");\n }\n\n parsed.handleAttributes = entry;\n }\n\n function testAriaFormat(parsed, entry) {\n if (!isValidPartialFormatter(entry)) {\n throw new Error(\"noUiSlider: 'ariaFormat' requires 'to' method.\");\n }\n\n parsed.ariaFormat = entry;\n }\n\n function testFormat(parsed, entry) {\n if (!isValidFormatter(entry)) {\n throw new Error(\"noUiSlider: 'format' requires 'to' and 'from' methods.\");\n }\n\n parsed.format = entry;\n }\n\n function testKeyboardSupport(parsed, entry) {\n if (typeof entry !== \"boolean\") {\n throw new Error(\"noUiSlider: 'keyboardSupport' option must be a boolean.\");\n }\n\n parsed.keyboardSupport = entry;\n }\n\n function testDocumentElement(parsed, entry) {\n // This is an advanced option. Passed values are used without validation.\n parsed.documentElement = entry;\n }\n\n function testCssPrefix(parsed, entry) {\n if (typeof entry !== \"string\" && entry !== false) {\n throw new Error(\"noUiSlider: 'cssPrefix' must be a string or `false`.\");\n }\n\n parsed.cssPrefix = entry;\n }\n\n function testCssClasses(parsed, entry) {\n if (_typeof(entry) !== \"object\") {\n throw new Error(\"noUiSlider: 'cssClasses' must be an object.\");\n }\n\n if (typeof parsed.cssPrefix === \"string\") {\n parsed.cssClasses = {};\n Object.keys(entry).forEach(function (key) {\n parsed.cssClasses[key] = parsed.cssPrefix + entry[key];\n });\n } else {\n parsed.cssClasses = entry;\n }\n } // Test all developer settings and parse to assumption-safe values.\n\n\n function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n var parsed = {\n margin: null,\n limit: null,\n padding: null,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n }; // Tests are executed in the order they are presented here.\n\n var tests = {\n step: {\n r: false,\n t: testStep\n },\n keyboardPageMultiplier: {\n r: false,\n t: testKeyboardPageMultiplier\n },\n keyboardMultiplier: {\n r: false,\n t: testKeyboardMultiplier\n },\n keyboardDefaultStep: {\n r: false,\n t: testKeyboardDefaultStep\n },\n start: {\n r: true,\n t: testStart\n },\n connect: {\n r: true,\n t: testConnect\n },\n direction: {\n r: true,\n t: testDirection\n },\n snap: {\n r: false,\n t: testSnap\n },\n animate: {\n r: false,\n t: testAnimate\n },\n animationDuration: {\n r: false,\n t: testAnimationDuration\n },\n range: {\n r: true,\n t: testRange\n },\n orientation: {\n r: false,\n t: testOrientation\n },\n margin: {\n r: false,\n t: testMargin\n },\n limit: {\n r: false,\n t: testLimit\n },\n padding: {\n r: false,\n t: testPadding\n },\n behaviour: {\n r: true,\n t: testBehaviour\n },\n ariaFormat: {\n r: false,\n t: testAriaFormat\n },\n format: {\n r: false,\n t: testFormat\n },\n tooltips: {\n r: false,\n t: testTooltips\n },\n keyboardSupport: {\n r: true,\n t: testKeyboardSupport\n },\n documentElement: {\n r: false,\n t: testDocumentElement\n },\n cssPrefix: {\n r: true,\n t: testCssPrefix\n },\n cssClasses: {\n r: true,\n t: testCssClasses\n },\n handleAttributes: {\n r: false,\n t: testHandleAttributes\n }\n };\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses,\n keyboardPageMultiplier: 5,\n keyboardMultiplier: 1,\n keyboardDefaultStep: 10\n }; // AriaFormat defaults to regular format, if any.\n\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n } // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n\n\n Object.keys(tests).forEach(function (name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider: '\" + name + \"' is required.\");\n }\n\n return;\n }\n\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n }); // Forward pips options\n\n parsed.pips = options.pips; // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\"; // Pips don't move, so we can place them using left/top.\n\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n parsed.style = styles[parsed.dir][parsed.ort];\n return parsed;\n } //endregion\n\n\n function scope(target, options, originalOptions) {\n var actions = getActions();\n var supportsTouchActionNone = getSupportsTouchActionNone();\n var supportsPassive = supportsTouchActionNone && getSupportsPassive(); // All variables local to 'scope' are prefixed with 'scope_'\n // Slider DOM Nodes\n\n var scope_Target = target;\n var scope_Base;\n var scope_Handles;\n var scope_Connects;\n var scope_Pips;\n var scope_Tooltips; // Slider state values\n\n var scope_Spectrum = options.spectrum;\n var scope_Values = [];\n var scope_Locations = [];\n var scope_HandleNumbers = [];\n var scope_ActiveHandlesCount = 0;\n var scope_Events = {}; // Document Nodes\n\n var scope_Document = target.ownerDocument;\n var scope_DocumentElement = options.documentElement || scope_Document.documentElement;\n var scope_Body = scope_Document.body; // For horizontal sliders in standard ltr documents,\n // make .noUi-origin overflow to the left so the document doesn't scroll.\n\n var scope_DirOffset = scope_Document.dir === \"rtl\" || options.ort === 1 ? 0 : 100; // Creates a node, adds it to target, returns the new node.\n\n function addNodeTo(addTarget, className) {\n var div = scope_Document.createElement(\"div\");\n\n if (className) {\n addClass(div, className);\n }\n\n addTarget.appendChild(div);\n return div;\n } // Append a origin to the base\n\n\n function addOrigin(base, handleNumber) {\n var origin = addNodeTo(base, options.cssClasses.origin);\n var handle = addNodeTo(origin, options.cssClasses.handle);\n addNodeTo(handle, options.cssClasses.touchArea);\n handle.setAttribute(\"data-handle\", String(handleNumber));\n\n if (options.keyboardSupport) {\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n // 0 = focusable and reachable\n handle.setAttribute(\"tabindex\", \"0\");\n handle.addEventListener(\"keydown\", function (event) {\n return eventKeydown(event, handleNumber);\n });\n }\n\n if (options.handleAttributes !== undefined) {\n var attributes_1 = options.handleAttributes[handleNumber];\n Object.keys(attributes_1).forEach(function (attribute) {\n handle.setAttribute(attribute, attributes_1[attribute]);\n });\n }\n\n handle.setAttribute(\"role\", \"slider\");\n handle.setAttribute(\"aria-orientation\", options.ort ? \"vertical\" : \"horizontal\");\n\n if (handleNumber === 0) {\n addClass(handle, options.cssClasses.handleLower);\n } else if (handleNumber === options.handles - 1) {\n addClass(handle, options.cssClasses.handleUpper);\n }\n\n return origin;\n } // Insert nodes for connect elements\n\n\n function addConnect(base, add) {\n if (!add) {\n return false;\n }\n\n return addNodeTo(base, options.cssClasses.connect);\n } // Add handles to the slider base.\n\n\n function addElements(connectOptions, base) {\n var connectBase = addNodeTo(base, options.cssClasses.connects);\n scope_Handles = [];\n scope_Connects = [];\n scope_Connects.push(addConnect(connectBase, connectOptions[0])); // [::::O====O====O====]\n // connectOptions = [0, 1, 1, 1]\n\n for (var i = 0; i < options.handles; i++) {\n // Keep a list of all added handles.\n scope_Handles.push(addOrigin(base, i));\n scope_HandleNumbers[i] = i;\n scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));\n }\n } // Initialize a single slider.\n\n\n function addSlider(addTarget) {\n // Apply classes and data to the target.\n addClass(addTarget, options.cssClasses.target);\n\n if (options.dir === 0) {\n addClass(addTarget, options.cssClasses.ltr);\n } else {\n addClass(addTarget, options.cssClasses.rtl);\n }\n\n if (options.ort === 0) {\n addClass(addTarget, options.cssClasses.horizontal);\n } else {\n addClass(addTarget, options.cssClasses.vertical);\n }\n\n var textDirection = getComputedStyle(addTarget).direction;\n\n if (textDirection === \"rtl\") {\n addClass(addTarget, options.cssClasses.textDirectionRtl);\n } else {\n addClass(addTarget, options.cssClasses.textDirectionLtr);\n }\n\n return addNodeTo(addTarget, options.cssClasses.base);\n }\n\n function addTooltip(handle, handleNumber) {\n if (!options.tooltips || !options.tooltips[handleNumber]) {\n return false;\n }\n\n return addNodeTo(handle.firstChild, options.cssClasses.tooltip);\n }\n\n function isSliderDisabled() {\n return scope_Target.hasAttribute(\"disabled\");\n } // Disable the slider dragging if any handle is disabled\n\n\n function isHandleDisabled(handleNumber) {\n var handleOrigin = scope_Handles[handleNumber];\n return handleOrigin.hasAttribute(\"disabled\");\n }\n\n function removeTooltips() {\n if (scope_Tooltips) {\n removeEvent(\"update\" + INTERNAL_EVENT_NS.tooltips);\n scope_Tooltips.forEach(function (tooltip) {\n if (tooltip) {\n removeElement(tooltip);\n }\n });\n scope_Tooltips = null;\n }\n } // The tooltips option is a shorthand for using the 'update' event.\n\n\n function tooltips() {\n removeTooltips(); // Tooltips are added with options.tooltips in original order.\n\n scope_Tooltips = scope_Handles.map(addTooltip);\n bindEvent(\"update\" + INTERNAL_EVENT_NS.tooltips, function (values, handleNumber, unencoded) {\n if (!scope_Tooltips || !options.tooltips) {\n return;\n }\n\n if (scope_Tooltips[handleNumber] === false) {\n return;\n }\n\n var formattedValue = values[handleNumber];\n\n if (options.tooltips[handleNumber] !== true) {\n formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n }\n\n scope_Tooltips[handleNumber].innerHTML = formattedValue;\n });\n }\n\n function aria() {\n removeEvent(\"update\" + INTERNAL_EVENT_NS.aria);\n bindEvent(\"update\" + INTERNAL_EVENT_NS.aria, function (values, handleNumber, unencoded, tap, positions) {\n // Update Aria Values for all handles, as a change in one changes min and max values for the next.\n scope_HandleNumbers.forEach(function (index) {\n var handle = scope_Handles[index];\n var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);\n var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);\n var now = positions[index]; // Formatted value for display\n\n var text = String(options.ariaFormat.to(unencoded[index])); // Map to slider range values\n\n min = scope_Spectrum.fromStepping(min).toFixed(1);\n max = scope_Spectrum.fromStepping(max).toFixed(1);\n now = scope_Spectrum.fromStepping(now).toFixed(1);\n handle.children[0].setAttribute(\"aria-valuemin\", min);\n handle.children[0].setAttribute(\"aria-valuemax\", max);\n handle.children[0].setAttribute(\"aria-valuenow\", now);\n handle.children[0].setAttribute(\"aria-valuetext\", text);\n });\n });\n }\n\n function getGroup(pips) {\n // Use the range.\n if (pips.mode === exports.PipsMode.Range || pips.mode === exports.PipsMode.Steps) {\n return scope_Spectrum.xVal;\n }\n\n if (pips.mode === exports.PipsMode.Count) {\n if (pips.values < 2) {\n throw new Error(\"noUiSlider: 'values' (>= 2) required for mode 'count'.\");\n } // Divide 0 - 100 in 'count' parts.\n\n\n var interval = pips.values - 1;\n var spread = 100 / interval;\n var values = []; // List these parts and have them handled as 'positions'.\n\n while (interval--) {\n values[interval] = interval * spread;\n }\n\n values.push(100);\n return mapToRange(values, pips.stepped);\n }\n\n if (pips.mode === exports.PipsMode.Positions) {\n // Map all percentages to on-range values.\n return mapToRange(pips.values, pips.stepped);\n }\n\n if (pips.mode === exports.PipsMode.Values) {\n // If the value must be stepped, it needs to be converted to a percentage first.\n if (pips.stepped) {\n return pips.values.map(function (value) {\n // Convert to percentage, apply step, return to value.\n return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));\n });\n } // Otherwise, we can simply use the values.\n\n\n return pips.values;\n }\n\n return []; // pips.mode = never\n }\n\n function mapToRange(values, stepped) {\n return values.map(function (value) {\n return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);\n });\n }\n\n function generateSpread(pips) {\n function safeIncrement(value, increment) {\n // Avoid floating point variance by dropping the smallest decimal places.\n return Number((value + increment).toFixed(7));\n }\n\n var group = getGroup(pips);\n var indexes = {};\n var firstInRange = scope_Spectrum.xVal[0];\n var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];\n var ignoreFirst = false;\n var ignoreLast = false;\n var prevPct = 0; // Create a copy of the group, sort it and filter away all duplicates.\n\n group = unique(group.slice().sort(function (a, b) {\n return a - b;\n })); // Make sure the range starts with the first element.\n\n if (group[0] !== firstInRange) {\n group.unshift(firstInRange);\n ignoreFirst = true;\n } // Likewise for the last one.\n\n\n if (group[group.length - 1] !== lastInRange) {\n group.push(lastInRange);\n ignoreLast = true;\n }\n\n group.forEach(function (current, index) {\n // Get the current step and the lower + upper positions.\n var step;\n var i;\n var q;\n var low = current;\n var high = group[index + 1];\n var newPct;\n var pctDifference;\n var pctPos;\n var type;\n var steps;\n var realSteps;\n var stepSize;\n var isSteps = pips.mode === exports.PipsMode.Steps; // When using 'steps' mode, use the provided steps.\n // Otherwise, we'll step on to the next subrange.\n\n if (isSteps) {\n step = scope_Spectrum.xNumSteps[index];\n } // Default to a 'full' step.\n\n\n if (!step) {\n step = high - low;\n } // If high is undefined we are at the last subrange. Make sure it iterates once (#1088)\n\n\n if (high === undefined) {\n high = low;\n } // Make sure step isn't 0, which would cause an infinite loop (#654)\n\n\n step = Math.max(step, 0.0000001); // Find all steps in the subrange.\n\n for (i = low; i <= high; i = safeIncrement(i, step)) {\n // Get the percentage value for the current step,\n // calculate the size for the subrange.\n newPct = scope_Spectrum.toStepping(i);\n pctDifference = newPct - prevPct;\n steps = pctDifference / (pips.density || 1);\n realSteps = Math.round(steps); // This ratio represents the amount of percentage-space a point indicates.\n // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.\n // Round the percentage offset to an even number, then divide by two\n // to spread the offset on both sides of the range.\n\n stepSize = pctDifference / realSteps; // Divide all points evenly, adding the correct number to this subrange.\n // Run up to <= so that 100% gets a point, event if ignoreLast is set.\n\n for (q = 1; q <= realSteps; q += 1) {\n // The ratio between the rounded value and the actual size might be ~1% off.\n // Correct the percentage offset by the number of points\n // per subrange. density = 1 will result in 100 points on the\n // full range, 2 for 50, 4 for 25, etc.\n pctPos = prevPct + q * stepSize;\n indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];\n } // Determine the point type.\n\n\n type = group.indexOf(i) > -1 ? exports.PipsType.LargeValue : isSteps ? exports.PipsType.SmallValue : exports.PipsType.NoValue; // Enforce the 'ignoreFirst' option by overwriting the type for 0.\n\n if (!index && ignoreFirst && i !== high) {\n type = 0;\n }\n\n if (!(i === high && ignoreLast)) {\n // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.\n indexes[newPct.toFixed(5)] = [i, type];\n } // Update the percentage count.\n\n\n prevPct = newPct;\n }\n });\n return indexes;\n }\n\n function addMarking(spread, filterFunc, formatter) {\n var _a, _b;\n\n var element = scope_Document.createElement(\"div\");\n var valueSizeClasses = (_a = {}, _a[exports.PipsType.None] = \"\", _a[exports.PipsType.NoValue] = options.cssClasses.valueNormal, _a[exports.PipsType.LargeValue] = options.cssClasses.valueLarge, _a[exports.PipsType.SmallValue] = options.cssClasses.valueSub, _a);\n var markerSizeClasses = (_b = {}, _b[exports.PipsType.None] = \"\", _b[exports.PipsType.NoValue] = options.cssClasses.markerNormal, _b[exports.PipsType.LargeValue] = options.cssClasses.markerLarge, _b[exports.PipsType.SmallValue] = options.cssClasses.markerSub, _b);\n var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];\n var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];\n addClass(element, options.cssClasses.pips);\n addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);\n\n function getClasses(type, source) {\n var a = source === options.cssClasses.value;\n var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;\n var sizeClasses = a ? valueSizeClasses : markerSizeClasses;\n return source + \" \" + orientationClasses[options.ort] + \" \" + sizeClasses[type];\n }\n\n function addSpread(offset, value, type) {\n // Apply the filter function, if it is set.\n type = filterFunc ? filterFunc(value, type) : type;\n\n if (type === exports.PipsType.None) {\n return;\n } // Add a marker for every point\n\n\n var node = addNodeTo(element, false);\n node.className = getClasses(type, options.cssClasses.marker);\n node.style[options.style] = offset + \"%\"; // Values are only appended for points marked '1' or '2'.\n\n if (type > exports.PipsType.NoValue) {\n node = addNodeTo(element, false);\n node.className = getClasses(type, options.cssClasses.value);\n node.setAttribute(\"data-value\", String(value));\n node.style[options.style] = offset + \"%\";\n node.innerHTML = String(formatter.to(value));\n }\n } // Append all points.\n\n\n Object.keys(spread).forEach(function (offset) {\n addSpread(offset, spread[offset][0], spread[offset][1]);\n });\n return element;\n }\n\n function removePips() {\n if (scope_Pips) {\n removeElement(scope_Pips);\n scope_Pips = null;\n }\n }\n\n function pips(pips) {\n // Fix #669\n removePips();\n var spread = generateSpread(pips);\n var filter = pips.filter;\n var format = pips.format || {\n to: function to(value) {\n return String(Math.round(value));\n }\n };\n scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));\n return scope_Pips;\n } // Shorthand for base dimensions.\n\n\n function baseSize() {\n var rect = scope_Base.getBoundingClientRect();\n var alt = \"offset\" + [\"Width\", \"Height\"][options.ort];\n return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];\n } // Handler for attaching events trough a proxy.\n\n\n function attachEvent(events, element, callback, data) {\n // This function can be used to 'filter' events to the slider.\n // element is a node, not a nodeList\n var method = function method(event) {\n var e = fixEvent(event, data.pageOffset, data.target || element); // fixEvent returns false if this event has a different target\n // when handling (multi-) touch events;\n\n if (!e) {\n return false;\n } // doNotReject is passed by all end events to make sure released touches\n // are not rejected, leaving the slider \"stuck\" to the cursor;\n\n\n if (isSliderDisabled() && !data.doNotReject) {\n return false;\n } // Stop if an active 'tap' transition is taking place.\n\n\n if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {\n return false;\n } // Ignore right or middle clicks on start #454\n\n\n if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {\n return false;\n } // Ignore right or middle clicks on start #454\n\n\n if (data.hover && e.buttons) {\n return false;\n } // 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.\n // iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support\n // touch-action: manipulation, but that allows panning, which breaks\n // sliders after zooming/on non-responsive pages.\n // See: https://bugs.webkit.org/show_bug.cgi?id=133112\n\n\n if (!supportsPassive) {\n e.preventDefault();\n }\n\n e.calcPoint = e.points[options.ort]; // Call the event handler with the event [ and additional data ].\n\n callback(e, data);\n return;\n };\n\n var methods = []; // Bind a closure on the target for every event type.\n\n events.split(\" \").forEach(function (eventName) {\n element.addEventListener(eventName, method, supportsPassive ? {\n passive: true\n } : false);\n methods.push([eventName, method]);\n });\n return methods;\n } // Provide a clean event with standardized offset values.\n\n\n function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n var x = 0;\n var y = 0; // IE10 implemented pointer events with a prefix;\n\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n } // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with\n // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore\n // events that have no touches or buttons associated with them. (#1057, #1079, #1095)\n\n\n if (e.type === \"mousedown\" && !e.buttons && !e.touches) {\n return false;\n } // The only thing one handle should be concerned about is the touches that originated on top of it.\n\n\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function isTouchOnTarget(checkTouch) {\n var target = checkTouch.target;\n return target === eventTarget || eventTarget.contains(target) || e.composed && e.composedPath().shift() === eventTarget;\n }; // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n\n\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget); // Do not support more than one touch per handle.\n\n if (targetTouches.length > 1) {\n return false;\n }\n\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n } else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget); // Cancel if the target touch has not moved.\n\n if (!targetTouch) {\n return false;\n }\n\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n\n pageOffset = pageOffset || getPageOffset(scope_Document);\n\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n } // Translate a coordinate in the document to a percentage on the slider\n\n\n function calcPointToPercentage(calcPoint) {\n var location = calcPoint - offset(scope_Base, options.ort);\n var proposal = location * 100 / baseSize(); // Clamp proposal between 0% and 100%\n // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n // are used (e.g. contained handles feature)\n\n proposal = limit(proposal);\n return options.dir ? 100 - proposal : proposal;\n } // Find handle closest to a certain percentage on the slider\n\n\n function getClosestHandle(clickedPosition) {\n var smallestDifference = 100;\n var handleNumber = false;\n scope_Handles.forEach(function (handle, index) {\n // Disabled handles are ignored\n if (isHandleDisabled(index)) {\n return;\n }\n\n var handlePosition = scope_Locations[index];\n var differenceWithThisHandle = Math.abs(handlePosition - clickedPosition); // Initial state\n\n var clickAtEdge = differenceWithThisHandle === 100 && smallestDifference === 100; // Difference with this handle is smaller than the previously checked handle\n\n var isCloser = differenceWithThisHandle < smallestDifference;\n var isCloserAfter = differenceWithThisHandle <= smallestDifference && clickedPosition > handlePosition;\n\n if (isCloser || isCloserAfter || clickAtEdge) {\n handleNumber = index;\n smallestDifference = differenceWithThisHandle;\n }\n });\n return handleNumber;\n } // Fire 'end' when a mouse or pen leaves the document.\n\n\n function documentLeave(event, data) {\n if (event.type === \"mouseout\" && event.target.nodeName === \"HTML\" && event.relatedTarget === null) {\n eventEnd(event, data);\n }\n } // Handle movement on document for handle and range drag.\n\n\n function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n } // Check if we are moving up or down\n\n\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint); // Convert the movement into a percentage of the slider width/height\n\n var proposal = movement * 100 / data.baseSize;\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers, data.connect);\n } // Unbind move events on document, call callbacks.\n\n\n function eventEnd(event, data) {\n // The handle is no longer active, so remove the class.\n if (data.handle) {\n removeClass(data.handle, options.cssClasses.active);\n scope_ActiveHandlesCount -= 1;\n } // Unbind the move and end events, which are added on 'start'.\n\n\n data.listeners.forEach(function (c) {\n scope_DocumentElement.removeEventListener(c[0], c[1]);\n });\n\n if (scope_ActiveHandlesCount === 0) {\n // Remove dragging class.\n removeClass(scope_Target, options.cssClasses.drag);\n setZindex(); // Remove cursor styles and text-selection events bound to the body.\n\n if (event.cursor) {\n scope_Body.style.cursor = \"\";\n scope_Body.removeEventListener(\"selectstart\", preventDefault);\n }\n }\n\n if (options.events.smoothSteps) {\n data.handleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, scope_Locations[handleNumber], true, true, false, false);\n });\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber);\n });\n }\n\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"change\", handleNumber);\n fireEvent(\"set\", handleNumber);\n fireEvent(\"end\", handleNumber);\n });\n } // Bind move events on document.\n\n\n function eventStart(event, data) {\n // Ignore event if any handle is disabled\n if (data.handleNumbers.some(isHandleDisabled)) {\n return;\n }\n\n var handle;\n\n if (data.handleNumbers.length === 1) {\n var handleOrigin = scope_Handles[data.handleNumbers[0]];\n handle = handleOrigin.children[0];\n scope_ActiveHandlesCount += 1; // Mark the handle as 'active' so it can be styled.\n\n addClass(handle, options.cssClasses.active);\n } // A drag should never propagate up to the 'tap' event.\n\n\n event.stopPropagation(); // Record the event listeners.\n\n var listeners = []; // Attach the move and end events.\n\n var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {\n // The event target has changed so we need to propagate the original one so that we keep\n // relying on it to extract target touches.\n target: event.target,\n handle: handle,\n connect: data.connect,\n listeners: listeners,\n startCalcPoint: event.calcPoint,\n baseSize: baseSize(),\n pageOffset: event.pageOffset,\n handleNumbers: data.handleNumbers,\n buttonsProperty: event.buttons,\n locations: scope_Locations.slice()\n });\n var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {\n target: event.target,\n handle: handle,\n listeners: listeners,\n doNotReject: true,\n handleNumbers: data.handleNumbers\n });\n var outEvent = attachEvent(\"mouseout\", scope_DocumentElement, documentLeave, {\n target: event.target,\n handle: handle,\n listeners: listeners,\n doNotReject: true,\n handleNumbers: data.handleNumbers\n }); // We want to make sure we pushed the listeners in the listener list rather than creating\n // a new one as it has already been passed to the event handlers.\n\n listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent)); // Text selection isn't an issue on touch devices,\n // so adding cursor styles can be skipped.\n\n if (event.cursor) {\n // Prevent the 'I' cursor and extend the range-drag cursor.\n scope_Body.style.cursor = getComputedStyle(event.target).cursor; // Mark the target with a dragging state.\n\n if (scope_Handles.length > 1) {\n addClass(scope_Target, options.cssClasses.drag);\n } // Prevent text selection when dragging the handles.\n // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,\n // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,\n // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.\n // The 'cursor' flag is false.\n // See: http://caniuse.com/#search=selectstart\n\n\n scope_Body.addEventListener(\"selectstart\", preventDefault, false);\n }\n\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"start\", handleNumber);\n });\n } // Move closest handle to tapped location.\n\n\n function eventTap(event) {\n // The tap event shouldn't propagate up\n event.stopPropagation();\n var proposal = calcPointToPercentage(event.calcPoint);\n var handleNumber = getClosestHandle(proposal); // Tackle the case that all handles are 'disabled'.\n\n if (handleNumber === false) {\n return;\n } // Flag the slider as it is now in a transitional state.\n // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.\n\n\n if (!options.events.snap) {\n addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n }\n\n setHandle(handleNumber, proposal, true, true);\n setZindex();\n fireEvent(\"slide\", handleNumber, true);\n fireEvent(\"update\", handleNumber, true);\n\n if (!options.events.snap) {\n fireEvent(\"change\", handleNumber, true);\n fireEvent(\"set\", handleNumber, true);\n } else {\n eventStart(event, {\n handleNumbers: [handleNumber]\n });\n }\n } // Fires a 'hover' event for a hovered mouse/pen position.\n\n\n function eventHover(event) {\n var proposal = calcPointToPercentage(event.calcPoint);\n var to = scope_Spectrum.getStep(proposal);\n var value = scope_Spectrum.fromStepping(to);\n Object.keys(scope_Events).forEach(function (targetEvent) {\n if (\"hover\" === targetEvent.split(\".\")[0]) {\n scope_Events[targetEvent].forEach(function (callback) {\n callback.call(scope_Self, value);\n });\n }\n });\n } // Handles keydown on focused handles\n // Don't move the document when pressing arrow keys on focused handles\n\n\n function eventKeydown(event, handleNumber) {\n if (isSliderDisabled() || isHandleDisabled(handleNumber)) {\n return false;\n }\n\n var horizontalKeys = [\"Left\", \"Right\"];\n var verticalKeys = [\"Down\", \"Up\"];\n var largeStepKeys = [\"PageDown\", \"PageUp\"];\n var edgeKeys = [\"Home\", \"End\"];\n\n if (options.dir && !options.ort) {\n // On an right-to-left slider, the left and right keys act inverted\n horizontalKeys.reverse();\n } else if (options.ort && !options.dir) {\n // On a top-to-bottom slider, the up and down keys act inverted\n verticalKeys.reverse();\n largeStepKeys.reverse();\n } // Strip \"Arrow\" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n\n\n var key = event.key.replace(\"Arrow\", \"\");\n var isLargeDown = key === largeStepKeys[0];\n var isLargeUp = key === largeStepKeys[1];\n var isDown = key === verticalKeys[0] || key === horizontalKeys[0] || isLargeDown;\n var isUp = key === verticalKeys[1] || key === horizontalKeys[1] || isLargeUp;\n var isMin = key === edgeKeys[0];\n var isMax = key === edgeKeys[1];\n\n if (!isDown && !isUp && !isMin && !isMax) {\n return true;\n }\n\n event.preventDefault();\n var to;\n\n if (isUp || isDown) {\n var direction = isDown ? 0 : 1;\n var steps = getNextStepsForHandle(handleNumber);\n var step = steps[direction]; // At the edge of a slider, do nothing\n\n if (step === null) {\n return false;\n } // No step set, use the default of 10% of the sub-range\n\n\n if (step === false) {\n step = scope_Spectrum.getDefaultStep(scope_Locations[handleNumber], isDown, options.keyboardDefaultStep);\n }\n\n if (isLargeUp || isLargeDown) {\n step *= options.keyboardPageMultiplier;\n } else {\n step *= options.keyboardMultiplier;\n } // Step over zero-length ranges (#948);\n\n\n step = Math.max(step, 0.0000001); // Decrement for down steps\n\n step = (isDown ? -1 : 1) * step;\n to = scope_Values[handleNumber] + step;\n } else if (isMax) {\n // End key\n to = options.spectrum.xVal[options.spectrum.xVal.length - 1];\n } else {\n // Home key\n to = options.spectrum.xVal[0];\n }\n\n setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);\n fireEvent(\"slide\", handleNumber);\n fireEvent(\"update\", handleNumber);\n fireEvent(\"change\", handleNumber);\n fireEvent(\"set\", handleNumber);\n return false;\n } // Attach events to several slider parts.\n\n\n function bindSliderEvents(behaviour) {\n // Attach the standard drag event to the handles.\n if (!behaviour.fixed) {\n scope_Handles.forEach(function (handle, index) {\n // These events are only bound to the visual handle\n // element, not the 'real' origin element.\n attachEvent(actions.start, handle.children[0], eventStart, {\n handleNumbers: [index]\n });\n });\n } // Attach the tap event to the slider base.\n\n\n if (behaviour.tap) {\n attachEvent(actions.start, scope_Base, eventTap, {});\n } // Fire hover events\n\n\n if (behaviour.hover) {\n attachEvent(actions.move, scope_Base, eventHover, {\n hover: true\n });\n } // Make the range draggable.\n\n\n if (behaviour.drag) {\n scope_Connects.forEach(function (connect, index) {\n if (connect === false || index === 0 || index === scope_Connects.length - 1) {\n return;\n }\n\n var handleBefore = scope_Handles[index - 1];\n var handleAfter = scope_Handles[index];\n var eventHolders = [connect];\n var handlesToDrag = [handleBefore, handleAfter];\n var handleNumbersToDrag = [index - 1, index];\n addClass(connect, options.cssClasses.draggable); // When the range is fixed, the entire range can\n // be dragged by the handles. The handle in the first\n // origin will propagate the start event upward,\n // but it needs to be bound manually on the other.\n\n if (behaviour.fixed) {\n eventHolders.push(handleBefore.children[0]);\n eventHolders.push(handleAfter.children[0]);\n }\n\n if (behaviour.dragAll) {\n handlesToDrag = scope_Handles;\n handleNumbersToDrag = scope_HandleNumbers;\n }\n\n eventHolders.forEach(function (eventHolder) {\n attachEvent(actions.start, eventHolder, eventStart, {\n handles: handlesToDrag,\n handleNumbers: handleNumbersToDrag,\n connect: connect\n });\n });\n });\n }\n } // Attach an event to this slider, possibly including a namespace\n\n\n function bindEvent(namespacedEvent, callback) {\n scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];\n scope_Events[namespacedEvent].push(callback); // If the event bound is 'update,' fire it immediately for all handles.\n\n if (namespacedEvent.split(\".\")[0] === \"update\") {\n scope_Handles.forEach(function (a, index) {\n fireEvent(\"update\", index);\n });\n }\n }\n\n function isInternalNamespace(namespace) {\n return namespace === INTERNAL_EVENT_NS.aria || namespace === INTERNAL_EVENT_NS.tooltips;\n } // Undo attachment of event\n\n\n function removeEvent(namespacedEvent) {\n var event = namespacedEvent && namespacedEvent.split(\".\")[0];\n var namespace = event ? namespacedEvent.substring(event.length) : namespacedEvent;\n Object.keys(scope_Events).forEach(function (bind) {\n var tEvent = bind.split(\".\")[0];\n var tNamespace = bind.substring(tEvent.length);\n\n if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {\n // only delete protected internal event if intentional\n if (!isInternalNamespace(tNamespace) || namespace === tNamespace) {\n delete scope_Events[bind];\n }\n }\n });\n } // External event handling\n\n\n function fireEvent(eventName, handleNumber, tap) {\n Object.keys(scope_Events).forEach(function (targetEvent) {\n var eventType = targetEvent.split(\".\")[0];\n\n if (eventName === eventType) {\n scope_Events[targetEvent].forEach(function (callback) {\n callback.call( // Use the slider public API as the scope ('this')\n scope_Self, // Return values as array, so arg_1[arg_2] is always valid.\n scope_Values.map(options.format.to), // Handle index, 0 or 1\n handleNumber, // Un-formatted slider values\n scope_Values.slice(), // Event is fired by tap, true or false\n tap || false, // Left offset of the handle, in relation to the slider\n scope_Locations.slice(), // add the slider public API to an accessible parameter when this is unavailable\n scope_Self);\n });\n }\n });\n } // Split out the handle positioning logic so the Move event can use it, too\n\n\n function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue, smoothSteps) {\n var distance; // For sliders with multiple handles, limit movement to the other handle.\n // Apply the margin option by adding it to the handle positions.\n\n if (scope_Handles.length > 1 && !options.events.unconstrained) {\n if (lookBackward && handleNumber > 0) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, false);\n to = Math.max(to, distance);\n }\n\n if (lookForward && handleNumber < scope_Handles.length - 1) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, true);\n to = Math.min(to, distance);\n }\n } // The limit option has the opposite effect, limiting handles to a\n // maximum distance from another. Limit must be > 0, as otherwise\n // handles would be unmovable.\n\n\n if (scope_Handles.length > 1 && options.limit) {\n if (lookBackward && handleNumber > 0) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, false);\n to = Math.min(to, distance);\n }\n\n if (lookForward && handleNumber < scope_Handles.length - 1) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, true);\n to = Math.max(to, distance);\n }\n } // The padding option keeps the handles a certain distance from the\n // edges of the slider. Padding must be > 0.\n\n\n if (options.padding) {\n if (handleNumber === 0) {\n distance = scope_Spectrum.getAbsoluteDistance(0, options.padding[0], false);\n to = Math.max(to, distance);\n }\n\n if (handleNumber === scope_Handles.length - 1) {\n distance = scope_Spectrum.getAbsoluteDistance(100, options.padding[1], true);\n to = Math.min(to, distance);\n }\n }\n\n if (!smoothSteps) {\n to = scope_Spectrum.getStep(to);\n } // Limit percentage to the 0 - 100 range\n\n\n to = limit(to); // Return false if handle can't move\n\n if (to === reference[handleNumber] && !getValue) {\n return false;\n }\n\n return to;\n } // Uses slider orientation to create CSS rules. a = base value;\n\n\n function inRuleOrder(v, a) {\n var o = options.ort;\n return (o ? a : v) + \", \" + (o ? v : a);\n } // Moves handle(s) by a percentage\n // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])\n\n\n function moveHandles(upward, proposal, locations, handleNumbers, connect) {\n var proposals = locations.slice(); // Store first handle now, so we still have it in case handleNumbers is reversed\n\n var firstHandle = handleNumbers[0];\n var smoothSteps = options.events.smoothSteps;\n var b = [!upward, upward];\n var f = [upward, !upward]; // Copy handleNumbers so we don't change the dataset\n\n handleNumbers = handleNumbers.slice(); // Check to see which handle is 'leading'.\n // If that one can't move the second can't either.\n\n if (upward) {\n handleNumbers.reverse();\n } // Step 1: get the maximum percentage that any of the handles can move\n\n\n if (handleNumbers.length > 1) {\n handleNumbers.forEach(function (handleNumber, o) {\n var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false, smoothSteps); // Stop if one of the handles can't move.\n\n if (to === false) {\n proposal = 0;\n } else {\n proposal = to - proposals[handleNumber];\n proposals[handleNumber] = to;\n }\n });\n } // If using one handle, check backward AND forward\n else {\n b = f = [true];\n }\n\n var state = false; // Step 2: Try to set the handles with the found percentage\n\n handleNumbers.forEach(function (handleNumber, o) {\n state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o], false, smoothSteps) || state;\n }); // Step 3: If a handle moved, fire events\n\n if (state) {\n handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber);\n fireEvent(\"slide\", handleNumber);\n }); // If target is a connect, then fire drag event\n\n if (connect != undefined) {\n fireEvent(\"drag\", firstHandle);\n }\n }\n } // Takes a base value and an offset. This offset is used for the connect bar size.\n // In the initial design for this feature, the origin element was 1% wide.\n // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature\n // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223\n\n\n function transformDirection(a, b) {\n return options.dir ? 100 - a - b : a;\n } // Updates scope_Locations and scope_Values, updates visual state\n\n\n function updateHandlePosition(handleNumber, to) {\n // Update locations.\n scope_Locations[handleNumber] = to; // Convert the value to the slider stepping/range.\n\n scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);\n var translation = transformDirection(to, 0) - scope_DirOffset;\n var translateRule = \"translate(\" + inRuleOrder(translation + \"%\", \"0\") + \")\";\n scope_Handles[handleNumber].style[options.transformRule] = translateRule;\n updateConnect(handleNumber);\n updateConnect(handleNumber + 1);\n } // Handles before the slider middle are stacked later = higher,\n // Handles after the middle later is lower\n // [[7] [8] .......... | .......... [5] [4]\n\n\n function setZindex() {\n scope_HandleNumbers.forEach(function (handleNumber) {\n var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;\n var zIndex = 3 + (scope_Handles.length + dir * handleNumber);\n scope_Handles[handleNumber].style.zIndex = String(zIndex);\n });\n } // Test suggested values and apply margin, step.\n // if exactInput is true, don't run checkHandlePosition, then the handle can be placed in between steps (#436)\n\n\n function setHandle(handleNumber, to, lookBackward, lookForward, exactInput, smoothSteps) {\n if (!exactInput) {\n to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false, smoothSteps);\n }\n\n if (to === false) {\n return false;\n }\n\n updateHandlePosition(handleNumber, to);\n return true;\n } // Updates style attribute for connect nodes\n\n\n function updateConnect(index) {\n // Skip connects set to false\n if (!scope_Connects[index]) {\n return;\n }\n\n var l = 0;\n var h = 100;\n\n if (index !== 0) {\n l = scope_Locations[index - 1];\n }\n\n if (index !== scope_Connects.length - 1) {\n h = scope_Locations[index];\n } // We use two rules:\n // 'translate' to change the left/top offset;\n // 'scale' to change the width of the element;\n // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)\n\n\n var connectWidth = h - l;\n var translateRule = \"translate(\" + inRuleOrder(transformDirection(l, connectWidth) + \"%\", \"0\") + \")\";\n var scaleRule = \"scale(\" + inRuleOrder(connectWidth / 100, \"1\") + \")\";\n scope_Connects[index].style[options.transformRule] = translateRule + \" \" + scaleRule;\n } // Parses value passed to .set method. Returns current value if not parse-able.\n\n\n function resolveToValue(to, handleNumber) {\n // Setting with null indicates an 'ignore'.\n // Inputting 'false' is invalid.\n if (to === null || to === false || to === undefined) {\n return scope_Locations[handleNumber];\n } // If a formatted number was passed, attempt to decode it.\n\n\n if (typeof to === \"number\") {\n to = String(to);\n }\n\n to = options.format.from(to);\n\n if (to !== false) {\n to = scope_Spectrum.toStepping(to);\n } // If parsing the number failed, use the current value.\n\n\n if (to === false || isNaN(to)) {\n return scope_Locations[handleNumber];\n }\n\n return to;\n } // Set the slider value.\n\n\n function valueSet(input, fireSetEvent, exactInput) {\n var values = asArray(input);\n var isInit = scope_Locations[0] === undefined; // Event fires by default\n\n fireSetEvent = fireSetEvent === undefined ? true : fireSetEvent; // Animation is optional.\n // Make sure the initial values were set before using animated placement.\n\n if (options.animate && !isInit) {\n addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n } // First pass, without lookAhead but with lookBackward. Values are set from left to right.\n\n\n scope_HandleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false, exactInput);\n });\n var i = scope_HandleNumbers.length === 1 ? 0 : 1; // Spread handles evenly across the slider if the range has no size (min=max)\n\n if (isInit && scope_Spectrum.hasNoSize()) {\n exactInput = true;\n scope_Locations[0] = 0;\n\n if (scope_HandleNumbers.length > 1) {\n var space_1 = 100 / (scope_HandleNumbers.length - 1);\n scope_HandleNumbers.forEach(function (handleNumber) {\n scope_Locations[handleNumber] = handleNumber * space_1;\n });\n }\n } // Secondary passes. Now that all base values are set, apply constraints.\n // Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)\n\n\n for (; i < scope_HandleNumbers.length; ++i) {\n scope_HandleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, scope_Locations[handleNumber], true, true, exactInput);\n });\n }\n\n setZindex();\n scope_HandleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber); // Fire the event only for handles that received a new value, as per #579\n\n if (values[handleNumber] !== null && fireSetEvent) {\n fireEvent(\"set\", handleNumber);\n }\n });\n } // Reset slider to initial values\n\n\n function valueReset(fireSetEvent) {\n valueSet(options.start, fireSetEvent);\n } // Set value for a single handle\n\n\n function valueSetHandle(handleNumber, value, fireSetEvent, exactInput) {\n // Ensure numeric input\n handleNumber = Number(handleNumber);\n\n if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {\n throw new Error(\"noUiSlider: invalid handle number, got: \" + handleNumber);\n } // Look both backward and forward, since we don't want this handle to \"push\" other handles (#960);\n // The exactInput argument can be used to ignore slider stepping (#436)\n\n\n setHandle(handleNumber, resolveToValue(value, handleNumber), true, true, exactInput);\n fireEvent(\"update\", handleNumber);\n\n if (fireSetEvent) {\n fireEvent(\"set\", handleNumber);\n }\n } // Get the slider value.\n\n\n function valueGet(unencoded) {\n if (unencoded === void 0) {\n unencoded = false;\n }\n\n if (unencoded) {\n // return a copy of the raw values\n return scope_Values.length === 1 ? scope_Values[0] : scope_Values.slice(0);\n }\n\n var values = scope_Values.map(options.format.to); // If only one handle is used, return a single value.\n\n if (values.length === 1) {\n return values[0];\n }\n\n return values;\n } // Removes classes from the root and empties it.\n\n\n function destroy() {\n // remove protected internal listeners\n removeEvent(INTERNAL_EVENT_NS.aria);\n removeEvent(INTERNAL_EVENT_NS.tooltips);\n Object.keys(options.cssClasses).forEach(function (key) {\n removeClass(scope_Target, options.cssClasses[key]);\n });\n\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n\n delete scope_Target.noUiSlider;\n }\n\n function getNextStepsForHandle(handleNumber) {\n var location = scope_Locations[handleNumber];\n var nearbySteps = scope_Spectrum.getNearbySteps(location);\n var value = scope_Values[handleNumber];\n var increment = nearbySteps.thisStep.step;\n var decrement = null; // If snapped, directly use defined step value\n\n if (options.snap) {\n return [value - nearbySteps.stepBefore.startValue || null, nearbySteps.stepAfter.startValue - value || null];\n } // If the next value in this step moves into the next step,\n // the increment is the start of the next step - the current value\n\n\n if (increment !== false) {\n if (value + increment > nearbySteps.stepAfter.startValue) {\n increment = nearbySteps.stepAfter.startValue - value;\n }\n } // If the value is beyond the starting point\n\n\n if (value > nearbySteps.thisStep.startValue) {\n decrement = nearbySteps.thisStep.step;\n } else if (nearbySteps.stepBefore.step === false) {\n decrement = false;\n } // If a handle is at the start of a step, it always steps back into the previous step first\n else {\n decrement = value - nearbySteps.stepBefore.highestStep;\n } // Now, if at the slider edges, there is no in/decrement\n\n\n if (location === 100) {\n increment = null;\n } else if (location === 0) {\n decrement = null;\n } // As per #391, the comparison for the decrement step can have some rounding issues.\n\n\n var stepDecimals = scope_Spectrum.countStepDecimals(); // Round per #391\n\n if (increment !== null && increment !== false) {\n increment = Number(increment.toFixed(stepDecimals));\n }\n\n if (decrement !== null && decrement !== false) {\n decrement = Number(decrement.toFixed(stepDecimals));\n }\n\n return [decrement, increment];\n } // Get the current step size for the slider.\n\n\n function getNextSteps() {\n return scope_HandleNumbers.map(getNextStepsForHandle);\n } // Updatable: margin, limit, padding, step, range, animate, snap\n\n\n function updateOptions(optionsToUpdate, fireSetEvent) {\n // Spectrum is created using the range, snap, direction and step options.\n // 'snap' and 'step' can be updated.\n // If 'snap' and 'step' are not passed, they should remain unchanged.\n var v = valueGet();\n var updateAble = [\"margin\", \"limit\", \"padding\", \"range\", \"animate\", \"snap\", \"step\", \"format\", \"pips\", \"tooltips\"]; // Only change options that we're actually passed to update.\n\n updateAble.forEach(function (name) {\n // Check for undefined. null removes the value.\n if (optionsToUpdate[name] !== undefined) {\n originalOptions[name] = optionsToUpdate[name];\n }\n });\n var newOptions = testOptions(originalOptions); // Load new options into the slider state\n\n updateAble.forEach(function (name) {\n if (optionsToUpdate[name] !== undefined) {\n options[name] = newOptions[name];\n }\n });\n scope_Spectrum = newOptions.spectrum; // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)\n\n options.margin = newOptions.margin;\n options.limit = newOptions.limit;\n options.padding = newOptions.padding; // Update pips, removes existing.\n\n if (options.pips) {\n pips(options.pips);\n } else {\n removePips();\n } // Update tooltips, removes existing.\n\n\n if (options.tooltips) {\n tooltips();\n } else {\n removeTooltips();\n } // Invalidate the current positioning so valueSet forces an update.\n\n\n scope_Locations = [];\n valueSet(isSet(optionsToUpdate.start) ? optionsToUpdate.start : v, fireSetEvent);\n } // Initialization steps\n\n\n function setupSlider() {\n // Create the base element, initialize HTML and set classes.\n // Add handles and connect elements.\n scope_Base = addSlider(scope_Target);\n addElements(options.connect, scope_Base); // Attach user events.\n\n bindSliderEvents(options.events); // Use the public value method to set the start values.\n\n valueSet(options.start);\n\n if (options.pips) {\n pips(options.pips);\n }\n\n if (options.tooltips) {\n tooltips();\n }\n\n aria();\n }\n\n setupSlider();\n var scope_Self = {\n destroy: destroy,\n steps: getNextSteps,\n on: bindEvent,\n off: removeEvent,\n get: valueGet,\n set: valueSet,\n setHandle: valueSetHandle,\n reset: valueReset,\n // Exposed for unit testing, don't use this in your application.\n __moveHandles: function __moveHandles(upward, proposal, handleNumbers) {\n moveHandles(upward, proposal, scope_Locations, handleNumbers);\n },\n options: originalOptions,\n updateOptions: updateOptions,\n target: scope_Target,\n removePips: removePips,\n removeTooltips: removeTooltips,\n getPositions: function getPositions() {\n return scope_Locations.slice();\n },\n getTooltips: function getTooltips() {\n return scope_Tooltips;\n },\n getOrigins: function getOrigins() {\n return scope_Handles;\n },\n pips: pips // Issue #594\n\n };\n return scope_Self;\n } // Run the standard initializer\n\n\n function initialize(target, originalOptions) {\n if (!target || !target.nodeName) {\n throw new Error(\"noUiSlider: create requires a single element, got: \" + target);\n } // Throw an error if the slider was already initialized.\n\n\n if (target.noUiSlider) {\n throw new Error(\"noUiSlider: Slider was already initialized.\");\n } // Test the options and create the slider environment;\n\n\n var options = testOptions(originalOptions);\n var api = scope(target, options, originalOptions);\n target.noUiSlider = api;\n return api;\n }\n\n var nouislider = {\n // Exposed for unit testing, don't use this in your application.\n __spectrum: Spectrum,\n // A reference to the default classes, allows global changes.\n // Use the cssClasses option for changes to one slider.\n cssClasses: cssClasses,\n create: initialize\n };\n exports.create = initialize;\n exports.cssClasses = cssClasses;\n exports[\"default\"] = nouislider;\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\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","\"use strict\";\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of