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AW,EACX,YAAY,EACZ,SAAS,KAoBb,oBAAqB,SAA6B,GAC3C,EAAG,MACN,EAAG,IAAM,IAAI,GAAU,KAG3B,MAAO,SAAe,EAAW,GAC1B,EAAM,MACT,EAAM,IAAM,IAAI,GAAU,EAAO,EAAU,wBAiBjD,OAZK,MACH,OAAO,OAAS,GAEZ,OAAO,mBACT,OAAO,mBAAmB,WACxB,OAAO,OAAO,UAGhB,OAAO,OAAO,SAIX","file":"/gh/alpinejs/alpine@2.3.3/dist/alpine.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v3.14.1.\n * Original file: /gh/alpinejs/alpine@2.3.3/dist/alpine.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.Alpine = factory());\n}(this, (function () { 'use strict';\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n }\n\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n }\n\n // Thanks @stimulus:\n // https://github.com/stimulusjs/stimulus/blob/master/packages/%40stimulus/core/src/application.ts\n function domReady() {\n return new Promise(resolve => {\n if (document.readyState == \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", resolve);\n } else {\n resolve();\n }\n });\n }\n function arrayUnique(array) {\n return Array.from(new Set(array));\n }\n function isTesting() {\n return navigator.userAgent.includes(\"Node.js\") || navigator.userAgent.includes(\"jsdom\");\n }\n function kebabCase(subject) {\n return subject.replace(/([a-z])([A-Z])/g, '$1-$2').replace(/[_\\s]/, '-').toLowerCase();\n }\n function walk(el, callback) {\n if (callback(el) === false) return;\n let node = el.firstElementChild;\n\n while (node) {\n walk(node, callback);\n node = node.nextElementSibling;\n }\n }\n function debounce(func, wait) {\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n\n var later = function later() {\n timeout = null;\n func.apply(context, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n }\n function saferEval(expression, dataContext, additionalHelperVariables = {}) {\n return new Function(['$data', ...Object.keys(additionalHelperVariables)], `var result; with($data) { result = ${expression} }; return result`)(dataContext, ...Object.values(additionalHelperVariables));\n }\n function saferEvalNoReturn(expression, dataContext, additionalHelperVariables = {}) {\n // For the cases when users pass only a function reference to the caller: `x-on:click=\"foo\"`\n // Where \"foo\" is a function. Also, we'll pass the function the event instance when we call it.\n if (Object.keys(dataContext).includes(expression)) {\n let methodReference = new Function(['dataContext', ...Object.keys(additionalHelperVariables)], `with(dataContext) { return ${expression} }`)(dataContext, ...Object.values(additionalHelperVariables));\n\n if (typeof methodReference === 'function') {\n return methodReference.call(dataContext, additionalHelperVariables['$event']);\n }\n }\n\n return new Function(['dataContext', ...Object.keys(additionalHelperVariables)], `with(dataContext) { ${expression} }`)(dataContext, ...Object.values(additionalHelperVariables));\n }\n const xAttrRE = /^x-(on|bind|data|text|html|model|if|for|show|cloak|transition|ref)\\b/;\n function isXAttr(attr) {\n const name = replaceAtAndColonWithStandardSyntax(attr.name);\n return xAttrRE.test(name);\n }\n function getXAttrs(el, type) {\n return Array.from(el.attributes).filter(isXAttr).map(attr => {\n const name = replaceAtAndColonWithStandardSyntax(attr.name);\n const typeMatch = name.match(xAttrRE);\n const valueMatch = name.match(/:([a-zA-Z\\-:]+)/);\n const modifiers = name.match(/\\.[^.\\]]+(?=[^\\]]*$)/g) || [];\n return {\n type: typeMatch ? typeMatch[1] : null,\n value: valueMatch ? valueMatch[1] : null,\n modifiers: modifiers.map(i => i.replace('.', '')),\n expression: attr.value\n };\n }).filter(i => {\n // If no type is passed in for filtering, bypass filter\n if (!type) return true;\n return i.type === type;\n });\n }\n function isBooleanAttr(attrName) {\n // As per HTML spec table https://html.spec.whatwg.org/multipage/indices.html#attributes-3:boolean-attribute\n // Array roughly ordered by estimated usage\n const booleanAttributes = ['disabled', 'checked', 'required', 'readonly', 'hidden', 'open', 'selected', 'autofocus', 'itemscope', 'multiple', 'novalidate', 'allowfullscreen', 'allowpaymentrequest', 'formnovalidate', 'autoplay', 'controls', 'loop', 'muted', 'playsinline', 'default', 'ismap', 'reversed', 'async', 'defer', 'nomodule'];\n return booleanAttributes.includes(attrName);\n }\n function replaceAtAndColonWithStandardSyntax(name) {\n if (name.startsWith('@')) {\n return name.replace('@', 'x-on:');\n } else if (name.startsWith(':')) {\n return name.replace(':', 'x-bind:');\n }\n\n return name;\n }\n function transitionIn(el, show, forceSkip = false) {\n // We don't want to transition on the initial page load.\n if (forceSkip) return show();\n const attrs = getXAttrs(el, 'transition');\n const showAttr = getXAttrs(el, 'show')[0]; // If this is triggered by a x-show.transition.\n\n if (showAttr && showAttr.modifiers.includes('transition')) {\n let modifiers = showAttr.modifiers; // If x-show.transition.out, we'll skip the \"in\" transition.\n\n if (modifiers.includes('out') && !modifiers.includes('in')) return show();\n const settingBothSidesOfTransition = modifiers.includes('in') && modifiers.includes('out'); // If x-show.transition.in...out... only use \"in\" related modifiers for this transition.\n\n modifiers = settingBothSidesOfTransition ? modifiers.filter((i, index) => index < modifiers.indexOf('out')) : modifiers;\n transitionHelperIn(el, modifiers, show); // Otherwise, we can assume x-transition:enter.\n } else if (attrs.length > 0) {\n transitionClassesIn(el, attrs, show);\n } else {\n // If neither, just show that damn thing.\n show();\n }\n }\n function transitionOut(el, hide, forceSkip = false) {\n if (forceSkip) return hide();\n const attrs = getXAttrs(el, 'transition');\n const showAttr = getXAttrs(el, 'show')[0];\n\n if (showAttr && showAttr.modifiers.includes('transition')) {\n let modifiers = showAttr.modifiers;\n if (modifiers.includes('in') && !modifiers.includes('out')) return hide();\n const settingBothSidesOfTransition = modifiers.includes('in') && modifiers.includes('out');\n modifiers = settingBothSidesOfTransition ? modifiers.filter((i, index) => index > modifiers.indexOf('out')) : modifiers;\n transitionHelperOut(el, modifiers, settingBothSidesOfTransition, hide);\n } else if (attrs.length > 0) {\n transitionClassesOut(el, attrs, hide);\n } else {\n hide();\n }\n }\n function transitionHelperIn(el, modifiers, showCallback) {\n // Default values inspired by: https://material.io/design/motion/speed.html#duration\n const styleValues = {\n duration: modifierValue(modifiers, 'duration', 150),\n origin: modifierValue(modifiers, 'origin', 'center'),\n first: {\n opacity: 0,\n scale: modifierValue(modifiers, 'scale', 95)\n },\n second: {\n opacity: 1,\n scale: 100\n }\n };\n transitionHelper(el, modifiers, showCallback, () => {}, styleValues);\n }\n function transitionHelperOut(el, modifiers, settingBothSidesOfTransition, hideCallback) {\n // Make the \"out\" transition .5x slower than the \"in\". (Visually better)\n // HOWEVER, if they explicitly set a duration for the \"out\" transition,\n // use that.\n const duration = settingBothSidesOfTransition ? modifierValue(modifiers, 'duration', 150) : modifierValue(modifiers, 'duration', 150) / 2;\n const styleValues = {\n duration: duration,\n origin: modifierValue(modifiers, 'origin', 'center'),\n first: {\n opacity: 1,\n scale: 100\n },\n second: {\n opacity: 0,\n scale: modifierValue(modifiers, 'scale', 95)\n }\n };\n transitionHelper(el, modifiers, () => {}, hideCallback, styleValues);\n }\n\n function modifierValue(modifiers, key, fallback) {\n // If the modifier isn't present, use the default.\n if (modifiers.indexOf(key) === -1) return fallback; // If it IS present, grab the value after it: x-show.transition.duration.500ms\n\n const rawValue = modifiers[modifiers.indexOf(key) + 1];\n if (!rawValue) return fallback;\n\n if (key === 'scale') {\n // Check if the very next value is NOT a number and return the fallback.\n // If x-show.transition.scale, we'll use the default scale value.\n // That is how a user opts out of the opacity transition.\n if (!isNumeric(rawValue)) return fallback;\n }\n\n if (key === 'duration') {\n // Support x-show.transition.duration.500ms && duration.500\n let match = rawValue.match(/([0-9]+)ms/);\n if (match) return match[1];\n }\n\n if (key === 'origin') {\n // Support chaining origin directions: x-show.transition.top.right\n if (['top', 'right', 'left', 'center', 'bottom'].includes(modifiers[modifiers.indexOf(key) + 2])) {\n return [rawValue, modifiers[modifiers.indexOf(key) + 2]].join(' ');\n }\n }\n\n return rawValue;\n }\n\n function transitionHelper(el, modifiers, hook1, hook2, styleValues) {\n // If the user set these style values, we'll put them back when we're done with them.\n const opacityCache = el.style.opacity;\n const transformCache = el.style.transform;\n const transformOriginCache = el.style.transformOrigin; // If no modifiers are present: x-show.transition, we'll default to both opacity and scale.\n\n const noModifiers = !modifiers.includes('opacity') && !modifiers.includes('scale');\n const transitionOpacity = noModifiers || modifiers.includes('opacity');\n const transitionScale = noModifiers || modifiers.includes('scale'); // These are the explicit stages of a transition (same stages for in and for out).\n // This way you can get a birds eye view of the hooks, and the differences\n // between them.\n\n const stages = {\n start() {\n if (transitionOpacity) el.style.opacity = styleValues.first.opacity;\n if (transitionScale) el.style.transform = `scale(${styleValues.first.scale / 100})`;\n },\n\n during() {\n if (transitionScale) el.style.transformOrigin = styleValues.origin;\n el.style.transitionProperty = [transitionOpacity ? `opacity` : ``, transitionScale ? `transform` : ``].join(' ').trim();\n el.style.transitionDuration = `${styleValues.duration / 1000}s`;\n el.style.transitionTimingFunction = `cubic-bezier(0.4, 0.0, 0.2, 1)`;\n },\n\n show() {\n hook1();\n },\n\n end() {\n if (transitionOpacity) el.style.opacity = styleValues.second.opacity;\n if (transitionScale) el.style.transform = `scale(${styleValues.second.scale / 100})`;\n },\n\n hide() {\n hook2();\n },\n\n cleanup() {\n if (transitionOpacity) el.style.opacity = opacityCache;\n if (transitionScale) el.style.transform = transformCache;\n if (transitionScale) el.style.transformOrigin = transformOriginCache;\n el.style.transitionProperty = null;\n el.style.transitionDuration = null;\n el.style.transitionTimingFunction = null;\n }\n\n };\n transition(el, stages);\n }\n function transitionClassesIn(el, directives, showCallback) {\n const enter = (directives.find(i => i.value === 'enter') || {\n expression: ''\n }).expression.split(' ').filter(i => i !== '');\n const enterStart = (directives.find(i => i.value === 'enter-start') || {\n expression: ''\n }).expression.split(' ').filter(i => i !== '');\n const enterEnd = (directives.find(i => i.value === 'enter-end') || {\n expression: ''\n }).expression.split(' ').filter(i => i !== '');\n transitionClasses(el, enter, enterStart, enterEnd, showCallback, () => {});\n }\n function transitionClassesOut(el, directives, hideCallback) {\n const leave = (directives.find(i => i.value === 'leave') || {\n expression: ''\n }).expression.split(' ').filter(i => i !== '');\n const leaveStart = (directives.find(i => i.value === 'leave-start') || {\n expression: ''\n }).expression.split(' ').filter(i => i !== '');\n const leaveEnd = (directives.find(i => i.value === 'leave-end') || {\n expression: ''\n }).expression.split(' ').filter(i => i !== '');\n transitionClasses(el, leave, leaveStart, leaveEnd, () => {}, hideCallback);\n }\n function transitionClasses(el, classesDuring, classesStart, classesEnd, hook1, hook2) {\n const originalClasses = el.__x_original_classes || [];\n const stages = {\n start() {\n el.classList.add(...classesStart);\n },\n\n during() {\n el.classList.add(...classesDuring);\n },\n\n show() {\n hook1();\n },\n\n end() {\n // Don't remove classes that were in the original class attribute.\n el.classList.remove(...classesStart.filter(i => !originalClasses.includes(i)));\n el.classList.add(...classesEnd);\n },\n\n hide() {\n hook2();\n },\n\n cleanup() {\n el.classList.remove(...classesDuring.filter(i => !originalClasses.includes(i)));\n el.classList.remove(...classesEnd.filter(i => !originalClasses.includes(i)));\n }\n\n };\n transition(el, stages);\n }\n function transition(el, stages) {\n stages.start();\n stages.during();\n requestAnimationFrame(() => {\n // Note: Safari's transitionDuration property will list out comma separated transition durations\n // for every single transition property. Let's grab the first one and call it a day.\n let duration = Number(getComputedStyle(el).transitionDuration.replace(/,.*/, '').replace('s', '')) * 1000;\n stages.show();\n requestAnimationFrame(() => {\n stages.end();\n setTimeout(() => {\n stages.hide(); // Adding an \"isConnected\" check, in case the callback\n // removed the element from the DOM.\n\n if (el.isConnected) {\n stages.cleanup();\n }\n }, duration);\n });\n });\n }\n function isNumeric(subject) {\n return !isNaN(subject);\n }\n\n function handleForDirective(component, templateEl, expression, initialUpdate, extraVars) {\n warnIfNotTemplateTag(templateEl);\n let iteratorNames = parseForExpression(expression);\n let items = evaluateItemsAndReturnEmptyIfXIfIsPresentAndFalseOnElement(component, templateEl, iteratorNames, extraVars); // As we walk the array, we'll also walk the DOM (updating/creating as we go).\n\n let currentEl = templateEl;\n items.forEach((item, index) => {\n let iterationScopeVariables = getIterationScopeVariables(iteratorNames, item, index, items, extraVars());\n let currentKey = generateKeyForIteration(component, templateEl, index, iterationScopeVariables);\n let nextEl = currentEl.nextElementSibling; // If there's no previously x-for processed element ahead, add one.\n\n if (!nextEl || nextEl.__x_for_key === undefined) {\n nextEl = addElementInLoopAfterCurrentEl(templateEl, currentEl); // And transition it in if it's not the first page load.\n\n transitionIn(nextEl, () => {}, initialUpdate);\n nextEl.__x_for = iterationScopeVariables;\n component.initializeElements(nextEl, () => nextEl.__x_for);\n } else {\n nextEl = lookAheadForMatchingKeyedElementAndMoveItIfFound(nextEl, currentKey); // If we haven't found a matching key, just insert the element at the current position\n\n if (!nextEl) {\n nextEl = addElementInLoopAfterCurrentEl(templateEl, currentEl);\n } // Temporarily remove the key indicator to allow the normal \"updateElements\" to work\n\n\n delete nextEl.__x_for_key;\n nextEl.__x_for = iterationScopeVariables;\n component.updateElements(nextEl, () => nextEl.__x_for);\n }\n\n currentEl = nextEl;\n currentEl.__x_for_key = currentKey;\n });\n removeAnyLeftOverElementsFromPreviousUpdate(currentEl);\n } // This was taken from VueJS 2.* core. Thanks Vue!\n\n function parseForExpression(expression) {\n let forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\n let stripParensRE = /^\\(|\\)$/g;\n let forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/;\n let inMatch = expression.match(forAliasRE);\n if (!inMatch) return;\n let res = {};\n res.items = inMatch[2].trim();\n let item = inMatch[1].trim().replace(stripParensRE, '');\n let iteratorMatch = item.match(forIteratorRE);\n\n if (iteratorMatch) {\n res.item = item.replace(forIteratorRE, '').trim();\n res.index = iteratorMatch[1].trim();\n\n if (iteratorMatch[2]) {\n res.collection = iteratorMatch[2].trim();\n }\n } else {\n res.item = item;\n }\n\n return res;\n }\n\n function getIterationScopeVariables(iteratorNames, item, index, items, extraVars) {\n // We must create a new object, so each iteration has a new scope\n let scopeVariables = extraVars ? _objectSpread2({}, extraVars) : {};\n scopeVariables[iteratorNames.item] = item;\n if (iteratorNames.index) scopeVariables[iteratorNames.index] = index;\n if (iteratorNames.collection) scopeVariables[iteratorNames.collection] = items;\n return scopeVariables;\n }\n\n function generateKeyForIteration(component, el, index, iterationScopeVariables) {\n let bindKeyAttribute = getXAttrs(el, 'bind').filter(attr => attr.value === 'key')[0]; // If the dev hasn't specified a key, just return the index of the iteration.\n\n if (!bindKeyAttribute) return index;\n return component.evaluateReturnExpression(el, bindKeyAttribute.expression, () => iterationScopeVariables);\n }\n\n function warnIfNotTemplateTag(el) {\n if (el.tagName.toLowerCase() !== 'template') console.warn('Alpine: [x-for] directive should only be added to <template> tags.');\n }\n\n function evaluateItemsAndReturnEmptyIfXIfIsPresentAndFalseOnElement(component, el, iteratorNames, extraVars) {\n let ifAttribute = getXAttrs(el, 'if')[0];\n\n if (ifAttribute && !component.evaluateReturnExpression(el, ifAttribute.expression)) {\n return [];\n }\n\n return component.evaluateReturnExpression(el, iteratorNames.items, extraVars);\n }\n\n function addElementInLoopAfterCurrentEl(templateEl, currentEl) {\n let clone = document.importNode(templateEl.content, true);\n if (clone.childElementCount !== 1) console.warn('Alpine: <template> tag with [x-for] encountered with multiple element roots. Make sure <template> only has a single child node.');\n currentEl.parentElement.insertBefore(clone, currentEl.nextElementSibling);\n return currentEl.nextElementSibling;\n }\n\n function lookAheadForMatchingKeyedElementAndMoveItIfFound(nextEl, currentKey) {\n // If the the key's DO match, no need to look ahead.\n if (nextEl.__x_for_key === currentKey) return nextEl; // If they don't, we'll look ahead for a match.\n // If we find it, we'll move it to the current position in the loop.\n\n let tmpNextEl = nextEl;\n\n while (tmpNextEl) {\n if (tmpNextEl.__x_for_key === currentKey) {\n return tmpNextEl.parentElement.insertBefore(tmpNextEl, nextEl);\n }\n\n tmpNextEl = tmpNextEl.nextElementSibling && tmpNextEl.nextElementSibling.__x_for_key !== undefined ? tmpNextEl.nextElementSibling : false;\n }\n }\n\n function removeAnyLeftOverElementsFromPreviousUpdate(currentEl) {\n var nextElementFromOldLoop = currentEl.nextElementSibling && currentEl.nextElementSibling.__x_for_key !== undefined ? currentEl.nextElementSibling : false;\n\n while (nextElementFromOldLoop) {\n let nextElementFromOldLoopImmutable = nextElementFromOldLoop;\n let nextSibling = nextElementFromOldLoop.nextElementSibling;\n transitionOut(nextElementFromOldLoop, () => {\n nextElementFromOldLoopImmutable.remove();\n });\n nextElementFromOldLoop = nextSibling && nextSibling.__x_for_key !== undefined ? nextSibling : false;\n }\n }\n\n function handleAttributeBindingDirective(component, el, attrName, expression, extraVars, attrType) {\n var value = component.evaluateReturnExpression(el, expression, extraVars);\n\n if (attrName === 'value') {\n // If nested model key is undefined, set the default value to empty string.\n if (value === undefined && expression.match(/\\./).length) {\n value = '';\n }\n\n if (el.type === 'radio') {\n // Set radio value from x-bind:value, if no \"value\" attribute exists.\n // If there are any initial state values, radio will have a correct\n // \"checked\" value since x-bind:value is processed before x-model.\n if (el.attributes.value === undefined && attrType === 'bind') {\n el.value = value;\n } else if (attrType !== 'bind') {\n el.checked = el.value == value;\n }\n } else if (el.type === 'checkbox') {\n if (Array.isArray(value)) {\n // I'm purposely not using Array.includes here because it's\n // strict, and because of Numeric/String mis-casting, I\n // want the \"includes\" to be \"fuzzy\".\n let valueFound = false;\n value.forEach(val => {\n if (val == el.value) {\n valueFound = true;\n }\n });\n el.checked = valueFound;\n } else {\n el.checked = !!value;\n } // If we are explicitly binding a string to the :value, set the string,\n // If the value is a boolean, leave it alone, it will be set to \"on\"\n // automatically.\n\n\n if (typeof value === 'string') {\n el.value = value;\n }\n } else if (el.tagName === 'SELECT') {\n updateSelect(el, value);\n } else if (el.type === 'text') {\n // Cursor position should be restored back to origin due to a safari bug\n const selectionStart = el.selectionStart;\n const selectionEnd = el.selectionEnd;\n const selectionDirection = el.selectionDirection;\n el.value = value;\n\n if (el === document.activeElement && selectionStart !== null) {\n el.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n } else {\n el.value = value;\n }\n } else if (attrName === 'class') {\n if (Array.isArray(value)) {\n const originalClasses = el.__x_original_classes || [];\n el.setAttribute('class', arrayUnique(originalClasses.concat(value)).join(' '));\n } else if (typeof value === 'object') {\n // Sorting the keys / class names by their boolean value will ensure that\n // anything that evaluates to `false` and needs to remove classes is run first.\n const keysSortedByBooleanValue = Object.keys(value).sort((a, b) => value[a] - value[b]);\n keysSortedByBooleanValue.forEach(classNames => {\n if (value[classNames]) {\n classNames.split(' ').forEach(className => el.classList.add(className));\n } else {\n classNames.split(' ').forEach(className => el.classList.remove(className));\n }\n });\n } else {\n const originalClasses = el.__x_original_classes || [];\n const newClasses = value.split(' ');\n el.setAttribute('class', arrayUnique(originalClasses.concat(newClasses)).join(' '));\n }\n } else if (isBooleanAttr(attrName)) {\n // Boolean attributes have to be explicitly added and removed, not just set.\n if (!!value) {\n el.setAttribute(attrName, '');\n } else {\n el.removeAttribute(attrName);\n }\n } else {\n el.setAttribute(attrName, value);\n }\n }\n\n function updateSelect(el, value) {\n const arrayWrappedValue = [].concat(value).map(value => {\n return value + '';\n });\n Array.from(el.options).forEach(option => {\n option.selected = arrayWrappedValue.includes(option.value || option.text);\n });\n }\n\n function handleTextDirective(el, output, expression) {\n // If nested model key is undefined, set the default value to empty string.\n if (output === undefined && expression.match(/\\./).length) {\n output = '';\n }\n\n el.innerText = output;\n }\n\n function handleHtmlDirective(component, el, expression, extraVars) {\n el.innerHTML = component.evaluateReturnExpression(el, expression, extraVars);\n }\n\n function handleShowDirective(component, el, value, modifiers, initialUpdate = false) {\n const hide = () => {\n el.style.display = 'none';\n };\n\n const show = () => {\n if (el.style.length === 1 && el.style.display === 'none') {\n el.removeAttribute('style');\n } else {\n el.style.removeProperty('display');\n }\n };\n\n if (initialUpdate === true) {\n if (value) {\n show();\n } else {\n hide();\n }\n\n return;\n }\n\n const handle = resolve => {\n if (!value) {\n if (el.style.display !== 'none') {\n transitionOut(el, () => {\n resolve(() => {\n hide();\n });\n });\n } else {\n resolve(() => {});\n }\n } else {\n if (el.style.display !== '') {\n transitionIn(el, () => {\n show();\n });\n } // Resolve immediately, only hold up parent `x-show`s for hidin.\n\n\n resolve(() => {});\n }\n }; // The working of x-show is a bit complex because we need to\n // wait for any child transitions to finish before hiding\n // some element. Also, this has to be done recursively.\n // If x-show.immediate, foregoe the waiting.\n\n\n if (modifiers.includes('immediate')) {\n handle(finish => finish());\n return;\n } // x-show is encountered during a DOM tree walk. If an element\n // we encounter is NOT a child of another x-show element we\n // can execute the previous x-show stack (if one exists).\n\n\n if (component.showDirectiveLastElement && !component.showDirectiveLastElement.contains(el)) {\n component.executeAndClearRemainingShowDirectiveStack();\n } // We'll push the handler onto a stack to be handled later.\n\n\n component.showDirectiveStack.push(handle);\n component.showDirectiveLastElement = el;\n }\n\n function handleIfDirective(component, el, expressionResult, initialUpdate, extraVars) {\n if (el.nodeName.toLowerCase() !== 'template') console.warn(`Alpine: [x-if] directive should only be added to <template> tags. See https://github.com/alpinejs/alpine#x-if`);\n const elementHasAlreadyBeenAdded = el.nextElementSibling && el.nextElementSibling.__x_inserted_me === true;\n\n if (expressionResult && !elementHasAlreadyBeenAdded) {\n const clone = document.importNode(el.content, true);\n el.parentElement.insertBefore(clone, el.nextElementSibling);\n transitionIn(el.nextElementSibling, () => {}, initialUpdate);\n component.initializeElements(el.nextElementSibling, extraVars);\n el.nextElementSibling.__x_inserted_me = true;\n } else if (!expressionResult && elementHasAlreadyBeenAdded) {\n transitionOut(el.nextElementSibling, () => {\n el.nextElementSibling.remove();\n }, initialUpdate);\n }\n }\n\n function registerListener(component, el, event, modifiers, expression, extraVars = {}) {\n if (modifiers.includes('away')) {\n let handler = e => {\n // Don't do anything if the click came form the element or within it.\n if (el.contains(e.target)) return; // Don't do anything if this element isn't currently visible.\n\n if (el.offsetWidth < 1 && el.offsetHeight < 1) return; // Now that we are sure the element is visible, AND the click\n // is from outside it, let's run the expression.\n\n runListenerHandler(component, expression, e, extraVars);\n\n if (modifiers.includes('once')) {\n document.removeEventListener(event, handler);\n }\n }; // Listen for this event at the root level.\n\n\n document.addEventListener(event, handler);\n } else {\n let listenerTarget = modifiers.includes('window') ? window : modifiers.includes('document') ? document : el;\n\n let handler = e => {\n // Remove this global event handler if the element that declared it\n // has been removed. It's now stale.\n if (listenerTarget === window || listenerTarget === document) {\n if (!document.body.contains(el)) {\n listenerTarget.removeEventListener(event, handler);\n return;\n }\n }\n\n if (isKeyEvent(event)) {\n if (isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) {\n return;\n }\n }\n\n if (modifiers.includes('prevent')) e.preventDefault();\n if (modifiers.includes('stop')) e.stopPropagation(); // If the .self modifier isn't present, or if it is present and\n // the target element matches the element we are registering the\n // event on, run the handler\n\n if (!modifiers.includes('self') || e.target === el) {\n const returnValue = runListenerHandler(component, expression, e, extraVars);\n\n if (returnValue === false) {\n e.preventDefault();\n } else {\n if (modifiers.includes('once')) {\n listenerTarget.removeEventListener(event, handler);\n }\n }\n }\n };\n\n if (modifiers.includes('debounce')) {\n let nextModifier = modifiers[modifiers.indexOf('debounce') + 1] || 'invalid-wait';\n let wait = isNumeric(nextModifier.split('ms')[0]) ? Number(nextModifier.split('ms')[0]) : 250;\n handler = debounce(handler, wait);\n }\n\n listenerTarget.addEventListener(event, handler);\n }\n }\n\n function runListenerHandler(component, expression, e, extraVars) {\n return component.evaluateCommandExpression(e.target, expression, () => {\n return _objectSpread2({}, extraVars(), {\n '$event': e\n });\n });\n }\n\n function isKeyEvent(event) {\n return ['keydown', 'keyup'].includes(event);\n }\n\n function isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers) {\n let keyModifiers = modifiers.filter(i => {\n return !['window', 'document', 'prevent', 'stop'].includes(i);\n });\n\n if (keyModifiers.includes('debounce')) {\n let debounceIndex = keyModifiers.indexOf('debounce');\n keyModifiers.splice(debounceIndex, isNumeric((keyModifiers[debounceIndex + 1] || 'invalid-wait').split('ms')[0]) ? 2 : 1);\n } // If no modifier is specified, we'll call it a press.\n\n\n if (keyModifiers.length === 0) return false; // If one is passed, AND it matches the key pressed, we'll call it a press.\n\n if (keyModifiers.length === 1 && keyModifiers[0] === keyToModifier(e.key)) return false; // The user is listening for key combinations.\n\n const systemKeyModifiers = ['ctrl', 'shift', 'alt', 'meta', 'cmd', 'super'];\n const selectedSystemKeyModifiers = systemKeyModifiers.filter(modifier => keyModifiers.includes(modifier));\n keyModifiers = keyModifiers.filter(i => !selectedSystemKeyModifiers.includes(i));\n\n if (selectedSystemKeyModifiers.length > 0) {\n const activelyPressedKeyModifiers = selectedSystemKeyModifiers.filter(modifier => {\n // Alias \"cmd\" and \"super\" to \"meta\"\n if (modifier === 'cmd' || modifier === 'super') modifier = 'meta';\n return e[`${modifier}Key`];\n }); // If all the modifiers selected are pressed, ...\n\n if (activelyPressedKeyModifiers.length === selectedSystemKeyModifiers.length) {\n // AND the remaining key is pressed as well. It's a press.\n if (keyModifiers[0] === keyToModifier(e.key)) return false;\n }\n } // We'll call it NOT a valid keypress.\n\n\n return true;\n }\n\n function keyToModifier(key) {\n switch (key) {\n case '/':\n return 'slash';\n\n case ' ':\n case 'Spacebar':\n return 'space';\n\n default:\n return key && kebabCase(key);\n }\n }\n\n function registerModelListener(component, el, modifiers, expression, extraVars) {\n // If the element we are binding to is a select, a radio, or checkbox\n // we'll listen for the change event instead of the \"input\" event.\n var event = el.tagName.toLowerCase() === 'select' || ['checkbox', 'radio'].includes(el.type) || modifiers.includes('lazy') ? 'change' : 'input';\n const listenerExpression = `${expression} = rightSideOfExpression($event, ${expression})`;\n registerListener(component, el, event, modifiers, listenerExpression, () => {\n return _objectSpread2({}, extraVars(), {\n rightSideOfExpression: generateModelAssignmentFunction(el, modifiers, expression)\n });\n });\n }\n\n function generateModelAssignmentFunction(el, modifiers, expression) {\n if (el.type === 'radio') {\n // Radio buttons only work properly when they share a name attribute.\n // People might assume we take care of that for them, because\n // they already set a shared \"x-model\" attribute.\n if (!el.hasAttribute('name')) el.setAttribute('name', expression);\n }\n\n return (event, currentValue) => {\n // Check for event.detail due to an issue where IE11 handles other events as a CustomEvent.\n if (event instanceof CustomEvent && event.detail) {\n return event.detail;\n } else if (el.type === 'checkbox') {\n // If the data we are binding to is an array, toggle it's value inside the array.\n if (Array.isArray(currentValue)) {\n return event.target.checked ? currentValue.concat([event.target.value]) : currentValue.filter(i => i !== event.target.value);\n } else {\n return event.target.checked;\n }\n } else if (el.tagName.toLowerCase() === 'select' && el.multiple) {\n return modifiers.includes('number') ? Array.from(event.target.selectedOptions).map(option => {\n const rawValue = option.value || option.text;\n const number = rawValue ? parseFloat(rawValue) : null;\n return isNaN(number) ? rawValue : number;\n }) : Array.from(event.target.selectedOptions).map(option => {\n return option.value || option.text;\n });\n } else {\n const rawValue = event.target.value;\n const number = rawValue ? parseFloat(rawValue) : null;\n return modifiers.includes('number') ? isNaN(number) ? rawValue : number : modifiers.includes('trim') ? rawValue.trim() : rawValue;\n }\n };\n }\n\n /**\n * Copyright (C) 2017 salesforce.com, inc.\n */\n const { isArray } = Array;\n const { getPrototypeOf, create: ObjectCreate, defineProperty: ObjectDefineProperty, defineProperties: ObjectDefineProperties, isExtensible, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, preventExtensions, hasOwnProperty, } = Object;\n const { push: ArrayPush, concat: ArrayConcat, map: ArrayMap, } = Array.prototype;\n function isUndefined(obj) {\n return obj === undefined;\n }\n function isFunction(obj) {\n return typeof obj === 'function';\n }\n function isObject(obj) {\n return typeof obj === 'object';\n }\n const proxyToValueMap = new WeakMap();\n function registerProxy(proxy, value) {\n proxyToValueMap.set(proxy, value);\n }\n const unwrap = (replicaOrAny) => proxyToValueMap.get(replicaOrAny) || replicaOrAny;\n\n function wrapValue(membrane, value) {\n return membrane.valueIsObservable(value) ? membrane.getProxy(value) : value;\n }\n /**\n * Unwrap property descriptors will set value on original descriptor\n * We only need to unwrap if value is specified\n * @param descriptor external descrpitor provided to define new property on original value\n */\n function unwrapDescriptor(descriptor) {\n if (hasOwnProperty.call(descriptor, 'value')) {\n descriptor.value = unwrap(descriptor.value);\n }\n return descriptor;\n }\n function lockShadowTarget(membrane, shadowTarget, originalTarget) {\n const targetKeys = ArrayConcat.call(getOwnPropertyNames(originalTarget), getOwnPropertySymbols(originalTarget));\n targetKeys.forEach((key) => {\n let descriptor = getOwnPropertyDescriptor(originalTarget, key);\n // We do not need to wrap the descriptor if configurable\n // Because we can deal with wrapping it when user goes through\n // Get own property descriptor. There is also a chance that this descriptor\n // could change sometime in the future, so we can defer wrapping\n // until we need to\n if (!descriptor.configurable) {\n descriptor = wrapDescriptor(membrane, descriptor, wrapValue);\n }\n ObjectDefineProperty(shadowTarget, key, descriptor);\n });\n preventExtensions(shadowTarget);\n }\n class ReactiveProxyHandler {\n constructor(membrane, value) {\n this.originalTarget = value;\n this.membrane = membrane;\n }\n get(shadowTarget, key) {\n const { originalTarget, membrane } = this;\n const value = originalTarget[key];\n const { valueObserved } = membrane;\n valueObserved(originalTarget, key);\n return membrane.getProxy(value);\n }\n set(shadowTarget, key, value) {\n const { originalTarget, membrane: { valueMutated } } = this;\n const oldValue = originalTarget[key];\n if (oldValue !== value) {\n originalTarget[key] = value;\n valueMutated(originalTarget, key);\n }\n else if (key === 'length' && isArray(originalTarget)) {\n // fix for issue #236: push will add the new index, and by the time length\n // is updated, the internal length is already equal to the new length value\n // therefore, the oldValue is equal to the value. This is the forking logic\n // to support this use case.\n valueMutated(originalTarget, key);\n }\n return true;\n }\n deleteProperty(shadowTarget, key) {\n const { originalTarget, membrane: { valueMutated } } = this;\n delete originalTarget[key];\n valueMutated(originalTarget, key);\n return true;\n }\n apply(shadowTarget, thisArg, argArray) {\n /* No op */\n }\n construct(target, argArray, newTarget) {\n /* No op */\n }\n has(shadowTarget, key) {\n const { originalTarget, membrane: { valueObserved } } = this;\n valueObserved(originalTarget, key);\n return key in originalTarget;\n }\n ownKeys(shadowTarget) {\n const { originalTarget } = this;\n return ArrayConcat.call(getOwnPropertyNames(originalTarget), getOwnPropertySymbols(originalTarget));\n }\n isExtensible(shadowTarget) {\n const shadowIsExtensible = isExtensible(shadowTarget);\n if (!shadowIsExtensible) {\n return shadowIsExtensible;\n }\n const { originalTarget, membrane } = this;\n const targetIsExtensible = isExtensible(originalTarget);\n if (!targetIsExtensible) {\n lockShadowTarget(membrane, shadowTarget, originalTarget);\n }\n return targetIsExtensible;\n }\n setPrototypeOf(shadowTarget, prototype) {\n }\n getPrototypeOf(shadowTarget) {\n const { originalTarget } = this;\n return getPrototypeOf(originalTarget);\n }\n getOwnPropertyDescriptor(shadowTarget, key) {\n const { originalTarget, membrane } = this;\n const { valueObserved } = this.membrane;\n // keys looked up via hasOwnProperty need to be reactive\n valueObserved(originalTarget, key);\n let desc = getOwnPropertyDescriptor(originalTarget, key);\n if (isUndefined(desc)) {\n return desc;\n }\n const shadowDescriptor = getOwnPropertyDescriptor(shadowTarget, key);\n if (!isUndefined(shadowDescriptor)) {\n return shadowDescriptor;\n }\n // Note: by accessing the descriptor, the key is marked as observed\n // but access to the value, setter or getter (if available) cannot observe\n // mutations, just like regular methods, in which case we just do nothing.\n desc = wrapDescriptor(membrane, desc, wrapValue);\n if (!desc.configurable) {\n // If descriptor from original target is not configurable,\n // We must copy the wrapped descriptor over to the shadow target.\n // Otherwise, proxy will throw an invariant error.\n // This is our last chance to lock the value.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getOwnPropertyDescriptor#Invariants\n ObjectDefineProperty(shadowTarget, key, desc);\n }\n return desc;\n }\n preventExtensions(shadowTarget) {\n const { originalTarget, membrane } = this;\n lockShadowTarget(membrane, shadowTarget, originalTarget);\n preventExtensions(originalTarget);\n return true;\n }\n defineProperty(shadowTarget, key, descriptor) {\n const { originalTarget, membrane } = this;\n const { valueMutated } = membrane;\n const { configurable } = descriptor;\n // We have to check for value in descriptor\n // because Object.freeze(proxy) calls this method\n // with only { configurable: false, writeable: false }\n // Additionally, method will only be called with writeable:false\n // if the descriptor has a value, as opposed to getter/setter\n // So we can just check if writable is present and then see if\n // value is present. This eliminates getter and setter descriptors\n if (hasOwnProperty.call(descriptor, 'writable') && !hasOwnProperty.call(descriptor, 'value')) {\n const originalDescriptor = getOwnPropertyDescriptor(originalTarget, key);\n descriptor.value = originalDescriptor.value;\n }\n ObjectDefineProperty(originalTarget, key, unwrapDescriptor(descriptor));\n if (configurable === false) {\n ObjectDefineProperty(shadowTarget, key, wrapDescriptor(membrane, descriptor, wrapValue));\n }\n valueMutated(originalTarget, key);\n return true;\n }\n }\n\n function wrapReadOnlyValue(membrane, value) {\n return membrane.valueIsObservable(value) ? membrane.getReadOnlyProxy(value) : value;\n }\n class ReadOnlyHandler {\n constructor(membrane, value) {\n this.originalTarget = value;\n this.membrane = membrane;\n }\n get(shadowTarget, key) {\n const { membrane, originalTarget } = this;\n const value = originalTarget[key];\n const { valueObserved } = membrane;\n valueObserved(originalTarget, key);\n return membrane.getReadOnlyProxy(value);\n }\n set(shadowTarget, key, value) {\n return false;\n }\n deleteProperty(shadowTarget, key) {\n return false;\n }\n apply(shadowTarget, thisArg, argArray) {\n /* No op */\n }\n construct(target, argArray, newTarget) {\n /* No op */\n }\n has(shadowTarget, key) {\n const { originalTarget, membrane: { valueObserved } } = this;\n valueObserved(originalTarget, key);\n return key in originalTarget;\n }\n ownKeys(shadowTarget) {\n const { originalTarget } = this;\n return ArrayConcat.call(getOwnPropertyNames(originalTarget), getOwnPropertySymbols(originalTarget));\n }\n setPrototypeOf(shadowTarget, prototype) {\n }\n getOwnPropertyDescriptor(shadowTarget, key) {\n const { originalTarget, membrane } = this;\n const { valueObserved } = membrane;\n // keys looked up via hasOwnProperty need to be reactive\n valueObserved(originalTarget, key);\n let desc = getOwnPropertyDescriptor(originalTarget, key);\n if (isUndefined(desc)) {\n return desc;\n }\n const shadowDescriptor = getOwnPropertyDescriptor(shadowTarget, key);\n if (!isUndefined(shadowDescriptor)) {\n return shadowDescriptor;\n }\n // Note: by accessing the descriptor, the key is marked as observed\n // but access to the value or getter (if available) cannot be observed,\n // just like regular methods, in which case we just do nothing.\n desc = wrapDescriptor(membrane, desc, wrapReadOnlyValue);\n if (hasOwnProperty.call(desc, 'set')) {\n desc.set = undefined; // readOnly membrane does not allow setters\n }\n if (!desc.configurable) {\n // If descriptor from original target is not configurable,\n // We must copy the wrapped descriptor over to the shadow target.\n // Otherwise, proxy will throw an invariant error.\n // This is our last chance to lock the value.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getOwnPropertyDescriptor#Invariants\n ObjectDefineProperty(shadowTarget, key, desc);\n }\n return desc;\n }\n preventExtensions(shadowTarget) {\n return false;\n }\n defineProperty(shadowTarget, key, descriptor) {\n return false;\n }\n }\n function createShadowTarget(value) {\n let shadowTarget = undefined;\n if (isArray(value)) {\n shadowTarget = [];\n }\n else if (isObject(value)) {\n shadowTarget = {};\n }\n return shadowTarget;\n }\n const ObjectDotPrototype = Object.prototype;\n function defaultValueIsObservable(value) {\n // intentionally checking for null\n if (value === null) {\n return false;\n }\n // treat all non-object types, including undefined, as non-observable values\n if (typeof value !== 'object') {\n return false;\n }\n if (isArray(value)) {\n return true;\n }\n const proto = getPrototypeOf(value);\n return (proto === ObjectDotPrototype || proto === null || getPrototypeOf(proto) === null);\n }\n const defaultValueObserved = (obj, key) => {\n /* do nothing */\n };\n const defaultValueMutated = (obj, key) => {\n /* do nothing */\n };\n const defaultValueDistortion = (value) => value;\n function wrapDescriptor(membrane, descriptor, getValue) {\n const { set, get } = descriptor;\n if (hasOwnProperty.call(descriptor, 'value')) {\n descriptor.value = getValue(membrane, descriptor.value);\n }\n else {\n if (!isUndefined(get)) {\n descriptor.get = function () {\n // invoking the original getter with the original target\n return getValue(membrane, get.call(unwrap(this)));\n };\n }\n if (!isUndefined(set)) {\n descriptor.set = function (value) {\n // At this point we don't have a clear indication of whether\n // or not a valid mutation will occur, we don't have the key,\n // and we are not sure why and how they are invoking this setter.\n // Nevertheless we preserve the original semantics by invoking the\n // original setter with the original target and the unwrapped value\n set.call(unwrap(this), membrane.unwrapProxy(value));\n };\n }\n }\n return descriptor;\n }\n class ReactiveMembrane {\n constructor(options) {\n this.valueDistortion = defaultValueDistortion;\n this.valueMutated = defaultValueMutated;\n this.valueObserved = defaultValueObserved;\n this.valueIsObservable = defaultValueIsObservable;\n this.objectGraph = new WeakMap();\n if (!isUndefined(options)) {\n const { valueDistortion, valueMutated, valueObserved, valueIsObservable } = options;\n this.valueDistortion = isFunction(valueDistortion) ? valueDistortion : defaultValueDistortion;\n this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;\n this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;\n this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;\n }\n }\n getProxy(value) {\n const unwrappedValue = unwrap(value);\n const distorted = this.valueDistortion(unwrappedValue);\n if (this.valueIsObservable(distorted)) {\n const o = this.getReactiveState(unwrappedValue, distorted);\n // when trying to extract the writable version of a readonly\n // we return the readonly.\n return o.readOnly === value ? value : o.reactive;\n }\n return distorted;\n }\n getReadOnlyProxy(value) {\n value = unwrap(value);\n const distorted = this.valueDistortion(value);\n if (this.valueIsObservable(distorted)) {\n return this.getReactiveState(value, distorted).readOnly;\n }\n return distorted;\n }\n unwrapProxy(p) {\n return unwrap(p);\n }\n getReactiveState(value, distortedValue) {\n const { objectGraph, } = this;\n let reactiveState = objectGraph.get(distortedValue);\n if (reactiveState) {\n return reactiveState;\n }\n const membrane = this;\n reactiveState = {\n get reactive() {\n const reactiveHandler = new ReactiveProxyHandler(membrane, distortedValue);\n // caching the reactive proxy after the first time it is accessed\n const proxy = new Proxy(createShadowTarget(distortedValue), reactiveHandler);\n registerProxy(proxy, value);\n ObjectDefineProperty(this, 'reactive', { value: proxy });\n return proxy;\n },\n get readOnly() {\n const readOnlyHandler = new ReadOnlyHandler(membrane, distortedValue);\n // caching the readOnly proxy after the first time it is accessed\n const proxy = new Proxy(createShadowTarget(distortedValue), readOnlyHandler);\n registerProxy(proxy, value);\n ObjectDefineProperty(this, 'readOnly', { value: proxy });\n return proxy;\n }\n };\n objectGraph.set(distortedValue, reactiveState);\n return reactiveState;\n }\n }\n /** version: 0.26.0 */\n\n function wrap(data, mutationCallback) {\n\n let membrane = new ReactiveMembrane({\n valueMutated(target, key) {\n mutationCallback(target, key);\n }\n\n });\n return {\n data: membrane.getProxy(data),\n membrane: membrane\n };\n }\n function unwrap$1(membrane, observable) {\n let unwrappedData = membrane.unwrapProxy(observable);\n let copy = {};\n Object.keys(unwrappedData).forEach(key => {\n if (['$el', '$refs', '$nextTick', '$watch'].includes(key)) return;\n copy[key] = unwrappedData[key];\n });\n return copy;\n }\n\n class Component {\n constructor(el, seedDataForCloning = null) {\n this.$el = el;\n const dataAttr = this.$el.getAttribute('x-data');\n const dataExpression = dataAttr === '' ? '{}' : dataAttr;\n const initExpression = this.$el.getAttribute('x-init');\n this.unobservedData = seedDataForCloning ? seedDataForCloning : saferEval(dataExpression, {});\n // Construct a Proxy-based observable. This will be used to handle reactivity.\n\n let {\n membrane,\n data\n } = this.wrapDataInObservable(this.unobservedData);\n this.$data = data;\n this.membrane = membrane; // After making user-supplied data methods reactive, we can now add\n // our magic properties to the original data for access.\n\n this.unobservedData.$el = this.$el;\n this.unobservedData.$refs = this.getRefsProxy();\n this.nextTickStack = [];\n\n this.unobservedData.$nextTick = callback => {\n this.nextTickStack.push(callback);\n };\n\n this.watchers = {};\n\n this.unobservedData.$watch = (property, callback) => {\n if (!this.watchers[property]) this.watchers[property] = [];\n this.watchers[property].push(callback);\n };\n\n this.showDirectiveStack = [];\n this.showDirectiveLastElement;\n var initReturnedCallback; // If x-init is present AND we aren't cloning (skip x-init on clone)\n\n if (initExpression && !seedDataForCloning) {\n // We want to allow data manipulation, but not trigger DOM updates just yet.\n // We haven't even initialized the elements with their Alpine bindings. I mean c'mon.\n this.pauseReactivity = true;\n initReturnedCallback = this.evaluateReturnExpression(this.$el, initExpression);\n this.pauseReactivity = false;\n } // Register all our listeners and set all our attribute bindings.\n\n\n this.initializeElements(this.$el); // Use mutation observer to detect new elements being added within this component at run-time.\n // Alpine's just so darn flexible amirite?\n\n this.listenForNewElementsToInitialize();\n\n if (typeof initReturnedCallback === 'function') {\n // Run the callback returned from the \"x-init\" hook to allow the user to do stuff after\n // Alpine's got it's grubby little paws all over everything.\n initReturnedCallback.call(this.$data);\n }\n }\n\n getUnobservedData() {\n return unwrap$1(this.membrane, this.$data);\n }\n\n wrapDataInObservable(data) {\n var self = this;\n let updateDom = debounce(function () {\n self.updateElements(self.$el);\n }, 0);\n return wrap(data, (target, key) => {\n if (self.watchers[key]) {\n // If there's a watcher for this specific key, run it.\n self.watchers[key].forEach(callback => callback(target[key]));\n } else {\n // Let's walk through the watchers with \"dot-notation\" (foo.bar) and see\n // if this mutation fits any of them.\n Object.keys(self.watchers).filter(i => i.includes('.')).forEach(fullDotNotationKey => {\n let dotNotationParts = fullDotNotationKey.split('.'); // If this dot-notation watcher's last \"part\" doesn't match the current\n // key, then skip it early for performance reasons.\n\n if (key !== dotNotationParts[dotNotationParts.length - 1]) return; // Now, walk through the dot-notation \"parts\" recursively to find\n // a match, and call the watcher if one's found.\n\n dotNotationParts.reduce((comparisonData, part) => {\n if (Object.is(target, comparisonData)) {\n // Run the watchers.\n self.watchers[fullDotNotationKey].forEach(callback => callback(target[key]));\n }\n\n return comparisonData[part];\n }, self.getUnobservedData());\n });\n } // Don't react to data changes for cases like the `x-created` hook.\n\n\n if (self.pauseReactivity) return;\n updateDom();\n });\n }\n\n walkAndSkipNestedComponents(el, callback, initializeComponentCallback = () => {}) {\n walk(el, el => {\n // We've hit a component.\n if (el.hasAttribute('x-data')) {\n // If it's not the current one.\n if (!el.isSameNode(this.$el)) {\n // Initialize it if it's not.\n if (!el.__x) initializeComponentCallback(el); // Now we'll let that sub-component deal with itself.\n\n return false;\n }\n }\n\n return callback(el);\n });\n }\n\n initializeElements(rootEl, extraVars = () => {}) {\n this.walkAndSkipNestedComponents(rootEl, el => {\n // Don't touch spawns from for loop\n if (el.__x_for_key !== undefined) return false; // Don't touch spawns from if directives\n\n if (el.__x_inserted_me !== undefined) return false;\n this.initializeElement(el, extraVars);\n }, el => {\n el.__x = new Component(el);\n });\n this.executeAndClearRemainingShowDirectiveStack();\n this.executeAndClearNextTickStack(rootEl);\n }\n\n initializeElement(el, extraVars) {\n // To support class attribute merging, we have to know what the element's\n // original class attribute looked like for reference.\n if (el.hasAttribute('class') && getXAttrs(el).length > 0) {\n el.__x_original_classes = el.getAttribute('class').split(' ');\n }\n\n this.registerListeners(el, extraVars);\n this.resolveBoundAttributes(el, true, extraVars);\n }\n\n updateElements(rootEl, extraVars = () => {}) {\n this.walkAndSkipNestedComponents(rootEl, el => {\n // Don't touch spawns from for loop (and check if the root is actually a for loop in a parent, don't skip it.)\n if (el.__x_for_key !== undefined && !el.isSameNode(this.$el)) return false;\n this.updateElement(el, extraVars);\n }, el => {\n el.__x = new Component(el);\n });\n this.executeAndClearRemainingShowDirectiveStack();\n this.executeAndClearNextTickStack(rootEl);\n }\n\n executeAndClearNextTickStack(el) {\n // Skip spawns from alpine directives\n if (el === this.$el) {\n // Walk through the $nextTick stack and clear it as we go.\n while (this.nextTickStack.length > 0) {\n this.nextTickStack.shift()();\n }\n }\n }\n\n executeAndClearRemainingShowDirectiveStack() {\n // The goal here is to start all the x-show transitions\n // and build a nested promise chain so that elements\n // only hide when the children are finished hiding.\n this.showDirectiveStack.reverse().map(thing => {\n return new Promise(resolve => {\n thing(finish => {\n resolve(finish);\n });\n });\n }).reduce((nestedPromise, promise) => {\n return nestedPromise.then(() => {\n return promise.then(finish => finish());\n });\n }, Promise.resolve(() => {})); // We've processed the handler stack. let's clear it.\n\n this.showDirectiveStack = [];\n this.showDirectiveLastElement = undefined;\n }\n\n updateElement(el, extraVars) {\n this.resolveBoundAttributes(el, false, extraVars);\n }\n\n registerListeners(el, extraVars) {\n getXAttrs(el).forEach(({\n type,\n value,\n modifiers,\n expression\n }) => {\n switch (type) {\n case 'on':\n registerListener(this, el, value, modifiers, expression, extraVars);\n break;\n\n case 'model':\n registerModelListener(this, el, modifiers, expression, extraVars);\n break;\n }\n });\n }\n\n resolveBoundAttributes(el, initialUpdate = false, extraVars) {\n let attrs = getXAttrs(el);\n\n if (el.type !== undefined && el.type === 'radio') {\n // If there's an x-model on a radio input, move it to end of attribute list\n // to ensure that x-bind:value (if present) is processed first.\n const modelIdx = attrs.findIndex(attr => attr.type === 'model');\n\n if (modelIdx > -1) {\n attrs.push(attrs.splice(modelIdx, 1)[0]);\n }\n }\n\n attrs.forEach(({\n type,\n value,\n modifiers,\n expression\n }) => {\n switch (type) {\n case 'model':\n handleAttributeBindingDirective(this, el, 'value', expression, extraVars, type);\n break;\n\n case 'bind':\n // The :key binding on an x-for is special, ignore it.\n if (el.tagName.toLowerCase() === 'template' && value === 'key') return;\n handleAttributeBindingDirective(this, el, value, expression, extraVars, type);\n break;\n\n case 'text':\n var output = this.evaluateReturnExpression(el, expression, extraVars);\n handleTextDirective(el, output, expression);\n break;\n\n case 'html':\n handleHtmlDirective(this, el, expression, extraVars);\n break;\n\n case 'show':\n var output = this.evaluateReturnExpression(el, expression, extraVars);\n handleShowDirective(this, el, output, modifiers, initialUpdate);\n break;\n\n case 'if':\n // If this element also has x-for on it, don't process x-if.\n // We will let the \"x-for\" directive handle the \"if\"ing.\n if (attrs.filter(i => i.type === 'for').length > 0) return;\n var output = this.evaluateReturnExpression(el, expression, extraVars);\n handleIfDirective(this, el, output, initialUpdate, extraVars);\n break;\n\n case 'for':\n handleForDirective(this, el, expression, initialUpdate, extraVars);\n break;\n\n case 'cloak':\n el.removeAttribute('x-cloak');\n break;\n }\n });\n }\n\n evaluateReturnExpression(el, expression, extraVars = () => {}) {\n return saferEval(expression, this.$data, _objectSpread2({}, extraVars(), {\n $dispatch: this.getDispatchFunction(el)\n }));\n }\n\n evaluateCommandExpression(el, expression, extraVars = () => {}) {\n return saferEvalNoReturn(expression, this.$data, _objectSpread2({}, extraVars(), {\n $dispatch: this.getDispatchFunction(el)\n }));\n }\n\n getDispatchFunction(el) {\n return (event, detail = {}) => {\n el.dispatchEvent(new CustomEvent(event, {\n detail,\n bubbles: true\n }));\n };\n }\n\n listenForNewElementsToInitialize() {\n const targetNode = this.$el;\n const observerOptions = {\n childList: true,\n attributes: true,\n subtree: true\n };\n const observer = new MutationObserver(mutations => {\n for (let i = 0; i < mutations.length; i++) {\n // Filter out mutations triggered from child components.\n const closestParentComponent = mutations[i].target.closest('[x-data]');\n if (!(closestParentComponent && closestParentComponent.isSameNode(this.$el))) continue;\n\n if (mutations[i].type === 'attributes' && mutations[i].attributeName === 'x-data') {\n const rawData = saferEval(mutations[i].target.getAttribute('x-data'), {});\n Object.keys(rawData).forEach(key => {\n if (this.$data[key] !== rawData[key]) {\n this.$data[key] = rawData[key];\n }\n });\n }\n\n if (mutations[i].addedNodes.length > 0) {\n mutations[i].addedNodes.forEach(node => {\n if (node.nodeType !== 1 || node.__x_inserted_me) return;\n\n if (node.matches('[x-data]')) {\n node.__x = new Component(node);\n return;\n }\n\n this.initializeElements(node);\n });\n }\n }\n });\n observer.observe(targetNode, observerOptions);\n }\n\n getRefsProxy() {\n var self = this;\n var refObj = {};\n // One of the goals of this is to not hold elements in memory, but rather re-evaluate\n // the DOM when the system needs something from it. This way, the framework is flexible and\n // friendly to outside DOM changes from libraries like Vue/Livewire.\n // For this reason, I'm using an \"on-demand\" proxy to fake a \"$refs\" object.\n\n return new Proxy(refObj, {\n get(object, property) {\n if (property === '$isAlpineProxy') return true;\n var ref; // We can't just query the DOM because it's hard to filter out refs in\n // nested components.\n\n self.walkAndSkipNestedComponents(self.$el, el => {\n if (el.hasAttribute('x-ref') && el.getAttribute('x-ref') === property) {\n ref = el;\n }\n });\n return ref;\n }\n\n });\n }\n\n }\n\n const Alpine = {\n version: \"2.3.3\",\n start: async function start() {\n if (!isTesting()) {\n await domReady();\n }\n\n this.discoverComponents(el => {\n this.initializeComponent(el);\n }); // It's easier and more performant to just support Turbolinks than listen\n // to MutationObserver mutations at the document level.\n\n document.addEventListener(\"turbolinks:load\", () => {\n this.discoverUninitializedComponents(el => {\n this.initializeComponent(el);\n });\n });\n this.listenForNewUninitializedComponentsAtRunTime(el => {\n this.initializeComponent(el);\n });\n },\n discoverComponents: function discoverComponents(callback) {\n const rootEls = document.querySelectorAll('[x-data]');\n rootEls.forEach(rootEl => {\n callback(rootEl);\n });\n },\n discoverUninitializedComponents: function discoverUninitializedComponents(callback, el = null) {\n const rootEls = (el || document).querySelectorAll('[x-data]');\n Array.from(rootEls).filter(el => el.__x === undefined).forEach(rootEl => {\n callback(rootEl);\n });\n },\n listenForNewUninitializedComponentsAtRunTime: function listenForNewUninitializedComponentsAtRunTime(callback) {\n const targetNode = document.querySelector('body');\n const observerOptions = {\n childList: true,\n attributes: true,\n subtree: true\n };\n const observer = new MutationObserver(mutations => {\n for (let i = 0; i < mutations.length; i++) {\n if (mutations[i].addedNodes.length > 0) {\n mutations[i].addedNodes.forEach(node => {\n // Discard non-element nodes (like line-breaks)\n if (node.nodeType !== 1) return; // Discard any changes happening within an existing component.\n // They will take care of themselves.\n\n if (node.parentElement && node.parentElement.closest('[x-data]')) return;\n this.discoverUninitializedComponents(el => {\n this.initializeComponent(el);\n }, node.parentElement);\n });\n }\n }\n });\n observer.observe(targetNode, observerOptions);\n },\n initializeComponent: function initializeComponent(el) {\n if (!el.__x) {\n el.__x = new Component(el);\n }\n },\n clone: function clone(component, newEl) {\n if (!newEl.__x) {\n newEl.__x = new Component(newEl, component.getUnobservedData());\n }\n }\n };\n\n if (!isTesting()) {\n window.Alpine = Alpine;\n\n if (window.deferLoadingAlpine) {\n window.deferLoadingAlpine(function () {\n window.Alpine.start();\n });\n } else {\n window.Alpine.start();\n }\n }\n\n return Alpine;\n\n})));\n"]}