mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 01:24:06 -08:00
8 lines
551 KiB
Plaintext
8 lines
551 KiB
Plaintext
{
|
|
"version": 3,
|
|
"sources": ["../node_modules/nprogress/nprogress.js", "../js/utils.js", "../js/features/supportFileUploads.js", "../../alpine/packages/alpinejs/dist/module.esm.js", "../js/features/supportEntangle.js", "../js/hooks.js", "../js/request/modal.js", "../js/request/pool.js", "../js/request/commit.js", "../js/request/bus.js", "../js/request/index.js", "../js/$wire.js", "../js/component.js", "../js/store.js", "../js/events.js", "../js/directives.js", "../../alpine/packages/collapse/dist/module.esm.js", "../../alpine/packages/focus/dist/module.esm.js", "../../alpine/packages/persist/dist/module.esm.js", "../../alpine/packages/intersect/dist/module.esm.js", "../../alpine/packages/anchor/dist/module.esm.js", "../js/plugins/navigate/history.js", "../js/plugins/navigate/links.js", "../js/plugins/navigate/fetch.js", "../js/plugins/navigate/prefetch.js", "../js/plugins/navigate/teleport.js", "../js/plugins/navigate/scroll.js", "../js/plugins/navigate/persist.js", "../js/plugins/navigate/bar.js", "../js/plugins/navigate/page.js", "../js/plugins/navigate/index.js", "../js/plugins/history/index.js", "../../alpine/packages/morph/dist/module.esm.js", "../../alpine/packages/mask/dist/module.esm.js", "../js/lifecycle.js", "../js/features/supportListeners.js", "../js/features/supportScriptsAndAssets.js", "../js/features/supportJsEvaluation.js", "../js/morph.js", "../js/features/supportMorphDom.js", "../js/features/supportDispatches.js", "../js/features/supportDisablingFormsDuringRequest.js", "../js/features/supportPropsAndModelables.js", "../js/features/supportFileDownloads.js", "../js/features/supportLazyLoading.js", "../js/features/supportQueryString.js", "../js/features/supportLaravelEcho.js", "../js/features/supportIsolating.js", "../js/features/supportNavigate.js", "../js/features/supportRedirects.js", "../js/directives/wire-transition.js", "../js/debounce.js", "../js/directives/wire-wildcard.js", "../js/directives/wire-navigate.js", "../js/directives/wire-confirm.js", "../js/directives/shared.js", "../js/directives/wire-offline.js", "../js/directives/wire-loading.js", "../js/directives/wire-stream.js", "../js/directives/wire-replace.js", "../js/directives/wire-ignore.js", "../js/directives/wire-dirty.js", "../js/directives/wire-model.js", "../js/directives/wire-init.js", "../js/directives/wire-poll.js", "../js/index.js"],
|
|
"sourcesContent": ["/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress\n * @license MIT */\n\n;(function(root, factory) {\n\n if (typeof define === 'function' && define.amd) {\n define(factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.NProgress = factory();\n }\n\n})(this, function() {\n var NProgress = {};\n\n NProgress.version = '0.2.0';\n\n var Settings = NProgress.settings = {\n minimum: 0.08,\n easing: 'ease',\n positionUsing: '',\n speed: 200,\n trickle: true,\n trickleRate: 0.02,\n trickleSpeed: 800,\n showSpinner: true,\n barSelector: '[role=\"bar\"]',\n spinnerSelector: '[role=\"spinner\"]',\n parent: 'body',\n template: '<div class=\"bar\" role=\"bar\"><div class=\"peg\"></div></div><div class=\"spinner\" role=\"spinner\"><div class=\"spinner-icon\"></div></div>'\n };\n\n /**\n * Updates configuration.\n *\n * NProgress.configure({\n * minimum: 0.1\n * });\n */\n NProgress.configure = function(options) {\n var key, value;\n for (key in options) {\n value = options[key];\n if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;\n }\n\n return this;\n };\n\n /**\n * Last number.\n */\n\n NProgress.status = null;\n\n /**\n * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.\n *\n * NProgress.set(0.4);\n * NProgress.set(1.0);\n */\n\n NProgress.set = function(n) {\n var started = NProgress.isStarted();\n\n n = clamp(n, Settings.minimum, 1);\n NProgress.status = (n === 1 ? null : n);\n\n var progress = NProgress.render(!started),\n bar = progress.querySelector(Settings.barSelector),\n speed = Settings.speed,\n ease = Settings.easing;\n\n progress.offsetWidth; /* Repaint */\n\n queue(function(next) {\n // Set positionUsing if it hasn't already been set\n if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();\n\n // Add transition\n css(bar, barPositionCSS(n, speed, ease));\n\n if (n === 1) {\n // Fade out\n css(progress, { \n transition: 'none', \n opacity: 1 \n });\n progress.offsetWidth; /* Repaint */\n\n setTimeout(function() {\n css(progress, { \n transition: 'all ' + speed + 'ms linear', \n opacity: 0 \n });\n setTimeout(function() {\n NProgress.remove();\n next();\n }, speed);\n }, speed);\n } else {\n setTimeout(next, speed);\n }\n });\n\n return this;\n };\n\n NProgress.isStarted = function() {\n return typeof NProgress.status === 'number';\n };\n\n /**\n * Shows the progress bar.\n * This is the same as setting the status to 0%, except that it doesn't go backwards.\n *\n * NProgress.start();\n *\n */\n NProgress.start = function() {\n if (!NProgress.status) NProgress.set(0);\n\n var work = function() {\n setTimeout(function() {\n if (!NProgress.status) return;\n NProgress.trickle();\n work();\n }, Settings.trickleSpeed);\n };\n\n if (Settings.trickle) work();\n\n return this;\n };\n\n /**\n * Hides the progress bar.\n * This is the *sort of* the same as setting the status to 100%, with the\n * difference being `done()` makes some placebo effect of some realistic motion.\n *\n * NProgress.done();\n *\n * If `true` is passed, it will show the progress bar even if its hidden.\n *\n * NProgress.done(true);\n */\n\n NProgress.done = function(force) {\n if (!force && !NProgress.status) return this;\n\n return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);\n };\n\n /**\n * Increments by a random amount.\n */\n\n NProgress.inc = function(amount) {\n var n = NProgress.status;\n\n if (!n) {\n return NProgress.start();\n } else {\n if (typeof amount !== 'number') {\n amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);\n }\n\n n = clamp(n + amount, 0, 0.994);\n return NProgress.set(n);\n }\n };\n\n NProgress.trickle = function() {\n return NProgress.inc(Math.random() * Settings.trickleRate);\n };\n\n /**\n * Waits for all supplied jQuery promises and\n * increases the progress as the promises resolve.\n *\n * @param $promise jQUery Promise\n */\n (function() {\n var initial = 0, current = 0;\n\n NProgress.promise = function($promise) {\n if (!$promise || $promise.state() === \"resolved\") {\n return this;\n }\n\n if (current === 0) {\n NProgress.start();\n }\n\n initial++;\n current++;\n\n $promise.always(function() {\n current--;\n if (current === 0) {\n initial = 0;\n NProgress.done();\n } else {\n NProgress.set((initial - current) / initial);\n }\n });\n\n return this;\n };\n\n })();\n\n /**\n * (Internal) renders the progress bar markup based on the `template`\n * setting.\n */\n\n NProgress.render = function(fromStart) {\n if (NProgress.isRendered()) return document.getElementById('nprogress');\n\n addClass(document.documentElement, 'nprogress-busy');\n \n var progress = document.createElement('div');\n progress.id = 'nprogress';\n progress.innerHTML = Settings.template;\n\n var bar = progress.querySelector(Settings.barSelector),\n perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),\n parent = document.querySelector(Settings.parent),\n spinner;\n \n css(bar, {\n transition: 'all 0 linear',\n transform: 'translate3d(' + perc + '%,0,0)'\n });\n\n if (!Settings.showSpinner) {\n spinner = progress.querySelector(Settings.spinnerSelector);\n spinner && removeElement(spinner);\n }\n\n if (parent != document.body) {\n addClass(parent, 'nprogress-custom-parent');\n }\n\n parent.appendChild(progress);\n return progress;\n };\n\n /**\n * Removes the element. Opposite of render().\n */\n\n NProgress.remove = function() {\n removeClass(document.documentElement, 'nprogress-busy');\n removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');\n var progress = document.getElementById('nprogress');\n progress && removeElement(progress);\n };\n\n /**\n * Checks if the progress bar is rendered.\n */\n\n NProgress.isRendered = function() {\n return !!document.getElementById('nprogress');\n };\n\n /**\n * Determine which positioning CSS rule to use.\n */\n\n NProgress.getPositioningCSS = function() {\n // Sniff on document.body.style\n var bodyStyle = document.body.style;\n\n // Sniff prefixes\n var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :\n ('MozTransform' in bodyStyle) ? 'Moz' :\n ('msTransform' in bodyStyle) ? 'ms' :\n ('OTransform' in bodyStyle) ? 'O' : '';\n\n if (vendorPrefix + 'Perspective' in bodyStyle) {\n // Modern browsers with 3D support, e.g. Webkit, IE10\n return 'translate3d';\n } else if (vendorPrefix + 'Transform' in bodyStyle) {\n // Browsers without 3D support, e.g. IE9\n return 'translate';\n } else {\n // Browsers without translate() support, e.g. IE7-8\n return 'margin';\n }\n };\n\n /**\n * Helpers\n */\n\n function clamp(n, min, max) {\n if (n < min) return min;\n if (n > max) return max;\n return n;\n }\n\n /**\n * (Internal) converts a percentage (`0..1`) to a bar translateX\n * percentage (`-100%..0%`).\n */\n\n function toBarPerc(n) {\n return (-1 + n) * 100;\n }\n\n\n /**\n * (Internal) returns the correct CSS for changing the bar's\n * position given an n percentage, and speed and ease from Settings\n */\n\n function barPositionCSS(n, speed, ease) {\n var barCSS;\n\n if (Settings.positionUsing === 'translate3d') {\n barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };\n } else if (Settings.positionUsing === 'translate') {\n barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };\n } else {\n barCSS = { 'margin-left': toBarPerc(n)+'%' };\n }\n\n barCSS.transition = 'all '+speed+'ms '+ease;\n\n return barCSS;\n }\n\n /**\n * (Internal) Queues a function to be executed.\n */\n\n var queue = (function() {\n var pending = [];\n \n function next() {\n var fn = pending.shift();\n if (fn) {\n fn(next);\n }\n }\n\n return function(fn) {\n pending.push(fn);\n if (pending.length == 1) next();\n };\n })();\n\n /**\n * (Internal) Applies css properties to an element, similar to the jQuery \n * css method.\n *\n * While this helper does assist with vendor prefixed property names, it \n * does not perform any manipulation of values prior to setting styles.\n */\n\n var css = (function() {\n var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],\n cssProps = {};\n\n function camelCase(string) {\n return string.replace(/^-ms-/, 'ms-').replace(/-([\\da-z])/gi, function(match, letter) {\n return letter.toUpperCase();\n });\n }\n\n function getVendorProp(name) {\n var style = document.body.style;\n if (name in style) return name;\n\n var i = cssPrefixes.length,\n capName = name.charAt(0).toUpperCase() + name.slice(1),\n vendorName;\n while (i--) {\n vendorName = cssPrefixes[i] + capName;\n if (vendorName in style) return vendorName;\n }\n\n return name;\n }\n\n function getStyleProp(name) {\n name = camelCase(name);\n return cssProps[name] || (cssProps[name] = getVendorProp(name));\n }\n\n function applyCss(element, prop, value) {\n prop = getStyleProp(prop);\n element.style[prop] = value;\n }\n\n return function(element, properties) {\n var args = arguments,\n prop, \n value;\n\n if (args.length == 2) {\n for (prop in properties) {\n value = properties[prop];\n if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);\n }\n } else {\n applyCss(element, args[1], args[2]);\n }\n }\n })();\n\n /**\n * (Internal) Determines if an element or space separated list of class names contains a class name.\n */\n\n function hasClass(element, name) {\n var list = typeof element == 'string' ? element : classList(element);\n return list.indexOf(' ' + name + ' ') >= 0;\n }\n\n /**\n * (Internal) Adds a class to an element.\n */\n\n function addClass(element, name) {\n var oldList = classList(element),\n newList = oldList + name;\n\n if (hasClass(oldList, name)) return; \n\n // Trim the opening space.\n element.className = newList.substring(1);\n }\n\n /**\n * (Internal) Removes a class from an element.\n */\n\n function removeClass(element, name) {\n var oldList = classList(element),\n newList;\n\n if (!hasClass(element, name)) return;\n\n // Replace the class name.\n newList = oldList.replace(' ' + name + ' ', ' ');\n\n // Trim the opening and closing spaces.\n element.className = newList.substring(1, newList.length - 1);\n }\n\n /**\n * (Internal) Gets a space separated list of the class names on the element. \n * The list is wrapped with a single space on each end to facilitate finding \n * matches within the list.\n */\n\n function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }\n\n /**\n * (Internal) Removes an element from the DOM.\n */\n\n function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }\n\n return NProgress;\n});\n\n", "\nexport class Bag {\n constructor() { this.arrays = {} }\n\n add(key, value) {\n if (! this.arrays[key]) this.arrays[key] = []\n this.arrays[key].push(value)\n }\n\n remove(key) {\n if (this.arrays[key]) delete this.arrays[key]\n }\n\n get(key) { return this.arrays[key] || [] }\n\n each(key, callback) { return this.get(key).forEach(callback) }\n}\n\nexport class WeakBag {\n constructor() { this.arrays = new WeakMap }\n\n add(key, value) {\n if (! this.arrays.has(key)) this.arrays.set(key, [])\n this.arrays.get(key).push(value)\n }\n\n remove(key) {\n if (this.arrays.has(key)) this.arrays.delete(key, [])\n }\n\n get(key) { return this.arrays.has(key) ? this.arrays.get(key) : [] }\n\n each(key, callback) { return this.get(key).forEach(callback) }\n}\n\nexport function dispatch(target, name, detail = {}, bubbles = true) {\n target.dispatchEvent(\n new CustomEvent(name, {\n detail,\n bubbles,\n // Allows events to pass the shadow DOM barrier.\n composed: true,\n cancelable: true,\n })\n )\n}\n\nexport function listen(target, name, handler) {\n target.addEventListener(name, handler)\n\n return () => target.removeEventListener(name, handler)\n}\n\n/**\n * Type-checking in JS is weird and annoying, these are better.\n */\nexport function isObjecty(subject) { return (typeof subject === 'object' && subject !== null) }\nexport function isObject(subject) { return (isObjecty(subject) && ! isArray(subject)) }\nexport function isArray(subject) { return Array.isArray(subject) }\nexport function isFunction(subject) { return typeof subject === 'function' }\nexport function isPrimitive(subject) { return typeof subject !== 'object' || subject === null }\n\n/**\n * Clone an object deeply to wipe out any shared references.\n */\nexport function deepClone(obj) { return JSON.parse(JSON.stringify(obj)) }\n\n/**\n * Determine if two objects take the exact same shape.\n */\nexport function deeplyEqual(a, b) { return JSON.stringify(a) === JSON.stringify(b) }\n\n/**\n * An easy way to loop through arrays and objects.\n */\nexport function each(subject, callback) {\n Object.entries(subject).forEach(([key, value]) => callback(key, value))\n}\n\n/**\n * Get a property from an object with support for dot-notation.\n */\nexport function dataGet(object, key) {\n if (key === '') return object\n\n return key.split('.').reduce((carry, i) => {\n if (carry === undefined) return undefined\n\n return carry[i]\n }, object)\n}\n\n/**\n * Set a property on an object with support for dot-notation.\n */\nexport function dataSet(object, key, value) {\n let segments = key.split('.')\n\n if (segments.length === 1) {\n return object[key] = value\n }\n\n let firstSegment = segments.shift()\n let restOfSegments = segments.join('.')\n\n if (object[firstSegment] === undefined) {\n object[firstSegment] = {}\n }\n\n dataSet(object[firstSegment], restOfSegments, value)\n}\n\n/**\n * Create a flat, dot-notated diff of two obejcts.\n */\nexport function diff(left, right, diffs = {}, path = '') {\n // Are they the same?\n if (left === right) return diffs\n\n // Are they COMPLETELY different?\n if (typeof left !== typeof right || (isObject(left) && isArray(right)) || (isArray(left) && isObject(right))) {\n diffs[path] = right;\n return diffs\n }\n\n // Is the right or left side a primitive value (a leaf node)?\n if (isPrimitive(left) || isPrimitive(right)) {\n diffs[path] = right\n return diffs\n }\n\n // We now know both are objects...\n let leftKeys = Object.keys(left)\n\n // Recursively diff the object's properties...\n Object.entries(right).forEach(([key, value]) => {\n diffs = {...diffs, ...diff(left[key], right[key], diffs, path === '' ? key : `${path}.${key}`)}\n leftKeys = leftKeys.filter(i => i !== key)\n })\n\n // Mark any items for removal...\n leftKeys.forEach(key => {\n diffs[`${path}.${key}`] = '__rm__'\n })\n\n return diffs\n}\n\n/**\n * The data that's passed between the browser and server is in the form of\n * nested tuples consisting of the schema: [rawValue, metadata]. In this\n * method we're extracting the plain JS object of only the raw values.\n */\nexport function extractData(payload) {\n let value = isSynthetic(payload) ? payload[0] : payload\n let meta = isSynthetic(payload) ? payload[1] : undefined\n\n if (isObjecty(value)) {\n Object.entries(value).forEach(([key, iValue]) => {\n value[key] = extractData(iValue)\n })\n }\n\n return value\n}\n\n/**\n * Determine if the variable passed in is a node in a nested metadata\n * tuple tree. (Meaning it takes the form of: [rawData, metadata])\n */\nexport function isSynthetic(subject) {\n return Array.isArray(subject)\n && subject.length === 2\n && typeof subject[1] === 'object'\n && Object.keys(subject[1]).includes('s')\n}\n\n/**\n * Post requests in Laravel require a csrf token to be passed\n * along with the payload. Here, we'll try and locate one.\n */\nexport function getCsrfToken() {\n // Purposely not caching. Fetching it fresh every time ensures we're\n // not depending on a stale session's CSRF token...\n\n if (document.querySelector('meta[name=\"csrf-token\"]')) {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n\n if (document.querySelector('[data-csrf]')) {\n return document.querySelector('[data-csrf]').getAttribute('data-csrf')\n }\n\n if (window.livewireScriptConfig['csrf'] ?? false) {\n return window.livewireScriptConfig['csrf']\n }\n\n throw 'Livewire: No CSRF token detected'\n}\n\nlet nonce;\n\nexport function getNonce() {\n if (nonce) return nonce\n\n\n if (window.livewireScriptConfig && (window.livewireScriptConfig['nonce'] ?? false)) {\n nonce = window.livewireScriptConfig['nonce']\n\n return nonce\n }\n\n const elWithNonce = document.querySelector('style[data-livewire-style][nonce]')\n\n if (elWithNonce) {\n nonce = elWithNonce.nonce\n\n return nonce\n }\n\n return null\n}\n\n/**\n * Livewire's update URI. This is configurable via Livewire::setUpdateRoute(...)\n */\nexport function getUpdateUri() {\n return document.querySelector('[data-update-uri]')?.getAttribute('data-update-uri') ?? window.livewireScriptConfig['uri'] ?? null\n}\n\nexport function contentIsFromDump(content) {\n return !! content.match(/<script>Sfdump\\(\".+\"\\)<\\/script>/)\n}\n\nexport function splitDumpFromContent(content) {\n let dump = content.match(/.*<script>Sfdump\\(\".+\"\\)<\\/script>/s)\n\n return [dump, content.replace(dump, '')]\n}\n", "import { getCsrfToken } from '@/utils';\n\nlet uploadManagers = new WeakMap\n\nfunction getUploadManager(component) {\n if (! uploadManagers.has(component)) {\n let manager = new UploadManager(component)\n\n uploadManagers.set(component, manager)\n\n manager.registerListeners()\n }\n\n return uploadManagers.get(component)\n}\n\nexport function handleFileUpload(el, property, component, cleanup) {\n let manager = getUploadManager(component)\n\n let start = () => el.dispatchEvent(new CustomEvent('livewire-upload-start', { bubbles: true, detail: { id: component.id, property} }))\n let finish = () => el.dispatchEvent(new CustomEvent('livewire-upload-finish', { bubbles: true, detail: { id: component.id, property} }))\n let error = () => el.dispatchEvent(new CustomEvent('livewire-upload-error', { bubbles: true, detail: { id: component.id, property} }))\n let cancel = () => el.dispatchEvent(new CustomEvent('livewire-upload-cancel', { bubbles: true, detail: { id: component.id, property} }))\n let progress = (progressEvent) => {\n var percentCompleted = Math.round( (progressEvent.loaded * 100) / progressEvent.total )\n\n el.dispatchEvent(\n new CustomEvent('livewire-upload-progress', {\n bubbles: true, detail: { progress: percentCompleted }\n })\n )\n }\n\n let eventHandler = e => {\n if (e.target.files.length === 0) return\n\n start()\n\n if (e.target.multiple) {\n manager.uploadMultiple(property, e.target.files, finish, error, progress, cancel)\n } else {\n manager.upload(property, e.target.files[0], finish, error, progress, cancel)\n }\n }\n\n el.addEventListener('change', eventHandler)\n\n // If the Livewire property has changed to null or an empty string, then reset the input...\n component.$wire.$watch(property, (value) => {\n // This watch will only be released when the component is removed. However, the\n // actual file-upload element may be removed from the DOM withou the entire\n // component being removed. In this case, let's just bail early on this.\n if (! el.isConnected) return\n\n if (value === null || value === '') {\n el.value = ''\n }\n })\n\n // There's a bug in browsers where selecting a file, removing it,\n // then re-adding it doesn't fire the change event. This fixes it.\n // Reference: https://stackoverflow.com/questions/12030686/html-input-file-selection-event-not-firing-upon-selecting-the-same-file\n let clearFileInputValue = () => { el.value = null }\n el.addEventListener('click', clearFileInputValue)\n\n // Clear the input if the uploaded is cancelled...\n el.addEventListener('livewire-upload-cancel', clearFileInputValue)\n\n cleanup(() => {\n el.removeEventListener('change', eventHandler)\n el.removeEventListener('click', clearFileInputValue)\n })\n}\n\nclass UploadManager {\n constructor(component) {\n this.component = component\n this.uploadBag = new MessageBag\n this.removeBag = new MessageBag\n }\n\n registerListeners() {\n this.component.$wire.$on('upload:generatedSignedUrl', ({ name, url }) => {\n // We have to add reduntant \"setLoading\" calls because the dom-patch\n // from the first response will clear the setUploadLoading call\n // from the first upload call.\n setUploadLoading(this.component, name)\n\n this.handleSignedUrl(name, url)\n })\n\n this.component.$wire.$on('upload:generatedSignedUrlForS3', ({ name, payload }) => {\n setUploadLoading(this.component, name)\n\n this.handleS3PreSignedUrl(name, payload)\n })\n\n this.component.$wire.$on('upload:finished', ({ name, tmpFilenames }) => this.markUploadFinished(name, tmpFilenames))\n this.component.$wire.$on('upload:errored', ({ name }) => this.markUploadErrored(name))\n this.component.$wire.$on('upload:removed', ({ name, tmpFilename }) => this.removeBag.shift(name).finishCallback(tmpFilename))\n }\n\n upload(name, file, finishCallback, errorCallback, progressCallback, cancelledCallback) {\n this.setUpload(name, {\n files: [file],\n multiple: false,\n finishCallback,\n errorCallback,\n progressCallback,\n cancelledCallback,\n })\n }\n\n uploadMultiple(name, files, finishCallback, errorCallback, progressCallback, cancelledCallback) {\n this.setUpload(name, {\n files: Array.from(files),\n multiple: true,\n finishCallback,\n errorCallback,\n progressCallback,\n cancelledCallback,\n })\n }\n\n removeUpload(name, tmpFilename, finishCallback) {\n this.removeBag.push(name, {\n tmpFilename, finishCallback\n })\n\n this.component.$wire.call('_removeUpload', name, tmpFilename);\n }\n\n setUpload(name, uploadObject) {\n this.uploadBag.add(name, uploadObject)\n\n if (this.uploadBag.get(name).length === 1) {\n this.startUpload(name, uploadObject)\n }\n }\n\n handleSignedUrl(name, url) {\n let formData = new FormData()\n Array.from(this.uploadBag.first(name).files).forEach(file => formData.append('files[]', file, file.name))\n\n let headers = {\n 'Accept': 'application/json',\n }\n\n let csrfToken = getCsrfToken()\n\n if (csrfToken) headers['X-CSRF-TOKEN'] = csrfToken\n\n this.makeRequest(name, formData, 'post', url, headers, response => {\n return response.paths\n })\n }\n\n handleS3PreSignedUrl(name, payload) {\n let formData = this.uploadBag.first(name).files[0]\n\n let headers = payload.headers\n if ('Host' in headers) delete headers.Host\n let url = payload.url\n\n this.makeRequest(name, formData, 'put', url, headers, response => {\n return [payload.path]\n })\n }\n\n makeRequest(name, formData, method, url, headers, retrievePaths) {\n let request = new XMLHttpRequest()\n\n request.open(method, url)\n\n Object.entries(headers).forEach(([key, value]) => {\n request.setRequestHeader(key, value)\n })\n\n request.upload.addEventListener('progress', e => {\n e.detail = {}\n e.detail.progress = Math.floor((e.loaded * 100) / e.total)\n\n this.uploadBag.first(name).progressCallback(e)\n })\n\n request.addEventListener('load', () => {\n if ((request.status+'')[0] === '2') {\n let paths = retrievePaths(request.response && JSON.parse(request.response))\n\n this.component.$wire.call('_finishUpload', name, paths, this.uploadBag.first(name).multiple)\n\n return\n }\n\n let errors = null\n\n if (request.status === 422) {\n errors = request.response\n }\n\n this.component.$wire.call('_uploadErrored', name, errors, this.uploadBag.first(name).multiple)\n })\n\n this.uploadBag.first(name).request = request\n\n request.send(formData)\n }\n\n startUpload(name, uploadObject) {\n let fileInfos = uploadObject.files.map(file => {\n return { name: file.name, size: file.size, type: file.type }\n })\n\n this.component.$wire.call('_startUpload', name, fileInfos, uploadObject.multiple);\n\n setUploadLoading(this.component, name)\n }\n\n markUploadFinished(name, tmpFilenames) {\n unsetUploadLoading(this.component)\n\n let uploadObject = this.uploadBag.shift(name)\n uploadObject.finishCallback(uploadObject.multiple ? tmpFilenames : tmpFilenames[0])\n\n if (this.uploadBag.get(name).length > 0) this.startUpload(name, this.uploadBag.last(name))\n }\n\n markUploadErrored(name) {\n unsetUploadLoading(this.component)\n\n this.uploadBag.shift(name).errorCallback()\n\n if (this.uploadBag.get(name).length > 0) this.startUpload(name, this.uploadBag.last(name))\n }\n\n cancelUpload(name, cancelledCallback = null) {\n unsetUploadLoading(this.component)\n\n let uploadItem = this.uploadBag.first(name);\n\n if (uploadItem) {\n if (uploadItem.request) {\n uploadItem.request.abort();\n }\n\n this.uploadBag.shift(name).cancelledCallback();\n\n if (cancelledCallback) cancelledCallback()\n }\n }\n}\n\nexport default class MessageBag {\n constructor() {\n this.bag = {}\n }\n\n add(name, thing) {\n if (! this.bag[name]) {\n this.bag[name] = []\n }\n\n this.bag[name].push(thing)\n }\n\n push(name, thing) {\n this.add(name, thing)\n }\n\n first(name) {\n if (! this.bag[name]) return null\n\n return this.bag[name][0]\n }\n\n last(name) {\n return this.bag[name].slice(-1)[0]\n }\n\n get(name) {\n return this.bag[name]\n }\n\n shift(name) {\n return this.bag[name].shift()\n }\n\n call(name, ...params) {\n (this.listeners[name] || []).forEach(callback => {\n callback(...params)\n })\n }\n\n has(name) {\n return Object.keys(this.listeners).includes(name)\n }\n}\n\nfunction setUploadLoading() {\n // @todo\n}\n\nfunction unsetUploadLoading() {\n // @todo\n}\n\nexport function upload(\n component,\n name,\n file,\n finishCallback = () => { },\n errorCallback = () => { },\n progressCallback = () => { },\n cancelledCallback = () => { },\n) {\n let uploadManager = getUploadManager(component)\n\n uploadManager.upload(\n name,\n file,\n finishCallback,\n errorCallback,\n progressCallback,\n cancelledCallback,\n )\n}\n\nexport function uploadMultiple(\n component,\n name,\n files,\n finishCallback = () => { },\n errorCallback = () => { },\n progressCallback = () => { },\n cancelledCallback = () => { },\n) {\n let uploadManager = getUploadManager(component)\n\n uploadManager.uploadMultiple(\n name,\n files,\n finishCallback,\n errorCallback,\n progressCallback,\n cancelledCallback,\n )\n}\n\nexport function removeUpload(\n component,\n name,\n tmpFilename,\n finishCallback = () => { },\n errorCallback = () => { }\n) {\n let uploadManager = getUploadManager(component)\n\n uploadManager.removeUpload(\n name,\n tmpFilename,\n finishCallback,\n errorCallback\n )\n}\n\nexport function cancelUpload(\n component,\n name,\n cancelledCallback = () => { }\n) {\n let uploadManager = getUploadManager(component)\n\n uploadManager.cancelUpload(\n name,\n cancelledCallback\n )\n}\n", "// packages/alpinejs/src/scheduler.js\nvar flushPending = false;\nvar flushing = false;\nvar queue = [];\nvar lastFlushedIndex = -1;\nfunction scheduler(callback) {\n queueJob(callback);\n}\nfunction queueJob(job) {\n if (!queue.includes(job))\n queue.push(job);\n queueFlush();\n}\nfunction dequeueJob(job) {\n let index = queue.indexOf(job);\n if (index !== -1 && index > lastFlushedIndex)\n queue.splice(index, 1);\n}\nfunction queueFlush() {\n if (!flushing && !flushPending) {\n flushPending = true;\n queueMicrotask(flushJobs);\n }\n}\nfunction flushJobs() {\n flushPending = false;\n flushing = true;\n for (let i = 0; i < queue.length; i++) {\n queue[i]();\n lastFlushedIndex = i;\n }\n queue.length = 0;\n lastFlushedIndex = -1;\n flushing = false;\n}\n\n// packages/alpinejs/src/reactivity.js\nvar reactive;\nvar effect;\nvar release;\nvar raw;\nvar shouldSchedule = true;\nfunction disableEffectScheduling(callback) {\n shouldSchedule = false;\n callback();\n shouldSchedule = true;\n}\nfunction setReactivityEngine(engine) {\n reactive = engine.reactive;\n release = engine.release;\n effect = (callback) => engine.effect(callback, { scheduler: (task) => {\n if (shouldSchedule) {\n scheduler(task);\n } else {\n task();\n }\n } });\n raw = engine.raw;\n}\nfunction overrideEffect(override) {\n effect = override;\n}\nfunction elementBoundEffect(el) {\n let cleanup2 = () => {\n };\n let wrappedEffect = (callback) => {\n let effectReference = effect(callback);\n if (!el._x_effects) {\n el._x_effects = /* @__PURE__ */ new Set();\n el._x_runEffects = () => {\n el._x_effects.forEach((i) => i());\n };\n }\n el._x_effects.add(effectReference);\n cleanup2 = () => {\n if (effectReference === void 0)\n return;\n el._x_effects.delete(effectReference);\n release(effectReference);\n };\n return effectReference;\n };\n return [wrappedEffect, () => {\n cleanup2();\n }];\n}\nfunction watch(getter, callback) {\n let firstTime = true;\n let oldValue;\n let effectReference = effect(() => {\n let value = getter();\n JSON.stringify(value);\n if (!firstTime) {\n queueMicrotask(() => {\n callback(value, oldValue);\n oldValue = value;\n });\n } else {\n oldValue = value;\n }\n firstTime = false;\n });\n return () => release(effectReference);\n}\n\n// packages/alpinejs/src/mutation.js\nvar onAttributeAddeds = [];\nvar onElRemoveds = [];\nvar onElAddeds = [];\nfunction onElAdded(callback) {\n onElAddeds.push(callback);\n}\nfunction onElRemoved(el, callback) {\n if (typeof callback === \"function\") {\n if (!el._x_cleanups)\n el._x_cleanups = [];\n el._x_cleanups.push(callback);\n } else {\n callback = el;\n onElRemoveds.push(callback);\n }\n}\nfunction onAttributesAdded(callback) {\n onAttributeAddeds.push(callback);\n}\nfunction onAttributeRemoved(el, name, callback) {\n if (!el._x_attributeCleanups)\n el._x_attributeCleanups = {};\n if (!el._x_attributeCleanups[name])\n el._x_attributeCleanups[name] = [];\n el._x_attributeCleanups[name].push(callback);\n}\nfunction cleanupAttributes(el, names) {\n if (!el._x_attributeCleanups)\n return;\n Object.entries(el._x_attributeCleanups).forEach(([name, value]) => {\n if (names === void 0 || names.includes(name)) {\n value.forEach((i) => i());\n delete el._x_attributeCleanups[name];\n }\n });\n}\nfunction cleanupElement(el) {\n if (el._x_cleanups) {\n while (el._x_cleanups.length)\n el._x_cleanups.pop()();\n }\n}\nvar observer = new MutationObserver(onMutate);\nvar currentlyObserving = false;\nfunction startObservingMutations() {\n observer.observe(document, { subtree: true, childList: true, attributes: true, attributeOldValue: true });\n currentlyObserving = true;\n}\nfunction stopObservingMutations() {\n flushObserver();\n observer.disconnect();\n currentlyObserving = false;\n}\nvar queuedMutations = [];\nfunction flushObserver() {\n let records = observer.takeRecords();\n queuedMutations.push(() => records.length > 0 && onMutate(records));\n let queueLengthWhenTriggered = queuedMutations.length;\n queueMicrotask(() => {\n if (queuedMutations.length === queueLengthWhenTriggered) {\n while (queuedMutations.length > 0)\n queuedMutations.shift()();\n }\n });\n}\nfunction mutateDom(callback) {\n if (!currentlyObserving)\n return callback();\n stopObservingMutations();\n let result = callback();\n startObservingMutations();\n return result;\n}\nvar isCollecting = false;\nvar deferredMutations = [];\nfunction deferMutations() {\n isCollecting = true;\n}\nfunction flushAndStopDeferringMutations() {\n isCollecting = false;\n onMutate(deferredMutations);\n deferredMutations = [];\n}\nfunction onMutate(mutations) {\n if (isCollecting) {\n deferredMutations = deferredMutations.concat(mutations);\n return;\n }\n let addedNodes = /* @__PURE__ */ new Set();\n let removedNodes = /* @__PURE__ */ new Set();\n let addedAttributes = /* @__PURE__ */ new Map();\n let removedAttributes = /* @__PURE__ */ new Map();\n for (let i = 0; i < mutations.length; i++) {\n if (mutations[i].target._x_ignoreMutationObserver)\n continue;\n if (mutations[i].type === \"childList\") {\n mutations[i].addedNodes.forEach((node) => node.nodeType === 1 && addedNodes.add(node));\n mutations[i].removedNodes.forEach((node) => node.nodeType === 1 && removedNodes.add(node));\n }\n if (mutations[i].type === \"attributes\") {\n let el = mutations[i].target;\n let name = mutations[i].attributeName;\n let oldValue = mutations[i].oldValue;\n let add2 = () => {\n if (!addedAttributes.has(el))\n addedAttributes.set(el, []);\n addedAttributes.get(el).push({ name, value: el.getAttribute(name) });\n };\n let remove = () => {\n if (!removedAttributes.has(el))\n removedAttributes.set(el, []);\n removedAttributes.get(el).push(name);\n };\n if (el.hasAttribute(name) && oldValue === null) {\n add2();\n } else if (el.hasAttribute(name)) {\n remove();\n add2();\n } else {\n remove();\n }\n }\n }\n removedAttributes.forEach((attrs, el) => {\n cleanupAttributes(el, attrs);\n });\n addedAttributes.forEach((attrs, el) => {\n onAttributeAddeds.forEach((i) => i(el, attrs));\n });\n for (let node of removedNodes) {\n if (addedNodes.has(node))\n continue;\n onElRemoveds.forEach((i) => i(node));\n }\n addedNodes.forEach((node) => {\n node._x_ignoreSelf = true;\n node._x_ignore = true;\n });\n for (let node of addedNodes) {\n if (removedNodes.has(node))\n continue;\n if (!node.isConnected)\n continue;\n delete node._x_ignoreSelf;\n delete node._x_ignore;\n onElAddeds.forEach((i) => i(node));\n node._x_ignore = true;\n node._x_ignoreSelf = true;\n }\n addedNodes.forEach((node) => {\n delete node._x_ignoreSelf;\n delete node._x_ignore;\n });\n addedNodes = null;\n removedNodes = null;\n addedAttributes = null;\n removedAttributes = null;\n}\n\n// packages/alpinejs/src/scope.js\nfunction scope(node) {\n return mergeProxies(closestDataStack(node));\n}\nfunction addScopeToNode(node, data2, referenceNode) {\n node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)];\n return () => {\n node._x_dataStack = node._x_dataStack.filter((i) => i !== data2);\n };\n}\nfunction closestDataStack(node) {\n if (node._x_dataStack)\n return node._x_dataStack;\n if (typeof ShadowRoot === \"function\" && node instanceof ShadowRoot) {\n return closestDataStack(node.host);\n }\n if (!node.parentNode) {\n return [];\n }\n return closestDataStack(node.parentNode);\n}\nfunction mergeProxies(objects) {\n return new Proxy({ objects }, mergeProxyTrap);\n}\nvar mergeProxyTrap = {\n ownKeys({ objects }) {\n return Array.from(\n new Set(objects.flatMap((i) => Object.keys(i)))\n );\n },\n has({ objects }, name) {\n if (name == Symbol.unscopables)\n return false;\n return objects.some(\n (obj) => Object.prototype.hasOwnProperty.call(obj, name) || Reflect.has(obj, name)\n );\n },\n get({ objects }, name, thisProxy) {\n if (name == \"toJSON\")\n return collapseProxies;\n return Reflect.get(\n objects.find(\n (obj) => Reflect.has(obj, name)\n ) || {},\n name,\n thisProxy\n );\n },\n set({ objects }, name, value, thisProxy) {\n const target = objects.find(\n (obj) => Object.prototype.hasOwnProperty.call(obj, name)\n ) || objects[objects.length - 1];\n const descriptor = Object.getOwnPropertyDescriptor(target, name);\n if (descriptor?.set && descriptor?.get)\n return descriptor.set.call(thisProxy, value) || true;\n return Reflect.set(target, name, value);\n }\n};\nfunction collapseProxies() {\n let keys = Reflect.ownKeys(this);\n return keys.reduce((acc, key) => {\n acc[key] = Reflect.get(this, key);\n return acc;\n }, {});\n}\n\n// packages/alpinejs/src/interceptor.js\nfunction initInterceptors(data2) {\n let isObject2 = (val) => typeof val === \"object\" && !Array.isArray(val) && val !== null;\n let recurse = (obj, basePath = \"\") => {\n Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value, enumerable }]) => {\n if (enumerable === false || value === void 0)\n return;\n if (typeof value === \"object\" && value !== null && value.__v_skip)\n return;\n let path = basePath === \"\" ? key : `${basePath}.${key}`;\n if (typeof value === \"object\" && value !== null && value._x_interceptor) {\n obj[key] = value.initialize(data2, path, key);\n } else {\n if (isObject2(value) && value !== obj && !(value instanceof Element)) {\n recurse(value, path);\n }\n }\n });\n };\n return recurse(data2);\n}\nfunction interceptor(callback, mutateObj = () => {\n}) {\n let obj = {\n initialValue: void 0,\n _x_interceptor: true,\n initialize(data2, path, key) {\n return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key);\n }\n };\n mutateObj(obj);\n return (initialValue) => {\n if (typeof initialValue === \"object\" && initialValue !== null && initialValue._x_interceptor) {\n let initialize = obj.initialize.bind(obj);\n obj.initialize = (data2, path, key) => {\n let innerValue = initialValue.initialize(data2, path, key);\n obj.initialValue = innerValue;\n return initialize(data2, path, key);\n };\n } else {\n obj.initialValue = initialValue;\n }\n return obj;\n };\n}\nfunction get(obj, path) {\n return path.split(\".\").reduce((carry, segment) => carry[segment], obj);\n}\nfunction set(obj, path, value) {\n if (typeof path === \"string\")\n path = path.split(\".\");\n if (path.length === 1)\n obj[path[0]] = value;\n else if (path.length === 0)\n throw error;\n else {\n if (obj[path[0]])\n return set(obj[path[0]], path.slice(1), value);\n else {\n obj[path[0]] = {};\n return set(obj[path[0]], path.slice(1), value);\n }\n }\n}\n\n// packages/alpinejs/src/magics.js\nvar magics = {};\nfunction magic(name, callback) {\n magics[name] = callback;\n}\nfunction injectMagics(obj, el) {\n Object.entries(magics).forEach(([name, callback]) => {\n let memoizedUtilities = null;\n function getUtilities() {\n if (memoizedUtilities) {\n return memoizedUtilities;\n } else {\n let [utilities, cleanup2] = getElementBoundUtilities(el);\n memoizedUtilities = { interceptor, ...utilities };\n onElRemoved(el, cleanup2);\n return memoizedUtilities;\n }\n }\n Object.defineProperty(obj, `$${name}`, {\n get() {\n return callback(el, getUtilities());\n },\n enumerable: false\n });\n });\n return obj;\n}\n\n// packages/alpinejs/src/utils/error.js\nfunction tryCatch(el, expression, callback, ...args) {\n try {\n return callback(...args);\n } catch (e) {\n handleError(e, el, expression);\n }\n}\nfunction handleError(error2, el, expression = void 0) {\n error2 = Object.assign(\n error2 ?? { message: \"No error message given.\" },\n { el, expression }\n );\n console.warn(`Alpine Expression Error: ${error2.message}\n\n${expression ? 'Expression: \"' + expression + '\"\\n\\n' : \"\"}`, el);\n setTimeout(() => {\n throw error2;\n }, 0);\n}\n\n// packages/alpinejs/src/evaluator.js\nvar shouldAutoEvaluateFunctions = true;\nfunction dontAutoEvaluateFunctions(callback) {\n let cache = shouldAutoEvaluateFunctions;\n shouldAutoEvaluateFunctions = false;\n let result = callback();\n shouldAutoEvaluateFunctions = cache;\n return result;\n}\nfunction evaluate(el, expression, extras = {}) {\n let result;\n evaluateLater(el, expression)((value) => result = value, extras);\n return result;\n}\nfunction evaluateLater(...args) {\n return theEvaluatorFunction(...args);\n}\nvar theEvaluatorFunction = normalEvaluator;\nfunction setEvaluator(newEvaluator) {\n theEvaluatorFunction = newEvaluator;\n}\nfunction normalEvaluator(el, expression) {\n let overriddenMagics = {};\n injectMagics(overriddenMagics, el);\n let dataStack = [overriddenMagics, ...closestDataStack(el)];\n let evaluator = typeof expression === \"function\" ? generateEvaluatorFromFunction(dataStack, expression) : generateEvaluatorFromString(dataStack, expression, el);\n return tryCatch.bind(null, el, expression, evaluator);\n}\nfunction generateEvaluatorFromFunction(dataStack, func) {\n return (receiver = () => {\n }, { scope: scope2 = {}, params = [] } = {}) => {\n let result = func.apply(mergeProxies([scope2, ...dataStack]), params);\n runIfTypeOfFunction(receiver, result);\n };\n}\nvar evaluatorMemo = {};\nfunction generateFunctionFromString(expression, el) {\n if (evaluatorMemo[expression]) {\n return evaluatorMemo[expression];\n }\n let AsyncFunction = Object.getPrototypeOf(async function() {\n }).constructor;\n let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression.trim()) || /^(let|const)\\s/.test(expression.trim()) ? `(async()=>{ ${expression} })()` : expression;\n const safeAsyncFunction = () => {\n try {\n let func2 = new AsyncFunction(\n [\"__self\", \"scope\"],\n `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`\n );\n Object.defineProperty(func2, \"name\", {\n value: `[Alpine] ${expression}`\n });\n return func2;\n } catch (error2) {\n handleError(error2, el, expression);\n return Promise.resolve();\n }\n };\n let func = safeAsyncFunction();\n evaluatorMemo[expression] = func;\n return func;\n}\nfunction generateEvaluatorFromString(dataStack, expression, el) {\n let func = generateFunctionFromString(expression, el);\n return (receiver = () => {\n }, { scope: scope2 = {}, params = [] } = {}) => {\n func.result = void 0;\n func.finished = false;\n let completeScope = mergeProxies([scope2, ...dataStack]);\n if (typeof func === \"function\") {\n let promise = func(func, completeScope).catch((error2) => handleError(error2, el, expression));\n if (func.finished) {\n runIfTypeOfFunction(receiver, func.result, completeScope, params, el);\n func.result = void 0;\n } else {\n promise.then((result) => {\n runIfTypeOfFunction(receiver, result, completeScope, params, el);\n }).catch((error2) => handleError(error2, el, expression)).finally(() => func.result = void 0);\n }\n }\n };\n}\nfunction runIfTypeOfFunction(receiver, value, scope2, params, el) {\n if (shouldAutoEvaluateFunctions && typeof value === \"function\") {\n let result = value.apply(scope2, params);\n if (result instanceof Promise) {\n result.then((i) => runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2) => handleError(error2, el, value));\n } else {\n receiver(result);\n }\n } else if (typeof value === \"object\" && value instanceof Promise) {\n value.then((i) => receiver(i));\n } else {\n receiver(value);\n }\n}\n\n// packages/alpinejs/src/directives.js\nvar prefixAsString = \"x-\";\nfunction prefix(subject = \"\") {\n return prefixAsString + subject;\n}\nfunction setPrefix(newPrefix) {\n prefixAsString = newPrefix;\n}\nvar directiveHandlers = {};\nfunction directive(name, callback) {\n directiveHandlers[name] = callback;\n return {\n before(directive2) {\n if (!directiveHandlers[directive2]) {\n console.warn(String.raw`Cannot find directive \\`${directive2}\\`. \\`${name}\\` will use the default order of execution`);\n return;\n }\n const pos = directiveOrder.indexOf(directive2);\n directiveOrder.splice(pos >= 0 ? pos : directiveOrder.indexOf(\"DEFAULT\"), 0, name);\n }\n };\n}\nfunction directiveExists(name) {\n return Object.keys(directiveHandlers).includes(name);\n}\nfunction directives(el, attributes, originalAttributeOverride) {\n attributes = Array.from(attributes);\n if (el._x_virtualDirectives) {\n let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value]) => ({ name, value }));\n let staticAttributes = attributesOnly(vAttributes);\n vAttributes = vAttributes.map((attribute) => {\n if (staticAttributes.find((attr) => attr.name === attribute.name)) {\n return {\n name: `x-bind:${attribute.name}`,\n value: `\"${attribute.value}\"`\n };\n }\n return attribute;\n });\n attributes = attributes.concat(vAttributes);\n }\n let transformedAttributeMap = {};\n let directives2 = attributes.map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority);\n return directives2.map((directive2) => {\n return getDirectiveHandler(el, directive2);\n });\n}\nfunction attributesOnly(attributes) {\n return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr));\n}\nvar isDeferringHandlers = false;\nvar directiveHandlerStacks = /* @__PURE__ */ new Map();\nvar currentHandlerStackKey = Symbol();\nfunction deferHandlingDirectives(callback) {\n isDeferringHandlers = true;\n let key = Symbol();\n currentHandlerStackKey = key;\n directiveHandlerStacks.set(key, []);\n let flushHandlers = () => {\n while (directiveHandlerStacks.get(key).length)\n directiveHandlerStacks.get(key).shift()();\n directiveHandlerStacks.delete(key);\n };\n let stopDeferring = () => {\n isDeferringHandlers = false;\n flushHandlers();\n };\n callback(flushHandlers);\n stopDeferring();\n}\nfunction getElementBoundUtilities(el) {\n let cleanups = [];\n let cleanup2 = (callback) => cleanups.push(callback);\n let [effect3, cleanupEffect] = elementBoundEffect(el);\n cleanups.push(cleanupEffect);\n let utilities = {\n Alpine: alpine_default,\n effect: effect3,\n cleanup: cleanup2,\n evaluateLater: evaluateLater.bind(evaluateLater, el),\n evaluate: evaluate.bind(evaluate, el)\n };\n let doCleanup = () => cleanups.forEach((i) => i());\n return [utilities, doCleanup];\n}\nfunction getDirectiveHandler(el, directive2) {\n let noop = () => {\n };\n let handler4 = directiveHandlers[directive2.type] || noop;\n let [utilities, cleanup2] = getElementBoundUtilities(el);\n onAttributeRemoved(el, directive2.original, cleanup2);\n let fullHandler = () => {\n if (el._x_ignore || el._x_ignoreSelf)\n return;\n handler4.inline && handler4.inline(el, directive2, utilities);\n handler4 = handler4.bind(handler4, el, directive2, utilities);\n isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler4) : handler4();\n };\n fullHandler.runCleanups = cleanup2;\n return fullHandler;\n}\nvar startingWith = (subject, replacement) => ({ name, value }) => {\n if (name.startsWith(subject))\n name = name.replace(subject, replacement);\n return { name, value };\n};\nvar into = (i) => i;\nfunction toTransformedAttributes(callback = () => {\n}) {\n return ({ name, value }) => {\n let { name: newName, value: newValue } = attributeTransformers.reduce((carry, transform) => {\n return transform(carry);\n }, { name, value });\n if (newName !== name)\n callback(newName, name);\n return { name: newName, value: newValue };\n };\n}\nvar attributeTransformers = [];\nfunction mapAttributes(callback) {\n attributeTransformers.push(callback);\n}\nfunction outNonAlpineAttributes({ name }) {\n return alpineAttributeRegex().test(name);\n}\nvar alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\\\b`);\nfunction toParsedDirectives(transformedAttributeMap, originalAttributeOverride) {\n return ({ name, value }) => {\n let typeMatch = name.match(alpineAttributeRegex());\n let valueMatch = name.match(/:([a-zA-Z0-9\\-_:]+)/);\n let modifiers = name.match(/\\.[^.\\]]+(?=[^\\]]*$)/g) || [];\n let original = originalAttributeOverride || transformedAttributeMap[name] || name;\n return {\n type: typeMatch ? typeMatch[1] : null,\n value: valueMatch ? valueMatch[1] : null,\n modifiers: modifiers.map((i) => i.replace(\".\", \"\")),\n expression: value,\n original\n };\n };\n}\nvar DEFAULT = \"DEFAULT\";\nvar directiveOrder = [\n \"ignore\",\n \"ref\",\n \"data\",\n \"id\",\n \"anchor\",\n \"bind\",\n \"init\",\n \"for\",\n \"model\",\n \"modelable\",\n \"transition\",\n \"show\",\n \"if\",\n DEFAULT,\n \"teleport\"\n];\nfunction byPriority(a, b) {\n let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type;\n let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type;\n return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB);\n}\n\n// packages/alpinejs/src/utils/dispatch.js\nfunction dispatch(el, name, detail = {}) {\n el.dispatchEvent(\n new CustomEvent(name, {\n detail,\n bubbles: true,\n // Allows events to pass the shadow DOM barrier.\n composed: true,\n cancelable: true\n })\n );\n}\n\n// packages/alpinejs/src/utils/walk.js\nfunction walk(el, callback) {\n if (typeof ShadowRoot === \"function\" && el instanceof ShadowRoot) {\n Array.from(el.children).forEach((el2) => walk(el2, callback));\n return;\n }\n let skip = false;\n callback(el, () => skip = true);\n if (skip)\n return;\n let node = el.firstElementChild;\n while (node) {\n walk(node, callback, false);\n node = node.nextElementSibling;\n }\n}\n\n// packages/alpinejs/src/utils/warn.js\nfunction warn(message, ...args) {\n console.warn(`Alpine Warning: ${message}`, ...args);\n}\n\n// packages/alpinejs/src/lifecycle.js\nvar started = false;\nfunction start() {\n if (started)\n warn(\"Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.\");\n started = true;\n if (!document.body)\n warn(\"Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?\");\n dispatch(document, \"alpine:init\");\n dispatch(document, \"alpine:initializing\");\n startObservingMutations();\n onElAdded((el) => initTree(el, walk));\n onElRemoved((el) => destroyTree(el));\n onAttributesAdded((el, attrs) => {\n directives(el, attrs).forEach((handle) => handle());\n });\n let outNestedComponents = (el) => !closestRoot(el.parentElement, true);\n Array.from(document.querySelectorAll(allSelectors().join(\",\"))).filter(outNestedComponents).forEach((el) => {\n initTree(el);\n });\n dispatch(document, \"alpine:initialized\");\n setTimeout(() => {\n warnAboutMissingPlugins();\n });\n}\nvar rootSelectorCallbacks = [];\nvar initSelectorCallbacks = [];\nfunction rootSelectors() {\n return rootSelectorCallbacks.map((fn) => fn());\n}\nfunction allSelectors() {\n return rootSelectorCallbacks.concat(initSelectorCallbacks).map((fn) => fn());\n}\nfunction addRootSelector(selectorCallback) {\n rootSelectorCallbacks.push(selectorCallback);\n}\nfunction addInitSelector(selectorCallback) {\n initSelectorCallbacks.push(selectorCallback);\n}\nfunction closestRoot(el, includeInitSelectors = false) {\n return findClosest(el, (element) => {\n const selectors = includeInitSelectors ? allSelectors() : rootSelectors();\n if (selectors.some((selector) => element.matches(selector)))\n return true;\n });\n}\nfunction findClosest(el, callback) {\n if (!el)\n return;\n if (callback(el))\n return el;\n if (el._x_teleportBack)\n el = el._x_teleportBack;\n if (!el.parentElement)\n return;\n return findClosest(el.parentElement, callback);\n}\nfunction isRoot(el) {\n return rootSelectors().some((selector) => el.matches(selector));\n}\nvar initInterceptors2 = [];\nfunction interceptInit(callback) {\n initInterceptors2.push(callback);\n}\nfunction initTree(el, walker = walk, intercept = () => {\n}) {\n deferHandlingDirectives(() => {\n walker(el, (el2, skip) => {\n intercept(el2, skip);\n initInterceptors2.forEach((i) => i(el2, skip));\n directives(el2, el2.attributes).forEach((handle) => handle());\n el2._x_ignore && skip();\n });\n });\n}\nfunction destroyTree(root, walker = walk) {\n walker(root, (el) => {\n cleanupAttributes(el);\n cleanupElement(el);\n });\n}\nfunction warnAboutMissingPlugins() {\n let pluginDirectives = [\n [\"ui\", \"dialog\", [\"[x-dialog], [x-popover]\"]],\n [\"anchor\", \"anchor\", [\"[x-anchor]\"]],\n [\"sort\", \"sort\", [\"[x-sort]\"]]\n ];\n pluginDirectives.forEach(([plugin2, directive2, selectors]) => {\n if (directiveExists(directive2))\n return;\n selectors.some((selector) => {\n if (document.querySelector(selector)) {\n warn(`found \"${selector}\", but missing ${plugin2} plugin`);\n return true;\n }\n });\n });\n}\n\n// packages/alpinejs/src/nextTick.js\nvar tickStack = [];\nvar isHolding = false;\nfunction nextTick(callback = () => {\n}) {\n queueMicrotask(() => {\n isHolding || setTimeout(() => {\n releaseNextTicks();\n });\n });\n return new Promise((res) => {\n tickStack.push(() => {\n callback();\n res();\n });\n });\n}\nfunction releaseNextTicks() {\n isHolding = false;\n while (tickStack.length)\n tickStack.shift()();\n}\nfunction holdNextTicks() {\n isHolding = true;\n}\n\n// packages/alpinejs/src/utils/classes.js\nfunction setClasses(el, value) {\n if (Array.isArray(value)) {\n return setClassesFromString(el, value.join(\" \"));\n } else if (typeof value === \"object\" && value !== null) {\n return setClassesFromObject(el, value);\n } else if (typeof value === \"function\") {\n return setClasses(el, value());\n }\n return setClassesFromString(el, value);\n}\nfunction setClassesFromString(el, classString) {\n let split = (classString2) => classString2.split(\" \").filter(Boolean);\n let missingClasses = (classString2) => classString2.split(\" \").filter((i) => !el.classList.contains(i)).filter(Boolean);\n let addClassesAndReturnUndo = (classes) => {\n el.classList.add(...classes);\n return () => {\n el.classList.remove(...classes);\n };\n };\n classString = classString === true ? classString = \"\" : classString || \"\";\n return addClassesAndReturnUndo(missingClasses(classString));\n}\nfunction setClassesFromObject(el, classObject) {\n let split = (classString) => classString.split(\" \").filter(Boolean);\n let forAdd = Object.entries(classObject).flatMap(([classString, bool]) => bool ? split(classString) : false).filter(Boolean);\n let forRemove = Object.entries(classObject).flatMap(([classString, bool]) => !bool ? split(classString) : false).filter(Boolean);\n let added = [];\n let removed = [];\n forRemove.forEach((i) => {\n if (el.classList.contains(i)) {\n el.classList.remove(i);\n removed.push(i);\n }\n });\n forAdd.forEach((i) => {\n if (!el.classList.contains(i)) {\n el.classList.add(i);\n added.push(i);\n }\n });\n return () => {\n removed.forEach((i) => el.classList.add(i));\n added.forEach((i) => el.classList.remove(i));\n };\n}\n\n// packages/alpinejs/src/utils/styles.js\nfunction setStyles(el, value) {\n if (typeof value === \"object\" && value !== null) {\n return setStylesFromObject(el, value);\n }\n return setStylesFromString(el, value);\n}\nfunction setStylesFromObject(el, value) {\n let previousStyles = {};\n Object.entries(value).forEach(([key, value2]) => {\n previousStyles[key] = el.style[key];\n if (!key.startsWith(\"--\")) {\n key = kebabCase(key);\n }\n el.style.setProperty(key, value2);\n });\n setTimeout(() => {\n if (el.style.length === 0) {\n el.removeAttribute(\"style\");\n }\n });\n return () => {\n setStyles(el, previousStyles);\n };\n}\nfunction setStylesFromString(el, value) {\n let cache = el.getAttribute(\"style\", value);\n el.setAttribute(\"style\", value);\n return () => {\n el.setAttribute(\"style\", cache || \"\");\n };\n}\nfunction kebabCase(subject) {\n return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\n// packages/alpinejs/src/utils/once.js\nfunction once(callback, fallback = () => {\n}) {\n let called = false;\n return function() {\n if (!called) {\n called = true;\n callback.apply(this, arguments);\n } else {\n fallback.apply(this, arguments);\n }\n };\n}\n\n// packages/alpinejs/src/directives/x-transition.js\ndirective(\"transition\", (el, { value, modifiers, expression }, { evaluate: evaluate2 }) => {\n if (typeof expression === \"function\")\n expression = evaluate2(expression);\n if (expression === false)\n return;\n if (!expression || typeof expression === \"boolean\") {\n registerTransitionsFromHelper(el, modifiers, value);\n } else {\n registerTransitionsFromClassString(el, expression, value);\n }\n});\nfunction registerTransitionsFromClassString(el, classString, stage) {\n registerTransitionObject(el, setClasses, \"\");\n let directiveStorageMap = {\n \"enter\": (classes) => {\n el._x_transition.enter.during = classes;\n },\n \"enter-start\": (classes) => {\n el._x_transition.enter.start = classes;\n },\n \"enter-end\": (classes) => {\n el._x_transition.enter.end = classes;\n },\n \"leave\": (classes) => {\n el._x_transition.leave.during = classes;\n },\n \"leave-start\": (classes) => {\n el._x_transition.leave.start = classes;\n },\n \"leave-end\": (classes) => {\n el._x_transition.leave.end = classes;\n }\n };\n directiveStorageMap[stage](classString);\n}\nfunction registerTransitionsFromHelper(el, modifiers, stage) {\n registerTransitionObject(el, setStyles);\n let doesntSpecify = !modifiers.includes(\"in\") && !modifiers.includes(\"out\") && !stage;\n let transitioningIn = doesntSpecify || modifiers.includes(\"in\") || [\"enter\"].includes(stage);\n let transitioningOut = doesntSpecify || modifiers.includes(\"out\") || [\"leave\"].includes(stage);\n if (modifiers.includes(\"in\") && !doesntSpecify) {\n modifiers = modifiers.filter((i, index) => index < modifiers.indexOf(\"out\"));\n }\n if (modifiers.includes(\"out\") && !doesntSpecify) {\n modifiers = modifiers.filter((i, index) => index > modifiers.indexOf(\"out\"));\n }\n let wantsAll = !modifiers.includes(\"opacity\") && !modifiers.includes(\"scale\");\n let wantsOpacity = wantsAll || modifiers.includes(\"opacity\");\n let wantsScale = wantsAll || modifiers.includes(\"scale\");\n let opacityValue = wantsOpacity ? 0 : 1;\n let scaleValue = wantsScale ? modifierValue(modifiers, \"scale\", 95) / 100 : 1;\n let delay = modifierValue(modifiers, \"delay\", 0) / 1e3;\n let origin = modifierValue(modifiers, \"origin\", \"center\");\n let property = \"opacity, transform\";\n let durationIn = modifierValue(modifiers, \"duration\", 150) / 1e3;\n let durationOut = modifierValue(modifiers, \"duration\", 75) / 1e3;\n let easing = `cubic-bezier(0.4, 0.0, 0.2, 1)`;\n if (transitioningIn) {\n el._x_transition.enter.during = {\n transformOrigin: origin,\n transitionDelay: `${delay}s`,\n transitionProperty: property,\n transitionDuration: `${durationIn}s`,\n transitionTimingFunction: easing\n };\n el._x_transition.enter.start = {\n opacity: opacityValue,\n transform: `scale(${scaleValue})`\n };\n el._x_transition.enter.end = {\n opacity: 1,\n transform: `scale(1)`\n };\n }\n if (transitioningOut) {\n el._x_transition.leave.during = {\n transformOrigin: origin,\n transitionDelay: `${delay}s`,\n transitionProperty: property,\n transitionDuration: `${durationOut}s`,\n transitionTimingFunction: easing\n };\n el._x_transition.leave.start = {\n opacity: 1,\n transform: `scale(1)`\n };\n el._x_transition.leave.end = {\n opacity: opacityValue,\n transform: `scale(${scaleValue})`\n };\n }\n}\nfunction registerTransitionObject(el, setFunction, defaultValue = {}) {\n if (!el._x_transition)\n el._x_transition = {\n enter: { during: defaultValue, start: defaultValue, end: defaultValue },\n leave: { during: defaultValue, start: defaultValue, end: defaultValue },\n in(before = () => {\n }, after = () => {\n }) {\n transition(el, setFunction, {\n during: this.enter.during,\n start: this.enter.start,\n end: this.enter.end\n }, before, after);\n },\n out(before = () => {\n }, after = () => {\n }) {\n transition(el, setFunction, {\n during: this.leave.during,\n start: this.leave.start,\n end: this.leave.end\n }, before, after);\n }\n };\n}\nwindow.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) {\n const nextTick2 = document.visibilityState === \"visible\" ? requestAnimationFrame : setTimeout;\n let clickAwayCompatibleShow = () => nextTick2(show);\n if (value) {\n if (el._x_transition && (el._x_transition.enter || el._x_transition.leave)) {\n el._x_transition.enter && (Object.entries(el._x_transition.enter.during).length || Object.entries(el._x_transition.enter.start).length || Object.entries(el._x_transition.enter.end).length) ? el._x_transition.in(show) : clickAwayCompatibleShow();\n } else {\n el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow();\n }\n return;\n }\n el._x_hidePromise = el._x_transition ? new Promise((resolve, reject) => {\n el._x_transition.out(() => {\n }, () => resolve(hide));\n el._x_transitioning && el._x_transitioning.beforeCancel(() => reject({ isFromCancelledTransition: true }));\n }) : Promise.resolve(hide);\n queueMicrotask(() => {\n let closest = closestHide(el);\n if (closest) {\n if (!closest._x_hideChildren)\n closest._x_hideChildren = [];\n closest._x_hideChildren.push(el);\n } else {\n nextTick2(() => {\n let hideAfterChildren = (el2) => {\n let carry = Promise.all([\n el2._x_hidePromise,\n ...(el2._x_hideChildren || []).map(hideAfterChildren)\n ]).then(([i]) => i?.());\n delete el2._x_hidePromise;\n delete el2._x_hideChildren;\n return carry;\n };\n hideAfterChildren(el).catch((e) => {\n if (!e.isFromCancelledTransition)\n throw e;\n });\n });\n }\n });\n};\nfunction closestHide(el) {\n let parent = el.parentNode;\n if (!parent)\n return;\n return parent._x_hidePromise ? parent : closestHide(parent);\n}\nfunction transition(el, setFunction, { during, start: start2, end } = {}, before = () => {\n}, after = () => {\n}) {\n if (el._x_transitioning)\n el._x_transitioning.cancel();\n if (Object.keys(during).length === 0 && Object.keys(start2).length === 0 && Object.keys(end).length === 0) {\n before();\n after();\n return;\n }\n let undoStart, undoDuring, undoEnd;\n performTransition(el, {\n start() {\n undoStart = setFunction(el, start2);\n },\n during() {\n undoDuring = setFunction(el, during);\n },\n before,\n end() {\n undoStart();\n undoEnd = setFunction(el, end);\n },\n after,\n cleanup() {\n undoDuring();\n undoEnd();\n }\n });\n}\nfunction performTransition(el, stages) {\n let interrupted, reachedBefore, reachedEnd;\n let finish = once(() => {\n mutateDom(() => {\n interrupted = true;\n if (!reachedBefore)\n stages.before();\n if (!reachedEnd) {\n stages.end();\n releaseNextTicks();\n }\n stages.after();\n if (el.isConnected)\n stages.cleanup();\n delete el._x_transitioning;\n });\n });\n el._x_transitioning = {\n beforeCancels: [],\n beforeCancel(callback) {\n this.beforeCancels.push(callback);\n },\n cancel: once(function() {\n while (this.beforeCancels.length) {\n this.beforeCancels.shift()();\n }\n ;\n finish();\n }),\n finish\n };\n mutateDom(() => {\n stages.start();\n stages.during();\n });\n holdNextTicks();\n requestAnimationFrame(() => {\n if (interrupted)\n return;\n let duration = Number(getComputedStyle(el).transitionDuration.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n let delay = Number(getComputedStyle(el).transitionDelay.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n if (duration === 0)\n duration = Number(getComputedStyle(el).animationDuration.replace(\"s\", \"\")) * 1e3;\n mutateDom(() => {\n stages.before();\n });\n reachedBefore = true;\n requestAnimationFrame(() => {\n if (interrupted)\n return;\n mutateDom(() => {\n stages.end();\n });\n releaseNextTicks();\n setTimeout(el._x_transitioning.finish, duration + delay);\n reachedEnd = true;\n });\n });\n}\nfunction modifierValue(modifiers, key, fallback) {\n if (modifiers.indexOf(key) === -1)\n return fallback;\n const rawValue = modifiers[modifiers.indexOf(key) + 1];\n if (!rawValue)\n return fallback;\n if (key === \"scale\") {\n if (isNaN(rawValue))\n return fallback;\n }\n if (key === \"duration\" || key === \"delay\") {\n let match = rawValue.match(/([0-9]+)ms/);\n if (match)\n return match[1];\n }\n if (key === \"origin\") {\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 return rawValue;\n}\n\n// packages/alpinejs/src/clone.js\nvar isCloning = false;\nfunction skipDuringClone(callback, fallback = () => {\n}) {\n return (...args) => isCloning ? fallback(...args) : callback(...args);\n}\nfunction onlyDuringClone(callback) {\n return (...args) => isCloning && callback(...args);\n}\nvar interceptors = [];\nfunction interceptClone(callback) {\n interceptors.push(callback);\n}\nfunction cloneNode(from, to) {\n interceptors.forEach((i) => i(from, to));\n isCloning = true;\n dontRegisterReactiveSideEffects(() => {\n initTree(to, (el, callback) => {\n callback(el, () => {\n });\n });\n });\n isCloning = false;\n}\nvar isCloningLegacy = false;\nfunction clone(oldEl, newEl) {\n if (!newEl._x_dataStack)\n newEl._x_dataStack = oldEl._x_dataStack;\n isCloning = true;\n isCloningLegacy = true;\n dontRegisterReactiveSideEffects(() => {\n cloneTree(newEl);\n });\n isCloning = false;\n isCloningLegacy = false;\n}\nfunction cloneTree(el) {\n let hasRunThroughFirstEl = false;\n let shallowWalker = (el2, callback) => {\n walk(el2, (el3, skip) => {\n if (hasRunThroughFirstEl && isRoot(el3))\n return skip();\n hasRunThroughFirstEl = true;\n callback(el3, skip);\n });\n };\n initTree(el, shallowWalker);\n}\nfunction dontRegisterReactiveSideEffects(callback) {\n let cache = effect;\n overrideEffect((callback2, el) => {\n let storedEffect = cache(callback2);\n release(storedEffect);\n return () => {\n };\n });\n callback();\n overrideEffect(cache);\n}\n\n// packages/alpinejs/src/utils/bind.js\nfunction bind(el, name, value, modifiers = []) {\n if (!el._x_bindings)\n el._x_bindings = reactive({});\n el._x_bindings[name] = value;\n name = modifiers.includes(\"camel\") ? camelCase(name) : name;\n switch (name) {\n case \"value\":\n bindInputValue(el, value);\n break;\n case \"style\":\n bindStyles(el, value);\n break;\n case \"class\":\n bindClasses(el, value);\n break;\n case \"selected\":\n case \"checked\":\n bindAttributeAndProperty(el, name, value);\n break;\n default:\n bindAttribute(el, name, value);\n break;\n }\n}\nfunction bindInputValue(el, value) {\n if (el.type === \"radio\") {\n if (el.attributes.value === void 0) {\n el.value = value;\n }\n if (window.fromModel) {\n if (typeof value === \"boolean\") {\n el.checked = safeParseBoolean(el.value) === value;\n } else {\n el.checked = checkedAttrLooseCompare(el.value, value);\n }\n }\n } else if (el.type === \"checkbox\") {\n if (Number.isInteger(value)) {\n el.value = value;\n } else if (!Array.isArray(value) && typeof value !== \"boolean\" && ![null, void 0].includes(value)) {\n el.value = String(value);\n } else {\n if (Array.isArray(value)) {\n el.checked = value.some((val) => checkedAttrLooseCompare(val, el.value));\n } else {\n el.checked = !!value;\n }\n }\n } else if (el.tagName === \"SELECT\") {\n updateSelect(el, value);\n } else {\n if (el.value === value)\n return;\n el.value = value === void 0 ? \"\" : value;\n }\n}\nfunction bindClasses(el, value) {\n if (el._x_undoAddedClasses)\n el._x_undoAddedClasses();\n el._x_undoAddedClasses = setClasses(el, value);\n}\nfunction bindStyles(el, value) {\n if (el._x_undoAddedStyles)\n el._x_undoAddedStyles();\n el._x_undoAddedStyles = setStyles(el, value);\n}\nfunction bindAttributeAndProperty(el, name, value) {\n bindAttribute(el, name, value);\n setPropertyIfChanged(el, name, value);\n}\nfunction bindAttribute(el, name, value) {\n if ([null, void 0, false].includes(value) && attributeShouldntBePreservedIfFalsy(name)) {\n el.removeAttribute(name);\n } else {\n if (isBooleanAttr(name))\n value = name;\n setIfChanged(el, name, value);\n }\n}\nfunction setIfChanged(el, attrName, value) {\n if (el.getAttribute(attrName) != value) {\n el.setAttribute(attrName, value);\n }\n}\nfunction setPropertyIfChanged(el, propName, value) {\n if (el[propName] !== value) {\n el[propName] = value;\n }\n}\nfunction updateSelect(el, value) {\n const arrayWrappedValue = [].concat(value).map((value2) => {\n return value2 + \"\";\n });\n Array.from(el.options).forEach((option) => {\n option.selected = arrayWrappedValue.includes(option.value);\n });\n}\nfunction camelCase(subject) {\n return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction checkedAttrLooseCompare(valueA, valueB) {\n return valueA == valueB;\n}\nfunction safeParseBoolean(rawValue) {\n if ([1, \"1\", \"true\", \"on\", \"yes\", true].includes(rawValue)) {\n return true;\n }\n if ([0, \"0\", \"false\", \"off\", \"no\", false].includes(rawValue)) {\n return false;\n }\n return rawValue ? Boolean(rawValue) : null;\n}\nfunction isBooleanAttr(attrName) {\n const booleanAttributes = [\n \"disabled\",\n \"checked\",\n \"required\",\n \"readonly\",\n \"open\",\n \"selected\",\n \"autofocus\",\n \"itemscope\",\n \"multiple\",\n \"novalidate\",\n \"allowfullscreen\",\n \"allowpaymentrequest\",\n \"formnovalidate\",\n \"autoplay\",\n \"controls\",\n \"loop\",\n \"muted\",\n \"playsinline\",\n \"default\",\n \"ismap\",\n \"reversed\",\n \"async\",\n \"defer\",\n \"nomodule\"\n ];\n return booleanAttributes.includes(attrName);\n}\nfunction attributeShouldntBePreservedIfFalsy(name) {\n return ![\"aria-pressed\", \"aria-checked\", \"aria-expanded\", \"aria-selected\"].includes(name);\n}\nfunction getBinding(el, name, fallback) {\n if (el._x_bindings && el._x_bindings[name] !== void 0)\n return el._x_bindings[name];\n return getAttributeBinding(el, name, fallback);\n}\nfunction extractProp(el, name, fallback, extract = true) {\n if (el._x_bindings && el._x_bindings[name] !== void 0)\n return el._x_bindings[name];\n if (el._x_inlineBindings && el._x_inlineBindings[name] !== void 0) {\n let binding = el._x_inlineBindings[name];\n binding.extract = extract;\n return dontAutoEvaluateFunctions(() => {\n return evaluate(el, binding.expression);\n });\n }\n return getAttributeBinding(el, name, fallback);\n}\nfunction getAttributeBinding(el, name, fallback) {\n let attr = el.getAttribute(name);\n if (attr === null)\n return typeof fallback === \"function\" ? fallback() : fallback;\n if (attr === \"\")\n return true;\n if (isBooleanAttr(name)) {\n return !![name, \"true\"].includes(attr);\n }\n return attr;\n}\n\n// packages/alpinejs/src/utils/debounce.js\nfunction debounce(func, wait) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n func.apply(context, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n}\n\n// packages/alpinejs/src/utils/throttle.js\nfunction throttle(func, limit) {\n let inThrottle;\n return function() {\n let context = this, args = arguments;\n if (!inThrottle) {\n func.apply(context, args);\n inThrottle = true;\n setTimeout(() => inThrottle = false, limit);\n }\n };\n}\n\n// packages/alpinejs/src/entangle.js\nfunction entangle({ get: outerGet, set: outerSet }, { get: innerGet, set: innerSet }) {\n let firstRun = true;\n let outerHash;\n let innerHash;\n let reference = effect(() => {\n let outer = outerGet();\n let inner = innerGet();\n if (firstRun) {\n innerSet(cloneIfObject(outer));\n firstRun = false;\n } else {\n let outerHashLatest = JSON.stringify(outer);\n let innerHashLatest = JSON.stringify(inner);\n if (outerHashLatest !== outerHash) {\n innerSet(cloneIfObject(outer));\n } else if (outerHashLatest !== innerHashLatest) {\n outerSet(cloneIfObject(inner));\n } else {\n }\n }\n outerHash = JSON.stringify(outerGet());\n innerHash = JSON.stringify(innerGet());\n });\n return () => {\n release(reference);\n };\n}\nfunction cloneIfObject(value) {\n return typeof value === \"object\" ? JSON.parse(JSON.stringify(value)) : value;\n}\n\n// packages/alpinejs/src/plugin.js\nfunction plugin(callback) {\n let callbacks = Array.isArray(callback) ? callback : [callback];\n callbacks.forEach((i) => i(alpine_default));\n}\n\n// packages/alpinejs/src/store.js\nvar stores = {};\nvar isReactive = false;\nfunction store(name, value) {\n if (!isReactive) {\n stores = reactive(stores);\n isReactive = true;\n }\n if (value === void 0) {\n return stores[name];\n }\n stores[name] = value;\n if (typeof value === \"object\" && value !== null && value.hasOwnProperty(\"init\") && typeof value.init === \"function\") {\n stores[name].init();\n }\n initInterceptors(stores[name]);\n}\nfunction getStores() {\n return stores;\n}\n\n// packages/alpinejs/src/binds.js\nvar binds = {};\nfunction bind2(name, bindings) {\n let getBindings = typeof bindings !== \"function\" ? () => bindings : bindings;\n if (name instanceof Element) {\n return applyBindingsObject(name, getBindings());\n } else {\n binds[name] = getBindings;\n }\n return () => {\n };\n}\nfunction injectBindingProviders(obj) {\n Object.entries(binds).forEach(([name, callback]) => {\n Object.defineProperty(obj, name, {\n get() {\n return (...args) => {\n return callback(...args);\n };\n }\n });\n });\n return obj;\n}\nfunction applyBindingsObject(el, obj, original) {\n let cleanupRunners = [];\n while (cleanupRunners.length)\n cleanupRunners.pop()();\n let attributes = Object.entries(obj).map(([name, value]) => ({ name, value }));\n let staticAttributes = attributesOnly(attributes);\n attributes = attributes.map((attribute) => {\n if (staticAttributes.find((attr) => attr.name === attribute.name)) {\n return {\n name: `x-bind:${attribute.name}`,\n value: `\"${attribute.value}\"`\n };\n }\n return attribute;\n });\n directives(el, attributes, original).map((handle) => {\n cleanupRunners.push(handle.runCleanups);\n handle();\n });\n return () => {\n while (cleanupRunners.length)\n cleanupRunners.pop()();\n };\n}\n\n// packages/alpinejs/src/datas.js\nvar datas = {};\nfunction data(name, callback) {\n datas[name] = callback;\n}\nfunction injectDataProviders(obj, context) {\n Object.entries(datas).forEach(([name, callback]) => {\n Object.defineProperty(obj, name, {\n get() {\n return (...args) => {\n return callback.bind(context)(...args);\n };\n },\n enumerable: false\n });\n });\n return obj;\n}\n\n// packages/alpinejs/src/alpine.js\nvar Alpine = {\n get reactive() {\n return reactive;\n },\n get release() {\n return release;\n },\n get effect() {\n return effect;\n },\n get raw() {\n return raw;\n },\n version: \"3.14.1\",\n flushAndStopDeferringMutations,\n dontAutoEvaluateFunctions,\n disableEffectScheduling,\n startObservingMutations,\n stopObservingMutations,\n setReactivityEngine,\n onAttributeRemoved,\n onAttributesAdded,\n closestDataStack,\n skipDuringClone,\n onlyDuringClone,\n addRootSelector,\n addInitSelector,\n interceptClone,\n addScopeToNode,\n deferMutations,\n mapAttributes,\n evaluateLater,\n interceptInit,\n setEvaluator,\n mergeProxies,\n extractProp,\n findClosest,\n onElRemoved,\n closestRoot,\n destroyTree,\n interceptor,\n // INTERNAL: not public API and is subject to change without major release.\n transition,\n // INTERNAL\n setStyles,\n // INTERNAL\n mutateDom,\n directive,\n entangle,\n throttle,\n debounce,\n evaluate,\n initTree,\n nextTick,\n prefixed: prefix,\n prefix: setPrefix,\n plugin,\n magic,\n store,\n start,\n clone,\n // INTERNAL\n cloneNode,\n // INTERNAL\n bound: getBinding,\n $data: scope,\n watch,\n walk,\n data,\n bind: bind2\n};\nvar alpine_default = Alpine;\n\n// node_modules/@vue/shared/dist/shared.esm-bundler.js\nfunction makeMap(str, expectsLowerCase) {\n const map = /* @__PURE__ */ Object.create(null);\n const list = str.split(\",\");\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];\n}\nvar specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nvar isBooleanAttr2 = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);\nvar EMPTY_OBJ = true ? Object.freeze({}) : {};\nvar EMPTY_ARR = true ? Object.freeze([]) : [];\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar hasOwn = (val, key) => hasOwnProperty.call(val, key);\nvar isArray = Array.isArray;\nvar isMap = (val) => toTypeString(val) === \"[object Map]\";\nvar isString = (val) => typeof val === \"string\";\nvar isSymbol = (val) => typeof val === \"symbol\";\nvar isObject = (val) => val !== null && typeof val === \"object\";\nvar objectToString = Object.prototype.toString;\nvar toTypeString = (value) => objectToString.call(value);\nvar toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nvar isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nvar cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nvar capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));\nvar toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);\nvar hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue);\n\n// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js\nvar targetMap = /* @__PURE__ */ new WeakMap();\nvar effectStack = [];\nvar activeEffect;\nvar ITERATE_KEY = Symbol(true ? \"iterate\" : \"\");\nvar MAP_KEY_ITERATE_KEY = Symbol(true ? \"Map key iterate\" : \"\");\nfunction isEffect(fn) {\n return fn && fn._isEffect === true;\n}\nfunction effect2(fn, options = EMPTY_OBJ) {\n if (isEffect(fn)) {\n fn = fn.raw;\n }\n const effect3 = createReactiveEffect(fn, options);\n if (!options.lazy) {\n effect3();\n }\n return effect3;\n}\nfunction stop(effect3) {\n if (effect3.active) {\n cleanup(effect3);\n if (effect3.options.onStop) {\n effect3.options.onStop();\n }\n effect3.active = false;\n }\n}\nvar uid = 0;\nfunction createReactiveEffect(fn, options) {\n const effect3 = function reactiveEffect() {\n if (!effect3.active) {\n return fn();\n }\n if (!effectStack.includes(effect3)) {\n cleanup(effect3);\n try {\n enableTracking();\n effectStack.push(effect3);\n activeEffect = effect3;\n return fn();\n } finally {\n effectStack.pop();\n resetTracking();\n activeEffect = effectStack[effectStack.length - 1];\n }\n }\n };\n effect3.id = uid++;\n effect3.allowRecurse = !!options.allowRecurse;\n effect3._isEffect = true;\n effect3.active = true;\n effect3.raw = fn;\n effect3.deps = [];\n effect3.options = options;\n return effect3;\n}\nfunction cleanup(effect3) {\n const { deps } = effect3;\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].delete(effect3);\n }\n deps.length = 0;\n }\n}\nvar shouldTrack = true;\nvar trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction track(target, type, key) {\n if (!shouldTrack || activeEffect === void 0) {\n return;\n }\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = /* @__PURE__ */ new Set());\n }\n if (!dep.has(activeEffect)) {\n dep.add(activeEffect);\n activeEffect.deps.push(dep);\n if (activeEffect.options.onTrack) {\n activeEffect.options.onTrack({\n effect: activeEffect,\n target,\n type,\n key\n });\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n const effects = /* @__PURE__ */ new Set();\n const add2 = (effectsToAdd) => {\n if (effectsToAdd) {\n effectsToAdd.forEach((effect3) => {\n if (effect3 !== activeEffect || effect3.allowRecurse) {\n effects.add(effect3);\n }\n });\n }\n };\n if (type === \"clear\") {\n depsMap.forEach(add2);\n } else if (key === \"length\" && isArray(target)) {\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || key2 >= newValue) {\n add2(dep);\n }\n });\n } else {\n if (key !== void 0) {\n add2(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n add2(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n add2(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n add2(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n add2(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n add2(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n add2(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n const run = (effect3) => {\n if (effect3.options.onTrigger) {\n effect3.options.onTrigger({\n effect: effect3,\n target,\n key,\n type,\n newValue,\n oldValue,\n oldTarget\n });\n }\n if (effect3.options.scheduler) {\n effect3.options.scheduler(effect3);\n } else {\n effect3();\n }\n };\n effects.forEach(run);\n}\nvar isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nvar builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol));\nvar get2 = /* @__PURE__ */ createGetter();\nvar readonlyGet = /* @__PURE__ */ createGetter(true);\nvar arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n const instrumentations = {};\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = arr[key](...args);\n if (res === -1 || res === false) {\n return arr[key](...args.map(toRaw));\n } else {\n return res;\n }\n };\n });\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n pauseTracking();\n const res = toRaw(this)[key].apply(this, args);\n resetTracking();\n return res;\n };\n });\n return instrumentations;\n}\nfunction createGetter(isReadonly = false, shallow = false) {\n return function get3(target, key, receiver) {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\" && receiver === (isReadonly ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {\n return target;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly) {\n track(target, \"get\", key);\n }\n if (shallow) {\n return res;\n }\n if (isRef(res)) {\n const shouldUnwrap = !targetIsArray || !isIntegerKey(key);\n return shouldUnwrap ? res.value : res;\n }\n if (isObject(res)) {\n return isReadonly ? readonly(res) : reactive2(res);\n }\n return res;\n };\n}\nvar set2 = /* @__PURE__ */ createSetter();\nfunction createSetter(shallow = false) {\n return function set3(target, key, value, receiver) {\n let oldValue = target[key];\n if (!shallow) {\n value = toRaw(value);\n oldValue = toRaw(oldValue);\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n };\n}\nfunction deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n}\nfunction ownKeys(target) {\n track(target, \"iterate\", isArray(target) ? \"length\" : ITERATE_KEY);\n return Reflect.ownKeys(target);\n}\nvar mutableHandlers = {\n get: get2,\n set: set2,\n deleteProperty,\n has,\n ownKeys\n};\nvar readonlyHandlers = {\n get: readonlyGet,\n set(target, key) {\n if (true) {\n console.warn(`Set operation on key \"${String(key)}\" failed: target is readonly.`, target);\n }\n return true;\n },\n deleteProperty(target, key) {\n if (true) {\n console.warn(`Delete operation on key \"${String(key)}\" failed: target is readonly.`, target);\n }\n return true;\n }\n};\nvar toReactive = (value) => isObject(value) ? reactive2(value) : value;\nvar toReadonly = (value) => isObject(value) ? readonly(value) : value;\nvar toShallow = (value) => value;\nvar getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get$1(target, key, isReadonly = false, isShallow = false) {\n target = target[\n \"__v_raw\"\n /* RAW */\n ];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (key !== rawKey) {\n !isReadonly && track(rawTarget, \"get\", key);\n }\n !isReadonly && track(rawTarget, \"get\", rawKey);\n const { has: has2 } = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has$1(key, isReadonly = false) {\n const target = this[\n \"__v_raw\"\n /* RAW */\n ];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (key !== rawKey) {\n !isReadonly && track(rawTarget, \"has\", key);\n }\n !isReadonly && track(rawTarget, \"has\", rawKey);\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\n \"__v_raw\"\n /* RAW */\n ];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set$1(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const { has: has2, get: get3 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (true) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get3.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const { has: has2, get: get3 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (true) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get3 ? get3.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\n \"__v_raw\"\n /* RAW */\n ];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\n \"__v_raw\"\n /* RAW */\n ];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (true) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));\n }\n return type === \"delete\" ? false : this;\n };\n}\nfunction createInstrumentations() {\n const mutableInstrumentations2 = {\n get(key) {\n return get$1(this, key);\n },\n get size() {\n return size(this);\n },\n has: has$1,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n };\n const shallowInstrumentations2 = {\n get(key) {\n return get$1(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has: has$1,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n };\n const readonlyInstrumentations2 = {\n get(key) {\n return get$1(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has$1.call(this, key, true);\n },\n add: createReadonlyMethod(\n \"add\"\n /* ADD */\n ),\n set: createReadonlyMethod(\n \"set\"\n /* SET */\n ),\n delete: createReadonlyMethod(\n \"delete\"\n /* DELETE */\n ),\n clear: createReadonlyMethod(\n \"clear\"\n /* CLEAR */\n ),\n forEach: createForEach(true, false)\n };\n const shallowReadonlyInstrumentations2 = {\n get(key) {\n return get$1(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has$1.call(this, key, true);\n },\n add: createReadonlyMethod(\n \"add\"\n /* ADD */\n ),\n set: createReadonlyMethod(\n \"set\"\n /* SET */\n ),\n delete: createReadonlyMethod(\n \"delete\"\n /* DELETE */\n ),\n clear: createReadonlyMethod(\n \"clear\"\n /* CLEAR */\n ),\n forEach: createForEach(true, true)\n };\n const iteratorMethods = [\"keys\", \"values\", \"entries\", Symbol.iterator];\n iteratorMethods.forEach((method) => {\n mutableInstrumentations2[method] = createIterableMethod(method, false, false);\n readonlyInstrumentations2[method] = createIterableMethod(method, true, false);\n shallowInstrumentations2[method] = createIterableMethod(method, false, true);\n shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true);\n });\n return [\n mutableInstrumentations2,\n readonlyInstrumentations2,\n shallowInstrumentations2,\n shallowReadonlyInstrumentations2\n ];\n}\nvar [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);\n };\n}\nvar mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nvar readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);\n }\n}\nvar reactiveMap = /* @__PURE__ */ new WeakMap();\nvar shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nvar readonlyMap = /* @__PURE__ */ new WeakMap();\nvar shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2;\n default:\n return 0;\n }\n}\nfunction getTargetType(value) {\n return value[\n \"__v_skip\"\n /* SKIP */\n ] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));\n}\nfunction reactive2(target) {\n if (target && target[\n \"__v_isReadonly\"\n /* IS_READONLY */\n ]) {\n return target;\n }\n return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);\n}\nfunction readonly(target) {\n return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);\n}\nfunction createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (true) {\n console.warn(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\n \"__v_raw\"\n /* RAW */\n ] && !(isReadonly && target[\n \"__v_isReactive\"\n /* IS_REACTIVE */\n ])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0) {\n return target;\n }\n const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction toRaw(observed) {\n return observed && toRaw(observed[\n \"__v_raw\"\n /* RAW */\n ]) || observed;\n}\nfunction isRef(r) {\n return Boolean(r && r.__v_isRef === true);\n}\n\n// packages/alpinejs/src/magics/$nextTick.js\nmagic(\"nextTick\", () => nextTick);\n\n// packages/alpinejs/src/magics/$dispatch.js\nmagic(\"dispatch\", (el) => dispatch.bind(dispatch, el));\n\n// packages/alpinejs/src/magics/$watch.js\nmagic(\"watch\", (el, { evaluateLater: evaluateLater2, cleanup: cleanup2 }) => (key, callback) => {\n let evaluate2 = evaluateLater2(key);\n let getter = () => {\n let value;\n evaluate2((i) => value = i);\n return value;\n };\n let unwatch = watch(getter, callback);\n cleanup2(unwatch);\n});\n\n// packages/alpinejs/src/magics/$store.js\nmagic(\"store\", getStores);\n\n// packages/alpinejs/src/magics/$data.js\nmagic(\"data\", (el) => scope(el));\n\n// packages/alpinejs/src/magics/$root.js\nmagic(\"root\", (el) => closestRoot(el));\n\n// packages/alpinejs/src/magics/$refs.js\nmagic(\"refs\", (el) => {\n if (el._x_refs_proxy)\n return el._x_refs_proxy;\n el._x_refs_proxy = mergeProxies(getArrayOfRefObject(el));\n return el._x_refs_proxy;\n});\nfunction getArrayOfRefObject(el) {\n let refObjects = [];\n findClosest(el, (i) => {\n if (i._x_refs)\n refObjects.push(i._x_refs);\n });\n return refObjects;\n}\n\n// packages/alpinejs/src/ids.js\nvar globalIdMemo = {};\nfunction findAndIncrementId(name) {\n if (!globalIdMemo[name])\n globalIdMemo[name] = 0;\n return ++globalIdMemo[name];\n}\nfunction closestIdRoot(el, name) {\n return findClosest(el, (element) => {\n if (element._x_ids && element._x_ids[name])\n return true;\n });\n}\nfunction setIdRoot(el, name) {\n if (!el._x_ids)\n el._x_ids = {};\n if (!el._x_ids[name])\n el._x_ids[name] = findAndIncrementId(name);\n}\n\n// packages/alpinejs/src/magics/$id.js\nmagic(\"id\", (el, { cleanup: cleanup2 }) => (name, key = null) => {\n let cacheKey = `${name}${key ? `-${key}` : \"\"}`;\n return cacheIdByNameOnElement(el, cacheKey, cleanup2, () => {\n let root = closestIdRoot(el, name);\n let id = root ? root._x_ids[name] : findAndIncrementId(name);\n return key ? `${name}-${id}-${key}` : `${name}-${id}`;\n });\n});\ninterceptClone((from, to) => {\n if (from._x_id) {\n to._x_id = from._x_id;\n }\n});\nfunction cacheIdByNameOnElement(el, cacheKey, cleanup2, callback) {\n if (!el._x_id)\n el._x_id = {};\n if (el._x_id[cacheKey])\n return el._x_id[cacheKey];\n let output = callback();\n el._x_id[cacheKey] = output;\n cleanup2(() => {\n delete el._x_id[cacheKey];\n });\n return output;\n}\n\n// packages/alpinejs/src/magics/$el.js\nmagic(\"el\", (el) => el);\n\n// packages/alpinejs/src/magics/index.js\nwarnMissingPluginMagic(\"Focus\", \"focus\", \"focus\");\nwarnMissingPluginMagic(\"Persist\", \"persist\", \"persist\");\nfunction warnMissingPluginMagic(name, magicName, slug) {\n magic(magicName, (el) => warn(`You can't use [$${magicName}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n\n// packages/alpinejs/src/directives/x-modelable.js\ndirective(\"modelable\", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2, cleanup: cleanup2 }) => {\n let func = evaluateLater2(expression);\n let innerGet = () => {\n let result;\n func((i) => result = i);\n return result;\n };\n let evaluateInnerSet = evaluateLater2(`${expression} = __placeholder`);\n let innerSet = (val) => evaluateInnerSet(() => {\n }, { scope: { \"__placeholder\": val } });\n let initialValue = innerGet();\n innerSet(initialValue);\n queueMicrotask(() => {\n if (!el._x_model)\n return;\n el._x_removeModelListeners[\"default\"]();\n let outerGet = el._x_model.get;\n let outerSet = el._x_model.set;\n let releaseEntanglement = entangle(\n {\n get() {\n return outerGet();\n },\n set(value) {\n outerSet(value);\n }\n },\n {\n get() {\n return innerGet();\n },\n set(value) {\n innerSet(value);\n }\n }\n );\n cleanup2(releaseEntanglement);\n });\n});\n\n// packages/alpinejs/src/directives/x-teleport.js\ndirective(\"teleport\", (el, { modifiers, expression }, { cleanup: cleanup2 }) => {\n if (el.tagName.toLowerCase() !== \"template\")\n warn(\"x-teleport can only be used on a <template> tag\", el);\n let target = getTarget(expression);\n let clone2 = el.content.cloneNode(true).firstElementChild;\n el._x_teleport = clone2;\n clone2._x_teleportBack = el;\n el.setAttribute(\"data-teleport-template\", true);\n clone2.setAttribute(\"data-teleport-target\", true);\n if (el._x_forwardEvents) {\n el._x_forwardEvents.forEach((eventName) => {\n clone2.addEventListener(eventName, (e) => {\n e.stopPropagation();\n el.dispatchEvent(new e.constructor(e.type, e));\n });\n });\n }\n addScopeToNode(clone2, {}, el);\n let placeInDom = (clone3, target2, modifiers2) => {\n if (modifiers2.includes(\"prepend\")) {\n target2.parentNode.insertBefore(clone3, target2);\n } else if (modifiers2.includes(\"append\")) {\n target2.parentNode.insertBefore(clone3, target2.nextSibling);\n } else {\n target2.appendChild(clone3);\n }\n };\n mutateDom(() => {\n placeInDom(clone2, target, modifiers);\n skipDuringClone(() => {\n initTree(clone2);\n clone2._x_ignore = true;\n })();\n });\n el._x_teleportPutBack = () => {\n let target2 = getTarget(expression);\n mutateDom(() => {\n placeInDom(el._x_teleport, target2, modifiers);\n });\n };\n cleanup2(() => clone2.remove());\n});\nvar teleportContainerDuringClone = document.createElement(\"div\");\nfunction getTarget(expression) {\n let target = skipDuringClone(() => {\n return document.querySelector(expression);\n }, () => {\n return teleportContainerDuringClone;\n })();\n if (!target)\n warn(`Cannot find x-teleport element for selector: \"${expression}\"`);\n return target;\n}\n\n// packages/alpinejs/src/directives/x-ignore.js\nvar handler = () => {\n};\nhandler.inline = (el, { modifiers }, { cleanup: cleanup2 }) => {\n modifiers.includes(\"self\") ? el._x_ignoreSelf = true : el._x_ignore = true;\n cleanup2(() => {\n modifiers.includes(\"self\") ? delete el._x_ignoreSelf : delete el._x_ignore;\n });\n};\ndirective(\"ignore\", handler);\n\n// packages/alpinejs/src/directives/x-effect.js\ndirective(\"effect\", skipDuringClone((el, { expression }, { effect: effect3 }) => {\n effect3(evaluateLater(el, expression));\n}));\n\n// packages/alpinejs/src/utils/on.js\nfunction on(el, event, modifiers, callback) {\n let listenerTarget = el;\n let handler4 = (e) => callback(e);\n let options = {};\n let wrapHandler = (callback2, wrapper) => (e) => wrapper(callback2, e);\n if (modifiers.includes(\"dot\"))\n event = dotSyntax(event);\n if (modifiers.includes(\"camel\"))\n event = camelCase2(event);\n if (modifiers.includes(\"passive\"))\n options.passive = true;\n if (modifiers.includes(\"capture\"))\n options.capture = true;\n if (modifiers.includes(\"window\"))\n listenerTarget = window;\n if (modifiers.includes(\"document\"))\n listenerTarget = document;\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 handler4 = debounce(handler4, wait);\n }\n if (modifiers.includes(\"throttle\")) {\n let nextModifier = modifiers[modifiers.indexOf(\"throttle\") + 1] || \"invalid-wait\";\n let wait = isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n handler4 = throttle(handler4, wait);\n }\n if (modifiers.includes(\"prevent\"))\n handler4 = wrapHandler(handler4, (next, e) => {\n e.preventDefault();\n next(e);\n });\n if (modifiers.includes(\"stop\"))\n handler4 = wrapHandler(handler4, (next, e) => {\n e.stopPropagation();\n next(e);\n });\n if (modifiers.includes(\"once\")) {\n handler4 = wrapHandler(handler4, (next, e) => {\n next(e);\n listenerTarget.removeEventListener(event, handler4, options);\n });\n }\n if (modifiers.includes(\"away\") || modifiers.includes(\"outside\")) {\n listenerTarget = document;\n handler4 = wrapHandler(handler4, (next, e) => {\n if (el.contains(e.target))\n return;\n if (e.target.isConnected === false)\n return;\n if (el.offsetWidth < 1 && el.offsetHeight < 1)\n return;\n if (el._x_isShown === false)\n return;\n next(e);\n });\n }\n if (modifiers.includes(\"self\"))\n handler4 = wrapHandler(handler4, (next, e) => {\n e.target === el && next(e);\n });\n if (isKeyEvent(event) || isClickEvent(event)) {\n handler4 = wrapHandler(handler4, (next, e) => {\n if (isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) {\n return;\n }\n next(e);\n });\n }\n listenerTarget.addEventListener(event, handler4, options);\n return () => {\n listenerTarget.removeEventListener(event, handler4, options);\n };\n}\nfunction dotSyntax(subject) {\n return subject.replace(/-/g, \".\");\n}\nfunction camelCase2(subject) {\n return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction isNumeric(subject) {\n return !Array.isArray(subject) && !isNaN(subject);\n}\nfunction kebabCase2(subject) {\n if ([\" \", \"_\"].includes(\n subject\n ))\n return subject;\n return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[_\\s]/, \"-\").toLowerCase();\n}\nfunction isKeyEvent(event) {\n return [\"keydown\", \"keyup\"].includes(event);\n}\nfunction isClickEvent(event) {\n return [\"contextmenu\", \"click\", \"mouse\"].some((i) => event.includes(i));\n}\nfunction isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers) {\n let keyModifiers = modifiers.filter((i) => {\n return ![\"window\", \"document\", \"prevent\", \"stop\", \"once\", \"capture\", \"self\", \"away\", \"outside\", \"passive\"].includes(i);\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 }\n if (keyModifiers.includes(\"throttle\")) {\n let debounceIndex = keyModifiers.indexOf(\"throttle\");\n keyModifiers.splice(debounceIndex, isNumeric((keyModifiers[debounceIndex + 1] || \"invalid-wait\").split(\"ms\")[0]) ? 2 : 1);\n }\n if (keyModifiers.length === 0)\n return false;\n if (keyModifiers.length === 1 && keyToModifiers(e.key).includes(keyModifiers[0]))\n return false;\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 if (selectedSystemKeyModifiers.length > 0) {\n const activelyPressedKeyModifiers = selectedSystemKeyModifiers.filter((modifier) => {\n if (modifier === \"cmd\" || modifier === \"super\")\n modifier = \"meta\";\n return e[`${modifier}Key`];\n });\n if (activelyPressedKeyModifiers.length === selectedSystemKeyModifiers.length) {\n if (isClickEvent(e.type))\n return false;\n if (keyToModifiers(e.key).includes(keyModifiers[0]))\n return false;\n }\n }\n return true;\n}\nfunction keyToModifiers(key) {\n if (!key)\n return [];\n key = kebabCase2(key);\n let modifierToKeyMap = {\n \"ctrl\": \"control\",\n \"slash\": \"/\",\n \"space\": \" \",\n \"spacebar\": \" \",\n \"cmd\": \"meta\",\n \"esc\": \"escape\",\n \"up\": \"arrow-up\",\n \"down\": \"arrow-down\",\n \"left\": \"arrow-left\",\n \"right\": \"arrow-right\",\n \"period\": \".\",\n \"comma\": \",\",\n \"equal\": \"=\",\n \"minus\": \"-\",\n \"underscore\": \"_\"\n };\n modifierToKeyMap[key] = key;\n return Object.keys(modifierToKeyMap).map((modifier) => {\n if (modifierToKeyMap[modifier] === key)\n return modifier;\n }).filter((modifier) => modifier);\n}\n\n// packages/alpinejs/src/directives/x-model.js\ndirective(\"model\", (el, { modifiers, expression }, { effect: effect3, cleanup: cleanup2 }) => {\n let scopeTarget = el;\n if (modifiers.includes(\"parent\")) {\n scopeTarget = el.parentNode;\n }\n let evaluateGet = evaluateLater(scopeTarget, expression);\n let evaluateSet;\n if (typeof expression === \"string\") {\n evaluateSet = evaluateLater(scopeTarget, `${expression} = __placeholder`);\n } else if (typeof expression === \"function\" && typeof expression() === \"string\") {\n evaluateSet = evaluateLater(scopeTarget, `${expression()} = __placeholder`);\n } else {\n evaluateSet = () => {\n };\n }\n let getValue = () => {\n let result;\n evaluateGet((value) => result = value);\n return isGetterSetter(result) ? result.get() : result;\n };\n let setValue = (value) => {\n let result;\n evaluateGet((value2) => result = value2);\n if (isGetterSetter(result)) {\n result.set(value);\n } else {\n evaluateSet(() => {\n }, {\n scope: { \"__placeholder\": value }\n });\n }\n };\n if (typeof expression === \"string\" && el.type === \"radio\") {\n mutateDom(() => {\n if (!el.hasAttribute(\"name\"))\n el.setAttribute(\"name\", expression);\n });\n }\n var event = el.tagName.toLowerCase() === \"select\" || [\"checkbox\", \"radio\"].includes(el.type) || modifiers.includes(\"lazy\") ? \"change\" : \"input\";\n let removeListener = isCloning ? () => {\n } : on(el, event, modifiers, (e) => {\n setValue(getInputValue(el, modifiers, e, getValue()));\n });\n if (modifiers.includes(\"fill\")) {\n if ([void 0, null, \"\"].includes(getValue()) || el.type === \"checkbox\" && Array.isArray(getValue()) || el.tagName.toLowerCase() === \"select\" && el.multiple) {\n setValue(\n getInputValue(el, modifiers, { target: el }, getValue())\n );\n }\n }\n if (!el._x_removeModelListeners)\n el._x_removeModelListeners = {};\n el._x_removeModelListeners[\"default\"] = removeListener;\n cleanup2(() => el._x_removeModelListeners[\"default\"]());\n if (el.form) {\n let removeResetListener = on(el.form, \"reset\", [], (e) => {\n nextTick(() => el._x_model && el._x_model.set(getInputValue(el, modifiers, { target: el }, getValue())));\n });\n cleanup2(() => removeResetListener());\n }\n el._x_model = {\n get() {\n return getValue();\n },\n set(value) {\n setValue(value);\n }\n };\n el._x_forceModelUpdate = (value) => {\n if (value === void 0 && typeof expression === \"string\" && expression.match(/\\./))\n value = \"\";\n window.fromModel = true;\n mutateDom(() => bind(el, \"value\", value));\n delete window.fromModel;\n };\n effect3(() => {\n let value = getValue();\n if (modifiers.includes(\"unintrusive\") && document.activeElement.isSameNode(el))\n return;\n el._x_forceModelUpdate(value);\n });\n});\nfunction getInputValue(el, modifiers, event, currentValue) {\n return mutateDom(() => {\n if (event instanceof CustomEvent && event.detail !== void 0)\n return event.detail !== null && event.detail !== void 0 ? event.detail : event.target.value;\n else if (el.type === \"checkbox\") {\n if (Array.isArray(currentValue)) {\n let newValue = null;\n if (modifiers.includes(\"number\")) {\n newValue = safeParseNumber(event.target.value);\n } else if (modifiers.includes(\"boolean\")) {\n newValue = safeParseBoolean(event.target.value);\n } else {\n newValue = event.target.value;\n }\n return event.target.checked ? currentValue.includes(newValue) ? currentValue : currentValue.concat([newValue]) : currentValue.filter((el2) => !checkedAttrLooseCompare2(el2, newValue));\n } else {\n return event.target.checked;\n }\n } else if (el.tagName.toLowerCase() === \"select\" && el.multiple) {\n if (modifiers.includes(\"number\")) {\n return Array.from(event.target.selectedOptions).map((option) => {\n let rawValue = option.value || option.text;\n return safeParseNumber(rawValue);\n });\n } else if (modifiers.includes(\"boolean\")) {\n return Array.from(event.target.selectedOptions).map((option) => {\n let rawValue = option.value || option.text;\n return safeParseBoolean(rawValue);\n });\n }\n return Array.from(event.target.selectedOptions).map((option) => {\n return option.value || option.text;\n });\n } else {\n let newValue;\n if (el.type === \"radio\") {\n if (event.target.checked) {\n newValue = event.target.value;\n } else {\n newValue = currentValue;\n }\n } else {\n newValue = event.target.value;\n }\n if (modifiers.includes(\"number\")) {\n return safeParseNumber(newValue);\n } else if (modifiers.includes(\"boolean\")) {\n return safeParseBoolean(newValue);\n } else if (modifiers.includes(\"trim\")) {\n return newValue.trim();\n } else {\n return newValue;\n }\n }\n });\n}\nfunction safeParseNumber(rawValue) {\n let number = rawValue ? parseFloat(rawValue) : null;\n return isNumeric2(number) ? number : rawValue;\n}\nfunction checkedAttrLooseCompare2(valueA, valueB) {\n return valueA == valueB;\n}\nfunction isNumeric2(subject) {\n return !Array.isArray(subject) && !isNaN(subject);\n}\nfunction isGetterSetter(value) {\n return value !== null && typeof value === \"object\" && typeof value.get === \"function\" && typeof value.set === \"function\";\n}\n\n// packages/alpinejs/src/directives/x-cloak.js\ndirective(\"cloak\", (el) => queueMicrotask(() => mutateDom(() => el.removeAttribute(prefix(\"cloak\")))));\n\n// packages/alpinejs/src/directives/x-init.js\naddInitSelector(() => `[${prefix(\"init\")}]`);\ndirective(\"init\", skipDuringClone((el, { expression }, { evaluate: evaluate2 }) => {\n if (typeof expression === \"string\") {\n return !!expression.trim() && evaluate2(expression, {}, false);\n }\n return evaluate2(expression, {}, false);\n}));\n\n// packages/alpinejs/src/directives/x-text.js\ndirective(\"text\", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2 }) => {\n let evaluate2 = evaluateLater2(expression);\n effect3(() => {\n evaluate2((value) => {\n mutateDom(() => {\n el.textContent = value;\n });\n });\n });\n});\n\n// packages/alpinejs/src/directives/x-html.js\ndirective(\"html\", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2 }) => {\n let evaluate2 = evaluateLater2(expression);\n effect3(() => {\n evaluate2((value) => {\n mutateDom(() => {\n el.innerHTML = value;\n el._x_ignoreSelf = true;\n initTree(el);\n delete el._x_ignoreSelf;\n });\n });\n });\n});\n\n// packages/alpinejs/src/directives/x-bind.js\nmapAttributes(startingWith(\":\", into(prefix(\"bind:\"))));\nvar handler2 = (el, { value, modifiers, expression, original }, { effect: effect3, cleanup: cleanup2 }) => {\n if (!value) {\n let bindingProviders = {};\n injectBindingProviders(bindingProviders);\n let getBindings = evaluateLater(el, expression);\n getBindings((bindings) => {\n applyBindingsObject(el, bindings, original);\n }, { scope: bindingProviders });\n return;\n }\n if (value === \"key\")\n return storeKeyForXFor(el, expression);\n if (el._x_inlineBindings && el._x_inlineBindings[value] && el._x_inlineBindings[value].extract) {\n return;\n }\n let evaluate2 = evaluateLater(el, expression);\n effect3(() => evaluate2((result) => {\n if (result === void 0 && typeof expression === \"string\" && expression.match(/\\./)) {\n result = \"\";\n }\n mutateDom(() => bind(el, value, result, modifiers));\n }));\n cleanup2(() => {\n el._x_undoAddedClasses && el._x_undoAddedClasses();\n el._x_undoAddedStyles && el._x_undoAddedStyles();\n });\n};\nhandler2.inline = (el, { value, modifiers, expression }) => {\n if (!value)\n return;\n if (!el._x_inlineBindings)\n el._x_inlineBindings = {};\n el._x_inlineBindings[value] = { expression, extract: false };\n};\ndirective(\"bind\", handler2);\nfunction storeKeyForXFor(el, expression) {\n el._x_keyExpression = expression;\n}\n\n// packages/alpinejs/src/directives/x-data.js\naddRootSelector(() => `[${prefix(\"data\")}]`);\ndirective(\"data\", (el, { expression }, { cleanup: cleanup2 }) => {\n if (shouldSkipRegisteringDataDuringClone(el))\n return;\n expression = expression === \"\" ? \"{}\" : expression;\n let magicContext = {};\n injectMagics(magicContext, el);\n let dataProviderContext = {};\n injectDataProviders(dataProviderContext, magicContext);\n let data2 = evaluate(el, expression, { scope: dataProviderContext });\n if (data2 === void 0 || data2 === true)\n data2 = {};\n injectMagics(data2, el);\n let reactiveData = reactive(data2);\n initInterceptors(reactiveData);\n let undo = addScopeToNode(el, reactiveData);\n reactiveData[\"init\"] && evaluate(el, reactiveData[\"init\"]);\n cleanup2(() => {\n reactiveData[\"destroy\"] && evaluate(el, reactiveData[\"destroy\"]);\n undo();\n });\n});\ninterceptClone((from, to) => {\n if (from._x_dataStack) {\n to._x_dataStack = from._x_dataStack;\n to.setAttribute(\"data-has-alpine-state\", true);\n }\n});\nfunction shouldSkipRegisteringDataDuringClone(el) {\n if (!isCloning)\n return false;\n if (isCloningLegacy)\n return true;\n return el.hasAttribute(\"data-has-alpine-state\");\n}\n\n// packages/alpinejs/src/directives/x-show.js\ndirective(\"show\", (el, { modifiers, expression }, { effect: effect3 }) => {\n let evaluate2 = evaluateLater(el, expression);\n if (!el._x_doHide)\n el._x_doHide = () => {\n mutateDom(() => {\n el.style.setProperty(\"display\", \"none\", modifiers.includes(\"important\") ? \"important\" : void 0);\n });\n };\n if (!el._x_doShow)\n el._x_doShow = () => {\n mutateDom(() => {\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 let hide = () => {\n el._x_doHide();\n el._x_isShown = false;\n };\n let show = () => {\n el._x_doShow();\n el._x_isShown = true;\n };\n let clickAwayCompatibleShow = () => setTimeout(show);\n let toggle = once(\n (value) => value ? show() : hide(),\n (value) => {\n if (typeof el._x_toggleAndCascadeWithTransitions === \"function\") {\n el._x_toggleAndCascadeWithTransitions(el, value, show, hide);\n } else {\n value ? clickAwayCompatibleShow() : hide();\n }\n }\n );\n let oldValue;\n let firstTime = true;\n effect3(() => evaluate2((value) => {\n if (!firstTime && value === oldValue)\n return;\n if (modifiers.includes(\"immediate\"))\n value ? clickAwayCompatibleShow() : hide();\n toggle(value);\n oldValue = value;\n firstTime = false;\n }));\n});\n\n// packages/alpinejs/src/directives/x-for.js\ndirective(\"for\", (el, { expression }, { effect: effect3, cleanup: cleanup2 }) => {\n let iteratorNames = parseForExpression(expression);\n let evaluateItems = evaluateLater(el, iteratorNames.items);\n let evaluateKey = evaluateLater(\n el,\n // the x-bind:key expression is stored for our use instead of evaluated.\n el._x_keyExpression || \"index\"\n );\n el._x_prevKeys = [];\n el._x_lookup = {};\n effect3(() => loop(el, iteratorNames, evaluateItems, evaluateKey));\n cleanup2(() => {\n Object.values(el._x_lookup).forEach((el2) => el2.remove());\n delete el._x_prevKeys;\n delete el._x_lookup;\n });\n});\nfunction loop(el, iteratorNames, evaluateItems, evaluateKey) {\n let isObject2 = (i) => typeof i === \"object\" && !Array.isArray(i);\n let templateEl = el;\n evaluateItems((items) => {\n if (isNumeric3(items) && items >= 0) {\n items = Array.from(Array(items).keys(), (i) => i + 1);\n }\n if (items === void 0)\n items = [];\n let lookup = el._x_lookup;\n let prevKeys = el._x_prevKeys;\n let scopes = [];\n let keys = [];\n if (isObject2(items)) {\n items = Object.entries(items).map(([key, value]) => {\n let scope2 = getIterationScopeVariables(iteratorNames, value, key, items);\n evaluateKey((value2) => {\n if (keys.includes(value2))\n warn(\"Duplicate key on x-for\", el);\n keys.push(value2);\n }, { scope: { index: key, ...scope2 } });\n scopes.push(scope2);\n });\n } else {\n for (let i = 0; i < items.length; i++) {\n let scope2 = getIterationScopeVariables(iteratorNames, items[i], i, items);\n evaluateKey((value) => {\n if (keys.includes(value))\n warn(\"Duplicate key on x-for\", el);\n keys.push(value);\n }, { scope: { index: i, ...scope2 } });\n scopes.push(scope2);\n }\n }\n let adds = [];\n let moves = [];\n let removes = [];\n let sames = [];\n for (let i = 0; i < prevKeys.length; i++) {\n let key = prevKeys[i];\n if (keys.indexOf(key) === -1)\n removes.push(key);\n }\n prevKeys = prevKeys.filter((key) => !removes.includes(key));\n let lastKey = \"template\";\n for (let i = 0; i < keys.length; i++) {\n let key = keys[i];\n let prevIndex = prevKeys.indexOf(key);\n if (prevIndex === -1) {\n prevKeys.splice(i, 0, key);\n adds.push([lastKey, i]);\n } else if (prevIndex !== i) {\n let keyInSpot = prevKeys.splice(i, 1)[0];\n let keyForSpot = prevKeys.splice(prevIndex - 1, 1)[0];\n prevKeys.splice(i, 0, keyForSpot);\n prevKeys.splice(prevIndex, 0, keyInSpot);\n moves.push([keyInSpot, keyForSpot]);\n } else {\n sames.push(key);\n }\n lastKey = key;\n }\n for (let i = 0; i < removes.length; i++) {\n let key = removes[i];\n if (!!lookup[key]._x_effects) {\n lookup[key]._x_effects.forEach(dequeueJob);\n }\n lookup[key].remove();\n lookup[key] = null;\n delete lookup[key];\n }\n for (let i = 0; i < moves.length; i++) {\n let [keyInSpot, keyForSpot] = moves[i];\n let elInSpot = lookup[keyInSpot];\n let elForSpot = lookup[keyForSpot];\n let marker = document.createElement(\"div\");\n mutateDom(() => {\n if (!elForSpot)\n warn(`x-for \":key\" is undefined or invalid`, templateEl, keyForSpot, lookup);\n elForSpot.after(marker);\n elInSpot.after(elForSpot);\n elForSpot._x_currentIfEl && elForSpot.after(elForSpot._x_currentIfEl);\n marker.before(elInSpot);\n elInSpot._x_currentIfEl && elInSpot.after(elInSpot._x_currentIfEl);\n marker.remove();\n });\n elForSpot._x_refreshXForScope(scopes[keys.indexOf(keyForSpot)]);\n }\n for (let i = 0; i < adds.length; i++) {\n let [lastKey2, index] = adds[i];\n let lastEl = lastKey2 === \"template\" ? templateEl : lookup[lastKey2];\n if (lastEl._x_currentIfEl)\n lastEl = lastEl._x_currentIfEl;\n let scope2 = scopes[index];\n let key = keys[index];\n let clone2 = document.importNode(templateEl.content, true).firstElementChild;\n let reactiveScope = reactive(scope2);\n addScopeToNode(clone2, reactiveScope, templateEl);\n clone2._x_refreshXForScope = (newScope) => {\n Object.entries(newScope).forEach(([key2, value]) => {\n reactiveScope[key2] = value;\n });\n };\n mutateDom(() => {\n lastEl.after(clone2);\n skipDuringClone(() => initTree(clone2))();\n });\n if (typeof key === \"object\") {\n warn(\"x-for key cannot be an object, it must be a string or an integer\", templateEl);\n }\n lookup[key] = clone2;\n }\n for (let i = 0; i < sames.length; i++) {\n lookup[sames[i]]._x_refreshXForScope(scopes[keys.indexOf(sames[i])]);\n }\n templateEl._x_prevKeys = keys;\n });\n}\nfunction parseForExpression(expression) {\n let forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\n let stripParensRE = /^\\s*\\(|\\)\\s*$/g;\n let forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/;\n let inMatch = expression.match(forAliasRE);\n if (!inMatch)\n return;\n let res = {};\n res.items = inMatch[2].trim();\n let item = inMatch[1].replace(stripParensRE, \"\").trim();\n let iteratorMatch = item.match(forIteratorRE);\n if (iteratorMatch) {\n res.item = item.replace(forIteratorRE, \"\").trim();\n res.index = iteratorMatch[1].trim();\n if (iteratorMatch[2]) {\n res.collection = iteratorMatch[2].trim();\n }\n } else {\n res.item = item;\n }\n return res;\n}\nfunction getIterationScopeVariables(iteratorNames, item, index, items) {\n let scopeVariables = {};\n if (/^\\[.*\\]$/.test(iteratorNames.item) && Array.isArray(item)) {\n let names = iteratorNames.item.replace(\"[\", \"\").replace(\"]\", \"\").split(\",\").map((i) => i.trim());\n names.forEach((name, i) => {\n scopeVariables[name] = item[i];\n });\n } else if (/^\\{.*\\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === \"object\") {\n let names = iteratorNames.item.replace(\"{\", \"\").replace(\"}\", \"\").split(\",\").map((i) => i.trim());\n names.forEach((name) => {\n scopeVariables[name] = item[name];\n });\n } else {\n scopeVariables[iteratorNames.item] = item;\n }\n if (iteratorNames.index)\n scopeVariables[iteratorNames.index] = index;\n if (iteratorNames.collection)\n scopeVariables[iteratorNames.collection] = items;\n return scopeVariables;\n}\nfunction isNumeric3(subject) {\n return !Array.isArray(subject) && !isNaN(subject);\n}\n\n// packages/alpinejs/src/directives/x-ref.js\nfunction handler3() {\n}\nhandler3.inline = (el, { expression }, { cleanup: cleanup2 }) => {\n let root = closestRoot(el);\n if (!root._x_refs)\n root._x_refs = {};\n root._x_refs[expression] = el;\n cleanup2(() => delete root._x_refs[expression]);\n};\ndirective(\"ref\", handler3);\n\n// packages/alpinejs/src/directives/x-if.js\ndirective(\"if\", (el, { expression }, { effect: effect3, cleanup: cleanup2 }) => {\n if (el.tagName.toLowerCase() !== \"template\")\n warn(\"x-if can only be used on a <template> tag\", el);\n let evaluate2 = evaluateLater(el, expression);\n let show = () => {\n if (el._x_currentIfEl)\n return el._x_currentIfEl;\n let clone2 = el.content.cloneNode(true).firstElementChild;\n addScopeToNode(clone2, {}, el);\n mutateDom(() => {\n el.after(clone2);\n skipDuringClone(() => initTree(clone2))();\n });\n el._x_currentIfEl = clone2;\n el._x_undoIf = () => {\n walk(clone2, (node) => {\n if (!!node._x_effects) {\n node._x_effects.forEach(dequeueJob);\n }\n });\n clone2.remove();\n delete el._x_currentIfEl;\n };\n return clone2;\n };\n let hide = () => {\n if (!el._x_undoIf)\n return;\n el._x_undoIf();\n delete el._x_undoIf;\n };\n effect3(() => evaluate2((value) => {\n value ? show() : hide();\n }));\n cleanup2(() => el._x_undoIf && el._x_undoIf());\n});\n\n// packages/alpinejs/src/directives/x-id.js\ndirective(\"id\", (el, { expression }, { evaluate: evaluate2 }) => {\n let names = evaluate2(expression);\n names.forEach((name) => setIdRoot(el, name));\n});\ninterceptClone((from, to) => {\n if (from._x_ids) {\n to._x_ids = from._x_ids;\n }\n});\n\n// packages/alpinejs/src/directives/x-on.js\nmapAttributes(startingWith(\"@\", into(prefix(\"on:\"))));\ndirective(\"on\", skipDuringClone((el, { value, modifiers, expression }, { cleanup: cleanup2 }) => {\n let evaluate2 = expression ? evaluateLater(el, expression) : () => {\n };\n if (el.tagName.toLowerCase() === \"template\") {\n if (!el._x_forwardEvents)\n el._x_forwardEvents = [];\n if (!el._x_forwardEvents.includes(value))\n el._x_forwardEvents.push(value);\n }\n let removeListener = on(el, value, modifiers, (e) => {\n evaluate2(() => {\n }, { scope: { \"$event\": e }, params: [e] });\n });\n cleanup2(() => removeListener());\n}));\n\n// packages/alpinejs/src/directives/index.js\nwarnMissingPluginDirective(\"Collapse\", \"collapse\", \"collapse\");\nwarnMissingPluginDirective(\"Intersect\", \"intersect\", \"intersect\");\nwarnMissingPluginDirective(\"Focus\", \"trap\", \"focus\");\nwarnMissingPluginDirective(\"Mask\", \"mask\", \"mask\");\nfunction warnMissingPluginDirective(name, directiveName, slug) {\n directive(directiveName, (el) => warn(`You can't use [x-${directiveName}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n\n// packages/alpinejs/src/index.js\nalpine_default.setEvaluator(normalEvaluator);\nalpine_default.setReactivityEngine({ reactive: reactive2, effect: effect2, release: stop, raw: toRaw });\nvar src_default = alpine_default;\n\n// packages/alpinejs/builds/module.js\nvar module_default = src_default;\nexport {\n src_default as Alpine,\n module_default as default\n};\n", "import Alpine from 'alpinejs'\n\nexport function generateEntangleFunction(component, cleanup) {\n if (! cleanup) cleanup = () => {}\n\n return (name, live = false) => {\n let isLive = live\n let livewireProperty = name\n let livewireComponent = component.$wire\n let livewirePropertyValue = livewireComponent.get(livewireProperty)\n\n let interceptor = Alpine.interceptor((initialValue, getter, setter, path, key) => {\n // Check to see if the Livewire property exists and if not log a console error\n // and return so everything else keeps running.\n if (typeof livewirePropertyValue === 'undefined') {\n console.error(`Livewire Entangle Error: Livewire property ['${livewireProperty}'] cannot be found on component: ['${component.name}']`)\n return\n }\n\n let release = Alpine.entangle({\n // Outer scope...\n get() {\n return livewireComponent.get(name)\n },\n set(value) {\n livewireComponent.set(name, value, isLive)\n }\n }, {\n // Inner scope...\n get() {\n return getter()\n },\n set(value) {\n setter(value)\n }\n })\n\n cleanup(() => release())\n\n return cloneIfObject(livewireComponent.get(name))\n }, obj => {\n Object.defineProperty(obj, 'live', {\n get() {\n isLive = true\n\n return obj\n }\n })\n })\n\n return interceptor(livewirePropertyValue)\n }\n}\n\nfunction cloneIfObject(value) {\n return typeof value === 'object'\n ? JSON.parse(JSON.stringify(value))\n : value\n}\n", "import { isFunction } from '@/utils'\n\n/**\n * Our internal event listener bus...\n */\nlet listeners = []\n\n/**\n * Register a callback to run when an event is triggered...\n */\nexport function on(name, callback) {\n if (! listeners[name]) listeners[name] = []\n\n listeners[name].push(callback)\n\n // Return an \"off\" callback to remove the listener...\n return () => {\n listeners[name] = listeners[name].filter(i => i !== callback)\n }\n}\n\n/**\n * In addition to triggering an event, this method allows you to\n * defer running callbacks returned from listeners and pass a\n * value through each one so they can act like middleware.\n *\n * An example of using this combination to the fullest:\n *\n * // First let's look at the triggering phase:\n * let finish = trigger([event name], ...[event params])\n *\n * return finish([pass-through value])\n *\n * // Now, let's look at the \"listening\" phase:\n * on([event name], (...[event params]) => {\n * // The contents of this callback will be run immediately on trigger.\n *\n * return ([pass-through value]) => {\n * // This callback will be run when \"finish()\" is called.\n *\n * // The [pass-through value] can be mutated and must\n * // be returned for the next callback to process.\n * return [pass-through value]\n * }\n * })\n */\nexport function trigger(name, ...params) {\n let callbacks = listeners[name] || []\n\n let finishers = []\n\n for (let i = 0; i < callbacks.length; i++) {\n let finisher = callbacks[i](...params)\n\n if (isFunction(finisher)) finishers.push(finisher)\n }\n\n return (result) => {\n return runFinishers(finishers, result)\n }\n}\n\nexport async function triggerAsync(name, ...params) {\n let callbacks = listeners[name] || []\n\n let finishers = []\n\n for (let i = 0; i < callbacks.length; i++) {\n let finisher = await callbacks[i](...params)\n\n if (isFunction(finisher)) finishers.push(finisher)\n }\n\n return (result) => {\n return runFinishers(finishers, result)\n }\n}\n\nexport function runFinishers(finishers, result)\n{\n let latest = result\n\n for (let i = 0; i < finishers.length; i++) {\n let iResult = finishers[i](latest)\n\n if (iResult !== undefined) {\n latest = iResult\n }\n }\n\n return latest\n}\n", "\n// This code and concept is all Jonathan Reinink - thanks main!\nexport function showHtmlModal(html) {\n let page = document.createElement('html')\n page.innerHTML = html\n page.querySelectorAll('a').forEach(a =>\n a.setAttribute('target', '_top')\n )\n\n let modal = document.getElementById('livewire-error')\n\n if (typeof modal != 'undefined' && modal != null) {\n // Modal already exists.\n modal.innerHTML = ''\n } else {\n modal = document.createElement('div')\n modal.id = 'livewire-error'\n modal.style.position = 'fixed'\n modal.style.width = '100vw'\n modal.style.height = '100vh'\n modal.style.padding = '50px'\n modal.style.backgroundColor = 'rgba(0, 0, 0, .6)'\n modal.style.zIndex = 200000\n }\n\n let iframe = document.createElement('iframe')\n iframe.style.backgroundColor = '#17161A'\n iframe.style.borderRadius = '5px'\n iframe.style.width = '100%'\n iframe.style.height = '100%'\n modal.appendChild(iframe)\n\n document.body.prepend(modal)\n document.body.style.overflow = 'hidden'\n iframe.contentWindow.document.open()\n iframe.contentWindow.document.write(page.outerHTML)\n iframe.contentWindow.document.close()\n\n // Close on click.\n modal.addEventListener('click', () => hideHtmlModal(modal))\n\n // Close on escape key press.\n modal.setAttribute('tabindex', 0)\n modal.addEventListener('keydown', e => {\n if (e.key === 'Escape') hideHtmlModal(modal)\n })\n modal.focus()\n}\n\nexport function hideHtmlModal(modal) {\n modal.outerHTML = ''\n document.body.style.overflow = 'visible'\n}\n", "import { sendRequest } from \"@/request\"\n\n/**\n * The RequestPool contains a list of commits to be sent to the server...\n */\nexport class RequestPool {\n constructor() {\n this.commits = new Set\n }\n\n add(commit) {\n this.commits.add(commit)\n }\n\n delete(commit) {\n this.commits.delete(commit)\n }\n\n hasCommitFor(component) {\n return !! this.findCommitByComponent(component)\n }\n\n findCommitByComponent(component) {\n // Determine if this pool already has a commit for this component...\n for (let [idx, commit] of this.commits.entries()) {\n if (commit.component === component) return commit\n }\n }\n\n // Determine if a commit should be added to this pool or isolated into its own...\n shouldHoldCommit(commit) {\n return ! commit.isolate\n }\n\n empty() {\n return this.commits.size === 0\n }\n\n async send() {\n this.prepare()\n\n // Send this pool of commits to the server and let the commits\n // Manage their own response actions...\n await sendRequest(this)\n }\n\n prepare() {\n // Give each commit a chance to do any last-minute prep\n // before being sent to the server.\n this.commits.forEach(i => i.prepare())\n }\n\n payload() {\n // Extract a request payload from each of the commits in this pool...\n let commitPayloads = []\n\n // Collect success and failure callbacks to be used inside aggregated callbacks...\n let successReceivers = []\n let failureReceivers = []\n\n this.commits.forEach(commit => {\n let [payload, succeed, fail] = commit.toRequestPayload()\n\n commitPayloads.push(payload)\n successReceivers.push(succeed)\n failureReceivers.push(fail)\n })\n\n // Aggregate the success and failure callbacks for individual commits\n // into something that can be called singularly...\n let succeed = components => successReceivers.forEach(receiver => receiver(components.shift()))\n\n let fail = () => failureReceivers.forEach(receiver => receiver())\n\n return [ commitPayloads, succeed, fail ]\n }\n}\n", "import { diff } from '@/utils'\nimport { on, trigger } from '@/hooks'\n\n/**\n * A commit represents an individual component updating itself server-side...\n */\nexport class Commit {\n constructor(component) {\n this.component = component\n this.isolate = false\n this.calls = []\n this.receivers = []\n this.resolvers = []\n }\n\n // Add a new resolver to be resolved when a commit is returned from the server...\n addResolver(resolver) {\n this.resolvers.push(resolver)\n }\n\n // Add a new action \"call\" to the commit payload...\n addCall(method, params, receiver) {\n this.calls.push({\n path: '', method, params,\n handleReturn(value) {\n receiver(value)\n },\n })\n }\n\n prepare() {\n trigger('commit.prepare', { component: this.component })\n }\n\n // Generate a JSON-friendly server-request payload...\n toRequestPayload() {\n // Generate a \"diff\" of the current last known server-side state, and\n // the new front-end state so that we can update the server atomically...\n let propertiesDiff = diff(this.component.canonical, this.component.ephemeral)\n\n let updates = this.component.mergeQueuedUpdates(propertiesDiff)\n\n let payload = {\n snapshot: this.component.snapshotEncoded,\n updates: updates,\n calls: this.calls.map(i => ({\n path: i.path,\n method: i.method,\n params: i.params,\n }))\n }\n\n // Store success and failure hooks from commit listeners\n // so they can be aggregated into a singular callback later...\n let succeedCallbacks = []\n let failCallbacks = []\n let respondCallbacks = []\n\n let succeed = (fwd) => succeedCallbacks.forEach(i => i(fwd))\n let fail = () => failCallbacks.forEach(i => i())\n let respond = () => respondCallbacks.forEach(i => i())\n\n // Allow other areas of the codebase to hook into the lifecycle\n // of an individual commit...\n let finishTarget = trigger('commit', {\n component: this.component,\n commit: payload,\n succeed: (callback) => {\n succeedCallbacks.push(callback)\n },\n fail: (callback) => {\n failCallbacks.push(callback)\n },\n respond: (callback) => {\n respondCallbacks.push(callback)\n },\n })\n\n // Handle the response payload for a commit...\n let handleResponse = (response) => {\n let { snapshot, effects } = response\n\n respond()\n\n // Take the new snapshot and merge it into the existing one...\n this.component.mergeNewSnapshot(snapshot, effects, updates)\n\n // Trigger any side effects from the payload like \"morph\" and \"dispatch event\"...\n this.component.processEffects(this.component.effects)\n\n if (effects['returns']) {\n let returns = effects['returns']\n\n // Here we'll match up returned values with their method call handlers. We need to build up\n // two \"stacks\" of the same length and walk through them together to handle them properly...\n let returnHandlerStack = this.calls.map(({ handleReturn }) => (handleReturn))\n\n returnHandlerStack.forEach((handleReturn, index) => {\n handleReturn(returns[index])\n })\n }\n\n let parsedSnapshot = JSON.parse(snapshot)\n\n finishTarget({ snapshot: parsedSnapshot, effects })\n\n this.resolvers.forEach(i => i())\n\n succeed(response)\n }\n\n let handleFailure = () => {\n respond()\n\n fail()\n }\n\n return [payload, handleResponse, handleFailure]\n }\n}\n", "import { trigger } from '@/hooks'\nimport { RequestPool } from './pool'\nimport { Commit } from './commit'\n\n/**\n * This bus manages the pooling of multiple commits and sending\n * those pools of commits to the server...\n */\nexport class CommitBus {\n constructor() {\n // A list of loose, un-pooled, commits ready to be pooled and sent to the server...\n this.commits = new Set\n\n // A list of commit pools currently out to the server...\n this.pools = new Set\n }\n\n add(component) {\n // If this component already has a commit, leave it, otherwise,\n // create a new commit and add it to the list...\n let commit = this.findCommitOr(component, () => {\n let newCommit = new Commit(component)\n\n this.commits.add(newCommit)\n\n return newCommit\n })\n\n // Buffer the sending of a pool for 5ms to account for UI interactions\n // that will trigger multiple events within a few milliseconds of each other.\n // For example, clicking on a button that both unfocuses a field and registers a mousedown...\n bufferPoolingForFiveMs(commit, () => {\n // If this commit is already in a pool, leave it be...\n let pool = this.findPoolWithComponent(commit.component)\n\n if (! pool) {\n // If it's not, create a new pool or add it to an existing one and trigger a network request...\n this.createAndSendNewPool()\n }\n })\n\n return commit\n }\n\n findCommitOr(component, callback) {\n for (let [idx, commit] of this.commits.entries()) {\n if (commit.component === component) {\n return commit\n }\n }\n\n return callback()\n }\n\n findPoolWithComponent(component) {\n for (let [idx, pool] of this.pools.entries()) {\n if (pool.hasCommitFor(component)) return pool\n }\n }\n\n createAndSendNewPool() {\n // Allow features like \"reactive properties\" to initiate associated\n // commits before those commits are pooled for a network request...\n trigger('commit.pooling', { commits: this.commits })\n\n // Split commits up across one or multiple pools to be sent as seperate network requests...\n let pools = this.corraleCommitsIntoPools()\n\n // Clear all commits in the queue now that they're in pools...\n this.commits.clear()\n\n trigger('commit.pooled', { pools })\n\n // Go through each pool and...\n pools.forEach(pool => {\n // Ignore empty pools (if other parts of the system have moved commits around different pools)...\n if (pool.empty()) return\n\n // Add it to the list of pending pools...\n this.pools.add(pool)\n\n // Send it's payload along to the server...\n pool.send().then(() => {\n // When it comes back, remove it from the list...\n this.pools.delete(pool)\n\n // Trigger another pooling phase in case commits have\n // been added while the current request was out...\n this.sendAnyQueuedCommits()\n })\n })\n }\n\n corraleCommitsIntoPools() {\n let pools = new Set\n\n // Go through each commit and assess wether it should be bundled\n // with other commits or sperated into it's own pool (network request)...\n for (let [idx, commit] of this.commits.entries()) {\n let hasFoundPool = false\n\n // If an existing pool wants to claim a commit, let it...\n pools.forEach(pool => {\n if (pool.shouldHoldCommit(commit)) {\n pool.add(commit)\n\n hasFoundPool = true\n }\n })\n\n // Otherwise, create a new pool and seed it with this commit...\n if (! hasFoundPool) {\n let newPool = new RequestPool\n\n newPool.add(commit)\n\n pools.add(newPool)\n }\n }\n\n return pools\n }\n\n sendAnyQueuedCommits() {\n if (this.commits.size > 0) {\n this.createAndSendNewPool()\n }\n }\n}\n\nlet buffersByCommit = new WeakMap\n\nfunction bufferPoolingForFiveMs(commit, callback) {\n if (buffersByCommit.has(commit)) return\n\n buffersByCommit.set(commit, setTimeout(() => {\n callback()\n\n buffersByCommit.delete(commit)\n }, 5))\n}\n", "import { getCsrfToken, contentIsFromDump, splitDumpFromContent, getUpdateUri } from '@/utils'\nimport { trigger, triggerAsync } from '@/hooks'\nimport { showHtmlModal } from './modal'\nimport { CommitBus } from './bus'\n\n/**\n * This is the bus that manages pooling and sending\n * commits to the server as network requests...\n */\nlet commitBus = new CommitBus\n\n/**\n * Create a commit and trigger a network request...\n */\nexport async function requestCommit(component) {\n let commit = commitBus.add(component)\n\n let promise = new Promise((resolve) => {\n commit.addResolver(resolve)\n })\n\n promise.commit = commit\n\n return promise\n}\n\n/**\n * Create a commit with an \"action\" call and trigger a network request...\n */\nexport async function requestCall(component, method, params) {\n let commit = commitBus.add(component)\n\n let promise = new Promise((resolve) => {\n commit.addCall(method, params, value => resolve(value))\n })\n\n promise.commit = commit\n\n return promise\n}\n\n/**\n * Send a pool of commits to the server over HTTP...\n */\nexport async function sendRequest(pool) {\n let [payload, handleSuccess, handleFailure] = pool.payload()\n\n let options = {\n method: 'POST',\n body: JSON.stringify({\n _token: getCsrfToken(),\n components: payload,\n }),\n headers: {\n 'Content-type': 'application/json',\n 'X-Livewire': '',\n },\n }\n\n let succeedCallbacks = []\n let failCallbacks = []\n let respondCallbacks = []\n\n let succeed = (fwd) => succeedCallbacks.forEach(i => i(fwd))\n let fail = (fwd) => failCallbacks.forEach(i => i(fwd))\n let respond = (fwd) => respondCallbacks.forEach(i => i(fwd))\n\n let finishProfile = trigger('request.profile', options)\n\n let updateUri = getUpdateUri()\n\n trigger('request', {\n url: updateUri,\n options,\n payload: options.body,\n respond: i => respondCallbacks.push(i),\n succeed: i => succeedCallbacks.push(i),\n fail: i => failCallbacks.push(i),\n })\n\n let response\n\n try {\n response = await fetch(updateUri, options)\n } catch (e) {\n // If something went wrong with the fetch (particularly\n // this would happen if the connection went offline)\n // fail with a 503 and allow Livewire to clean up\n\n finishProfile({ content: '{}', failed: true })\n\n handleFailure()\n\n fail({\n status: 503,\n content: null,\n preventDefault: () => {},\n })\n\n return\n }\n\n let mutableObject = {\n status: response.status,\n response,\n }\n\n respond(mutableObject)\n\n response = mutableObject.response\n\n let content = await response.text()\n\n // Handle error response...\n if (! response.ok) {\n finishProfile({ content: '{}', failed: true })\n\n let preventDefault = false\n\n handleFailure()\n\n fail({\n status: response.status,\n content,\n preventDefault: () => preventDefault = true,\n })\n\n if (preventDefault) return\n\n if (response.status === 419) {\n handlePageExpiry()\n }\n\n return showFailureModal(content)\n }\n\n /**\n * Sometimes a redirect happens on the backend outside of Livewire's control,\n * for example to a login page from a middleware, so we will just redirect\n * to that page.\n */\n if (response.redirected) {\n window.location.href = response.url\n }\n\n /**\n * Sometimes a response will be prepended with html to render a dump, so we\n * will seperate the dump html from Livewire's JSON response content and\n * render the dump in a modal and allow Livewire to continue with the\n * request.\n */\n if (contentIsFromDump(content)) {\n let dump\n [dump, content] = splitDumpFromContent(content)\n\n showHtmlModal(dump)\n\n finishProfile({ content: '{}', failed: true })\n } else {\n finishProfile({ content, failed: false })\n }\n\n let { components, assets } = JSON.parse(content)\n\n await triggerAsync('payload.intercept', { components, assets })\n\n await handleSuccess(components)\n\n succeed({ status: response.status, json: JSON.parse(content) })\n}\n\nfunction handlePageExpiry() {\n confirm(\n 'This page has expired.\\nWould you like to refresh the page?'\n ) && window.location.reload()\n}\n\nfunction showFailureModal(content) {\n let html = content\n\n showHtmlModal(html)\n}\n", "import { cancelUpload, removeUpload, upload, uploadMultiple } from './features/supportFileUploads'\nimport { dispatch, dispatchSelf, dispatchTo, listen } from '@/events'\nimport { generateEntangleFunction } from '@/features/supportEntangle'\nimport { closestComponent } from '@/store'\nimport { requestCommit, requestCall } from '@/request'\nimport { dataGet, dataSet } from '@/utils'\nimport Alpine from 'alpinejs'\n\nlet properties = {}\nlet fallback\n\nfunction wireProperty(name, callback, component = null) {\n properties[name] = callback\n}\n\nfunction wireFallback(callback) {\n fallback = callback\n}\n\n// For V2 backwards compatibility...\n// And I actually like both depending on the scenario...\nlet aliases = {\n 'on': '$on',\n 'el': '$el',\n 'id': '$id',\n 'get': '$get',\n 'set': '$set',\n 'call': '$call',\n 'commit': '$commit',\n 'watch': '$watch',\n 'entangle': '$entangle',\n 'dispatch': '$dispatch',\n 'dispatchTo': '$dispatchTo',\n 'dispatchSelf': '$dispatchSelf',\n 'upload': '$upload',\n 'uploadMultiple': '$uploadMultiple',\n 'removeUpload': '$removeUpload',\n 'cancelUpload': '$cancelUpload',\n}\n\nexport function generateWireObject(component, state) {\n return new Proxy({}, {\n get(target, property) {\n if (property === '__instance') return component\n\n if (property in aliases) {\n return getProperty(component, aliases[property])\n } else if (property in properties) {\n return getProperty(component, property)\n } else if (property in state) {\n return state[property]\n } else if (! ['then'].includes(property)) {\n return getFallback(component)(property)\n }\n },\n\n set(target, property, value) {\n if (property in state) {\n state[property] = value\n }\n\n return true\n },\n })\n}\n\nfunction getProperty(component, name) {\n return properties[name](component)\n}\n\nfunction getFallback(component) {\n return fallback(component)\n}\n\nAlpine.magic('wire', (el, { cleanup }) => {\n // Purposely initializing an empty variable here is a \"memo\"\n // so that a component is lazy-loaded when using $wire from Alpine...\n let component\n\n // Override $wire methods that need to be cleaned up when\n // and element is removed. For example, `x-data=\"{ foo: $wire.entangle(...) }\"`:\n // we would want the entangle effect freed if the element was removed from the DOM...\n return new Proxy({}, {\n get(target, property) {\n if (! component) component = closestComponent(el)\n\n if (['$entangle', 'entangle'].includes(property)) {\n return generateEntangleFunction(component, cleanup)\n }\n\n return component.$wire[property]\n },\n\n set(target, property, value) {\n if (! component) component = closestComponent(el)\n\n component.$wire[property] = value\n\n return true\n },\n })\n})\n\nwireProperty('__instance', (component) => component)\n\nwireProperty('$get', (component) => (property, reactive = true) => dataGet(reactive ? component.reactive : component.ephemeral, property))\n\nwireProperty('$el', (component) => {\n return component.el\n})\n\nwireProperty('$id', (component) => {\n return component.id\n})\n\nwireProperty('$set', (component) => async (property, value, live = true) => {\n dataSet(component.reactive, property, value)\n\n // If \"live\", send a request, queueing the property update to happen first\n // on the server, then trickle back down to the client and get merged...\n if (live) {\n component.queueUpdate(property, value)\n\n return await requestCommit(component)\n }\n\n return Promise.resolve()\n})\n\nwireProperty('$call', (component) => async (method, ...params) => {\n return await component.$wire[method](...params)\n})\n\nwireProperty('$entangle', (component) => (name, live = false) => {\n return generateEntangleFunction(component)(name, live)\n})\n\nwireProperty('$toggle', (component) => (name, live = true) => {\n return component.$wire.set(name, ! component.$wire.get(name), live)\n})\n\nwireProperty('$watch', (component) => (path, callback) => {\n let getter = () => {\n return dataGet(component.reactive, path)\n }\n\n let unwatch = Alpine.watch(getter, callback)\n\n component.addCleanup(unwatch)\n})\n\nwireProperty('$refresh', (component) => component.$wire.$commit)\nwireProperty('$commit', (component) => async () => await requestCommit(component))\n\nwireProperty('$on', (component) => (...params) => listen(component, ...params))\n\nwireProperty('$dispatch', (component) => (...params) => dispatch(component, ...params))\nwireProperty('$dispatchSelf', (component) => (...params) => dispatchSelf(component, ...params))\nwireProperty('$dispatchTo', () => (...params) => dispatchTo(...params))\nwireProperty('$upload', (component) => (...params) => upload(component, ...params))\nwireProperty('$uploadMultiple', (component) => (...params) => uploadMultiple(component, ...params))\nwireProperty('$removeUpload', (component) => (...params) => removeUpload(component, ...params))\nwireProperty('$cancelUpload', (component) => (...params) => cancelUpload(component, ...params))\n\nlet parentMemo = new WeakMap\n\nwireProperty('$parent', component => {\n if (parentMemo.has(component)) return parentMemo.get(component).$wire\n\n let parent = component.parent\n\n parentMemo.set(component, parent)\n\n return parent.$wire\n})\n\nlet overriddenMethods = new WeakMap\n\nexport function overrideMethod(component, method, callback) {\n if (! overriddenMethods.has(component)) {\n overriddenMethods.set(component, {})\n }\n\n let obj = overriddenMethods.get(component)\n\n obj[method] = callback\n\n overriddenMethods.set(component, obj)\n}\n\nwireFallback((component) => (property) => async (...params) => {\n // If this method is passed directly to a Vue or Alpine\n // event listener (@click=\"someMethod\") without using\n // parens, strip out the automatically added event.\n if (params.length === 1 && params[0] instanceof Event) {\n params = []\n }\n\n if (overriddenMethods.has(component)) {\n let overrides = overriddenMethods.get(component)\n\n if (typeof overrides[property] === 'function') {\n return overrides[property](params)\n }\n }\n\n return await requestCall(component, property, params)\n})\n", "import { dataSet, deepClone, diff, extractData} from '@/utils'\nimport { generateWireObject } from '@/$wire'\nimport { closestComponent, findComponent } from '@/store'\nimport { trigger } from '@/hooks'\n\nexport class Component {\n constructor(el) {\n if (el.__livewire) throw 'Component already initialized';\n\n el.__livewire = this\n\n this.el = el\n\n this.id = el.getAttribute('wire:id')\n\n this.__livewireId = this.id // @legacy\n\n this.snapshotEncoded = el.getAttribute('wire:snapshot')\n\n this.snapshot = JSON.parse(this.snapshotEncoded)\n\n if (! this.snapshot) {\n throw `Snapshot missing on Livewire component with id: ` + this.id\n }\n\n this.name = this.snapshot.memo.name\n\n this.effects = JSON.parse(el.getAttribute('wire:effects'))\n this.originalEffects = deepClone(this.effects)\n\n // \"canonical\" data represents the last known server state.\n this.canonical = extractData(deepClone(this.snapshot.data))\n // \"ephemeral\" represents the most current state. (This can be freely manipulated by end users)\n this.ephemeral = extractData(deepClone(this.snapshot.data))\n // \"reactive\" is just ephemeral, except when you mutate it, front-ends like Vue react.\n this.reactive = Alpine.reactive(this.ephemeral)\n\n this.queuedUpdates = {}\n\n // this.$wire = this.reactive\n this.$wire = generateWireObject(this, this.reactive)\n\n this.cleanups = []\n\n // Effects will be processed after every request, but we'll also handle them on initialization.\n this.processEffects(this.effects)\n }\n\n mergeNewSnapshot(snapshotEncoded, effects, updates = {}) {\n let snapshot = JSON.parse(snapshotEncoded)\n\n let oldCanonical = deepClone(this.canonical)\n let updatedOldCanonical = this.applyUpdates(oldCanonical, updates)\n\n let newCanonical = extractData(deepClone(snapshot.data))\n\n let dirty = diff(updatedOldCanonical, newCanonical)\n\n this.snapshotEncoded = snapshotEncoded\n\n this.snapshot = snapshot\n\n this.effects = effects\n\n this.canonical = extractData(deepClone(snapshot.data))\n\n let newData = extractData(deepClone(snapshot.data))\n\n Object.entries(dirty).forEach(([key, value]) => {\n let rootKey = key.split('.')[0]\n this.reactive[rootKey] = newData[rootKey]\n })\n // Object.entries(this.ephemeral).forEach(([key, value]) => {\n // if (! deeplyEqual(this.ephemeral[key], newData[key])) {\n // this.reactive[key] = newData[key]\n // }\n // })\n\n return dirty\n }\n\n queueUpdate(propertyName, value) {\n // These updates will be applied first on the server\n // on the next request, then trickle back to the\n // client on the next request that gets sent.\n this.queuedUpdates[propertyName] = value\n }\n\n mergeQueuedUpdates(diff) {\n // Before adding queuedUpdates into the diff list, we will remove any diffs\n // that will be overriden by the queued update. Queued updates will take\n // priority against ephemeral updates that have happend since them...\n Object.entries(this.queuedUpdates).forEach(([updateKey, updateValue]) => {\n Object.entries(diff).forEach(([diffKey, diffValue]) => {\n if (diffKey.startsWith(updateValue)) {\n delete diff[diffKey]\n }\n })\n\n diff[updateKey] = updateValue\n })\n\n this.queuedUpdates = []\n\n return diff\n }\n\n applyUpdates(object, updates) {\n for (let key in updates) {\n dataSet(object, key, updates[key])\n }\n\n return object\n }\n\n replayUpdate(snapshot, html) {\n let effects = { ...this.effects, html}\n\n this.mergeNewSnapshot(JSON.stringify(snapshot), effects)\n\n this.processEffects({ html })\n }\n\n /**\n * Here we'll take the new state and side effects from the\n * server and use them to update the existing data that\n * users interact with, triggering reactive effects.\n */\n processEffects(effects) {\n // This is for BC.\n trigger('effects', this, effects)\n\n trigger('effect', {\n component: this,\n effects,\n cleanup: i => this.addCleanup(i)\n })\n }\n\n get children() {\n let meta = this.snapshot.memo\n let childIds = Object.values(meta.children).map(i => i[1])\n\n return childIds.map(id => findComponent(id))\n }\n\n get parent() {\n return closestComponent(this.el.parentElement)\n }\n\n inscribeSnapshotAndEffectsOnElement() {\n let el = this.el\n\n el.setAttribute('wire:snapshot', this.snapshotEncoded)\n\n // We need to re-register any event listeners that were originally registered...\n let effects = this.originalEffects.listeners\n ? { listeners: this.originalEffects.listeners }\n : {}\n\n // We need to re-register any url/query-string bindings...\n if (this.originalEffects.url) {\n effects.url = this.originalEffects.url\n }\n\n // We need to re-register any scripts that were originally registered...\n if (this.originalEffects.scripts) {\n effects.scripts = this.originalEffects.scripts;\n }\n\n el.setAttribute('wire:effects', JSON.stringify(effects))\n }\n\n addCleanup(cleanup) {\n this.cleanups.push(cleanup)\n }\n\n cleanup() {\n delete this.el.__livewire\n\n while (this.cleanups.length > 0) {\n this.cleanups.pop()()\n }\n }\n}\n", "import { Component } from \"@/component\";\nimport { trigger } from \"@/hooks\";\n\nlet components = {}\n\nexport function initComponent(el) {\n let component = new Component(el)\n\n if (components[component.id]) throw 'Component already registered'\n\n let cleanup = (i) => component.addCleanup(i)\n\n trigger('component.init', { component, cleanup })\n\n components[component.id] = component\n\n return component\n}\n\nexport function destroyComponent(id) {\n let component = components[id]\n\n if (! component) return\n\n component.cleanup()\n\n delete components[id]\n}\n\nexport function hasComponent(id) {\n return !! components[id]\n}\n\nexport function findComponent(id) {\n let component = components[id]\n\n if (! component) throw 'Component not found: ' + id\n\n return component\n}\n\nexport function closestComponent(el, strict = true) {\n let closestRoot = Alpine.findClosest(el, i => i.__livewire)\n\n if (! closestRoot) {\n if (strict) throw \"Could not find Livewire component in DOM tree\"\n\n return\n }\n\n return closestRoot.__livewire\n}\n\nexport function componentsByName(name) {\n return Object.values(components).filter(component => {\n return name == component.name\n })\n}\n\nexport function getByName(name) {\n return componentsByName(name).map(i => i.$wire)\n}\n\nexport function find(id) {\n let component = components[id]\n\n return component && component.$wire\n}\n\nexport function first() {\n return Object.values(components)[0].$wire\n}\n\nexport function all() {\n return Object.values(components)\n}\n", "import { componentsByName } from \"@/store\"\n\nexport function dispatch(component, name, params) {\n dispatchEvent(component.el, name, params)\n}\n\nexport function dispatchGlobal(name, params) {\n dispatchEvent(window, name, params)\n}\n\nexport function dispatchSelf(component, name, params) {\n dispatchEvent(component.el, name, params, false)\n}\n\nexport function dispatchTo(componentName, name, params) {\n let targets = componentsByName(componentName)\n\n targets.forEach(target => {\n dispatchEvent(target.el, name, params, false)\n })\n}\n\nexport function listen(component, name, callback) {\n component.el.addEventListener(name, e => {\n callback(e.detail)\n })\n}\n\nexport function on(eventName, callback) {\n let handler = (e) => {\n // Implemented for backwards compatibility...\n if (! e.__livewire) return\n\n callback(e.detail)\n }\n\n window.addEventListener(eventName, handler)\n\n return () => {\n window.removeEventListener(eventName, handler)\n }\n}\n\nfunction dispatchEvent(target, name, params, bubbles = true) {\n let e = new CustomEvent(name, { bubbles, detail: params })\n\n e.__livewire = { name, params, receivedBy: [] }\n\n target.dispatchEvent(e)\n}\n", "import { on } from './hooks'\n\nlet customDirectiveNames = new Set\n\nexport function matchesForLivewireDirective(attributeName) {\n return attributeName.match(new RegExp('wire:'))\n}\n\nexport function extractDirective(el, name) {\n let [value, ...modifiers] = name.replace(new RegExp('wire:'), '').split('.')\n\n return new Directive(value, modifiers, name, el)\n}\n\nexport function directive(name, callback) {\n // Prevent the same directive from registering multiple initialization listeners...\n if (customDirectiveNames.has(name)) return\n\n customDirectiveNames.add(name)\n\n on('directive.init', ({ el, component, directive, cleanup }) => {\n if (directive.value === name) {\n callback({\n el, directive, component, $wire: component.$wire, cleanup\n })\n }\n })\n}\n\nexport function getDirectives(el) {\n return new DirectiveManager(el)\n}\n\nexport function customDirectiveHasBeenRegistered(name) {\n return customDirectiveNames.has(name)\n}\n\nclass DirectiveManager {\n constructor(el) {\n this.el = el\n this.directives = this.extractTypeModifiersAndValue()\n }\n\n all() {\n return this.directives\n }\n\n has(value) {\n return this.directives.map(directive => directive.value).includes(value)\n }\n\n missing(value) {\n return ! this.has(value)\n }\n\n get(value) {\n return this.directives.find(directive => directive.value === value)\n }\n\n extractTypeModifiersAndValue() {\n return Array.from(this.el.getAttributeNames()\n // Filter only the livewire directives.\n .filter(name => matchesForLivewireDirective(name))\n // Parse out the type, modifiers, and value from it.\n .map(name => extractDirective(this.el, name)))\n }\n}\n\nexport class Directive {\n constructor(value, modifiers, rawName, el) {\n this.rawName = this.raw = rawName\n this.el = el\n this.eventContext\n\n this.value = value\n this.modifiers = modifiers\n this.expression = this.el.getAttribute(this.rawName)\n }\n\n get method() {\n const { method } = this.parseOutMethodAndParams(this.expression)\n\n return method\n }\n\n get params() {\n const { params } = this.parseOutMethodAndParams(this.expression)\n\n return params\n }\n\n parseOutMethodAndParams(rawMethod) {\n let method = rawMethod\n let params = []\n const methodAndParamString = method.match(/(.*?)\\((.*)\\)/s)\n\n if (methodAndParamString) {\n method = methodAndParamString[1]\n\n // Use a function that returns it's arguments to parse and eval all params\n // This \"$event\" is for use inside the livewire event handler.\n let func = new Function('$event', `return (function () {\n for (var l=arguments.length, p=new Array(l), k=0; k<l; k++) {\n p[k] = arguments[k];\n }\n return [].concat(p);\n })(${methodAndParamString[2]})`)\n\n params = func(this.eventContext)\n }\n\n return { method, params }\n }\n}\n", "// packages/collapse/src/index.js\nfunction src_default(Alpine) {\n Alpine.directive(\"collapse\", collapse);\n collapse.inline = (el, { modifiers }) => {\n if (!modifiers.includes(\"min\"))\n return;\n el._x_doShow = () => {\n };\n el._x_doHide = () => {\n };\n };\n function collapse(el, { modifiers }) {\n let duration = modifierValue(modifiers, \"duration\", 250) / 1e3;\n let floor = modifierValue(modifiers, \"min\", 0);\n let fullyHide = !modifiers.includes(\"min\");\n if (!el._x_isShown)\n el.style.height = `${floor}px`;\n if (!el._x_isShown && fullyHide)\n el.hidden = true;\n if (!el._x_isShown)\n el.style.overflow = \"hidden\";\n let setFunction = (el2, styles) => {\n let revertFunction = Alpine.setStyles(el2, styles);\n return styles.height ? () => {\n } : revertFunction;\n };\n let transitionStyles = {\n transitionProperty: \"height\",\n transitionDuration: `${duration}s`,\n transitionTimingFunction: \"cubic-bezier(0.4, 0.0, 0.2, 1)\"\n };\n el._x_transition = {\n in(before = () => {\n }, after = () => {\n }) {\n if (fullyHide)\n el.hidden = false;\n if (fullyHide)\n el.style.display = null;\n let current = el.getBoundingClientRect().height;\n el.style.height = \"auto\";\n let full = el.getBoundingClientRect().height;\n if (current === full) {\n current = floor;\n }\n Alpine.transition(el, Alpine.setStyles, {\n during: transitionStyles,\n start: { height: current + \"px\" },\n end: { height: full + \"px\" }\n }, () => el._x_isShown = true, () => {\n if (Math.abs(el.getBoundingClientRect().height - full) < 1) {\n el.style.overflow = null;\n }\n });\n },\n out(before = () => {\n }, after = () => {\n }) {\n let full = el.getBoundingClientRect().height;\n Alpine.transition(el, setFunction, {\n during: transitionStyles,\n start: { height: full + \"px\" },\n end: { height: floor + \"px\" }\n }, () => el.style.overflow = \"hidden\", () => {\n el._x_isShown = false;\n if (el.style.height == `${floor}px` && fullyHide) {\n el.style.display = \"none\";\n el.hidden = true;\n }\n });\n }\n };\n }\n}\nfunction modifierValue(modifiers, key, fallback) {\n if (modifiers.indexOf(key) === -1)\n return fallback;\n const rawValue = modifiers[modifiers.indexOf(key) + 1];\n if (!rawValue)\n return fallback;\n if (key === \"duration\") {\n let match = rawValue.match(/([0-9]+)ms/);\n if (match)\n return match[1];\n }\n if (key === \"min\") {\n let match = rawValue.match(/([0-9]+)px/);\n if (match)\n return match[1];\n }\n return rawValue;\n}\n\n// packages/collapse/builds/module.js\nvar module_default = src_default;\nexport {\n src_default as collapse,\n module_default as default\n};\n", "// node_modules/tabbable/dist/index.esm.js\nvar candidateSelectors = [\"input\", \"select\", \"textarea\", \"a[href]\", \"button\", \"[tabindex]:not(slot)\", \"audio[controls]\", \"video[controls]\", '[contenteditable]:not([contenteditable=\"false\"])', \"details>summary:first-of-type\", \"details\"];\nvar candidateSelector = /* @__PURE__ */ candidateSelectors.join(\",\");\nvar NoElement = typeof Element === \"undefined\";\nvar matches = NoElement ? function() {\n} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function(element) {\n return element.getRootNode();\n} : function(element) {\n return element.ownerDocument;\n};\nvar getCandidates = function getCandidates2(el, includeContainer, filter) {\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\nvar getCandidatesIteratively = function getCandidatesIteratively2(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (element.tagName === \"SLOT\") {\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively2(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: nestedCandidates\n });\n }\n } else {\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n var shadowRoot = element.shadowRoot || // check for an undisclosed shadow\n typeof options.getShadowRoot === \"function\" && options.getShadowRoot(element);\n var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);\n if (shadowRoot && validShadowRoot) {\n var _nestedCandidates = getCandidatesIteratively2(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\nvar getTabindex = function getTabindex2(node, isScope) {\n if (node.tabIndex < 0) {\n if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute(\"tabindex\"), 10))) {\n return 0;\n }\n }\n return node.tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables2(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput2(node) {\n return node.tagName === \"INPUT\";\n};\nvar isHiddenInput = function isHiddenInput2(node) {\n return isInput(node) && node.type === \"hidden\";\n};\nvar isDetailsWithSummary = function isDetailsWithSummary2(node) {\n var r = node.tagName === \"DETAILS\" && Array.prototype.slice.apply(node.children).some(function(child) {\n return child.tagName === \"SUMMARY\";\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio2(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio2(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios2(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== \"undefined\" && typeof window.CSS !== \"undefined\" && typeof window.CSS.escape === \"function\") {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n console.error(\"Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s\", err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio2(node) {\n return isInput(node) && node.type === \"radio\";\n};\nvar isNonTabbableRadio = function isNonTabbableRadio2(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\nvar isZeroArea = function isZeroArea2(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(), width = _node$getBoundingClie.width, height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden2(node, _ref) {\n var displayCheck = _ref.displayCheck, getShadowRoot = _ref.getShadowRoot;\n if (getComputedStyle(node).visibility === \"hidden\") {\n return true;\n }\n var isDirectSummary = matches.call(node, \"details>summary:first-of-type\");\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, \"details:not([open]) *\")) {\n return true;\n }\n var nodeRootHost = getRootNode(node).host;\n var nodeIsAttached = (nodeRootHost === null || nodeRootHost === void 0 ? void 0 : nodeRootHost.ownerDocument.contains(nodeRootHost)) || node.ownerDocument.contains(node);\n if (!displayCheck || displayCheck === \"full\") {\n if (typeof getShadowRoot === \"function\") {\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true) {\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n node = rootNode.host;\n } else {\n node = parentElement;\n }\n }\n node = originalNode;\n }\n if (nodeIsAttached) {\n return !node.getClientRects().length;\n }\n } else if (displayCheck === \"non-zero-area\") {\n return isZeroArea(node);\n }\n return false;\n};\nvar isDisabledFromFieldset = function isDisabledFromFieldset2(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n while (parentNode) {\n if (parentNode.tagName === \"FIELDSET\" && parentNode.disabled) {\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n if (child.tagName === \"LEGEND\") {\n return matches.call(parentNode, \"fieldset[disabled] *\") ? true : !child.contains(node);\n }\n }\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable2(options, node) {\n if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable2(options, node) {\n if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable2(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute(\"tabindex\"), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n return false;\n};\nvar sortByOrder = function sortByOrder2(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function(item, i) {\n var isScope = !!item.scope;\n var element = isScope ? item.scope : item;\n var candidateTabindex = getTabindex(element, isScope);\n var elements = isScope ? sortByOrder2(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item,\n isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function(acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable2(el, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([el], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable2(el, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([el], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable2(node, options) {\n options = options || {};\n if (!node) {\n throw new Error(\"No node provided\");\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* @__PURE__ */ candidateSelectors.concat(\"iframe\").join(\",\");\nvar isFocusable = function isFocusable2(node, options) {\n options = options || {};\n if (!node) {\n throw new Error(\"No node provided\");\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\n// node_modules/focus-trap/dist/focus-trap.esm.js\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), true).forEach(function(key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nvar activeFocusTraps = function() {\n var trapQueue = [];\n return {\n activateTrap: function activateTrap(trap) {\n if (trapQueue.length > 0) {\n var activeTrap = trapQueue[trapQueue.length - 1];\n if (activeTrap !== trap) {\n activeTrap.pause();\n }\n }\n var trapIndex = trapQueue.indexOf(trap);\n if (trapIndex === -1) {\n trapQueue.push(trap);\n } else {\n trapQueue.splice(trapIndex, 1);\n trapQueue.push(trap);\n }\n },\n deactivateTrap: function deactivateTrap(trap) {\n var trapIndex = trapQueue.indexOf(trap);\n if (trapIndex !== -1) {\n trapQueue.splice(trapIndex, 1);\n }\n if (trapQueue.length > 0) {\n trapQueue[trapQueue.length - 1].unpause();\n }\n }\n };\n}();\nvar isSelectableInput = function isSelectableInput2(node) {\n return node.tagName && node.tagName.toLowerCase() === \"input\" && typeof node.select === \"function\";\n};\nvar isEscapeEvent = function isEscapeEvent2(e) {\n return e.key === \"Escape\" || e.key === \"Esc\" || e.keyCode === 27;\n};\nvar isTabEvent = function isTabEvent2(e) {\n return e.key === \"Tab\" || e.keyCode === 9;\n};\nvar delay = function delay2(fn) {\n return setTimeout(fn, 0);\n};\nvar findIndex = function findIndex2(arr, fn) {\n var idx = -1;\n arr.every(function(value, i) {\n if (fn(value)) {\n idx = i;\n return false;\n }\n return true;\n });\n return idx;\n};\nvar valueOrHandler = function valueOrHandler2(value) {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n return typeof value === \"function\" ? value.apply(void 0, params) : value;\n};\nvar getActualTarget = function getActualTarget2(event) {\n return event.target.shadowRoot && typeof event.composedPath === \"function\" ? event.composedPath()[0] : event.target;\n};\nvar createFocusTrap = function createFocusTrap2(elements, userOptions) {\n var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;\n var config = _objectSpread2({\n returnFocusOnDeactivate: true,\n escapeDeactivates: true,\n delayInitialFocus: true\n }, userOptions);\n var state = {\n // containers given to createFocusTrap()\n // @type {Array<HTMLElement>}\n containers: [],\n // list of objects identifying tabbable nodes in `containers` in the trap\n // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n // is active, but the trap should never get to a state where there isn't at least one group\n // with at least one tabbable node in it (that would lead to an error condition that would\n // result in an error being thrown)\n // @type {Array<{\n // container: HTMLElement,\n // tabbableNodes: Array<HTMLElement>, // empty if none\n // focusableNodes: Array<HTMLElement>, // empty if none\n // firstTabbableNode: HTMLElement|null,\n // lastTabbableNode: HTMLElement|null,\n // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n // }>}\n containerGroups: [],\n // same order/length as `containers` list\n // references to objects in `containerGroups`, but only those that actually have\n // tabbable nodes in them\n // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n // the same length\n tabbableGroups: [],\n nodeFocusedBeforeActivation: null,\n mostRecentlyFocusedNode: null,\n active: false,\n paused: false,\n // timer ID for when delayInitialFocus is true and initial focus in this trap\n // has been delayed during activation\n delayInitialFocusTimer: void 0\n };\n var trap;\n var getOption = function getOption2(configOverrideOptions, optionName, configOptionName) {\n return configOverrideOptions && configOverrideOptions[optionName] !== void 0 ? configOverrideOptions[optionName] : config[configOptionName || optionName];\n };\n var findContainerIndex = function findContainerIndex2(element) {\n return state.containerGroups.findIndex(function(_ref) {\n var container = _ref.container, tabbableNodes = _ref.tabbableNodes;\n return container.contains(element) || // fall back to explicit tabbable search which will take into consideration any\n // web components if the `tabbableOptions.getShadowRoot` option was used for\n // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n // look inside web components even if open)\n tabbableNodes.find(function(node) {\n return node === element;\n });\n });\n };\n var getNodeForOption = function getNodeForOption2(optionName) {\n var optionValue = config[optionName];\n if (typeof optionValue === \"function\") {\n for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n params[_key2 - 1] = arguments[_key2];\n }\n optionValue = optionValue.apply(void 0, params);\n }\n if (optionValue === true) {\n optionValue = void 0;\n }\n if (!optionValue) {\n if (optionValue === void 0 || optionValue === false) {\n return optionValue;\n }\n throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n }\n var node = optionValue;\n if (typeof optionValue === \"string\") {\n node = doc.querySelector(optionValue);\n if (!node) {\n throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n }\n }\n return node;\n };\n var getInitialFocusNode = function getInitialFocusNode2() {\n var node = getNodeForOption(\"initialFocus\");\n if (node === false) {\n return false;\n }\n if (node === void 0) {\n if (findContainerIndex(doc.activeElement) >= 0) {\n node = doc.activeElement;\n } else {\n var firstTabbableGroup = state.tabbableGroups[0];\n var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n node = firstTabbableNode || getNodeForOption(\"fallbackFocus\");\n }\n }\n if (!node) {\n throw new Error(\"Your focus-trap needs to have at least one focusable element\");\n }\n return node;\n };\n var updateTabbableNodes = function updateTabbableNodes2() {\n state.containerGroups = state.containers.map(function(container) {\n var tabbableNodes = tabbable(container, config.tabbableOptions);\n var focusableNodes = focusable(container, config.tabbableOptions);\n return {\n container,\n tabbableNodes,\n focusableNodes,\n firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,\n lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,\n /**\n * Finds the __tabbable__ node that follows the given node in the specified direction,\n * in this container, if any.\n * @param {HTMLElement} node\n * @param {boolean} [forward] True if going in forward tab order; false if going\n * in reverse.\n * @returns {HTMLElement|undefined} The next tabbable node, if any.\n */\n nextTabbableNode: function nextTabbableNode(node) {\n var forward = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;\n var nodeIdx = focusableNodes.findIndex(function(n) {\n return n === node;\n });\n if (nodeIdx < 0) {\n return void 0;\n }\n if (forward) {\n return focusableNodes.slice(nodeIdx + 1).find(function(n) {\n return isTabbable(n, config.tabbableOptions);\n });\n }\n return focusableNodes.slice(0, nodeIdx).reverse().find(function(n) {\n return isTabbable(n, config.tabbableOptions);\n });\n }\n };\n });\n state.tabbableGroups = state.containerGroups.filter(function(group) {\n return group.tabbableNodes.length > 0;\n });\n if (state.tabbableGroups.length <= 0 && !getNodeForOption(\"fallbackFocus\")) {\n throw new Error(\"Your focus-trap must have at least one container with at least one tabbable node in it at all times\");\n }\n };\n var tryFocus = function tryFocus2(node) {\n if (node === false) {\n return;\n }\n if (node === doc.activeElement) {\n return;\n }\n if (!node || !node.focus) {\n tryFocus2(getInitialFocusNode());\n return;\n }\n node.focus({\n preventScroll: !!config.preventScroll\n });\n state.mostRecentlyFocusedNode = node;\n if (isSelectableInput(node)) {\n node.select();\n }\n };\n var getReturnFocusNode = function getReturnFocusNode2(previousActiveElement) {\n var node = getNodeForOption(\"setReturnFocus\", previousActiveElement);\n return node ? node : node === false ? false : previousActiveElement;\n };\n var checkPointerDown = function checkPointerDown2(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target) >= 0) {\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n trap.deactivate({\n // if, on deactivation, we should return focus to the node originally-focused\n // when the trap was activated (or the configured `setReturnFocus` node),\n // then assume it's also OK to return focus to the outside node that was\n // just clicked, causing deactivation, as long as that node is focusable;\n // if it isn't focusable, then return focus to the original node focused\n // on activation (or the configured `setReturnFocus` node)\n // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n // which will result in the outside click setting focus to the node\n // that was clicked, whether it's focusable or not; by setting\n // `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n // on activation (or the configured `setReturnFocus` node)\n returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)\n });\n return;\n }\n if (valueOrHandler(config.allowOutsideClick, e)) {\n return;\n }\n e.preventDefault();\n };\n var checkFocusIn = function checkFocusIn2(e) {\n var target = getActualTarget(e);\n var targetContained = findContainerIndex(target) >= 0;\n if (targetContained || target instanceof Document) {\n if (targetContained) {\n state.mostRecentlyFocusedNode = target;\n }\n } else {\n e.stopImmediatePropagation();\n tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n }\n };\n var checkTab = function checkTab2(e) {\n var target = getActualTarget(e);\n updateTabbableNodes();\n var destinationNode = null;\n if (state.tabbableGroups.length > 0) {\n var containerIndex = findContainerIndex(target);\n var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : void 0;\n if (containerIndex < 0) {\n if (e.shiftKey) {\n destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;\n } else {\n destinationNode = state.tabbableGroups[0].firstTabbableNode;\n }\n } else if (e.shiftKey) {\n var startOfGroupIndex = findIndex(state.tabbableGroups, function(_ref2) {\n var firstTabbableNode = _ref2.firstTabbableNode;\n return target === firstTabbableNode;\n });\n if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {\n startOfGroupIndex = containerIndex;\n }\n if (startOfGroupIndex >= 0) {\n var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;\n var destinationGroup = state.tabbableGroups[destinationGroupIndex];\n destinationNode = destinationGroup.lastTabbableNode;\n }\n } else {\n var lastOfGroupIndex = findIndex(state.tabbableGroups, function(_ref3) {\n var lastTabbableNode = _ref3.lastTabbableNode;\n return target === lastTabbableNode;\n });\n if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {\n lastOfGroupIndex = containerIndex;\n }\n if (lastOfGroupIndex >= 0) {\n var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;\n var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];\n destinationNode = _destinationGroup.firstTabbableNode;\n }\n }\n } else {\n destinationNode = getNodeForOption(\"fallbackFocus\");\n }\n if (destinationNode) {\n e.preventDefault();\n tryFocus(destinationNode);\n }\n };\n var checkKey = function checkKey2(e) {\n if (isEscapeEvent(e) && valueOrHandler(config.escapeDeactivates, e) !== false) {\n e.preventDefault();\n trap.deactivate();\n return;\n }\n if (isTabEvent(e)) {\n checkTab(e);\n return;\n }\n };\n var checkClick = function checkClick2(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target) >= 0) {\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n return;\n }\n if (valueOrHandler(config.allowOutsideClick, e)) {\n return;\n }\n e.preventDefault();\n e.stopImmediatePropagation();\n };\n var addListeners = function addListeners2() {\n if (!state.active) {\n return;\n }\n activeFocusTraps.activateTrap(trap);\n state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function() {\n tryFocus(getInitialFocusNode());\n }) : tryFocus(getInitialFocusNode());\n doc.addEventListener(\"focusin\", checkFocusIn, true);\n doc.addEventListener(\"mousedown\", checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener(\"touchstart\", checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener(\"click\", checkClick, {\n capture: true,\n passive: false\n });\n doc.addEventListener(\"keydown\", checkKey, {\n capture: true,\n passive: false\n });\n return trap;\n };\n var removeListeners = function removeListeners2() {\n if (!state.active) {\n return;\n }\n doc.removeEventListener(\"focusin\", checkFocusIn, true);\n doc.removeEventListener(\"mousedown\", checkPointerDown, true);\n doc.removeEventListener(\"touchstart\", checkPointerDown, true);\n doc.removeEventListener(\"click\", checkClick, true);\n doc.removeEventListener(\"keydown\", checkKey, true);\n return trap;\n };\n trap = {\n get active() {\n return state.active;\n },\n get paused() {\n return state.paused;\n },\n activate: function activate(activateOptions) {\n if (state.active) {\n return this;\n }\n var onActivate = getOption(activateOptions, \"onActivate\");\n var onPostActivate = getOption(activateOptions, \"onPostActivate\");\n var checkCanFocusTrap = getOption(activateOptions, \"checkCanFocusTrap\");\n if (!checkCanFocusTrap) {\n updateTabbableNodes();\n }\n state.active = true;\n state.paused = false;\n state.nodeFocusedBeforeActivation = doc.activeElement;\n if (onActivate) {\n onActivate();\n }\n var finishActivation = function finishActivation2() {\n if (checkCanFocusTrap) {\n updateTabbableNodes();\n }\n addListeners();\n if (onPostActivate) {\n onPostActivate();\n }\n };\n if (checkCanFocusTrap) {\n checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);\n return this;\n }\n finishActivation();\n return this;\n },\n deactivate: function deactivate(deactivateOptions) {\n if (!state.active) {\n return this;\n }\n var options = _objectSpread2({\n onDeactivate: config.onDeactivate,\n onPostDeactivate: config.onPostDeactivate,\n checkCanReturnFocus: config.checkCanReturnFocus\n }, deactivateOptions);\n clearTimeout(state.delayInitialFocusTimer);\n state.delayInitialFocusTimer = void 0;\n removeListeners();\n state.active = false;\n state.paused = false;\n activeFocusTraps.deactivateTrap(trap);\n var onDeactivate = getOption(options, \"onDeactivate\");\n var onPostDeactivate = getOption(options, \"onPostDeactivate\");\n var checkCanReturnFocus = getOption(options, \"checkCanReturnFocus\");\n var returnFocus = getOption(options, \"returnFocus\", \"returnFocusOnDeactivate\");\n if (onDeactivate) {\n onDeactivate();\n }\n var finishDeactivation = function finishDeactivation2() {\n delay(function() {\n if (returnFocus) {\n tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n }\n if (onPostDeactivate) {\n onPostDeactivate();\n }\n });\n };\n if (returnFocus && checkCanReturnFocus) {\n checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);\n return this;\n }\n finishDeactivation();\n return this;\n },\n pause: function pause() {\n if (state.paused || !state.active) {\n return this;\n }\n state.paused = true;\n removeListeners();\n return this;\n },\n unpause: function unpause() {\n if (!state.paused || !state.active) {\n return this;\n }\n state.paused = false;\n updateTabbableNodes();\n addListeners();\n return this;\n },\n updateContainerElements: function updateContainerElements(containerElements) {\n var elementsAsArray = [].concat(containerElements).filter(Boolean);\n state.containers = elementsAsArray.map(function(element) {\n return typeof element === \"string\" ? doc.querySelector(element) : element;\n });\n if (state.active) {\n updateTabbableNodes();\n }\n return this;\n }\n };\n trap.updateContainerElements(elements);\n return trap;\n};\n\n// packages/focus/src/index.js\nfunction src_default(Alpine) {\n let lastFocused;\n let currentFocused;\n window.addEventListener(\"focusin\", () => {\n lastFocused = currentFocused;\n currentFocused = document.activeElement;\n });\n Alpine.magic(\"focus\", (el) => {\n let within = el;\n return {\n __noscroll: false,\n __wrapAround: false,\n within(el2) {\n within = el2;\n return this;\n },\n withoutScrolling() {\n this.__noscroll = true;\n return this;\n },\n noscroll() {\n this.__noscroll = true;\n return this;\n },\n withWrapAround() {\n this.__wrapAround = true;\n return this;\n },\n wrap() {\n return this.withWrapAround();\n },\n focusable(el2) {\n return isFocusable(el2);\n },\n previouslyFocused() {\n return lastFocused;\n },\n lastFocused() {\n return lastFocused;\n },\n focused() {\n return currentFocused;\n },\n focusables() {\n if (Array.isArray(within))\n return within;\n return focusable(within, { displayCheck: \"none\" });\n },\n all() {\n return this.focusables();\n },\n isFirst(el2) {\n let els = this.all();\n return els[0] && els[0].isSameNode(el2);\n },\n isLast(el2) {\n let els = this.all();\n return els.length && els.slice(-1)[0].isSameNode(el2);\n },\n getFirst() {\n return this.all()[0];\n },\n getLast() {\n return this.all().slice(-1)[0];\n },\n getNext() {\n let list = this.all();\n let current = document.activeElement;\n if (list.indexOf(current) === -1)\n return;\n if (this.__wrapAround && list.indexOf(current) === list.length - 1) {\n return list[0];\n }\n return list[list.indexOf(current) + 1];\n },\n getPrevious() {\n let list = this.all();\n let current = document.activeElement;\n if (list.indexOf(current) === -1)\n return;\n if (this.__wrapAround && list.indexOf(current) === 0) {\n return list.slice(-1)[0];\n }\n return list[list.indexOf(current) - 1];\n },\n first() {\n this.focus(this.getFirst());\n },\n last() {\n this.focus(this.getLast());\n },\n next() {\n this.focus(this.getNext());\n },\n previous() {\n this.focus(this.getPrevious());\n },\n prev() {\n return this.previous();\n },\n focus(el2) {\n if (!el2)\n return;\n setTimeout(() => {\n if (!el2.hasAttribute(\"tabindex\"))\n el2.setAttribute(\"tabindex\", \"0\");\n el2.focus({ preventScroll: this.__noscroll });\n });\n }\n };\n });\n Alpine.directive(\"trap\", Alpine.skipDuringClone(\n (el, { expression, modifiers }, { effect, evaluateLater, cleanup }) => {\n let evaluator = evaluateLater(expression);\n let oldValue = false;\n let options = {\n escapeDeactivates: false,\n allowOutsideClick: true,\n fallbackFocus: () => el\n };\n if (modifiers.includes(\"noautofocus\")) {\n options.initialFocus = false;\n } else {\n let autofocusEl = el.querySelector(\"[autofocus]\");\n if (autofocusEl)\n options.initialFocus = autofocusEl;\n }\n let trap = createFocusTrap(el, options);\n let undoInert = () => {\n };\n let undoDisableScrolling = () => {\n };\n const releaseFocus = () => {\n undoInert();\n undoInert = () => {\n };\n undoDisableScrolling();\n undoDisableScrolling = () => {\n };\n trap.deactivate({\n returnFocus: !modifiers.includes(\"noreturn\")\n });\n };\n effect(() => evaluator((value) => {\n if (oldValue === value)\n return;\n if (value && !oldValue) {\n if (modifiers.includes(\"noscroll\"))\n undoDisableScrolling = disableScrolling();\n if (modifiers.includes(\"inert\"))\n undoInert = setInert(el);\n setTimeout(() => {\n trap.activate();\n }, 15);\n }\n if (!value && oldValue) {\n releaseFocus();\n }\n oldValue = !!value;\n }));\n cleanup(releaseFocus);\n },\n // When cloning, we only want to add aria-hidden attributes to the\n // DOM and not try to actually trap, as trapping can mess with the\n // live DOM and isn't just isolated to the cloned DOM.\n (el, { expression, modifiers }, { evaluate }) => {\n if (modifiers.includes(\"inert\") && evaluate(expression))\n setInert(el);\n }\n ));\n}\nfunction setInert(el) {\n let undos = [];\n crawlSiblingsUp(el, (sibling) => {\n let cache = sibling.hasAttribute(\"aria-hidden\");\n sibling.setAttribute(\"aria-hidden\", \"true\");\n undos.push(() => cache || sibling.removeAttribute(\"aria-hidden\"));\n });\n return () => {\n while (undos.length)\n undos.pop()();\n };\n}\nfunction crawlSiblingsUp(el, callback) {\n if (el.isSameNode(document.body) || !el.parentNode)\n return;\n Array.from(el.parentNode.children).forEach((sibling) => {\n if (sibling.isSameNode(el)) {\n crawlSiblingsUp(el.parentNode, callback);\n } else {\n callback(sibling);\n }\n });\n}\nfunction disableScrolling() {\n let overflow = document.documentElement.style.overflow;\n let paddingRight = document.documentElement.style.paddingRight;\n let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n document.documentElement.style.overflow = \"hidden\";\n document.documentElement.style.paddingRight = `${scrollbarWidth}px`;\n return () => {\n document.documentElement.style.overflow = overflow;\n document.documentElement.style.paddingRight = paddingRight;\n };\n}\n\n// packages/focus/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default,\n src_default as focus\n};\n/*! Bundled license information:\n\ntabbable/dist/index.esm.js:\n (*!\n * tabbable 5.3.3\n * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n *)\n\nfocus-trap/dist/focus-trap.esm.js:\n (*!\n * focus-trap 6.9.4\n * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE\n *)\n*/\n", "// packages/persist/src/index.js\nfunction src_default(Alpine) {\n let persist = () => {\n let alias;\n let storage;\n try {\n storage = localStorage;\n } catch (e) {\n console.error(e);\n console.warn(\"Alpine: $persist is using temporary storage since localStorage is unavailable.\");\n let dummy = /* @__PURE__ */ new Map();\n storage = {\n getItem: dummy.get.bind(dummy),\n setItem: dummy.set.bind(dummy)\n };\n }\n return Alpine.interceptor((initialValue, getter, setter, path, key) => {\n let lookup = alias || `_x_${path}`;\n let initial = storageHas(lookup, storage) ? storageGet(lookup, storage) : initialValue;\n setter(initial);\n Alpine.effect(() => {\n let value = getter();\n storageSet(lookup, value, storage);\n setter(value);\n });\n return initial;\n }, (func) => {\n func.as = (key) => {\n alias = key;\n return func;\n }, func.using = (target) => {\n storage = target;\n return func;\n };\n });\n };\n Object.defineProperty(Alpine, \"$persist\", { get: () => persist() });\n Alpine.magic(\"persist\", persist);\n Alpine.persist = (key, { get, set }, storage = localStorage) => {\n let initial = storageHas(key, storage) ? storageGet(key, storage) : get();\n set(initial);\n Alpine.effect(() => {\n let value = get();\n storageSet(key, value, storage);\n set(value);\n });\n };\n}\nfunction storageHas(key, storage) {\n return storage.getItem(key) !== null;\n}\nfunction storageGet(key, storage) {\n let value = storage.getItem(key, storage);\n if (value === void 0)\n return;\n return JSON.parse(value);\n}\nfunction storageSet(key, value, storage) {\n storage.setItem(key, JSON.stringify(value));\n}\n\n// packages/persist/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default,\n src_default as persist\n};\n", "// packages/intersect/src/index.js\nfunction src_default(Alpine) {\n Alpine.directive(\"intersect\", Alpine.skipDuringClone((el, { value, expression, modifiers }, { evaluateLater, cleanup }) => {\n let evaluate = evaluateLater(expression);\n let options = {\n rootMargin: getRootMargin(modifiers),\n threshold: getThreshold(modifiers)\n };\n let observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting === (value === \"leave\"))\n return;\n evaluate();\n modifiers.includes(\"once\") && observer.disconnect();\n });\n }, options);\n observer.observe(el);\n cleanup(() => {\n observer.disconnect();\n });\n }));\n}\nfunction getThreshold(modifiers) {\n if (modifiers.includes(\"full\"))\n return 0.99;\n if (modifiers.includes(\"half\"))\n return 0.5;\n if (!modifiers.includes(\"threshold\"))\n return 0;\n let threshold = modifiers[modifiers.indexOf(\"threshold\") + 1];\n if (threshold === \"100\")\n return 1;\n if (threshold === \"0\")\n return 0;\n return Number(`.${threshold}`);\n}\nfunction getLengthValue(rawValue) {\n let match = rawValue.match(/^(-?[0-9]+)(px|%)?$/);\n return match ? match[1] + (match[2] || \"px\") : void 0;\n}\nfunction getRootMargin(modifiers) {\n const key = \"margin\";\n const fallback = \"0px 0px 0px 0px\";\n const index = modifiers.indexOf(key);\n if (index === -1)\n return fallback;\n let values = [];\n for (let i = 1; i < 5; i++) {\n values.push(getLengthValue(modifiers[index + i] || \"\"));\n }\n values = values.filter((v) => v !== void 0);\n return values.length ? values.join(\" \").trim() : fallback;\n}\n\n// packages/intersect/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default,\n src_default as intersect\n};\n", "// node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs\nvar min = Math.min;\nvar max = Math.max;\nvar round = Math.round;\nvar floor = Math.floor;\nvar createCoords = (v) => ({\n x: v,\n y: v\n});\nvar oppositeSideMap = {\n left: \"right\",\n right: \"left\",\n bottom: \"top\",\n top: \"bottom\"\n};\nvar oppositeAlignmentMap = {\n start: \"end\",\n end: \"start\"\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === \"function\" ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split(\"-\")[0];\n}\nfunction getAlignment(placement) {\n return placement.split(\"-\")[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === \"x\" ? \"y\" : \"x\";\n}\nfunction getAxisLength(axis) {\n return axis === \"y\" ? \"height\" : \"width\";\n}\nfunction getSideAxis(placement) {\n return [\"top\", \"bottom\"].includes(getSide(placement)) ? \"y\" : \"x\";\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === \"x\" ? alignment === (rtl ? \"end\" : \"start\") ? \"right\" : \"left\" : alignment === \"start\" ? \"bottom\" : \"top\";\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = [\"left\", \"right\"];\n const rl = [\"right\", \"left\"];\n const tb = [\"top\", \"bottom\"];\n const bt = [\"bottom\", \"top\"];\n switch (side) {\n case \"top\":\n case \"bottom\":\n if (rtl)\n return isStart ? rl : lr;\n return isStart ? lr : rl;\n case \"left\":\n case \"right\":\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === \"start\", rtl);\n if (alignment) {\n list = list.map((side) => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== \"number\" ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\n// node_modules/@floating-ui/core/dist/floating-ui.core.mjs\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === \"y\";\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case \"top\":\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case \"bottom\":\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case \"right\":\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case \"left\":\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case \"start\":\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case \"end\":\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\nvar computePosition = async (reference, floating, config) => {\n const {\n placement = \"bottom\",\n strategy = \"absolute\",\n middleware = [],\n platform: platform2\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));\n let rects = await platform2.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: platform2,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === \"object\") {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform2.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n continue;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform: platform2,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = \"clippingAncestors\",\n rootBoundary = \"viewport\",\n elementContext = \"floating\",\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === \"floating\" ? \"reference\" : \"floating\";\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform2.getClippingRect({\n element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === \"floating\" ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));\n const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\nvar flip = function(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: \"flip\",\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform: platform2,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = \"bestFit\",\n fallbackAxisSideDirection = \"none\",\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== \"none\") {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements2 = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides2 = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides2[0]], overflow[sides2[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n if (!overflows.every((side2) => side2 <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements2[nextIndex];\n if (nextPlacement) {\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case \"bestFit\": {\n var _overflowsData$map$so;\n const placement2 = (_overflowsData$map$so = overflowsData.map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement2) {\n resetPlacement = placement2;\n }\n break;\n }\n case \"initialPlacement\":\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform: platform2,\n elements\n } = state;\n const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === \"y\";\n const mainAxisMulti = [\"left\", \"top\"].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === \"number\" ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === \"number\") {\n crossAxis = alignment === \"end\" ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\nvar offset = function(options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: \"offset\",\n options,\n async fn(state) {\n const {\n x,\n y\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: diffCoords\n };\n }\n };\n};\nvar shift = function(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: \"shift\",\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: (_ref) => {\n let {\n x: x2,\n y: y2\n } = _ref;\n return {\n x: x2,\n y: y2\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === \"y\" ? \"top\" : \"left\";\n const maxSide = mainAxis === \"y\" ? \"bottom\" : \"right\";\n const min2 = mainAxisCoord + overflow[minSide];\n const max2 = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min2, mainAxisCoord, max2);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === \"y\" ? \"top\" : \"left\";\n const maxSide = crossAxis === \"y\" ? \"bottom\" : \"right\";\n const min2 = crossAxisCoord + overflow[minSide];\n const max2 = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min2, crossAxisCoord, max2);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n\n// node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || \"\").toLowerCase();\n }\n return \"#document\";\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (typeof ShadowRoot === \"undefined\") {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && ![\"inline\", \"contents\"].includes(display);\n}\nfunction isTableElement(element) {\n return [\"table\", \"td\", \"th\"].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n return css.transform !== \"none\" || css.perspective !== \"none\" || (css.containerType ? css.containerType !== \"normal\" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== \"none\" : false) || !webkit && (css.filter ? css.filter !== \"none\" : false) || [\"transform\", \"perspective\", \"filter\"].some((value) => (css.willChange || \"\").includes(value)) || [\"paint\", \"layout\", \"strict\", \"content\"].some((value) => (css.contain || \"\").includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === \"undefined\" || !CSS.supports)\n return false;\n return CSS.supports(\"-webkit-backdrop-filter\", \"none\");\n}\nfunction isLastTraversableNode(node) {\n return [\"html\", \"body\", \"#document\"].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === \"html\") {\n return node;\n }\n const result = (\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot || // DOM Element detected.\n node.parentNode || // ShadowRoot detected.\n isShadowRoot(node) && node.host || // Fallback.\n getDocumentElement(node)\n );\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\n// node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\nvar noOffsets = /* @__PURE__ */ createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentIFrame = win.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== win) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentIFrame = getWindow(currentIFrame).frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n if (offsetParent === documentElement) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== \"fixed\") {\n if (getNodeName(offsetParent) !== \"body\" || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\nfunction getWindowScrollBarX(element) {\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === \"rtl\") {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === \"fixed\") {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === \"fixed\");\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === \"viewport\") {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === \"document\") {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === \"fixed\" || hasFixedPositionAncestor(parentNode, stopNode);\n}\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== \"body\");\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === \"fixed\";\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === \"fixed\") {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === \"static\" && !!currentContainingBlockComputedStyle && [\"absolute\", \"fixed\"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n result = result.filter((ancestor) => ancestor !== currentNode);\n } else {\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === \"clippingAncestors\" ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\nfunction getDimensions(element) {\n return getCssDimensions(element);\n}\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === \"fixed\";\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== \"body\" || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === \"fixed\") {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\nfunction getOffsetParent(element, polyfill) {\n const window2 = getWindow(element);\n if (!isHTMLElement(element)) {\n return window2;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === \"static\") {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === \"html\" || getNodeName(offsetParent) === \"body\" && getComputedStyle(offsetParent).position === \"static\" && !isContainingBlock(offsetParent))) {\n return window2;\n }\n return offsetParent || getContainingBlock(element) || window2;\n}\nvar getElementRects = async function(_ref) {\n let {\n reference,\n floating,\n strategy\n } = _ref;\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),\n floating: {\n x: 0,\n y: 0,\n ...await getDimensionsFn(floating)\n }\n };\n};\nfunction isRTL(element) {\n return getComputedStyle(element).direction === \"rtl\";\n}\nvar platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n clearTimeout(timeoutId);\n io && io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === \"function\",\n layoutShift = typeof IntersectionObserver === \"function\",\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];\n ancestors.forEach((ancestor) => {\n ancestorScroll && ancestor.addEventListener(\"scroll\", update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener(\"resize\", update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver((_ref) => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n resizeObserver && resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n ancestors.forEach((ancestor) => {\n ancestorScroll && ancestor.removeEventListener(\"scroll\", update);\n ancestorResize && ancestor.removeEventListener(\"resize\", update);\n });\n cleanupIo && cleanupIo();\n resizeObserver && resizeObserver.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\nvar computePosition2 = (reference, floating, options) => {\n const cache = /* @__PURE__ */ new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\n// packages/anchor/src/index.js\nfunction src_default(Alpine) {\n Alpine.magic(\"anchor\", (el) => {\n if (!el._x_anchor)\n throw \"Alpine: No x-anchor directive found on element using $anchor...\";\n return el._x_anchor;\n });\n Alpine.interceptClone((from, to) => {\n if (from && from._x_anchor && !to._x_anchor) {\n to._x_anchor = from._x_anchor;\n }\n });\n Alpine.directive(\"anchor\", Alpine.skipDuringClone(\n (el, { expression, modifiers, value }, { cleanup, evaluate: evaluate2 }) => {\n let { placement, offsetValue, unstyled } = getOptions(modifiers);\n el._x_anchor = Alpine.reactive({ x: 0, y: 0 });\n let reference = evaluate2(expression);\n if (!reference)\n throw \"Alpine: no element provided to x-anchor...\";\n let compute = () => {\n let previousValue;\n computePosition2(reference, el, {\n placement,\n middleware: [flip(), shift({ padding: 5 }), offset(offsetValue)]\n }).then(({ x, y }) => {\n unstyled || setStyles(el, x, y);\n if (JSON.stringify({ x, y }) !== previousValue) {\n el._x_anchor.x = x;\n el._x_anchor.y = y;\n }\n previousValue = JSON.stringify({ x, y });\n });\n };\n let release = autoUpdate(reference, el, () => compute());\n cleanup(() => release());\n },\n // When cloning (or \"morphing\"), we will graft the style and position data from the live tree...\n (el, { expression, modifiers, value }, { cleanup, evaluate: evaluate2 }) => {\n let { placement, offsetValue, unstyled } = getOptions(modifiers);\n if (el._x_anchor) {\n unstyled || setStyles(el, el._x_anchor.x, el._x_anchor.y);\n }\n }\n ));\n}\nfunction setStyles(el, x, y) {\n Object.assign(el.style, {\n left: x + \"px\",\n top: y + \"px\",\n position: \"absolute\"\n });\n}\nfunction getOptions(modifiers) {\n let positions = [\"top\", \"top-start\", \"top-end\", \"right\", \"right-start\", \"right-end\", \"bottom\", \"bottom-start\", \"bottom-end\", \"left\", \"left-start\", \"left-end\"];\n let placement = positions.find((i) => modifiers.includes(i));\n let offsetValue = 0;\n if (modifiers.includes(\"offset\")) {\n let idx = modifiers.findIndex((i) => i === \"offset\");\n offsetValue = modifiers[idx + 1] !== void 0 ? Number(modifiers[idx + 1]) : offsetValue;\n }\n let unstyled = modifiers.includes(\"no-style\");\n return { placement, offsetValue, unstyled };\n}\n\n// packages/anchor/builds/module.js\nvar module_default = src_default;\nexport {\n src_default as anchor,\n module_default as default\n};\n", "\nclass Snapshot {\n constructor(url, html) {\n this.url = url\n this.html = html\n }\n}\n\nlet snapshotCache = {\n currentKey: null,\n currentUrl: null,\n keys: [],\n lookup: {},\n\n limit: 10,\n\n has(location) {\n return this.lookup[location] !== undefined\n },\n\n retrieve(location) {\n let snapshot = this.lookup[location]\n\n if (snapshot === undefined)\n throw (\n 'No back button cache found for current location: ' +\n location\n )\n\n return snapshot\n },\n\n replace(key, snapshot) {\n if (this.has(key)) {\n this.lookup[key] = snapshot\n } else {\n this.push(key, snapshot)\n }\n },\n\n push(key, snapshot) {\n this.lookup[key] = snapshot\n\n let index = this.keys.indexOf(key)\n\n if (index > -1) this.keys.splice(index, 1)\n\n this.keys.unshift(key)\n\n this.trim()\n },\n\n trim() {\n for (let key of this.keys.splice(this.limit)) {\n delete this.lookup[key]\n }\n }\n}\n\nexport function updateCurrentPageHtmlInHistoryStateForLaterBackButtonClicks() {\n // Create a history state entry for the initial page load.\n // (This is so later hitting back can restore this page).\n let url = new URL(window.location.href, document.baseURI)\n\n replaceUrl(url, document.documentElement.outerHTML)\n}\n\nexport function updateCurrentPageHtmlInSnapshotCacheForLaterBackButtonClicks(key, url) {\n let html = document.documentElement.outerHTML\n\n snapshotCache.replace(key, new Snapshot(url, html))\n}\n\nexport function whenTheBackOrForwardButtonIsClicked(\n registerFallback,\n handleHtml\n) {\n let fallback\n\n registerFallback(i => (fallback = i))\n\n window.addEventListener('popstate', e => {\n let state = e.state || {}\n\n let alpine = state.alpine || {}\n\n // If state is an empty object, then the popstate has probably been triggered\n // by anchor tags `#my-heading`, so we don't want to handle them.\n if (Object.keys(state).length === 0) return\n\n if (! alpine.snapshotIdx) return\n\n if (snapshotCache.has(alpine.snapshotIdx)) {\n let snapshot = snapshotCache.retrieve(alpine.snapshotIdx)\n\n handleHtml(snapshot.html, snapshot.url, snapshotCache.currentUrl, snapshotCache.currentKey)\n } else {\n fallback(alpine.url)\n }\n })\n}\n\nexport function updateUrlAndStoreLatestHtmlForFutureBackButtons(\n html,\n destination\n) {\n pushUrl(destination, html)\n}\n\nexport function pushUrl(url, html) {\n updateUrl('pushState', url, html)\n}\n\nexport function replaceUrl(url, html) {\n updateUrl('replaceState', url, html)\n}\n\nfunction updateUrl(method, url, html) {\n let key = url.toString() + '-' + Math.random()\n\n method === 'pushState'\n ? snapshotCache.push(key, new Snapshot(url, html))\n : snapshotCache.replace(key = (snapshotCache.currentKey ?? key), new Snapshot(url, html))\n\n let state = history.state || {}\n\n if (!state.alpine) state.alpine = {}\n\n state.alpine.snapshotIdx = key\n state.alpine.url = url.toString()\n\n try {\n // 640k character limit:\n history[method](state, JSON.stringify(document.title), url)\n\n snapshotCache.currentKey = key\n snapshotCache.currentUrl = url\n } catch (error) {\n if (error instanceof DOMException && error.name === 'SecurityError') {\n console.error(\n \"Livewire: You can't use wire:navigate with a link to a different root domain: \" +\n url\n )\n }\n\n console.error(error)\n }\n}\n", "\nexport function whenThisLinkIsPressed(el, callback) {\n let isProgrammaticClick = e => ! e.isTrusted\n let isNotPlainLeftClick = e => (e.which > 1) || (e.altKey) || (e.ctrlKey) || (e.metaKey) || (e.shiftKey)\n let isNotPlainEnterKey = (e) => (e.which !== 13) || (e.altKey) || (e.ctrlKey) || (e.metaKey) || (e.shiftKey)\n\n el.addEventListener('click', e => {\n // This allows programmatic clicking of links via: `$0.click()`...\n if (isProgrammaticClick(e)) {\n e.preventDefault()\n\n callback(whenReleased => whenReleased())\n\n return\n }\n\n // This allows cmd+click and such to still work as expected...\n if (isNotPlainLeftClick(e)) return;\n\n // If it's a plain left click, we want to prevent \"click\" and let \"mouseup\" do its thing...\n e.preventDefault()\n })\n\n el.addEventListener('mousedown', e => {\n // We only care about left clicks for wire:navigate...\n if (isNotPlainLeftClick(e)) return;\n\n e.preventDefault()\n\n callback((whenReleased) => {\n let handler = e => {\n e.preventDefault()\n\n whenReleased()\n\n el.removeEventListener('mouseup', handler)\n }\n\n el.addEventListener('mouseup', handler)\n })\n })\n\n el.addEventListener(\"keydown\", e => {\n // We only care about the enter key...\n if (isNotPlainEnterKey(e)) return;\n\n e.preventDefault()\n\n callback(whenReleased => whenReleased())\n })\n}\n\nexport function whenThisLinkIsHoveredFor(el, ms = 60, callback) {\n el.addEventListener('mouseenter', e => {\n let timeout = setTimeout(() => {\n callback(e)\n }, ms)\n\n let handler = () => {\n clearTimeout(timeout)\n el.removeEventListener('mouseleave', handler)\n }\n\n el.addEventListener('mouseleave', handler)\n })\n}\n\nexport function extractDestinationFromLink(linkEl) {\n return createUrlObjectFromString(linkEl.getAttribute('href'))\n}\n\nexport function createUrlObjectFromString(urlString) {\n return new URL(urlString, document.baseURI)\n}\n\nexport function getUriStringFromUrlObject(urlObject) {\n return urlObject.pathname + urlObject.search + urlObject.hash\n}\n", "import { trigger } from \"@/hooks\"\nimport { createUrlObjectFromString, getUriStringFromUrlObject } from \"./links\"\n\nexport function fetchHtml(destination, callback) {\n let uri = getUriStringFromUrlObject(destination)\n\n performFetch(uri, (html, finalDestination) => {\n callback(html, finalDestination)\n })\n}\n\nexport function performFetch(uri, callback) {\n let options = {\n headers: {\n 'X-Livewire-Navigate': ''\n }\n }\n\n trigger('navigate.request', {\n url: uri,\n options,\n })\n\n let finalDestination\n\n fetch(uri, options).then(response => {\n let destination = createUrlObjectFromString(uri)\n finalDestination = createUrlObjectFromString(response.url)\n\n // If there was no redirect triggered by the URL that was fetched...\n if ((destination.pathname + destination.search) === (finalDestination.pathname + finalDestination.search)) {\n // Then let's cary over any \"hash\" entries on the URL.\n // We have to do this because hashes aren't sent to\n // the server by \"fetch\", so it needs to get added\n finalDestination.hash = destination.hash\n }\n\n return response.text()\n }).then(html => {\n callback(html, finalDestination)\n });\n}\n", "import { performFetch } from \"@/plugins/navigate/fetch\";\nimport { getUriStringFromUrlObject } from \"./links\";\n\n// Warning: this could cause some memory leaks\nlet prefetches = {}\n\nexport function prefetchHtml(destination, callback) {\n let uri = getUriStringFromUrlObject(destination)\n\n if (prefetches[uri]) return\n\n prefetches[uri] = { finished: false, html: null, whenFinished: () => {} }\n\n performFetch(uri, (html, routedUri) => {\n callback(html, routedUri)\n })\n}\n\nexport function storeThePrefetchedHtmlForWhenALinkIsClicked(html, destination, finalDestination) {\n let state = prefetches[getUriStringFromUrlObject(destination)]\n state.html = html\n state.finished = true\n state.finalDestination = finalDestination\n state.whenFinished()\n}\n\nexport function getPretchedHtmlOr(destination, receive, ifNoPrefetchExists) {\n let uri = getUriStringFromUrlObject(destination)\n\n if (! prefetches[uri]) return ifNoPrefetchExists()\n\n if (prefetches[uri].finished) {\n let html = prefetches[uri].html\n let finalDestination = prefetches[uri].finalDestination\n\n delete prefetches[uri]\n\n return receive(html, finalDestination)\n } else {\n prefetches[uri].whenFinished = () => {\n let html = prefetches[uri].html\n let finalDestination = prefetches[uri].finalDestination\n\n delete prefetches[uri]\n\n receive(html, finalDestination)\n }\n }\n}\n\n", "import Alpine from \"alpinejs\"\n\nexport function packUpPersistedTeleports(persistedEl) {\n // Persisted elements get removed from the DOM and then re-added later. We need to do the same\n // with any `x-teleport`ed elements...\n Alpine.mutateDom(() => {\n persistedEl.querySelectorAll('[data-teleport-template]').forEach(i => i._x_teleport.remove())\n })\n}\n\nexport function removeAnyLeftOverStaleTeleportTargets(body) {\n // We need to remove any left-over teleported elements form the page\n // as they are stale and will be re-initialized when Alpine boots up on this page...\n Alpine.mutateDom(() => {\n body.querySelectorAll('[data-teleport-target]').forEach(i => i.remove())\n })\n}\n\nexport function unPackPersistedTeleports(persistedEl) {\n // Before we put back any persisted elements, we're going to\n // find any \"x-teleports\" and put their targets back on the page...\n Alpine.walk(persistedEl, (el, skip) => {\n if (! el._x_teleport) return;\n\n el._x_teleportPutBack()\n\n skip()\n })\n}\n\nexport function isTeleportTarget(el) {\n return el.hasAttribute('data-teleport-target')\n}\n", "\nexport function storeScrollInformationInHtmlBeforeNavigatingAway() {\n document.body.setAttribute('data-scroll-x', document.body.scrollLeft)\n document.body.setAttribute('data-scroll-y', document.body.scrollTop)\n\n document.querySelectorAll(['[x-navigate\\\\:scroll]', '[wire\\\\:scroll]']).forEach(el => {\n el.setAttribute('data-scroll-x', el.scrollLeft)\n el.setAttribute('data-scroll-y', el.scrollTop)\n })\n}\n\nexport function restoreScrollPositionOrScrollToTop() {\n let scroll = el => {\n if (! el.hasAttribute('data-scroll-x')) {\n window.scrollTo({ top: 0, left: 0, behavior: 'instant' })\n } else {\n el.scrollTo({\n top: Number(el.getAttribute('data-scroll-y')),\n left: Number(el.getAttribute('data-scroll-x')),\n behavior: 'instant',\n })\n el.removeAttribute('data-scroll-x')\n el.removeAttribute('data-scroll-y')\n }\n }\n\n queueMicrotask(() => {\n scroll(document.body)\n\n document.querySelectorAll(['[x-navigate\\\\:scroll]', '[wire\\\\:scroll]']).forEach(scroll)\n })\n}\n", "import Alpine from 'alpinejs'\n\nlet els = {}\n\nexport function storePersistantElementsForLater(callback) {\n els = {}\n\n document.querySelectorAll('[x-persist]').forEach(i => {\n els[i.getAttribute('x-persist')] = i\n\n callback(i)\n\n Alpine.mutateDom(() => {\n i.remove()\n })\n })\n}\n\nexport function putPersistantElementsBack(callback) {\n let usedPersists = []\n\n document.querySelectorAll('[x-persist]').forEach(i => {\n let old = els[i.getAttribute('x-persist')]\n\n // There might be a brand new x-persist element...\n if (! old) return\n\n usedPersists.push(i.getAttribute('x-persist'))\n\n old._x_wasPersisted = true\n\n callback(old, i)\n\n Alpine.mutateDom(() => {\n i.replaceWith(old)\n })\n })\n\n Object.entries(els).forEach(([key, el]) => {\n if (usedPersists.includes(key)) return\n\n // Destory the un-used persist DOM trees before releasing them...\n Alpine.destroyTree(el)\n })\n\n // Release unused persists for garbage collection...\n els = {}\n}\n\nexport function isPersistedElement(el) {\n return el.hasAttribute('x-persist')\n}\n", "import NProgress from 'nprogress'\nimport { getNonce } from '@/utils'\n\nNProgress.configure({\n minimum: 0.1,\n trickleSpeed: 200,\n showSpinner: false,\n parent: 'body',\n})\n\ninjectStyles()\n\nlet inProgress = false\n\nexport function showAndStartProgressBar() {\n inProgress = true\n\n // Only show progress bar if it's been a little bit...\n setTimeout(() => {\n if (! inProgress) return\n\n NProgress.start()\n }, 150)\n}\n\nexport function finishAndHideProgressBar() {\n inProgress = false\n\n NProgress.done()\n}\n\nexport function removeAnyLeftOverStaleProgressBars() {\n NProgress.remove()\n}\n\nfunction injectStyles() {\n let style = document.createElement('style')\n\n style.innerHTML = `/* Make clicks pass-through */\n\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: var(--livewire-progress-bar-color, #29d);\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n }\n\n /* Fancy blur effect */\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px var(--livewire-progress-bar-color, #29d), 0 0 5px var(--livewire-progress-bar-color, #29d);\n opacity: 1.0;\n\n -webkit-transform: rotate(3deg) translate(0px, -4px);\n -ms-transform: rotate(3deg) translate(0px, -4px);\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n /* Remove these to get rid of the spinner */\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: var(--livewire-progress-bar-color, #29d);\n border-left-color: var(--livewire-progress-bar-color, #29d);\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% { -webkit-transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); }\n }\n @keyframes nprogress-spinner {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n `\n\n let nonce = getNonce()\n\n if (nonce) style.nonce = nonce\n\n document.head.appendChild(style)\n}\n", "let oldBodyScriptTagHashes = []\n\nlet attributesExemptFromScriptTagHashing = [\n 'data-csrf',\n 'aria-hidden',\n]\n\nexport function swapCurrentPageWithNewHtml(html, andThen) {\n let newDocument = (new DOMParser()).parseFromString(html, \"text/html\")\n let newBody = document.adoptNode(newDocument.body)\n let newHead = document.adoptNode(newDocument.head)\n\n oldBodyScriptTagHashes = oldBodyScriptTagHashes.concat(Array.from(document.body.querySelectorAll('script')).map(i => {\n return simpleHash(ignoreAttributes(i.outerHTML, attributesExemptFromScriptTagHashing))\n }))\n\n let afterRemoteScriptsHaveLoaded = () => {}\n\n mergeNewHead(newHead).finally(() => {\n afterRemoteScriptsHaveLoaded()\n })\n\n prepNewBodyScriptTagsToRun(newBody, oldBodyScriptTagHashes)\n\n let oldBody = document.body\n\n document.body.replaceWith(newBody)\n\n Alpine.destroyTree(oldBody)\n\n andThen(i => afterRemoteScriptsHaveLoaded = i)\n}\n\nfunction prepNewBodyScriptTagsToRun(newBody, oldBodyScriptTagHashes) {\n newBody.querySelectorAll('script').forEach(i => {\n // We don't want to re-run script tags marked as \"data-navigate-once\"...\n if (i.hasAttribute('data-navigate-once')) {\n // However, if they didn't exist on the previous page, we do.\n // Therefore, we'll check the \"old body script hashes\" to\n // see if it was already there before skipping it...\n\n let hash = simpleHash(\n ignoreAttributes(i.outerHTML, attributesExemptFromScriptTagHashing)\n )\n\n if (oldBodyScriptTagHashes.includes(hash)) return\n }\n\n i.replaceWith(cloneScriptTag(i))\n })\n}\n\nfunction mergeNewHead(newHead) {\n let children = Array.from(document.head.children)\n let headChildrenHtmlLookup = children.map(i => i.outerHTML)\n\n // Only add scripts and styles that aren't already loaded on the page.\n let garbageCollector = document.createDocumentFragment()\n\n let touchedHeadElements = []\n\n let remoteScriptsPromises = []\n\n for (let child of Array.from(newHead.children)) {\n if (isAsset(child)) {\n if (! headChildrenHtmlLookup.includes(child.outerHTML)) {\n if (isTracked(child)) {\n if (ifTheQueryStringChangedSinceLastRequest(child, children)) {\n setTimeout(() => window.location.reload())\n }\n }\n\n if (isScript(child)) {\n try {\n remoteScriptsPromises.push(\n injectScriptTagAndWaitForItToFullyLoad(\n cloneScriptTag(child)\n )\n )\n } catch (error) {\n // Let's eat any promise rejects so that we don't\n // break the rest of the Alpine intializing...\n // Any errors triggered by adding the script tag to the page\n // will still be thrown...\n }\n } else {\n document.head.appendChild(child)\n }\n } else {\n garbageCollector.appendChild(child)\n }\n\n touchedHeadElements.push(child)\n }\n }\n\n // Remove any assets that aren't on the new page...\n // @todo: Re-enable this code and find a better way to managed injected stylesheets. See livewire/livewire#6824\n // for (let child of Array.from(document.head.children)) {\n // if (isAsset(child)) {\n // if (! touchedHeadElements.some(i => i.outerHTML === child.outerHTML)) {\n // child.remove()\n // }\n // }\n // }\n\n // How to free up the garbage collector?\n\n // Remove existing non-asset elements like meta, base, title, template.\n for (let child of Array.from(document.head.children)) {\n if (! isAsset(child)) child.remove()\n }\n\n // Add new non-asset elements left over in the new head element.\n for (let child of Array.from(newHead.children)) {\n document.head.appendChild(child)\n }\n\n return Promise.all(remoteScriptsPromises)\n}\n\nasync function injectScriptTagAndWaitForItToFullyLoad(script) {\n return new Promise((resolve, reject) => {\n // Script assets need to be loaded synchronously so that scripts have\n // their global variables available...\n if (script.src) {\n script.onload = () => resolve()\n script.onerror = () => reject()\n } else {\n resolve()\n }\n\n document.head.appendChild(script)\n })\n}\n\nfunction cloneScriptTag(el) {\n let script = document.createElement('script')\n\n script.textContent = el.textContent\n script.async = el.async\n\n for (let attr of el.attributes) {\n script.setAttribute(attr.name, attr.value)\n }\n\n return script\n}\n\nfunction isTracked(el) {\n return el.hasAttribute('data-navigate-track')\n}\n\nfunction ifTheQueryStringChangedSinceLastRequest(el, currentHeadChildren) {\n let [uri, queryString] = extractUriAndQueryString(el)\n\n return currentHeadChildren.some(child => {\n if (! isTracked(child)) return false\n\n let [currentUri, currentQueryString] = extractUriAndQueryString(child)\n\n // Only consider a data-navigate-track element changed if the query string has changed (not the URI)...\n if (currentUri === uri && queryString !== currentQueryString) return true\n })\n}\n\nfunction extractUriAndQueryString(el) {\n let url = isScript(el) ? el.src : el.href\n\n return url.split('?')\n}\n\nfunction isAsset(el) {\n return (el.tagName.toLowerCase() === 'link' && el.getAttribute('rel').toLowerCase() === 'stylesheet')\n || el.tagName.toLowerCase() === 'style'\n || el.tagName.toLowerCase() === 'script'\n}\n\nfunction isScript(el) {\n return el.tagName.toLowerCase() === 'script'\n}\n\nfunction simpleHash(str) {\n return str.split('').reduce((a, b) => {\n a = ((a << 5) - a) + b.charCodeAt(0)\n\n return a & a\n }, 0);\n}\n\nfunction ignoreAttributes(subject, attributesToRemove) {\n let result = subject\n\n attributesToRemove.forEach(attr => {\n // Create a regex pattern to match the attribute and its value.\n // The regex handles attributes that have values surrounded by either single or double quotes.\n const regex = new RegExp(`${attr}=\"[^\"]*\"|${attr}='[^']*'`, 'g')\n\n result = result.replace(regex, '')\n })\n\n // Remove all whitespace to make things less flaky...\n result = result.replaceAll(' ', '')\n\n return result.trim()\n}\n", "import { replaceUrl, updateCurrentPageHtmlInHistoryStateForLaterBackButtonClicks, updateCurrentPageHtmlInSnapshotCacheForLaterBackButtonClicks, updateUrlAndStoreLatestHtmlForFutureBackButtons, whenTheBackOrForwardButtonIsClicked } from \"./history\"\nimport { getPretchedHtmlOr, prefetchHtml, storeThePrefetchedHtmlForWhenALinkIsClicked } from \"./prefetch\"\nimport { createUrlObjectFromString, extractDestinationFromLink, whenThisLinkIsHoveredFor, whenThisLinkIsPressed } from \"./links\"\nimport { isTeleportTarget, packUpPersistedTeleports, removeAnyLeftOverStaleTeleportTargets, unPackPersistedTeleports } from \"./teleport\"\nimport { restoreScrollPositionOrScrollToTop, storeScrollInformationInHtmlBeforeNavigatingAway } from \"./scroll\"\nimport { isPersistedElement, putPersistantElementsBack, storePersistantElementsForLater } from \"./persist\"\nimport { finishAndHideProgressBar, removeAnyLeftOverStaleProgressBars, showAndStartProgressBar } from \"./bar\"\nimport { swapCurrentPageWithNewHtml } from \"./page\"\nimport { fetchHtml } from \"./fetch\"\n\nlet enablePersist = true\nlet showProgressBar = true\nlet restoreScroll = true\nlet autofocus = false\n\nexport default function (Alpine) {\n\n Alpine.navigate = (url) => {\n let destination = createUrlObjectFromString(url)\n\n let prevented = fireEventForOtherLibariesToHookInto('alpine:navigate', {\n url: destination, history: false, cached: false,\n })\n\n if (prevented) return\n\n navigateTo(destination)\n }\n\n Alpine.navigate.disableProgressBar = () => {\n showProgressBar = false\n }\n\n Alpine.addInitSelector(() => `[${Alpine.prefixed('navigate')}]`)\n\n Alpine.directive('navigate', (el, { modifiers }) => {\n let shouldPrefetchOnHover = modifiers.includes('hover')\n\n shouldPrefetchOnHover && whenThisLinkIsHoveredFor(el, 60, () => {\n let destination = extractDestinationFromLink(el)\n\n prefetchHtml(destination, (html, finalDestination) => {\n storeThePrefetchedHtmlForWhenALinkIsClicked(html, destination, finalDestination)\n })\n })\n\n whenThisLinkIsPressed(el, (whenItIsReleased) => {\n let destination = extractDestinationFromLink(el)\n\n prefetchHtml(destination, (html, finalDestination) => {\n storeThePrefetchedHtmlForWhenALinkIsClicked(html, destination, finalDestination)\n })\n\n whenItIsReleased(() => {\n let prevented = fireEventForOtherLibariesToHookInto('alpine:navigate', {\n url: destination, history: false, cached: false,\n })\n\n if (prevented) return\n\n navigateTo(destination);\n })\n })\n })\n\n function navigateTo(destination, shouldPushToHistoryState = true) {\n showProgressBar && showAndStartProgressBar()\n\n fetchHtmlOrUsePrefetchedHtml(destination, (html, finalDestination) => {\n fireEventForOtherLibariesToHookInto('alpine:navigating')\n\n restoreScroll && storeScrollInformationInHtmlBeforeNavigatingAway()\n\n showProgressBar && finishAndHideProgressBar()\n\n cleanupAlpineElementsOnThePageThatArentInsideAPersistedElement()\n\n updateCurrentPageHtmlInHistoryStateForLaterBackButtonClicks()\n\n preventAlpineFromPickingUpDomChanges(Alpine, andAfterAllThis => {\n enablePersist && storePersistantElementsForLater(persistedEl => {\n packUpPersistedTeleports(persistedEl)\n })\n\n if (shouldPushToHistoryState) {\n updateUrlAndStoreLatestHtmlForFutureBackButtons(html, finalDestination)\n } else {\n replaceUrl(finalDestination, html)\n }\n\n swapCurrentPageWithNewHtml(html, (afterNewScriptsAreDoneLoading) => {\n removeAnyLeftOverStaleTeleportTargets(document.body)\n\n enablePersist && putPersistantElementsBack((persistedEl, newStub) => {\n unPackPersistedTeleports(persistedEl)\n })\n\n restoreScrollPositionOrScrollToTop()\n\n afterNewScriptsAreDoneLoading(() => {\n andAfterAllThis(() => {\n setTimeout(() => {\n autofocus && autofocusElementsWithTheAutofocusAttribute()\n })\n\n nowInitializeAlpineOnTheNewPage(Alpine)\n\n fireEventForOtherLibariesToHookInto('alpine:navigated')\n })\n })\n })\n })\n })\n }\n\n whenTheBackOrForwardButtonIsClicked(\n (ifThePageBeingVisitedHasntBeenCached) => {\n ifThePageBeingVisitedHasntBeenCached((url) => {\n let destination = createUrlObjectFromString(url)\n\n let prevented = fireEventForOtherLibariesToHookInto('alpine:navigate', {\n url: destination, history: true, cached: false,\n })\n\n if (prevented) return\n\n let shouldPushToHistoryState = false\n\n navigateTo(destination, shouldPushToHistoryState)\n })\n },\n (html, url, currentPageUrl, currentPageKey) => {\n let destination = createUrlObjectFromString(url)\n\n let prevented = fireEventForOtherLibariesToHookInto('alpine:navigate', {\n url: destination, history: true, cached: true,\n })\n\n if (prevented) return\n\n // @todo: see if there's a way to update the current HTML BEFORE\n // the back button is hit, and not AFTER:\n storeScrollInformationInHtmlBeforeNavigatingAway()\n\n // This ensures the current HTML has the latest snapshot\n fireEventForOtherLibariesToHookInto('alpine:navigating')\n\n // Only update the snapshot and not the history state as the history state\n // has already changed to the new page due to the popstate event\n updateCurrentPageHtmlInSnapshotCacheForLaterBackButtonClicks(currentPageUrl, currentPageKey)\n\n preventAlpineFromPickingUpDomChanges(Alpine, andAfterAllThis => {\n enablePersist && storePersistantElementsForLater(persistedEl => {\n packUpPersistedTeleports(persistedEl)\n })\n\n swapCurrentPageWithNewHtml(html, () => {\n removeAnyLeftOverStaleProgressBars()\n\n removeAnyLeftOverStaleTeleportTargets(document.body)\n\n enablePersist && putPersistantElementsBack((persistedEl, newStub) => {\n unPackPersistedTeleports(persistedEl)\n })\n\n restoreScrollPositionOrScrollToTop()\n\n andAfterAllThis(() => {\n autofocus && autofocusElementsWithTheAutofocusAttribute()\n\n nowInitializeAlpineOnTheNewPage(Alpine)\n\n fireEventForOtherLibariesToHookInto('alpine:navigated')\n })\n })\n })\n },\n )\n\n // Because DOMContentLoaded is fired on first load,\n // we should fire alpine:navigated as a replacement as well...\n setTimeout(() => {\n fireEventForOtherLibariesToHookInto('alpine:navigated')\n })\n}\n\nfunction fetchHtmlOrUsePrefetchedHtml(fromDestination, callback) {\n getPretchedHtmlOr(fromDestination, callback, () => {\n fetchHtml(fromDestination, callback)\n })\n}\n\nfunction preventAlpineFromPickingUpDomChanges(Alpine, callback) {\n Alpine.stopObservingMutations()\n\n callback((afterAllThis) => {\n Alpine.startObservingMutations()\n\n queueMicrotask(() => {\n afterAllThis()\n })\n })\n}\n\nfunction fireEventForOtherLibariesToHookInto(name, detail) {\n let event = new CustomEvent(name, {\n cancelable: true,\n bubbles: true,\n detail,\n })\n\n document.dispatchEvent(event)\n\n return event.defaultPrevented\n}\n\nfunction nowInitializeAlpineOnTheNewPage(Alpine) {\n Alpine.initTree(document.body, undefined, (el, skip) => {\n if (el._x_wasPersisted) skip()\n })\n}\n\nfunction autofocusElementsWithTheAutofocusAttribute() {\n document.querySelector('[autofocus]') && document.querySelector('[autofocus]').focus()\n}\n\nfunction cleanupAlpineElementsOnThePageThatArentInsideAPersistedElement() {\n // Create a new tree walker that skips persisted elements...\n let walker = function (root, callback) {\n Alpine.walk(root, (el, skip) => {\n if (isPersistedElement(el)) skip()\n if (isTeleportTarget(el)) skip()\n else callback(el, skip)\n })\n }\n\n // Set Alpine in motion to destroy itself on the page. If this proves\n // to be a performance issue at some point (walking the DOM tree),\n // we can be more surgical about cleaning up x-for/if instead...\n Alpine.destroyTree(document.body, walker)\n}\n", "import { isObjecty } from \"@/utils\"\n\nexport default function history(Alpine) {\n Alpine.magic('queryString', (el, { interceptor }) => {\n let alias\n let alwaysShow = false\n let usePush = false\n\n return interceptor((initialSeedValue, getter, setter, path, key) => {\n let queryKey = alias || path\n\n let { initial, replace, push, pop } = track(queryKey, initialSeedValue, alwaysShow)\n\n setter(initial)\n\n if (! usePush) {\n Alpine.effect(() => replace(getter()))\n } else {\n Alpine.effect(() => push(getter()))\n\n pop(async newValue => {\n setter(newValue)\n\n let tillTheEndOfTheMicrotaskQueue = () => Promise.resolve()\n\n await tillTheEndOfTheMicrotaskQueue() // ...so that we preserve the internal lock...\n })\n }\n\n return initial\n }, func => {\n func.alwaysShow = () => { alwaysShow = true; return func }\n func.usePush = () => { usePush = true; return func }\n func.as = key => { alias = key; return func }\n })\n })\n\n Alpine.history = { track }\n}\n\nexport function track(name, initialSeedValue, alwaysShow = false, except = null) {\n let { has, get, set, remove } = queryStringUtils()\n\n let url = new URL(window.location.href)\n let isInitiallyPresentInUrl = has(url, name)\n let initialValue = isInitiallyPresentInUrl ? get(url, name) : initialSeedValue\n let initialValueMemo = JSON.stringify(initialValue)\n let exceptValueMemo = [false, null, undefined].includes(except) ? initialSeedValue : JSON.stringify(except)\n\n let hasReturnedToInitialValue = (newValue) => JSON.stringify(newValue) === initialValueMemo\n let hasReturnedToExceptValue = (newValue) => JSON.stringify(newValue) === exceptValueMemo\n\n if (alwaysShow) url = set(url, name, initialValue)\n\n replace(url, name, { value: initialValue })\n\n let lock = false\n\n let update = (strategy, newValue) => {\n if (lock) return\n\n let url = new URL(window.location.href)\n\n // This block of code is what needs to be changed for this failing test to pass:\n if (! alwaysShow && ! isInitiallyPresentInUrl && hasReturnedToInitialValue(newValue)) {\n url = remove(url, name)\n // This is so that when deeply nested values are tracked, but their parent array/object\n // is removed, we can handle it gracefully by removing the entry from the URL instead\n // of letting it get set to `?someKey=undefined` which causes issues on refresh...\n } else if (newValue === undefined) {\n url = remove(url, name)\n } else if (! alwaysShow && hasReturnedToExceptValue(newValue)) {\n url = remove(url, name)\n } else {\n url = set(url, name, newValue)\n }\n\n // Right now, the above block, checks a few conditions and updates/removes an entry from the query string.\n // The new strategy needs to be something like:\n // - If \"alwaysShow\" is toggled on, then just \"set\" the whole thing with no deep diff\n // - Otherwise, run a deep comparison callback (given the original value and new value).\n // - The callback recieves two params (leaf name and value)\n // - Check leaf name and value for existance in the original URL from page load. If it's there, just call \"set\"\n // - Check leaf name and value for equivelance to original name and value, if equal, call \"remove\", otherwise, \"set\"\n\n // That code will look something like this:\n\n // if (alwaysShow) {\n // set(url, name, newValue)\n // } else {\n // deepCompare(name, newValue, originalValue, (leafName, leafValue) => {\n // // ....\n // })\n // }\n\n strategy(url, name, { value: newValue})\n }\n\n return {\n initial: initialValue,\n\n replace(newValue) { // Update via replaceState...\n update(replace, newValue)\n },\n\n push(newValue) { // Update via pushState...\n update(push, newValue)\n },\n\n pop(receiver) { // \"popstate\" handler...\n let handler = (e) => {\n if (! e.state || ! e.state.alpine) return\n\n Object.entries(e.state.alpine).forEach(([iName, { value: newValue }]) => {\n if (iName !== name) return\n\n lock = true\n\n // Allow the \"receiver\" to be an async function in case a non-syncronous\n // operation (like an ajax) requests needs to happen while preserving\n // the \"locking\" mechanism (\"lock = true\" in this case)...\n let result = receiver(newValue)\n\n if (result instanceof Promise) {\n result.finally(() => lock = false)\n } else {\n lock = false\n }\n })\n }\n\n window.addEventListener('popstate', handler)\n\n return () => window.removeEventListener('popstate', handler)\n }\n }\n}\n\nfunction replace(url, key, object) {\n let state = window.history.state || {}\n\n if (! state.alpine) state.alpine = {}\n\n state.alpine[key] = unwrap(object)\n\n window.history.replaceState(state, '', url.toString())\n}\n\nfunction push(url, key, object) {\n let state = window.history.state || {}\n\n if (! state.alpine) state.alpine = {}\n\n state = { alpine: {...state.alpine, ...{[key]: unwrap(object)}} }\n\n window.history.pushState(state, '', url.toString())\n}\n\nfunction unwrap(object) {\n if (object === undefined) return undefined\n\n return JSON.parse(JSON.stringify(object))\n}\n\nfunction queryStringUtils() {\n return {\n has(url, key) {\n let search = url.search\n\n if (! search) return false\n\n let data = fromQueryString(search)\n\n return Object.keys(data).includes(key)\n },\n get(url, key) {\n let search = url.search\n\n if (! search) return false\n\n let data = fromQueryString(search)\n\n return data[key]\n },\n set(url, key, value) {\n let data = fromQueryString(url.search)\n\n data[key] = stripNulls(unwrap(value))\n\n url.search = toQueryString(data)\n\n return url\n },\n remove(url, key) {\n let data = fromQueryString(url.search)\n\n delete data[key]\n\n url.search = toQueryString(data)\n\n return url\n },\n }\n}\n\nfunction stripNulls(value) {\n if (! isObjecty(value)) return value\n\n for (let key in value) {\n if (value[key] === null) delete value[key]\n else value[key] = stripNulls(value[key])\n }\n\n return value\n}\n\n// This function converts JavaScript data to bracketed query string notation...\n// { items: [['foo']] } -> \"items[0][0]=foo\"\nfunction toQueryString(data) {\n let isObjecty = (subject) => typeof subject === 'object' && subject !== null\n\n let buildQueryStringEntries = (data, entries = {}, baseKey = '') => {\n Object.entries(data).forEach(([iKey, iValue]) => {\n let key = baseKey === '' ? iKey : `${baseKey}[${iKey}]`\n\n if (iValue === null) {\n entries[key] = '';\n } else if (! isObjecty(iValue)) {\n entries[key] = encodeURIComponent(iValue)\n .replaceAll('%20', '+') // Conform to RFC1738\n .replaceAll('%2C', ',')\n } else {\n entries = {...entries, ...buildQueryStringEntries(iValue, entries, key)}\n }\n })\n\n return entries\n }\n\n let entries = buildQueryStringEntries(data)\n\n return Object.entries(entries).map(([key, value]) => `${key}=${value}`).join('&')\n}\n\n// This function converts bracketed query string notation back to JS data...\n// \"items[0][0]=foo\" -> { items: [['foo']] }\nfunction fromQueryString(search) {\n search = search.replace('?', '')\n\n if (search === '') return {}\n\n let insertDotNotatedValueIntoData = (key, value, data) => {\n let [first, second, ...rest] = key.split('.')\n\n // We're at a leaf node, let's make the assigment...\n if (! second) return data[key] = value\n\n // This is where we fill in empty arrays/objects allong the way to the assigment...\n if (data[first] === undefined) {\n data[first] = isNaN(second) ? {} : []\n }\n\n // Keep deferring assignment until the full key is built up...\n insertDotNotatedValueIntoData([second, ...rest].join('.'), value, data[first])\n }\n\n let entries = search.split('&').map(i => i.split('='))\n\n // let data = {} creates a security (XSS) vulnerability here. We need to use\n // Object.create(null) instead so that we have a \"pure\" object that doesnt\n // inherit Object.prototype and expose the js internals to manipulation.\n let data = Object.create(null)\n\n entries.forEach(([key, value]) => {\n // Query string params don't always have values... (`?foo=`)\n if ( typeof value == 'undefined' ) return;\n\n value = decodeURIComponent(value.replaceAll('+', '%20'))\n\n if (! key.includes('[')) {\n data[key] = value\n } else {\n // Convert to dot notation because it's easier...\n let dotNotatedKey = key.replaceAll('[', '.').replaceAll(']', '')\n\n insertDotNotatedValueIntoData(dotNotatedKey, value, data)\n }\n })\n\n return data\n}\n", "// packages/morph/src/morph.js\nfunction morph(from, toHtml, options) {\n monkeyPatchDomSetAttributeToAllowAtSymbols();\n let fromEl;\n let toEl;\n let key, lookahead, updating, updated, removing, removed, adding, added;\n function assignOptions(options2 = {}) {\n let defaultGetKey = (el) => el.getAttribute(\"key\");\n let noop = () => {\n };\n updating = options2.updating || noop;\n updated = options2.updated || noop;\n removing = options2.removing || noop;\n removed = options2.removed || noop;\n adding = options2.adding || noop;\n added = options2.added || noop;\n key = options2.key || defaultGetKey;\n lookahead = options2.lookahead || false;\n }\n function patch(from2, to) {\n if (differentElementNamesTypesOrKeys(from2, to)) {\n return swapElements(from2, to);\n }\n let updateChildrenOnly = false;\n if (shouldSkip(updating, from2, to, () => updateChildrenOnly = true))\n return;\n if (from2.nodeType === 1 && window.Alpine) {\n window.Alpine.cloneNode(from2, to);\n if (from2._x_teleport && to._x_teleport) {\n patch(from2._x_teleport, to._x_teleport);\n }\n }\n if (textOrComment(to)) {\n patchNodeValue(from2, to);\n updated(from2, to);\n return;\n }\n if (!updateChildrenOnly) {\n patchAttributes(from2, to);\n }\n updated(from2, to);\n patchChildren(from2, to);\n }\n function differentElementNamesTypesOrKeys(from2, to) {\n return from2.nodeType != to.nodeType || from2.nodeName != to.nodeName || getKey(from2) != getKey(to);\n }\n function swapElements(from2, to) {\n if (shouldSkip(removing, from2))\n return;\n let toCloned = to.cloneNode(true);\n if (shouldSkip(adding, toCloned))\n return;\n from2.replaceWith(toCloned);\n removed(from2);\n added(toCloned);\n }\n function patchNodeValue(from2, to) {\n let value = to.nodeValue;\n if (from2.nodeValue !== value) {\n from2.nodeValue = value;\n }\n }\n function patchAttributes(from2, to) {\n if (from2._x_transitioning)\n return;\n if (from2._x_isShown && !to._x_isShown) {\n return;\n }\n if (!from2._x_isShown && to._x_isShown) {\n return;\n }\n let domAttributes = Array.from(from2.attributes);\n let toAttributes = Array.from(to.attributes);\n for (let i = domAttributes.length - 1; i >= 0; i--) {\n let name = domAttributes[i].name;\n if (!to.hasAttribute(name)) {\n from2.removeAttribute(name);\n }\n }\n for (let i = toAttributes.length - 1; i >= 0; i--) {\n let name = toAttributes[i].name;\n let value = toAttributes[i].value;\n if (from2.getAttribute(name) !== value) {\n from2.setAttribute(name, value);\n }\n }\n }\n function patchChildren(from2, to) {\n let fromKeys = keyToMap(from2.children);\n let fromKeyHoldovers = {};\n let currentTo = getFirstNode(to);\n let currentFrom = getFirstNode(from2);\n while (currentTo) {\n seedingMatchingId(currentTo, currentFrom);\n let toKey = getKey(currentTo);\n let fromKey = getKey(currentFrom);\n if (!currentFrom) {\n if (toKey && fromKeyHoldovers[toKey]) {\n let holdover = fromKeyHoldovers[toKey];\n from2.appendChild(holdover);\n currentFrom = holdover;\n } else {\n if (!shouldSkip(adding, currentTo)) {\n let clone = currentTo.cloneNode(true);\n from2.appendChild(clone);\n added(clone);\n }\n currentTo = getNextSibling(to, currentTo);\n continue;\n }\n }\n let isIf = (node) => node && node.nodeType === 8 && node.textContent === \"[if BLOCK]><![endif]\";\n let isEnd = (node) => node && node.nodeType === 8 && node.textContent === \"[if ENDBLOCK]><![endif]\";\n if (isIf(currentTo) && isIf(currentFrom)) {\n let nestedIfCount = 0;\n let fromBlockStart = currentFrom;\n while (currentFrom) {\n let next = getNextSibling(from2, currentFrom);\n if (isIf(next)) {\n nestedIfCount++;\n } else if (isEnd(next) && nestedIfCount > 0) {\n nestedIfCount--;\n } else if (isEnd(next) && nestedIfCount === 0) {\n currentFrom = next;\n break;\n }\n currentFrom = next;\n }\n let fromBlockEnd = currentFrom;\n nestedIfCount = 0;\n let toBlockStart = currentTo;\n while (currentTo) {\n let next = getNextSibling(to, currentTo);\n if (isIf(next)) {\n nestedIfCount++;\n } else if (isEnd(next) && nestedIfCount > 0) {\n nestedIfCount--;\n } else if (isEnd(next) && nestedIfCount === 0) {\n currentTo = next;\n break;\n }\n currentTo = next;\n }\n let toBlockEnd = currentTo;\n let fromBlock = new Block(fromBlockStart, fromBlockEnd);\n let toBlock = new Block(toBlockStart, toBlockEnd);\n patchChildren(fromBlock, toBlock);\n continue;\n }\n if (currentFrom.nodeType === 1 && lookahead && !currentFrom.isEqualNode(currentTo)) {\n let nextToElementSibling = getNextSibling(to, currentTo);\n let found = false;\n while (!found && nextToElementSibling) {\n if (nextToElementSibling.nodeType === 1 && currentFrom.isEqualNode(nextToElementSibling)) {\n found = true;\n currentFrom = addNodeBefore(from2, currentTo, currentFrom);\n fromKey = getKey(currentFrom);\n }\n nextToElementSibling = getNextSibling(to, nextToElementSibling);\n }\n }\n if (toKey !== fromKey) {\n if (!toKey && fromKey) {\n fromKeyHoldovers[fromKey] = currentFrom;\n currentFrom = addNodeBefore(from2, currentTo, currentFrom);\n fromKeyHoldovers[fromKey].remove();\n currentFrom = getNextSibling(from2, currentFrom);\n currentTo = getNextSibling(to, currentTo);\n continue;\n }\n if (toKey && !fromKey) {\n if (fromKeys[toKey]) {\n currentFrom.replaceWith(fromKeys[toKey]);\n currentFrom = fromKeys[toKey];\n }\n }\n if (toKey && fromKey) {\n let fromKeyNode = fromKeys[toKey];\n if (fromKeyNode) {\n fromKeyHoldovers[fromKey] = currentFrom;\n currentFrom.replaceWith(fromKeyNode);\n currentFrom = fromKeyNode;\n } else {\n fromKeyHoldovers[fromKey] = currentFrom;\n currentFrom = addNodeBefore(from2, currentTo, currentFrom);\n fromKeyHoldovers[fromKey].remove();\n currentFrom = getNextSibling(from2, currentFrom);\n currentTo = getNextSibling(to, currentTo);\n continue;\n }\n }\n }\n let currentFromNext = currentFrom && getNextSibling(from2, currentFrom);\n patch(currentFrom, currentTo);\n currentTo = currentTo && getNextSibling(to, currentTo);\n currentFrom = currentFromNext;\n }\n let removals = [];\n while (currentFrom) {\n if (!shouldSkip(removing, currentFrom))\n removals.push(currentFrom);\n currentFrom = getNextSibling(from2, currentFrom);\n }\n while (removals.length) {\n let domForRemoval = removals.shift();\n domForRemoval.remove();\n removed(domForRemoval);\n }\n }\n function getKey(el) {\n return el && el.nodeType === 1 && key(el);\n }\n function keyToMap(els) {\n let map = {};\n for (let el of els) {\n let theKey = getKey(el);\n if (theKey) {\n map[theKey] = el;\n }\n }\n return map;\n }\n function addNodeBefore(parent, node, beforeMe) {\n if (!shouldSkip(adding, node)) {\n let clone = node.cloneNode(true);\n parent.insertBefore(clone, beforeMe);\n added(clone);\n return clone;\n }\n return node;\n }\n assignOptions(options);\n fromEl = from;\n toEl = typeof toHtml === \"string\" ? createElement(toHtml) : toHtml;\n if (window.Alpine && window.Alpine.closestDataStack && !from._x_dataStack) {\n toEl._x_dataStack = window.Alpine.closestDataStack(from);\n toEl._x_dataStack && window.Alpine.cloneNode(from, toEl);\n }\n patch(from, toEl);\n fromEl = void 0;\n toEl = void 0;\n return from;\n}\nmorph.step = () => {\n};\nmorph.log = () => {\n};\nfunction shouldSkip(hook, ...args) {\n let skip = false;\n hook(...args, () => skip = true);\n return skip;\n}\nvar patched = false;\nfunction createElement(html) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content.firstElementChild;\n}\nfunction textOrComment(el) {\n return el.nodeType === 3 || el.nodeType === 8;\n}\nvar Block = class {\n constructor(start, end) {\n this.startComment = start;\n this.endComment = end;\n }\n get children() {\n let children = [];\n let currentNode = this.startComment.nextSibling;\n while (currentNode && currentNode !== this.endComment) {\n children.push(currentNode);\n currentNode = currentNode.nextSibling;\n }\n return children;\n }\n appendChild(child) {\n this.endComment.before(child);\n }\n get firstChild() {\n let first = this.startComment.nextSibling;\n if (first === this.endComment)\n return;\n return first;\n }\n nextNode(reference) {\n let next = reference.nextSibling;\n if (next === this.endComment)\n return;\n return next;\n }\n insertBefore(newNode, reference) {\n reference.before(newNode);\n return newNode;\n }\n};\nfunction getFirstNode(parent) {\n return parent.firstChild;\n}\nfunction getNextSibling(parent, reference) {\n let next;\n if (parent instanceof Block) {\n next = parent.nextNode(reference);\n } else {\n next = reference.nextSibling;\n }\n return next;\n}\nfunction monkeyPatchDomSetAttributeToAllowAtSymbols() {\n if (patched)\n return;\n patched = true;\n let original = Element.prototype.setAttribute;\n let hostDiv = document.createElement(\"div\");\n Element.prototype.setAttribute = function newSetAttribute(name, value) {\n if (!name.includes(\"@\")) {\n return original.call(this, name, value);\n }\n hostDiv.innerHTML = `<span ${name}=\"${value}\"></span>`;\n let attr = hostDiv.firstElementChild.getAttributeNode(name);\n hostDiv.firstElementChild.removeAttributeNode(attr);\n this.setAttributeNode(attr);\n };\n}\nfunction seedingMatchingId(to, from) {\n let fromId = from && from._x_bindings && from._x_bindings.id;\n if (!fromId)\n return;\n to.setAttribute(\"id\", fromId);\n to.id = fromId;\n}\n\n// packages/morph/src/index.js\nfunction src_default(Alpine) {\n Alpine.morph = morph;\n}\n\n// packages/morph/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default,\n src_default as morph\n};\n", "// packages/mask/src/index.js\nfunction src_default(Alpine) {\n Alpine.directive(\"mask\", (el, { value, expression }, { effect, evaluateLater, cleanup }) => {\n let templateFn = () => expression;\n let lastInputValue = \"\";\n queueMicrotask(() => {\n if ([\"function\", \"dynamic\"].includes(value)) {\n let evaluator = evaluateLater(expression);\n effect(() => {\n templateFn = (input) => {\n let result;\n Alpine.dontAutoEvaluateFunctions(() => {\n evaluator((value2) => {\n result = typeof value2 === \"function\" ? value2(input) : value2;\n }, { scope: {\n // These are \"magics\" we'll make available to the x-mask:function:\n \"$input\": input,\n \"$money\": formatMoney.bind({ el })\n } });\n });\n return result;\n };\n processInputValue(el, false);\n });\n } else {\n processInputValue(el, false);\n }\n if (el._x_model)\n el._x_model.set(el.value);\n });\n const controller = new AbortController();\n cleanup(() => {\n controller.abort();\n });\n el.addEventListener(\"input\", () => processInputValue(el), {\n signal: controller.signal,\n // Setting this as a capture phase listener to ensure it runs\n // before wire:model or x-model added as a latent binding...\n capture: true\n });\n el.addEventListener(\"blur\", () => processInputValue(el, false), { signal: controller.signal });\n function processInputValue(el2, shouldRestoreCursor = true) {\n let input = el2.value;\n let template = templateFn(input);\n if (!template || template === \"false\")\n return false;\n if (lastInputValue.length - el2.value.length === 1) {\n return lastInputValue = el2.value;\n }\n let setInput = () => {\n lastInputValue = el2.value = formatInput(input, template);\n };\n if (shouldRestoreCursor) {\n restoreCursorPosition(el2, template, () => {\n setInput();\n });\n } else {\n setInput();\n }\n }\n function formatInput(input, template) {\n if (input === \"\")\n return \"\";\n let strippedDownInput = stripDown(template, input);\n let rebuiltInput = buildUp(template, strippedDownInput);\n return rebuiltInput;\n }\n }).before(\"model\");\n}\nfunction restoreCursorPosition(el, template, callback) {\n let cursorPosition = el.selectionStart;\n let unformattedValue = el.value;\n callback();\n let beforeLeftOfCursorBeforeFormatting = unformattedValue.slice(0, cursorPosition);\n let newPosition = buildUp(\n template,\n stripDown(\n template,\n beforeLeftOfCursorBeforeFormatting\n )\n ).length;\n el.setSelectionRange(newPosition, newPosition);\n}\nfunction stripDown(template, input) {\n let inputToBeStripped = input;\n let output = \"\";\n let regexes = {\n \"9\": /[0-9]/,\n \"a\": /[a-zA-Z]/,\n \"*\": /[a-zA-Z0-9]/\n };\n let wildcardTemplate = \"\";\n for (let i = 0; i < template.length; i++) {\n if ([\"9\", \"a\", \"*\"].includes(template[i])) {\n wildcardTemplate += template[i];\n continue;\n }\n for (let j = 0; j < inputToBeStripped.length; j++) {\n if (inputToBeStripped[j] === template[i]) {\n inputToBeStripped = inputToBeStripped.slice(0, j) + inputToBeStripped.slice(j + 1);\n break;\n }\n }\n }\n for (let i = 0; i < wildcardTemplate.length; i++) {\n let found = false;\n for (let j = 0; j < inputToBeStripped.length; j++) {\n if (regexes[wildcardTemplate[i]].test(inputToBeStripped[j])) {\n output += inputToBeStripped[j];\n inputToBeStripped = inputToBeStripped.slice(0, j) + inputToBeStripped.slice(j + 1);\n found = true;\n break;\n }\n }\n if (!found)\n break;\n }\n return output;\n}\nfunction buildUp(template, input) {\n let clean = Array.from(input);\n let output = \"\";\n for (let i = 0; i < template.length; i++) {\n if (![\"9\", \"a\", \"*\"].includes(template[i])) {\n output += template[i];\n continue;\n }\n if (clean.length === 0)\n break;\n output += clean.shift();\n }\n return output;\n}\nfunction formatMoney(input, delimiter = \".\", thousands, precision = 2) {\n if (input === \"-\")\n return \"-\";\n if (/^\\D+$/.test(input))\n return \"9\";\n if (thousands === null || thousands === void 0) {\n thousands = delimiter === \",\" ? \".\" : \",\";\n }\n let addThousands = (input2, thousands2) => {\n let output = \"\";\n let counter = 0;\n for (let i = input2.length - 1; i >= 0; i--) {\n if (input2[i] === thousands2)\n continue;\n if (counter === 3) {\n output = input2[i] + thousands2 + output;\n counter = 0;\n } else {\n output = input2[i] + output;\n }\n counter++;\n }\n return output;\n };\n let minus = input.startsWith(\"-\") ? \"-\" : \"\";\n let strippedInput = input.replaceAll(new RegExp(`[^0-9\\\\${delimiter}]`, \"g\"), \"\");\n let template = Array.from({ length: strippedInput.split(delimiter)[0].length }).fill(\"9\").join(\"\");\n template = `${minus}${addThousands(template, thousands)}`;\n if (precision > 0 && input.includes(delimiter))\n template += `${delimiter}` + \"9\".repeat(precision);\n queueMicrotask(() => {\n if (this.el.value.endsWith(delimiter))\n return;\n if (this.el.value[this.el.selectionStart - 1] === delimiter) {\n this.el.setSelectionRange(this.el.selectionStart - 1, this.el.selectionStart - 1);\n }\n });\n return template;\n}\n\n// packages/mask/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default,\n src_default as mask,\n stripDown\n};\n", "import { closestComponent, destroyComponent, initComponent } from './store'\nimport { matchesForLivewireDirective, extractDirective } from './directives'\nimport { trigger } from './hooks'\nimport collapse from '@alpinejs/collapse'\nimport focus from '@alpinejs/focus'\nimport persist from '@alpinejs/persist'\nimport intersect from '@alpinejs/intersect'\nimport anchor from '@alpinejs/anchor'\nimport navigate from './plugins/navigate'\nimport history from './plugins/history'\nimport morph from '@alpinejs/morph'\nimport mask from '@alpinejs/mask'\nimport Alpine from 'alpinejs'\nimport { dispatch } from './utils'\n\nexport function start() {\n setTimeout(() => ensureLivewireScriptIsntMisplaced())\n\n dispatch(document, 'livewire:init')\n dispatch(document, 'livewire:initializing')\n\n Alpine.plugin(morph)\n Alpine.plugin(history)\n Alpine.plugin(intersect)\n Alpine.plugin(collapse)\n Alpine.plugin(anchor)\n Alpine.plugin(focus)\n Alpine.plugin(persist)\n Alpine.plugin(navigate)\n Alpine.plugin(mask)\n\n Alpine.addRootSelector(() => '[wire\\\\:id]')\n\n Alpine.onAttributesAdded((el, attributes) => {\n // if there are no \"wire:\" directives we don't need to process this element any further.\n // This prevents Livewire from causing general slowness for other Alpine elements on the page...\n if (! Array.from(attributes).some(attribute => matchesForLivewireDirective(attribute.name))) return\n\n let component = closestComponent(el, false)\n\n if (! component) return\n\n attributes.forEach(attribute => {\n if (! matchesForLivewireDirective(attribute.name)) return;\n\n let directive = extractDirective(el, attribute.name)\n\n trigger('directive.init', { el, component, directive, cleanup: (callback) => {\n Alpine.onAttributeRemoved(el, directive.raw, callback)\n } })\n })\n })\n\n Alpine.interceptInit(\n Alpine.skipDuringClone(el => {\n // if there are no \"wire:\" directives we don't need to process this element any further.\n // This prevents Livewire from causing general slowness for other Alpine elements on the page...\n if (! Array.from(el.attributes).some(attribute => matchesForLivewireDirective(attribute.name))) return\n\n if (el.hasAttribute('wire:id')) {\n let component = initComponent(el)\n\n Alpine.onAttributeRemoved(el, 'wire:id', () => {\n destroyComponent(component.id)\n })\n }\n\n let component = closestComponent(el, false)\n\n if (component) {\n trigger('element.init', { el, component })\n\n let directives = Array.from(el.getAttributeNames())\n .filter(name => matchesForLivewireDirective(name))\n .map(name => extractDirective(el, name))\n\n directives.forEach(directive => {\n trigger('directive.init', { el, component, directive, cleanup: (callback) => {\n Alpine.onAttributeRemoved(el, directive.raw, callback)\n } })\n })\n }\n })\n )\n\n Alpine.start()\n\n setTimeout(() => window.Livewire.initialRenderIsFinished = true)\n\n dispatch(document, 'livewire:initialized')\n}\n\nfunction ensureLivewireScriptIsntMisplaced() {\n let el = document.querySelector('script[data-update-uri][data-csrf]')\n\n // If there is no Livewire-injected script on the page, move on...\n if (! el) return\n\n // If there is, let's ensure it's at the top-level. If it's nested\n // inside a normal element, that probably means that a closing\n // tag was missing in the template and Chrome moved the tag.\n\n // We're only checking for \"div\" here because it's quick and useful...\n let livewireEl = el.closest('[wire\\\\:id]')\n\n if (livewireEl) {\n console.warn('Livewire: missing closing tags found. Ensure your template elements contain matching closing tags.', livewireEl)\n }\n}\n", "import { on as hook } from '@/hooks'\n\nhook('effect', ({ component, effects }) => {\n registerListeners(component, effects.listeners || [])\n})\n\nfunction registerListeners(component, listeners) {\n listeners.forEach(name => {\n // Register a global listener...\n let handler = (e) => {\n if (e.__livewire) e.__livewire.receivedBy.push(component)\n\n component.$wire.call('__dispatch', name, e.detail || {})\n }\n\n window.addEventListener(name, handler)\n\n component.addCleanup(() => window.removeEventListener(name, handler))\n\n // Register a listener for when \"to\" or \"self\"\n component.el.addEventListener(name, (e) => {\n // We don't care about non-Livewire dispatches...\n if (! e.__livewire) return\n\n // We don't care about Livewire bubbling dispatches (only \"to\" and \"self\")...\n if (e.bubbles) return\n\n if (e.__livewire) e.__livewire.receivedBy.push(component.id)\n\n component.$wire.call('__dispatch', name, e.detail || {})\n })\n })\n}\n\n\n", "import { on } from '@/hooks'\nimport Alpine from 'alpinejs'\n\nlet executedScripts = new WeakMap\n\nlet executedAssets = new Set\n\non('payload.intercept', async ({ assets }) => {\n if(! assets) return\n\n for (let [key, asset] of Object.entries(assets)) {\n await onlyIfAssetsHaventBeenLoadedAlreadyOnThisPage(key, async () => {\n await addAssetsToHeadTagOfPage(asset)\n })\n }\n})\n\n// Assets that were injected into the HTML need to be registered so that\n// they aren't loaded again...\non('component.init', ({ component }) => {\n let assets = component.snapshot.memo.assets\n\n if (assets) {\n assets.forEach((key) => {\n if (executedAssets.has(key)) return\n executedAssets.add(key)\n })\n }\n})\n\non('effect', ({ component, effects }) => {\n let scripts = effects.scripts\n\n if (scripts) {\n Object.entries(scripts).forEach(([key, content]) => {\n onlyIfScriptHasntBeenRunAlreadyForThisComponent(component, key, () => {\n let scriptContent = extractScriptTagContent(content)\n\n Alpine.dontAutoEvaluateFunctions(() => {\n Alpine.evaluate(component.el, scriptContent, { '$wire': component.$wire })\n })\n })\n })\n }\n})\n\nfunction onlyIfScriptHasntBeenRunAlreadyForThisComponent(component, key, callback) {\n if (executedScripts.has(component)) {\n let alreadyRunKeys = executedScripts.get(component)\n\n if (alreadyRunKeys.includes(key)) return\n }\n\n callback()\n\n if (! executedScripts.has(component)) executedScripts.set(component, [])\n\n let alreadyRunKeys = executedScripts.get(component)\n\n alreadyRunKeys.push(key)\n\n executedScripts.set(component, alreadyRunKeys)\n}\n\nfunction extractScriptTagContent(rawHtml) {\n let scriptRegex = /<script\\b[^>]*>([\\s\\S]*?)<\\/script>/gm\n let matches = scriptRegex.exec(rawHtml)\n let innards = matches && matches[1] ? matches[1].trim() : ''\n\n return innards\n}\n\nasync function onlyIfAssetsHaventBeenLoadedAlreadyOnThisPage(key, callback) {\n if (executedAssets.has(key)) return\n\n await callback()\n\n executedAssets.add(key)\n}\n\nasync function addAssetsToHeadTagOfPage(rawHtml) {\n let newDocument = (new DOMParser()).parseFromString(rawHtml, \"text/html\")\n let newHead = document.adoptNode(newDocument.head)\n\n for (let child of newHead.children) {\n try {\n await runAssetSynchronously(child)\n } catch (error) {\n // Let's eat any promise rejects so that we don't\n // break the rest of Livewire's handling of the response...\n // Any errors triggered by adding the script tag to the page\n // will still be thrown...\n }\n }\n}\n\nasync function runAssetSynchronously(child) {\n return new Promise((resolve, reject) => {\n if (isScript(child)) {\n let script = cloneScriptTag(child)\n\n // Script assets need to be loaded synchronously so that scripts have\n // their global variables available...\n if (script.src) {\n script.onload = () => resolve()\n script.onerror = () => reject()\n } else {\n resolve()\n }\n\n document.head.appendChild(script)\n } else {\n document.head.appendChild(child)\n\n resolve()\n }\n })\n}\n\nfunction isScript(el) {\n return el.tagName.toLowerCase() === 'script'\n}\n\nfunction cloneScriptTag(el) {\n let script = document.createElement('script')\n\n script.textContent = el.textContent\n script.async = el.async\n\n for (let attr of el.attributes) {\n script.setAttribute(attr.name, attr.value)\n }\n\n return script\n}\n", "import { overrideMethod } from '@/$wire'\nimport { on } from '@/hooks'\nimport Alpine from 'alpinejs'\n\non('effect', ({ component, effects }) => {\n let js = effects.js\n let xjs = effects.xjs\n\n if (js) {\n Object.entries(js).forEach(([method, body]) => {\n overrideMethod(component, method, () => {\n Alpine.evaluate(component.el, body)\n })\n })\n }\n\n if (xjs) {\n xjs.forEach(expression => {\n Alpine.evaluate(component.el, expression)\n })\n }\n})\n\n", "import { trigger } from \"@/hooks\"\nimport { closestComponent } from \"@/store\"\nimport Alpine from 'alpinejs'\n\nexport function morph(component, el, html) {\n let wrapperTag = el.parentElement\n // If the root element is a \"tr\", we need the wrapper to be a \"table\"...\n ? el.parentElement.tagName.toLowerCase()\n : 'div'\n\n let wrapper = document.createElement(wrapperTag)\n\n wrapper.innerHTML = html\n let parentComponent\n\n try {\n parentComponent = closestComponent(el.parentElement)\n } catch (e) {}\n\n parentComponent && (wrapper.__livewire = parentComponent)\n\n let to = wrapper.firstElementChild\n\n to.__livewire = component\n\n trigger('morph', { el, toEl: to, component })\n\n Alpine.morph(el, to, {\n updating: (el, toEl, childrenOnly, skip) => {\n if (isntElement(el)) return\n\n trigger('morph.updating', { el, toEl, component, skip, childrenOnly })\n\n // bypass DOM diffing for children by overwriting the content\n if (el.__livewire_replace === true) el.innerHTML = toEl.innerHTML;\n // completely bypass DOM diffing for this element and all children\n if (el.__livewire_replace_self === true) { el.outerHTML = toEl.outerHTML; return skip(); }\n\n if (el.__livewire_ignore === true) return skip()\n if (el.__livewire_ignore_self === true) childrenOnly()\n\n // Children will update themselves.\n if (isComponentRootEl(el) && el.getAttribute('wire:id') !== component.id) return skip()\n\n // Give the root Livewire \"to\" element, the same object reference as the \"from\"\n // element. This ensures new Alpine magics like $wire and @entangle can\n // initialize in the context of a real Livewire component object.\n if (isComponentRootEl(el)) toEl.__livewire = component\n },\n\n updated: (el) => {\n if (isntElement(el)) return\n\n trigger('morph.updated', { el, component })\n },\n\n removing: (el, skip) => {\n if (isntElement(el)) return\n\n trigger('morph.removing', { el, component, skip })\n },\n\n removed: (el) => {\n if (isntElement(el)) return\n\n trigger('morph.removed', { el, component })\n },\n\n adding: (el) => {\n trigger('morph.adding', { el, component })\n },\n\n added: (el) => {\n if (isntElement(el)) return\n\n const closestComponentId = closestComponent(el).id\n\n trigger('morph.added', { el })\n },\n\n key: (el) => {\n if (isntElement(el)) return\n\n return el.hasAttribute(`wire:key`)\n ? el.getAttribute(`wire:key`)\n : // If no \"key\", then first check for \"wire:id\", then \"id\"\n el.hasAttribute(`wire:id`)\n ? el.getAttribute(`wire:id`)\n : el.id\n },\n\n lookahead: false,\n })\n}\n\nfunction isntElement(el) {\n return typeof el.hasAttribute !== 'function'\n}\n\nfunction isComponentRootEl(el) {\n return el.hasAttribute('wire:id')\n}\n", "import { morph } from '@/morph'\nimport { on } from '@/hooks'\n\non('effect', ({ component, effects }) => {\n let html = effects.html\n if (! html) return\n\n // Wrapping this in a double queueMicrotask. The first one puts it after all\n // other \"effect\" hooks, and the second one puts it after all reactive\n // Alpine effects (that are processed via flushJobs in scheduler).\n queueMicrotask(() => {\n queueMicrotask(() => {\n morph(component, component.el, html)\n })\n })\n})\n", "import { dispatch, dispatchSelf, dispatchTo } from '@/events'\nimport { on } from '@/hooks'\n\non('effect', ({ component, effects }) => {\n dispatchEvents(component, effects.dispatches || [])\n})\n\nfunction dispatchEvents(component, dispatches) {\n dispatches.forEach(({ name, params = {}, self = false, to }) => {\n if (self) dispatchSelf(component, name, params)\n else if (to) dispatchTo(to, name, params)\n else dispatch(component, name, params)\n })\n}\n\n\n", "import { getDirectives } from '@/directives'\nimport { on } from '@/hooks'\nimport { Bag } from '@/utils'\nimport Alpine from 'alpinejs'\n\nlet cleanups = new Bag\n\n// Adding a setTimeout here so that these event listeners are\n// registered AFTER most other event listenrs, this way, we\n// can call \"stopPropagation\" for things like wire:confirm\non('directive.init', ({ el, directive, cleanup, component }) => setTimeout(() => {\n if (directive.value !== 'submit') return\n\n // Livewire will clean it all up automatically when the form\n // submission returns and the new DOM lacks these additions...\n el.addEventListener('submit', () => {\n // If using wire:submit=\"$parent...\", we will need to use\n // the parent ID as a reference for undoing because it's\n // the ID that will come back from the network request.\n let componentId = directive.expression.startsWith('$parent')\n ? component.parent.id\n : component.id\n\n let cleanup = disableForm(el)\n\n cleanups.add(componentId, cleanup)\n })\n}))\n\non('commit', ({ component, respond }) => {\n respond(() => {\n cleanups.each(component.id, i => i())\n cleanups.remove(component.id)\n })\n})\n\nfunction disableForm(formEl) {\n let undos = []\n\n Alpine.walk(formEl, (el, skip) => {\n if (! formEl.contains(el)) return\n\n if (el.hasAttribute('wire:ignore')) return skip()\n\n if (shouldMarkDisabled(el)) {\n undos.push(markDisabled(el))\n } else if (shouldMarkReadOnly(el)) {\n undos.push(markReadOnly(el))\n }\n })\n\n return () => {\n while (undos.length > 0) undos.shift()()\n }\n}\n\nfunction shouldMarkDisabled(el) {\n let tag = el.tagName.toLowerCase()\n\n if (tag === 'select') return true\n if (tag === 'button' && el.type === 'submit') return true\n if (tag === 'input' && (el.type === 'checkbox' || el.type === 'radio')) return true\n\n return false\n}\n\nfunction shouldMarkReadOnly(el) {\n return ['input', 'textarea'].includes(el.tagName.toLowerCase())\n}\n\nfunction markDisabled(el) {\n let undo = el.disabled\n ? () => {}\n : () => el.disabled = false\n\n el.disabled = true\n\n return undo\n}\n\nfunction markReadOnly(el) {\n let undo = el.readOnly\n ? () => {}\n : () => el.readOnly = false\n\n el.readOnly = true\n\n return undo\n}\n", "import { on } from '@/hooks'\n\n// Ensure that all child components with reactive props (even deeply nested)\n// are included in the network request...\non('commit.pooling', ({ commits }) => {\n commits.forEach(commit => {\n let component = commit.component\n\n getDeepChildrenWithBindings(component, child => {\n child.$wire.$commit()\n })\n })\n})\n\n// Ensure that related components are pooled together, even if they chose\n// to be isolated normally...\non('commit.pooled', ({ pools }) => {\n let commits = getPooledCommits(pools)\n\n commits.forEach(commit => {\n let component = commit.component\n\n getDeepChildrenWithBindings(component, child => {\n colocateCommitsByComponent(pools, component, child)\n })\n })\n})\n\nfunction getPooledCommits(pools) {\n let commits = []\n\n pools.forEach(pool => {\n pool.commits.forEach(commit => {\n commits.push(commit)\n })\n })\n\n return commits\n}\n\nfunction colocateCommitsByComponent(pools, component, foreignComponent) {\n let pool = findPoolWithComponent(pools, component)\n\n let foreignPool = findPoolWithComponent(pools, foreignComponent)\n\n let foreignCommit = foreignPool.findCommitByComponent(foreignComponent)\n\n // Delete needs to come before add in case there are the same pool...\n foreignPool.delete(foreignCommit)\n\n pool.add(foreignCommit)\n\n // Cleanup empty pools...\n pools.forEach(pool => {\n if (pool.empty()) pools.delete(pool)\n })\n}\n\nfunction findPoolWithComponent(pools, component) {\n for (let [idx, pool] of pools.entries()) {\n if (pool.hasCommitFor(component)) return pool\n }\n}\n\nfunction getDeepChildrenWithBindings(component, callback) {\n getDeepChildren(component, child => {\n if (hasReactiveProps(child) || hasWireModelableBindings(child)) {\n callback(child)\n }\n })\n}\n\nfunction hasReactiveProps(component) {\n let meta = component.snapshot.memo\n let props = meta.props\n\n return !! props\n}\n\nfunction hasWireModelableBindings(component) {\n let meta = component.snapshot.memo\n let bindings = meta.bindings\n\n return !! bindings\n}\n\nfunction getDeepChildren(component, callback) {\n component.children.forEach(child => {\n callback(child)\n\n getDeepChildren(child, callback)\n })\n}\n", "import { on } from '@/hooks'\n\non('commit', ({ succeed }) => {\n succeed(({ effects }) => {\n let download = effects.download\n\n if (! download) return\n\n // We need to use window.webkitURL so downloads work on iOS Safari.\n let urlObject = window.webkitURL || window.URL\n\n let url = urlObject.createObjectURL(\n base64toBlob(download.content, download.contentType)\n )\n\n let invisibleLink = document.createElement('a')\n\n invisibleLink.style.display = 'none'\n invisibleLink.href = url\n invisibleLink.download = download.name\n\n document.body.appendChild(invisibleLink)\n\n invisibleLink.click()\n\n setTimeout(function() {\n urlObject.revokeObjectURL(url)\n }, 0);\n })\n})\n\nfunction base64toBlob(b64Data, contentType = '', sliceSize = 512) {\n const byteCharacters = atob(b64Data)\n const byteArrays = []\n\n if (contentType === null) contentType = ''\n\n for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {\n let slice = byteCharacters.slice(offset, offset + sliceSize)\n\n let byteNumbers = new Array(slice.length)\n\n for (let i = 0; i < slice.length; i++) {\n byteNumbers[i] = slice.charCodeAt(i)\n }\n\n let byteArray = new Uint8Array(byteNumbers)\n\n byteArrays.push(byteArray)\n }\n\n return new Blob(byteArrays, { type: contentType });\n}\n", "import { on } from '@/hooks'\n\nlet componentsThatWantToBeBundled = new WeakSet\n\nlet componentsThatAreLazy = new WeakSet\n\non('component.init', ({ component }) => {\n let memo = component.snapshot.memo\n\n // We only care about lazy components...\n if (memo.lazyLoaded === undefined) return\n\n componentsThatAreLazy.add(component)\n\n // The component doesn't want its lazy load to be an isolated request\n // then we'll mark it to detect at \"pool\" time to make sure it gets bundled...\n if (memo.lazyIsolated !== undefined && memo.lazyIsolated === false) {\n componentsThatWantToBeBundled.add(component)\n }\n})\n\non('commit.pooling', ({ commits }) => {\n commits.forEach(commit => {\n // We only care about lazy components...\n if (! componentsThatAreLazy.has(commit.component)) return\n\n if (componentsThatWantToBeBundled.has(commit.component)) {\n commit.isolate = false\n\n componentsThatWantToBeBundled.delete(commit.component)\n } else {\n commit.isolate = true\n }\n\n // Component is no longer lazy after the first full request, so remove it...\n componentsThatAreLazy.delete(commit.component)\n })\n})\n", "import { on } from '@/hooks'\nimport { dataGet } from '@/utils'\nimport Alpine from 'alpinejs'\nimport { track } from '@/plugins/history'\n\non('effect', ({ component, effects, cleanup }) => {\n let queryString = effects['url']\n\n if (! queryString) return\n\n Object.entries(queryString).forEach(([key, value]) => {\n let { name, as, use, alwaysShow, except } = normalizeQueryStringEntry(key, value)\n\n if (! as) as = name\n\n let initialValue = [false, null, undefined].includes(except) ? dataGet(component.ephemeral, name) : except\n\n let { replace, push, pop } = track(as, initialValue, alwaysShow, except)\n\n if (use === 'replace') {\n let effectReference = Alpine.effect(() => {\n replace(dataGet(component.reactive, name))\n })\n\n cleanup(() => Alpine.release(effectReference))\n } else if (use === 'push') {\n let forgetCommitHandler = on('commit', ({ component: commitComponent, succeed }) => {\n if (component !== commitComponent) return\n\n let beforeValue = dataGet(component.canonical, name)\n\n succeed(() => {\n let afterValue = dataGet(component.canonical, name)\n\n if (JSON.stringify(beforeValue) === JSON.stringify(afterValue)) return\n\n push(afterValue)\n })\n })\n\n let forgetPopHandler = pop(async newValue => {\n await component.$wire.set(name, newValue)\n\n // @todo: this is the absolute worst thing ever I'm so sorry this needs to be refactored stat:\n document.querySelectorAll('input').forEach(el => {\n el._x_forceModelUpdate && el._x_forceModelUpdate(el._x_model.get())\n })\n })\n\n cleanup(() => {\n forgetCommitHandler()\n forgetPopHandler()\n })\n }\n })\n})\n\nfunction normalizeQueryStringEntry(key, value) {\n let defaults = { use: 'replace', alwaysShow: false }\n\n if (typeof value === 'string') {\n return {...defaults, name: value, as: value }\n } else {\n let fullerDefaults = {...defaults, name: key, as: key }\n\n return {...fullerDefaults, ...value }\n }\n}\n", "import { on } from '@/hooks'\nimport { dispatchSelf } from '@/events'\n\non('request', ({ options }) => {\n if (window.Echo) {\n options.headers['X-Socket-ID'] = window.Echo.socketId()\n }\n})\n\non('effect', ({ component, effects }) => {\n let listeners = effects.listeners || []\n\n listeners.forEach(event => {\n if (event.startsWith('echo')) {\n if (typeof window.Echo === 'undefined') {\n console.warn('Laravel Echo cannot be found')\n\n return\n }\n\n let event_parts = event.split(/(echo:|echo-)|:|,/)\n\n if (event_parts[1] == 'echo:') {\n event_parts.splice(2, 0, 'channel', undefined)\n }\n\n if (event_parts[2] == 'notification') {\n event_parts.push(undefined, undefined)\n }\n\n let [\n s1,\n signature,\n channel_type,\n s2,\n channel,\n s3,\n event_name,\n ] = event_parts\n\n if (['channel', 'private', 'encryptedPrivate'].includes(channel_type)) {\n let handler = e => dispatchSelf(component, event, [e])\n\n window.Echo[channel_type](channel).listen(event_name, handler)\n\n component.addCleanup(() => {\n window.Echo[channel_type](channel).stopListening(event_name, handler)\n })\n } else if (channel_type == 'presence') {\n if (['here', 'joining', 'leaving'].includes(event_name)) {\n window.Echo.join(channel)[event_name](e => {\n dispatchSelf(component, event, [e])\n })\n\n // @todo: add listener cleanup...\n } else{\n let handler = e => dispatchSelf(component, event, [e])\n\n window.Echo.join(channel).listen(event_name, handler)\n\n component.addCleanup(() => {\n window.Echo.leaveChannel(channel)\n })\n }\n } else if (channel_type == 'notification') {\n window.Echo.private(channel).notification(notification => {\n dispatchSelf(component, event, [notification])\n })\n\n // @todo: add listener cleanup...\n } else {\n console.warn('Echo channel type not yet supported')\n }\n }\n })\n})\n", "import { on } from '@/hooks'\n\nlet componentsThatAreIsolated = new WeakSet\n\non('component.init', ({ component }) => {\n let memo = component.snapshot.memo\n\n // We only care about isolated components...\n if (memo.isolate !== true) return\n\n componentsThatAreIsolated.add(component)\n})\n\non('commit.pooling', ({ commits }) => {\n commits.forEach(commit => {\n // We only care about isolated components...\n if (! componentsThatAreIsolated.has(commit.component)) return\n\n commit.isolate = true\n })\n})\n", "\nshouldHideProgressBar() && Alpine.navigate.disableProgressBar()\n\ndocument.addEventListener('alpine:navigate', e => forwardEvent('livewire:navigate', e))\ndocument.addEventListener('alpine:navigating', e => forwardEvent('livewire:navigating', e))\ndocument.addEventListener('alpine:navigated', e => forwardEvent('livewire:navigated', e))\n\nfunction forwardEvent(name, original) {\n let event = new CustomEvent(name, { cancelable: true, bubbles: true, detail: original.detail })\n\n document.dispatchEvent(event)\n\n if (event.defaultPrevented) {\n original.preventDefault()\n }\n}\n\nexport function shouldRedirectUsingNavigateOr(effects, url, or) {\n let forceNavigate = effects.redirectUsingNavigate\n\n if (forceNavigate) {\n Alpine.navigate(url)\n } else {\n or()\n }\n}\n\nfunction shouldHideProgressBar() {\n if (!! document.querySelector('[data-no-progress-bar]')) return true\n\n if (window.livewireScriptConfig && window.livewireScriptConfig.progressBar === false) return true\n\n return false\n}\n", "import { on } from \"@/hooks\"\nimport { shouldRedirectUsingNavigateOr } from \"./supportNavigate\"\n\non('effect', ({ effects }) => {\n if (! effects['redirect']) return\n\n let url = effects['redirect']\n\n shouldRedirectUsingNavigateOr(effects, url, () => {\n window.location.href = url\n })\n})\n", "import { directive } from \"@/directives\"\nimport { on } from '@/hooks'\nimport Alpine from 'alpinejs'\n\non('morph.added', ({ el }) => {\n el.__addedByMorph = true\n})\n\ndirective('transition', ({ el, directive, component, cleanup }) => {\n let visibility = Alpine.reactive({ state: el.__addedByMorph ? false : true })\n\n // We're going to control the element's transition with Alpine transitions...\n Alpine.bind(el, {\n [directive.rawName.replace('wire:', 'x-')]: '',\n 'x-show'() { return visibility.state },\n })\n\n // If it's not the initial page load, transition the element in...\n el.__addedByMorph && setTimeout(() => visibility.state = true)\n\n let cleanups = []\n\n cleanups.push(on('morph.removing', ({ el, skip }) => {\n // Here we interupt morphdom from removing an element...\n skip()\n\n // When the transition ends...\n el.addEventListener('transitionend', () => {\n // We can actually remove the element and all the listeners along with it...\n el.remove()\n })\n\n // Now we can trigger a transition:\n visibility.state = false\n\n cleanups.push(on('morph', ({ component: morphComponent }) => {\n if (morphComponent !== component) return\n\n // While this element is transitioning out, a new morph is about to occur.\n // Let's expidite this one and clean it up so it doesn't interfere...\n el.remove()\n\n cleanups.forEach(i => i())\n }))\n }))\n\n cleanup(() => cleanups.forEach(i => i()))\n})\n\n\n\n", "import { WeakBag } from './utils'\n\nlet callbacksByComponent = new WeakBag\n\nexport function debounceByComponent(component, callback, time) {\n // Prepare yourself for what's happening here.\n // Any text input with wire:model on it should be \"debounced\" by ~150ms by default.\n // We can't use a simple debounce function because we need a way to clear all the pending\n // debounces if a user submits a form or performs some other action.\n // This is a modified debounce function that acts just like a debounce, except it stores\n // the pending callbacks in a global property so we can \"clear them\" on command instead\n // of waiting for their setTimeouts to expire. I know.\n\n // This is a \"null\" callback. Each wire:model will resister one of these upon initialization.\n let callbackRegister = { callback: () => { } }\n callbacksByComponent.add(component, callbackRegister)\n\n // This is a normal \"timeout\" for a debounce function.\n var timeout\n\n return e => {\n clearTimeout(timeout)\n\n timeout = setTimeout(() => {\n callback(e)\n timeout = undefined\n\n // Because we just called the callback, let's return the\n // callback register to it's normal \"null\" state.\n callbackRegister.callback = () => { }\n }, time)\n\n // Register the current callback in the register as a kind-of \"escape-hatch\".\n callbackRegister.callback = () => {\n clearTimeout(timeout)\n callback(e)\n }\n }\n}\n\nexport function callAndClearComponentDebounces(component, callback) {\n // This is to protect against the following scenario:\n // A user is typing into a debounced input, and hits the enter key.\n // If the enter key submits a form or something, the submission\n // will happen BEFORE the model input finishes syncing because\n // of the debounce. This makes sure to clear anything in the debounce queue.\n\n callbacksByComponent.each(component, callbackRegister => {\n callbackRegister.callback()\n callbackRegister.callback = () => { }\n })\n\n callback()\n}\n", "import { callAndClearComponentDebounces } from '@/debounce'\nimport { customDirectiveHasBeenRegistered } from '@/directives'\nimport { on } from '@/hooks'\nimport Alpine from 'alpinejs'\n\non('directive.init', ({ el, directive, cleanup, component }) => {\n if (['snapshot', 'effects', 'model', 'init', 'loading', 'poll', 'ignore', 'id', 'data', 'key', 'target', 'dirty'].includes(directive.value)) return\n if (customDirectiveHasBeenRegistered(directive.value)) return\n\n let attribute = directive.rawName.replace('wire:', 'x-on:')\n\n // Automatically add .prevent to wire:submit, if they didn't add it themselves...\n if (directive.value === 'submit' && ! directive.modifiers.includes('prevent')) {\n attribute = attribute + '.prevent'\n }\n\n let cleanupBinding = Alpine.bind(el, {\n [attribute](e) {\n let execute = () => {\n callAndClearComponentDebounces(component, () => {\n // Forward these calls directly to $wire. Let them handle firing the request.\n Alpine.evaluate(el, '$wire.'+directive.expression, { scope: { $event: e }})\n })\n }\n\n // Account for the existance of wire:confirm=\"...\" on the action...\n if (el.__livewire_confirm) {\n el.__livewire_confirm(() => {\n execute()\n }, () => {\n e.stopImmediatePropagation()\n })\n } else {\n execute()\n }\n }\n })\n\n cleanup(cleanupBinding)\n})\n", "import Alpine from 'alpinejs'\n\nAlpine.addInitSelector(() => `[wire\\\\:navigate]`)\nAlpine.addInitSelector(() => `[wire\\\\:navigate\\\\.hover]`)\n\nAlpine.interceptInit(\n Alpine.skipDuringClone(el => {\n if (el.hasAttribute('wire:navigate')) {\n Alpine.bind(el, { ['x-navigate']: true })\n } else if (el.hasAttribute('wire:navigate.hover')) {\n Alpine.bind(el, { ['x-navigate.hover']: true })\n }\n })\n)\n\ndocument.addEventListener('alpine:navigating', () => {\n // Before navigating away, we'll inscribe the latest state of each component\n // in their HTML so that upon return, they will have the latest state...\n Livewire.all().forEach(component => {\n component.inscribeSnapshotAndEffectsOnElement()\n })\n})\n", "import { directive } from \"@/directives\"\n\ndirective('confirm', ({ el, directive }) => {\n let message = directive.expression\n let shouldPrompt = directive.modifiers.includes('prompt')\n\n // Convert sanitized linebreaks (\"\\n\") to real line breaks...\n message = message.replaceAll('\\\\n', '\\n')\n\n if (message === '') message = 'Are you sure?'\n\n el.__livewire_confirm = (action, instead) => {\n if (shouldPrompt) {\n let [question, expected] = message.split('|')\n\n if (! expected) {\n console.warn('Livewire: Must provide expectation with wire:confirm.prompt')\n } else {\n let input = prompt(question)\n\n if (input === expected) {\n action()\n } else {\n instead()\n }\n }\n } else {\n if (confirm(message)) action()\n else instead()\n }\n }\n})\n", "\nexport function toggleBooleanStateDirective(el, directive, isTruthy, cachedDisplay = null) {\n isTruthy = directive.modifiers.includes('remove') ? ! isTruthy : isTruthy\n\n if (directive.modifiers.includes('class')) {\n let classes = directive.expression.split(' ').filter(String)\n\n if (isTruthy) {\n el.classList.add(...classes)\n } else {\n el.classList.remove(...classes)\n }\n } else if (directive.modifiers.includes('attr')) {\n if (isTruthy) {\n el.setAttribute(directive.expression, true)\n } else {\n el.removeAttribute(directive.expression)\n }\n } else {\n let cache = cachedDisplay ?? window\n .getComputedStyle(el, null)\n .getPropertyValue('display')\n\n let display = (['inline', 'block', 'table', 'flex', 'grid', 'inline-flex']\n .filter(i => directive.modifiers.includes(i))[0] || 'inline-block')\n\n // If element is to be removed, set display to its current value...\n // display = (directive.modifiers.includes('remove') && ! isTruthy)\n display = (directive.modifiers.includes('remove') && ! isTruthy)\n ? cache : display\n\n el.style.display = isTruthy ? display : 'none'\n }\n}\n", "import { toggleBooleanStateDirective } from './shared'\nimport { directive } from '@/directives'\n\nlet offlineHandlers = new Set\nlet onlineHandlers = new Set\n\nwindow.addEventListener('offline', () => offlineHandlers.forEach(i => i()))\nwindow.addEventListener('online', () => onlineHandlers.forEach(i => i()))\n\ndirective('offline', ({ el, directive, cleanup }) => {\n let setOffline = () => toggleBooleanStateDirective(el, directive, true)\n let setOnline = () => toggleBooleanStateDirective(el, directive, false)\n\n offlineHandlers.add(setOffline)\n onlineHandlers.add(setOnline)\n\n cleanup(() => {\n offlineHandlers.delete(setOffline)\n onlineHandlers.delete(setOnline)\n })\n})\n", "import { toggleBooleanStateDirective } from './shared'\nimport { directive, getDirectives } from \"@/directives\"\nimport { on } from '@/hooks'\nimport { listen } from '@/utils'\n\ndirective('loading', ({ el, directive, component, cleanup }) => {\n let { targets, inverted } = getTargets(el)\n\n let [delay, abortDelay] = applyDelay(directive)\n\n let cleanupA = whenTargetsArePartOfRequest(component, targets, inverted, [\n () => delay(() => toggleBooleanStateDirective(el, directive, true)),\n () => abortDelay(() => toggleBooleanStateDirective(el, directive, false)),\n ])\n\n let cleanupB = whenTargetsArePartOfFileUpload(component, targets, [\n () => delay(() => toggleBooleanStateDirective(el, directive, true)),\n () => abortDelay(() => toggleBooleanStateDirective(el, directive, false)),\n ])\n\n cleanup(() => {\n cleanupA()\n cleanupB()\n })\n})\n\nfunction applyDelay(directive) {\n if (! directive.modifiers.includes('delay') || directive.modifiers.includes('none')) return [i => i(), i => i()]\n\n let duration = 200\n\n let delayModifiers = {\n 'shortest': 50,\n 'shorter': 100,\n 'short': 150,\n 'default': 200,\n 'long': 300,\n 'longer': 500,\n 'longest': 1000,\n }\n\n Object.keys(delayModifiers).some(key => {\n if (directive.modifiers.includes(key)) {\n duration = delayModifiers[key]\n\n return true\n }\n })\n\n let timeout\n let started = false\n\n return [\n (callback) => { // Initiate delay...\n timeout = setTimeout(() => {\n callback()\n\n started = true\n }, duration)\n },\n async (callback) => { // Execute or abort...\n if (started) {\n await callback()\n started = false\n } else {\n clearTimeout(timeout)\n }\n },\n ]\n}\n\nfunction whenTargetsArePartOfRequest(component, targets, inverted, [ startLoading, endLoading ]) {\n return on('commit', ({ component: iComponent, commit: payload, respond }) => {\n if (iComponent !== component) return\n\n if (targets.length > 0 && containsTargets(payload, targets) === inverted) return\n\n startLoading()\n\n respond(() => {\n endLoading()\n })\n })\n}\n\nfunction whenTargetsArePartOfFileUpload(component, targets, [ startLoading, endLoading ]) {\n let eventMismatch = e => {\n let { id, property } = e.detail\n\n if (id !== component.id) return true\n if (targets.length > 0 && ! targets.map(i => i.target).includes(property)) return true\n\n return false\n }\n\n let cleanupA = listen(window, 'livewire-upload-start', e => {\n if (eventMismatch(e)) return\n\n startLoading()\n })\n\n let cleanupB = listen(window, 'livewire-upload-finish', e => {\n if (eventMismatch(e)) return\n\n endLoading()\n })\n\n let cleanupC = listen(window, 'livewire-upload-error', e => {\n if (eventMismatch(e)) return\n\n endLoading()\n })\n\n return () => {\n cleanupA()\n cleanupB()\n cleanupC()\n }\n}\n\nfunction containsTargets(payload, targets) {\n let { updates, calls } = payload\n\n return targets.some(({ target, params }) => {\n if (params) {\n return calls.some(({ method, params: methodParams }) => {\n return target === method\n && params === quickHash(JSON.stringify(methodParams))\n })\n }\n\n let hasMatchingUpdate = Object.keys(updates).some(property => {\n // If the property is nested, like `foo.bar`, we need to check if the root `foo` is the target.\n if (property.includes('.')) {\n let propertyRoot = property.split('.')[0]\n\n if (propertyRoot === target) return true\n }\n\n return property === target\n })\n\n if (hasMatchingUpdate) return true\n\n if (calls.map(i => i.method).includes(target)) return true\n })\n}\n\nfunction getTargets(el) {\n let directives = getDirectives(el)\n\n let targets = []\n\n let inverted = false\n\n if (directives.has('target')) {\n let directive = directives.get('target')\n\n let raw = directive.expression\n\n if (directive.modifiers.includes(\"except\")) inverted = true\n\n if (raw.includes('(') && raw.includes(')')) {\n targets.push({ target: directive.method, params: quickHash(JSON.stringify(directive.params)) })\n } else if (raw.includes(',')) {\n raw.split(',').map(i => i.trim()).forEach(target => {\n targets.push({ target })\n })\n } else {\n targets.push({ target: raw })\n }\n } else {\n // If there is no wire:target, let's check for the existance of a wire:click=\"foo\" or something,\n // and automatically scope this loading directive to that action.\n let nonActionOrModelLivewireDirectives = [ 'init', 'dirty', 'offline', 'target', 'loading', 'poll', 'ignore', 'key', 'id' ]\n\n directives\n .all()\n .filter(i => ! nonActionOrModelLivewireDirectives.includes(i.value))\n .map(i => i.expression.split('(')[0])\n .forEach(target => targets.push({ target }))\n }\n\n return { targets, inverted }\n}\n\nfunction quickHash(subject) {\n return btoa(encodeURIComponent(subject))\n}\n", "import { contentIsFromDump } from '@/utils'\nimport { directive } from '@/directives'\nimport { on, trigger } from '@/hooks'\n\ndirective('stream', ({el, directive, cleanup }) => {\n let { expression, modifiers } = directive\n\n let off = on('stream', ({ name, content, replace }) => {\n if (name !== expression) return\n\n if (modifiers.includes('replace') || replace) {\n el.innerHTML = content\n } else {\n el.innerHTML = el.innerHTML + content\n }\n })\n\n cleanup(off)\n})\n\non('request', ({ respond }) => {\n respond(mutableObject => {\n let response = mutableObject.response\n\n if (! response.headers.has('X-Livewire-Stream')) return\n\n mutableObject.response = {\n ok: true,\n redirected: false,\n status: 200,\n\n async text() {\n let finalResponse = await interceptStreamAndReturnFinalResponse(response, streamed => {\n trigger('stream', streamed)\n })\n\n if (contentIsFromDump(finalResponse)) {\n this.ok = false\n }\n\n return finalResponse\n }\n }\n })\n})\n\nasync function interceptStreamAndReturnFinalResponse(response, callback) {\n let reader = response.body.getReader()\n let remainingResponse = ''\n\n while (true) {\n let { done, value: chunk } = await reader.read()\n\n let decoder = new TextDecoder\n let output = decoder.decode(chunk)\n\n let [ streams, remaining ] = extractStreamObjects(remainingResponse + output)\n\n streams.forEach(stream => {\n callback(stream)\n })\n\n remainingResponse = remaining\n\n if (done) return remainingResponse\n }\n}\n\nfunction extractStreamObjects(raw) {\n let regex = /({\"stream\":true.*?\"endStream\":true})/g\n\n let matches = raw.match(regex)\n\n let parsed = []\n\n if (matches) {\n for (let i = 0; i < matches.length; i++) {\n parsed.push(JSON.parse(matches[i]).body)\n }\n }\n\n let remaining = raw.replace(regex, '');\n\n return [ parsed, remaining ];\n}\n", "import { directive } from \"@/directives\"\n\ndirective('replace', ({ el, directive }) => {\n if (directive.modifiers.includes('self')) {\n el.__livewire_replace_self = true\n } else {\n el.__livewire_replace = true\n }\n})\n", "import { directive } from \"@/directives\"\n\ndirective('ignore', ({ el, directive }) => {\n if (directive.modifiers.includes('self')) {\n el.__livewire_ignore_self = true\n } else {\n el.__livewire_ignore = true\n }\n})\n", "import { toggleBooleanStateDirective } from './shared'\nimport { directive, getDirectives } from '@/directives'\nimport { dataGet, WeakBag } from '@/utils'\nimport { on } from '@/hooks'\n\nlet refreshDirtyStatesByComponent = new WeakBag\n\non('commit', ({ component, respond }) => {\n respond(() => {\n setTimeout(() => { // Doing a \"setTimeout\" to let morphdom do its thing first...\n refreshDirtyStatesByComponent.each(component, i => i(false))\n })\n })\n})\n\ndirective('dirty', ({ el, directive, component }) => {\n let targets = dirtyTargets(el)\n\n let dirty = Alpine.reactive({ state: false })\n\n let oldIsDirty = false\n\n let initialDisplay = el.style.display\n\n let refreshDirtyState = (isDirty) => {\n toggleBooleanStateDirective(el, directive, isDirty, initialDisplay)\n\n oldIsDirty = isDirty\n }\n\n refreshDirtyStatesByComponent.add(component, refreshDirtyState)\n\n Alpine.effect(() => {\n let isDirty = false\n\n if (targets.length === 0) {\n isDirty = JSON.stringify(component.canonical) !== JSON.stringify(component.reactive)\n } else {\n for (let i = 0; i < targets.length; i++) {\n if (isDirty) break;\n\n let target = targets[i]\n\n isDirty = JSON.stringify(dataGet(component.canonical, target)) !== JSON.stringify(dataGet(component.reactive, target))\n }\n }\n\n if (oldIsDirty !== isDirty) {\n refreshDirtyState(isDirty)\n }\n\n oldIsDirty = isDirty\n })\n})\n\nfunction dirtyTargets(el) {\n let directives = getDirectives(el)\n let targets = []\n\n if (directives.has('model')) {\n targets.push(directives.get('model').expression)\n }\n\n if (directives.has('target')) {\n targets = targets.concat(\n directives\n .get('target')\n .expression.split(',')\n .map(s => s.trim())\n )\n }\n\n return targets\n}\n", "import { directive } from '@/directives'\nimport { handleFileUpload } from '@/features/supportFileUploads'\nimport { closestComponent } from '@/store'\nimport { dataGet, dataSet } from '@/utils'\nimport Alpine from 'alpinejs'\n\ndirective('model', ({ el, directive, component, cleanup }) => {\n let { expression, modifiers } = directive\n\n if (! expression) {\n return console.warn('Livewire: [wire:model] is missing a value.', el)\n }\n\n if (componentIsMissingProperty(component, expression)) {\n return console.warn('Livewire: [wire:model=\"'+expression+'\"] property does not exist on component: ['+component.name+']', el)\n }\n\n // Handle file uploads differently...\n if (el.type && el.type.toLowerCase() === 'file') {\n return handleFileUpload(el, expression, component, cleanup)\n }\n\n let isLive = modifiers.includes('live')\n let isLazy = modifiers.includes('lazy') || modifiers.includes('change')\n let onBlur = modifiers.includes('blur')\n let isDebounced = modifiers.includes('debounce')\n\n // Trigger a network request (only if .live or .lazy is added to wire:model)...\n let update = expression.startsWith('$parent')\n ? () => component.$wire.$parent.$commit()\n : () => component.$wire.$commit()\n\n // If a plain wire:model is added to a text input, debounce the\n // trigerring of network requests.\n let debouncedUpdate = isTextInput(el) && ! isDebounced && isLive\n ? debounce(update, 150)\n : update\n\n Alpine.bind(el, {\n ['@change']() {\n isLazy && update()\n },\n ['@blur']() {\n onBlur && update()\n },\n ['x-model' + getModifierTail(modifiers)]() {\n return {\n get() {\n return dataGet(component.$wire, expression)\n },\n set(value) {\n dataSet(component.$wire, expression, value)\n\n isLive && (! isLazy) && (! onBlur) && debouncedUpdate()\n },\n }\n }\n })\n})\n\nfunction getModifierTail(modifiers) {\n modifiers = modifiers.filter(i => ! [\n 'lazy', 'defer'\n ].includes(i))\n\n if (modifiers.length === 0) return ''\n\n return '.' + modifiers.join('.')\n}\n\nfunction isTextInput(el) {\n return (\n ['INPUT', 'TEXTAREA'].includes(el.tagName.toUpperCase()) &&\n !['checkbox', 'radio'].includes(el.type)\n )\n}\n\nfunction isDirty(subject, dirty) {\n // Check for exact match: wire:model=\"bob\" in ['bob']\n if (dirty.includes(subject)) return true\n\n // Check case of parent: wire:model=\"bob.1\" in ['bob']\n return dirty.some(i => subject.startsWith(i))\n}\n\nfunction componentIsMissingProperty(component, property) {\n if (property.startsWith('$parent')) {\n let parent = closestComponent(component.el.parentElement, false)\n\n if (! parent) return true\n\n return componentIsMissingProperty(parent, property.split('$parent.')[1])\n }\n\n let baseProperty = property.split('.')[0]\n\n return ! Object.keys(component.canonical).includes(baseProperty)\n}\n\nfunction debounce(func, wait) {\n var timeout;\n\n return function() {\n var context = this, args = arguments;\n\n var later = function() {\n timeout = null\n\n func.apply(context, args)\n }\n\n clearTimeout(timeout)\n\n timeout = setTimeout(later, wait)\n }\n}\n", "import { directive } from \"@/directives\"\nimport Alpine from 'alpinejs'\n\ndirective('init', ({ el, directive }) => {\n let fullMethod = directive.expression ?? '$refresh'\n\n Alpine.evaluate(el, `$wire.${fullMethod}`)\n})\n\n", "import { directive, getDirectives } from \"@/directives\"\nimport Alpine from 'alpinejs'\n\ndirective('poll', ({ el, directive }) => {\n let interval = extractDurationFrom(directive.modifiers, 2000)\n\n let { start, pauseWhile, throttleWhile, stopWhen } = poll(() => {\n triggerComponentRequest(el, directive)\n }, interval)\n\n start()\n\n throttleWhile(() => theTabIsInTheBackground() && theDirectiveIsMissingKeepAlive(directive))\n pauseWhile(() => theDirectiveHasVisible(directive) && theElementIsNotInTheViewport(el))\n pauseWhile(() => theDirectiveIsOffTheElement(el))\n pauseWhile(() => livewireIsOffline())\n stopWhen(() => theElementIsDisconnected(el))\n})\n\nfunction triggerComponentRequest(el, directive) {\n Alpine.evaluate(el,\n directive.expression ? '$wire.' + directive.expression : '$wire.$commit()'\n )\n}\n\nfunction poll(callback, interval = 2000) {\n let pauseConditions = []\n let throttleConditions = []\n let stopConditions = []\n\n return {\n start() {\n let clear = syncronizedInterval(interval, () => {\n if (stopConditions.some(i => i())) return clear()\n if (pauseConditions.some(i => i())) return\n if (throttleConditions.some(i => i()) && Math.random() < .95) return\n\n callback()\n })\n },\n pauseWhile(condition) {\n pauseConditions.push(condition)\n },\n throttleWhile(condition) {\n throttleConditions.push(condition)\n },\n stopWhen(condition) {\n stopConditions.push(condition)\n }\n }\n}\n\nlet clocks = []\n\nfunction syncronizedInterval(ms, callback) {\n if (! clocks[ms]) {\n let clock = {\n timer: setInterval(() => clock.callbacks.forEach(i => i()), ms),\n callbacks: new Set,\n }\n\n clocks[ms] = clock\n }\n\n clocks[ms].callbacks.add(callback)\n\n return () => {\n clocks[ms].callbacks.delete(callback)\n\n if (clocks[ms].callbacks.size === 0) {\n clearInterval(clocks[ms].timer)\n delete clocks[ms]\n }\n }\n}\n\nlet isOffline = false\n\nwindow.addEventListener('offline', () => isOffline = true)\nwindow.addEventListener('online', () => isOffline = false)\n\nfunction livewireIsOffline() {\n return isOffline\n}\n\nlet inBackground = false\n\ndocument.addEventListener('visibilitychange', () => { inBackground = document.hidden }, false)\n\nfunction theTabIsInTheBackground() {\n return inBackground\n}\n\nfunction theDirectiveIsOffTheElement(el) {\n return ! getDirectives(el).has('poll')\n}\n\nfunction theDirectiveIsMissingKeepAlive(directive) {\n return ! directive.modifiers.includes('keep-alive')\n}\n\nfunction theDirectiveHasVisible(directive) {\n return directive.modifiers.includes('visible')\n}\n\nfunction theElementIsNotInTheViewport(el) {\n let bounding = el.getBoundingClientRect()\n\n return ! (\n bounding.top < (window.innerHeight || document.documentElement.clientHeight) &&\n bounding.left < (window.innerWidth || document.documentElement.clientWidth) &&\n bounding.bottom > 0 &&\n bounding.right > 0\n )\n}\n\nfunction theElementIsDisconnected(el) {\n return el.isConnected === false\n}\n\nfunction extractDurationFrom(modifiers, defaultDuration) {\n let durationInMilliSeconds\n let durationInMilliSecondsString = modifiers.find(mod => mod.match(/([0-9]+)ms/))\n let durationInSecondsString = modifiers.find(mod => mod.match(/([0-9]+)s/))\n\n if (durationInMilliSecondsString) {\n durationInMilliSeconds = Number(durationInMilliSecondsString.replace('ms', ''))\n } else if (durationInSecondsString) {\n durationInMilliSeconds = Number(durationInSecondsString.replace('s', '')) * 1000\n }\n\n return durationInMilliSeconds || defaultDuration\n}\n", "import { dispatchGlobal as dispatch, dispatchTo, on } from './events'\nimport { find, first, getByName, all } from './store'\nimport { start } from './lifecycle'\nimport { on as hook, trigger, triggerAsync } from './hooks'\nimport { directive } from './directives'\nimport Alpine from 'alpinejs'\n\nlet Livewire = {\n directive,\n dispatchTo,\n start,\n first,\n find,\n getByName,\n all,\n hook,\n trigger,\n triggerAsync,\n dispatch,\n on,\n get navigate() {\n return Alpine.navigate\n }\n}\n\nlet warnAboutMultipleInstancesOf = entity => console.warn(`Detected multiple instances of ${entity} running`)\n\nif (window.Livewire) warnAboutMultipleInstancesOf('Livewire')\nif (window.Alpine) warnAboutMultipleInstancesOf('Alpine')\n\n// Register features...\nimport './features/index'\n\n// Register directives...\nimport './directives/index'\n\n// Make globals...\nwindow.Livewire = Livewire\nwindow.Alpine = Alpine\n\nif (window.livewireScriptConfig === undefined) {\n window.Alpine.__fromLivewire = true\n\n document.addEventListener('DOMContentLoaded', () => {\n if (window.Alpine.__fromLivewire === undefined) {\n // If this is undefined, we know that an outside Alpine bundle\n // has been included on the page and will cause problems...\n warnAboutMultipleInstancesOf('Alpine')\n }\n\n // Start Livewire...\n Livewire.start()\n })\n}\n\nexport { Livewire, Alpine }\n"],
|
|
"mappings": "giBAAA,oBAGC,AAAC,UAAS,EAAM,EAAS,CAExB,AAAI,MAAO,SAAW,YAAc,OAAO,IACzC,OAAO,CAAO,EACT,AAAI,MAAO,KAAY,SAC5B,GAAO,QAAU,EAAQ,EAEzB,EAAK,UAAY,EAAQ,CAG7B,GAAG,GAAM,UAAW,CAClB,GAAI,GAAY,CAAC,EAEjB,EAAU,QAAU,QAEpB,GAAI,GAAW,EAAU,SAAW,CAClC,QAAS,IACT,OAAQ,OACR,cAAe,GACf,MAAO,IACP,QAAS,GACT,YAAa,IACb,a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