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KAAKE,QAChDF,KAAKE,OAAOO,OAAOT,MAEhBqB,CACX,CACJ,CACA,OAAO,CACX,EAGJ,MAAMG,EAAuB,CACzB,OAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,KACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,OAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,OAAO,IACP,SAAO,IACP,SAAO,IACP,SAAO,IACP,OAAO,IACP,OAAO,IACP,SAAO,IACP,OAAO,KAGLC,EAA0B,CAC5B,IAAO,IACP,EAAO,IACP,EAAO,IACP,EAAO,IACP,EAAO,IACP,EAAO,IACP,EAAO,IACP,EAAO,IACP,EAAO,IACP,EAAO,IACP,EAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,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EACAC,EAtFArU,EAAS,GACb,IAAK,IAAIf,KAAOhB,OAAOsR,GACjBtD,EAAe1K,KAAKgO,EAAQtQ,IAAe,eAAPA,GACtCe,EAAO1C,KAAK2B,GAGhB,OAAOe,CACT,CA+DA,SAAS0O,EAAQ5R,EAAOK,GAEtB,SADAA,EAAmB,MAAVA,EAAiB4K,EAAmB5K,KAE1B,iBAATL,GAAqByM,EAAS7J,KAAK5C,KAC1CA,GAAS,GAAKA,EAAQ,GAAK,GAAKA,EAAQK,CAC7C,CAkGA,IAAIkR,EAAU9I,MAAM8I,QA2BpB,SAASoB,EAAY3S,GACnB,OAAgB,MAATA,GAkFT,SAAkBA,GAChB,MAAuB,iBAATA,GACZA,GAAS,GAAKA,EAAQ,GAAK,GAAKA,GAASiL,CAC7C,CArF0BwL,CAASzW,EAAMK,UAiDzC,SAAoBL,GAGlB,IAAIsU,EA4DN,SAAkBtU,GAChB,IAAImF,SAAcnF,EAClB,QAASA,IAAkB,UAARmF,GAA4B,YAARA,EACzC,CA/DYuO,CAAS1T,GAASoP,EAAe3K,KAAKzE,GAAS,GACzD,OAAOsU,GAAO/I,GAAW+I,GAAOisF,CAClC,CAtDqDtqF,CAAWjW,EAChE,CA4KA,SAASoB,EAAKqR,GACZ,OAAOE,EAAYF,GAAUpB,EAAcoB,GAAU4E,EAAS5E,EAChE,CAkBA,SAAS0D,EAASnW,GAChB,OAAOA,CACT,CAEAqN,EAAOH,QArRP,SAAiB8E,EAAYjE,GAE3B,OADWwD,EAAQS,GAAcwuF,EAAYvuF,GACjCD,EAA+B,mBAAZjE,EAAyBA,EAAWoI,EACrE","sources":["webpack://rehomebase/./node_modules/@github/hotkey/dist/index.js","webpack://rehomebase/./node_modules/autosize/dist/autosize.esm.js","webpack://rehomebase/./node_modules/lodash.groupby/index.js","webpack://rehomebase/./node_modules/flatpickr/dist/esm/types/options.js","webpack://rehomebase/./node_modules/flatpickr/dist/esm/l10n/default.js","webpack://rehomebase/./node_modules/flatpickr/dist/esm/utils/index.js","webpack://rehomebase/./node_modules/flatpickr/dist/esm/utils/dom.js","webpack://rehomebase/./node_modules/flatpickr/dist/esm/utils/formatting.js","webpack://rehomebase/./node_modules/flatpickr/dist/esm/utils/dates.js","webpack://rehomebase/./node_modules/flatpickr/dist/esm/index.js","webpack://rehomebase/./node_modules/stimulus-flatpickr/dist/index.m.js","webpack://rehomebase/./node_modules/stimulus-use/dist/index.js","webpack://rehomebase/./node_modules/el-transition/index.js","webpack://rehomebase/./node_modules/sortablejs/modular/sortable.core.esm.js","webpack://rehomebase/./node_modules/tributejs/dist/tribute.min.js","webpack://rehomebase/./node_modules/flatpickr/dist/esm/utils/polyfills.js","webpack://rehomebase/./node_modules/@hotwired/turbo-rails/app/assets/javascripts/turbo.js","webpack://rehomebase/./node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js","webpack://rehomebase/./node_modules/lodash.sortby/index.js","webpack://rehomebase/./node_modules/@tarekraafat/autocomplete.js/dist/autoComplete.min.js","webpack://rehomebase/./node_modules/driver.js/dist/driver.js.mjs","webpack://rehomebase/./node_modules/lodash.foreach/index.js"],"sourcesContent":["class Leaf {\n constructor(trie) {\n this.children = [];\n this.parent = trie;\n }\n delete(value) {\n const index = this.children.indexOf(value);\n if (index === -1)\n return false;\n this.children = this.children.slice(0, index).concat(this.children.slice(index + 1));\n if (this.children.length === 0) {\n this.parent.delete(this);\n }\n return true;\n }\n add(value) {\n this.children.push(value);\n return this;\n }\n}\nclass RadixTrie {\n constructor(trie) {\n this.parent = null;\n this.children = {};\n this.parent = trie || null;\n }\n get(edge) {\n return this.children[edge];\n }\n insert(edges) {\n let currentNode = this;\n for (let i = 0; i < edges.length; i += 1) {\n const edge = edges[i];\n let nextNode = currentNode.get(edge);\n if (i === edges.length - 1) {\n if (nextNode instanceof RadixTrie) {\n currentNode.delete(nextNode);\n nextNode = null;\n }\n if (!nextNode) {\n nextNode = new Leaf(currentNode);\n currentNode.children[edge] = nextNode;\n }\n return nextNode;\n }\n else {\n if (nextNode instanceof Leaf)\n nextNode = null;\n if (!nextNode) {\n nextNode = new RadixTrie(currentNode);\n currentNode.children[edge] = nextNode;\n }\n }\n currentNode = nextNode;\n }\n return currentNode;\n }\n delete(node) {\n for (const edge in this.children) {\n const currentNode = this.children[edge];\n if (currentNode === node) {\n const success = delete this.children[edge];\n if (Object.keys(this.children).length === 0 && this.parent) {\n this.parent.delete(this);\n }\n return success;\n }\n }\n return false;\n }\n}\n\nconst macosSymbolLayerKeys = {\n ['¡']: '1',\n ['™']: '2',\n ['£']: '3',\n ['¢']: '4',\n ['∞']: '5',\n ['§']: '6',\n ['¶']: '7',\n ['•']: '8',\n ['ª']: '9',\n ['º']: '0',\n ['–']: '-',\n ['≠']: '=',\n ['⁄']: '!',\n ['€']: '@',\n ['‹']: '#',\n ['›']: '$',\n ['fi']: '%',\n ['fl']: '^',\n ['‡']: '&',\n ['°']: '*',\n ['·']: '(',\n ['‚']: ')',\n ['—']: '_',\n ['±']: '+',\n ['œ']: 'q',\n ['∑']: 'w',\n ['®']: 'r',\n ['†']: 't',\n ['¥']: 'y',\n ['ø']: 'o',\n ['π']: 'p',\n ['“']: '[',\n ['‘']: ']',\n ['«']: '\\\\',\n ['Œ']: 'Q',\n ['„']: 'W',\n ['´']: 'E',\n ['‰']: 'R',\n ['ˇ']: 'T',\n ['Á']: 'Y',\n ['¨']: 'U',\n ['ˆ']: 'I',\n ['Ø']: 'O',\n ['∏']: 'P',\n ['”']: '{',\n ['’']: '}',\n ['»']: '|',\n ['å']: 'a',\n ['ß']: 's',\n ['∂']: 'd',\n ['ƒ']: 'f',\n ['©']: 'g',\n ['˙']: 'h',\n ['∆']: 'j',\n ['˚']: 'k',\n ['¬']: 'l',\n ['…']: ';',\n ['æ']: \"'\",\n ['Å']: 'A',\n ['Í']: 'S',\n ['Î']: 'D',\n ['Ï']: 'F',\n ['˝']: 'G',\n ['Ó']: 'H',\n ['Ô']: 'J',\n ['']: 'K',\n ['Ò']: 'L',\n ['Ú']: ':',\n ['Æ']: '\"',\n ['Ω']: 'z',\n ['≈']: 'x',\n ['ç']: 'c',\n ['√']: 'v',\n ['∫']: 'b',\n ['µ']: 'm',\n ['≤']: ',',\n ['≥']: '.',\n ['÷']: '/',\n ['¸']: 'Z',\n ['˛']: 'X',\n ['Ç']: 'C',\n ['◊']: 'V',\n ['ı']: 'B',\n ['˜']: 'N',\n ['Â']: 'M',\n ['¯']: '<',\n ['˘']: '>',\n ['¿']: '?'\n};\n\nconst macosUppercaseLayerKeys = {\n ['`']: '~',\n ['1']: '!',\n ['2']: '@',\n ['3']: '#',\n ['4']: '$',\n ['5']: '%',\n ['6']: '^',\n ['7']: '&',\n ['8']: '*',\n ['9']: '(',\n ['0']: ')',\n ['-']: '_',\n ['=']: '+',\n ['[']: '{',\n [']']: '}',\n ['\\\\']: '|',\n [';']: ':',\n [\"'\"]: '\"',\n [',']: '<',\n ['.']: '>',\n ['/']: '?',\n ['q']: 'Q',\n ['w']: 'W',\n ['e']: 'E',\n ['r']: 'R',\n ['t']: 'T',\n ['y']: 'Y',\n ['u']: 'U',\n ['i']: 'I',\n ['o']: 'O',\n ['p']: 'P',\n ['a']: 'A',\n ['s']: 'S',\n ['d']: 'D',\n ['f']: 'F',\n ['g']: 'G',\n ['h']: 'H',\n ['j']: 'J',\n ['k']: 'K',\n ['l']: 'L',\n ['z']: 'Z',\n ['x']: 'X',\n ['c']: 'C',\n ['v']: 'V',\n ['b']: 'B',\n ['n']: 'N',\n ['m']: 'M'\n};\n\nconst syntheticKeyNames = {\n ' ': 'Space',\n '+': 'Plus'\n};\nfunction eventToHotkeyString(event, platform = navigator.platform) {\n var _a, _b, _c;\n const { ctrlKey, altKey, metaKey, shiftKey, key } = event;\n const hotkeyString = [];\n const modifiers = [ctrlKey, altKey, metaKey, shiftKey];\n for (const [i, mod] of modifiers.entries()) {\n if (mod)\n hotkeyString.push(modifierKeyNames[i]);\n }\n if (!modifierKeyNames.includes(key)) {\n const altNormalizedKey = hotkeyString.includes('Alt') && matchApplePlatform.test(platform) ? (_a = macosSymbolLayerKeys[key]) !== null && _a !== void 0 ? _a : key : key;\n const shiftNormalizedKey = hotkeyString.includes('Shift') && matchApplePlatform.test(platform)\n ? (_b = macosUppercaseLayerKeys[altNormalizedKey]) !== null && _b !== void 0 ? _b : altNormalizedKey\n : altNormalizedKey;\n const syntheticKey = (_c = syntheticKeyNames[shiftNormalizedKey]) !== null && _c !== void 0 ? _c : shiftNormalizedKey;\n hotkeyString.push(syntheticKey);\n }\n return hotkeyString.join('+');\n}\nconst modifierKeyNames = ['Control', 'Alt', 'Meta', 'Shift'];\nfunction normalizeHotkey(hotkey, platform) {\n let result;\n result = localizeMod(hotkey, platform);\n result = sortModifiers(result);\n return result;\n}\nconst matchApplePlatform = /Mac|iPod|iPhone|iPad/i;\nfunction localizeMod(hotkey, platform) {\n var _a;\n const ssrSafeWindow = typeof window === 'undefined' ? undefined : window;\n const safePlatform = (_a = platform !== null && platform !== void 0 ? platform : ssrSafeWindow === null || ssrSafeWindow === void 0 ? void 0 : ssrSafeWindow.navigator.platform) !== null && _a !== void 0 ? _a : '';\n const localModifier = matchApplePlatform.test(safePlatform) ? 'Meta' : 'Control';\n return hotkey.replace('Mod', localModifier);\n}\nfunction sortModifiers(hotkey) {\n const key = hotkey.split('+').pop();\n const modifiers = [];\n for (const modifier of ['Control', 'Alt', 'Meta', 'Shift']) {\n if (hotkey.includes(modifier)) {\n modifiers.push(modifier);\n }\n }\n if (key)\n modifiers.push(key);\n return modifiers.join('+');\n}\n\nconst SEQUENCE_DELIMITER = ' ';\nclass SequenceTracker {\n constructor({ onReset } = {}) {\n this._path = [];\n this.timer = null;\n this.onReset = onReset;\n }\n get path() {\n return this._path;\n }\n get sequence() {\n return this._path.join(SEQUENCE_DELIMITER);\n }\n registerKeypress(event) {\n this._path = [...this._path, eventToHotkeyString(event)];\n this.startTimer();\n }\n reset() {\n var _a;\n this.killTimer();\n this._path = [];\n (_a = this.onReset) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n killTimer() {\n if (this.timer != null) {\n window.clearTimeout(this.timer);\n }\n this.timer = null;\n }\n startTimer() {\n this.killTimer();\n this.timer = window.setTimeout(() => this.reset(), SequenceTracker.CHORD_TIMEOUT);\n }\n}\nSequenceTracker.CHORD_TIMEOUT = 1500;\nfunction normalizeSequence(sequence) {\n return sequence\n .split(SEQUENCE_DELIMITER)\n .map(h => normalizeHotkey(h))\n .join(SEQUENCE_DELIMITER);\n}\n\nfunction isFormField(element) {\n if (!(element instanceof HTMLElement)) {\n return false;\n }\n const name = element.nodeName.toLowerCase();\n const type = (element.getAttribute('type') || '').toLowerCase();\n return (name === 'select' ||\n name === 'textarea' ||\n (name === 'input' &&\n type !== 'submit' &&\n type !== 'reset' &&\n type !== 'checkbox' &&\n type !== 'radio' &&\n type !== 'file') ||\n element.isContentEditable);\n}\nfunction fireDeterminedAction(el, path) {\n const delegateEvent = new CustomEvent('hotkey-fire', { cancelable: true, detail: { path } });\n const cancelled = !el.dispatchEvent(delegateEvent);\n if (cancelled)\n return;\n if (isFormField(el)) {\n el.focus();\n }\n else {\n el.click();\n }\n}\nfunction expandHotkeyToEdges(hotkey) {\n const output = [];\n let acc = [''];\n let commaIsSeparator = false;\n for (let i = 0; i < hotkey.length; i++) {\n if (commaIsSeparator && hotkey[i] === ',') {\n output.push(acc);\n acc = [''];\n commaIsSeparator = false;\n continue;\n }\n if (hotkey[i] === SEQUENCE_DELIMITER) {\n acc.push('');\n commaIsSeparator = false;\n continue;\n }\n else if (hotkey[i] === '+') {\n commaIsSeparator = false;\n }\n else {\n commaIsSeparator = true;\n }\n acc[acc.length - 1] += hotkey[i];\n }\n output.push(acc);\n return output.map(h => h.map(k => normalizeHotkey(k)).filter(k => k !== '')).filter(h => h.length > 0);\n}\n\nconst hotkeyRadixTrie = new RadixTrie();\nconst elementsLeaves = new WeakMap();\nlet currentTriePosition = hotkeyRadixTrie;\nconst sequenceTracker = new SequenceTracker({\n onReset() {\n currentTriePosition = hotkeyRadixTrie;\n }\n});\nfunction keyDownHandler(event) {\n if (event.defaultPrevented)\n return;\n if (!(event.target instanceof Node))\n return;\n if (isFormField(event.target)) {\n const target = event.target;\n if (!target.id)\n return;\n if (!target.ownerDocument.querySelector(`[data-hotkey-scope=\"${target.id}\"]`))\n return;\n }\n const newTriePosition = currentTriePosition.get(eventToHotkeyString(event));\n if (!newTriePosition) {\n sequenceTracker.reset();\n return;\n }\n sequenceTracker.registerKeypress(event);\n currentTriePosition = newTriePosition;\n if (newTriePosition instanceof Leaf) {\n const target = event.target;\n let shouldFire = false;\n let elementToFire;\n const formField = isFormField(target);\n for (let i = newTriePosition.children.length - 1; i >= 0; i -= 1) {\n elementToFire = newTriePosition.children[i];\n const scope = elementToFire.getAttribute('data-hotkey-scope');\n if ((!formField && !scope) || (formField && target.id === scope)) {\n shouldFire = true;\n break;\n }\n }\n if (elementToFire && shouldFire) {\n fireDeterminedAction(elementToFire, sequenceTracker.path);\n event.preventDefault();\n }\n sequenceTracker.reset();\n }\n}\nfunction install(element, hotkey) {\n if (Object.keys(hotkeyRadixTrie.children).length === 0) {\n document.addEventListener('keydown', keyDownHandler);\n }\n const hotkeys = expandHotkeyToEdges(hotkey || element.getAttribute('data-hotkey') || '');\n const leaves = hotkeys.map(h => hotkeyRadixTrie.insert(h).add(element));\n elementsLeaves.set(element, leaves);\n}\nfunction uninstall(element) {\n const leaves = elementsLeaves.get(element);\n if (leaves && leaves.length) {\n for (const leaf of leaves) {\n leaf && leaf.delete(element);\n }\n }\n if (Object.keys(hotkeyRadixTrie.children).length === 0) {\n document.removeEventListener('keydown', keyDownHandler);\n }\n}\n\nexport { Leaf, RadixTrie, SequenceTracker, eventToHotkeyString, install, normalizeHotkey, normalizeSequence, uninstall };\n","var e=new Map;function t(t){var o=e.get(t);o&&o.destroy()}function o(t){var o=e.get(t);o&&o.update()}var r=null;\"undefined\"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,o){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return function(t){if(t&&t.nodeName&&\"TEXTAREA\"===t.nodeName&&!e.has(t)){var o,r=null,n=window.getComputedStyle(t),i=(o=t.value,function(){a({testForHeightReduction:\"\"===o||!t.value.startsWith(o),restoreTextAlign:null}),o=t.value}),l=function(o){t.removeEventListener(\"autosize:destroy\",l),t.removeEventListener(\"autosize:update\",s),t.removeEventListener(\"input\",i),window.removeEventListener(\"resize\",s),Object.keys(o).forEach(function(e){return t.style[e]=o[e]}),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener(\"autosize:destroy\",l),t.addEventListener(\"autosize:update\",s),t.addEventListener(\"input\",i),window.addEventListener(\"resize\",s),t.style.overflowX=\"hidden\",t.style.wordWrap=\"break-word\",e.set(t,{destroy:l,update:s}),s()}function a(e){var o,i,l=e.restoreTextAlign,s=void 0===l?null:l,d=e.testForHeightReduction,u=void 0===d||d,c=n.overflowY;if(0!==t.scrollHeight&&(\"vertical\"===n.resize?t.style.resize=\"none\":\"both\"===n.resize&&(t.style.resize=\"horizontal\"),u&&(o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach(function(e){var t=e[0],o=e[1];t.style.scrollBehavior=\"auto\",t.scrollTop=o,t.style.scrollBehavior=null})}}(t),t.style.height=\"\"),i=\"content-box\"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),\"none\"!==n.maxHeight&&i>parseFloat(n.maxHeight)?(\"hidden\"===n.overflowY&&(t.style.overflow=\"scroll\"),i=parseFloat(n.maxHeight)):\"hidden\"!==n.overflowY&&(t.style.overflow=\"hidden\"),t.style.height=i+\"px\",s&&(t.style.textAlign=s),o&&o(),r!==i&&(t.dispatchEvent(new Event(\"autosize:resized\",{bubbles:!0})),r=i),c!==n.overflow&&!s)){var v=n.textAlign;\"hidden\"===n.overflow&&(t.style.textAlign=\"start\"===v?\"end\":\"start\"),a({restoreTextAlign:v,testForHeightReduction:!0})}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(t)}),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e});var n=r;export default n;\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for comparison styles. */\nvar UNORDERED_COMPARE_FLAG = 1,\n PARTIAL_COMPARE_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {boolean} [bitmask] The bitmask of comparison flags.\n * The bitmask may be composed of the following flags:\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, customizer, bitmask, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = arrayTag,\n othTag = arrayTag;\n\n if (!objIsArr) {\n objTag = getTag(object);\n objTag = objTag == argsTag ? objectTag : objTag;\n }\n if (!othIsArr) {\n othTag = getTag(other);\n othTag = othTag == argsTag ? objectTag : othTag;\n }\n var objIsObj = objTag == objectTag && !isHostObject(object),\n othIsObj = othTag == objectTag && !isHostObject(other),\n isSameTag = objTag == othTag;\n\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)\n : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);\n }\n if (!(bitmask & PARTIAL_COMPARE_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, equalFunc, customizer, bitmask, stack);\n}\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);\n };\n}\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!seen.has(othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n return seen.add(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, customizer, bitmask, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= UNORDERED_COMPARE_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n objProps = keys(object),\n objLength = objProps.length,\n othProps = keys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var result,\n index = -1,\n length = path.length;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result) {\n return result;\n }\n var length = object ? object.length : 0;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity]\n * The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n result[key] = [value];\n }\n});\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = groupBy;\n","export var HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n];\nexport var defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n};\n","export var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n};\nexport default english;\n","export var pad = function (number, length) {\n if (length === void 0) { length = 2; }\n return (\"000\" + number).slice(length * -1);\n};\nexport var int = function (bool) { return (bool === true ? 1 : 0); };\nexport function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n };\n}\nexport var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n};\n","export function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n}\nexport function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nexport function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n}\n","import { int, pad } from \"../utils\";\nvar doNothing = function () { return undefined; };\nexport var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\nexport var revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n};\nexport var tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n};\nexport var formats = {\n Z: function (date) { return date.toISOString(); },\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: function (date) { return pad(date.getHours()); },\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: function (date) { return pad(date.getSeconds()); },\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: function (date) { return pad(date.getFullYear(), 4); },\n d: function (date) { return pad(date.getDate()); },\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n i: function (date) { return pad(date.getMinutes()); },\n j: function (date) { return date.getDate(); },\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function (date) { return pad(date.getMonth() + 1); },\n n: function (date) { return date.getMonth() + 1; },\n s: function (date) { return date.getSeconds(); },\n u: function (date) { return date.getTime(); },\n w: function (date) { return date.getDay(); },\n y: function (date) { return String(date.getFullYear()).substring(2); },\n};\n","import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n};\nexport var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n }\n else {\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n }\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n};\nexport function compareDates(date1, date2, timeless) {\n if (timeless === void 0) { timeless = true; }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n}\nexport var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function (secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours: hours, minutes: minutes, seconds: seconds };\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n l10n: English,\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) { month = self.currentMonth; }\n if (yr === void 0) { yr = self.currentYear; }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function getClosestActiveElement() {\n var _a;\n return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n .activeElement || document.activeElement);\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined ||\n compareDates(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n var defaults = getDefaultHours(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (self.config.maxTime !== undefined &&\n self.config.minTime !== undefined &&\n self.config.minTime > self.config.maxTime) {\n var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n if (currentTime > maxBound && currentTime < minBound) {\n var result = parseSeconds(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n }\n else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n function onYearInput(event) {\n var eventTarget = getEventTarget(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: function () { return element.removeEventListener(event, handler, options); },\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver(getEventTarget(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return getEventTarget(e).select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n var eventTarget = getEventTarget(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n var target = e && getEventTarget(e);\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = getEventTarget(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement,\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = getDefaultHours(self.config);\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers,\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) { isOffset = true; }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n if (toInitial === void 0) { toInitial = true; }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1)\n self.clear(false);\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n var _a;\n if (timeless === void 0) { timeless = true; }\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n if (isInput &&\n valueChanged &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n var eventTarget = getEventTarget(e);\n var isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (activeElement && isInView(activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(eventTarget);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) { cellClass = \"flatpickr-day\"; }\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(cellClass) ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n }\n else if (containsDisabled && !outOfRange)\n return;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n });\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) { positionElement = self._positionElement; }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = getEventTarget(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n },\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\"),\n });\n var minMaxTimeSetter = function (type) { return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n }; };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n var editableSheet = null;\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules)\n continue;\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = findParent(getEventTarget(e), isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [\n function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) { triggerChange = false; }\n if (format === void 0) { format = self.config.dateFormat; }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter(function (x) { return x; });\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date &&\n compareDates(selectedDate, date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(specificFormat) {\n var format = specificFormat ||\n (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange) {\n if (triggerChange === void 0) { triggerChange = true; }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var eventTarget = getEventTarget(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n}\nfunction _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\nvar flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: __assign({}, English),\n default: __assign({}, English),\n};\nflatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n","import flatpickr from 'flatpickr';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n return function () {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (_isNativeReflectConstruct()) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\n/*\nStimulus 3.0.0\nCopyright © 2021 Basecamp, LLC\n */\n\nfunction camelize(value) {\n return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\n\nfunction capitalize(value) {\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\n\nfunction dasherize(value) {\n return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n const ancestors = getAncestorsForConstructor(constructor);\n return Array.from(ancestors.reduce((values, constructor) => {\n getOwnStaticArrayValues(constructor, propertyName).forEach(name => values.add(name));\n return values;\n }, new Set()));\n}\n\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n const ancestors = getAncestorsForConstructor(constructor);\n return ancestors.reduce((pairs, constructor) => {\n pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n return pairs;\n }, []);\n}\n\nfunction getAncestorsForConstructor(constructor) {\n const ancestors = [];\n\n while (constructor) {\n ancestors.push(constructor);\n constructor = Object.getPrototypeOf(constructor);\n }\n\n return ancestors.reverse();\n}\n\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n const definition = constructor[propertyName];\n return Array.isArray(definition) ? definition : [];\n}\n\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n const definition = constructor[propertyName];\n return definition ? Object.keys(definition).map(key => [key, definition[key]]) : [];\n}\n\nconst extend = (() => {\n function extendWithReflect(constructor) {\n function extended() {\n return Reflect.construct(constructor, arguments, new.target);\n }\n\n extended.prototype = Object.create(constructor.prototype, {\n constructor: {\n value: extended\n }\n });\n Reflect.setPrototypeOf(extended, constructor);\n return extended;\n }\n\n function testReflectExtension() {\n const a = function () {\n this.a.call(this);\n };\n\n const b = extendWithReflect(a);\n\n b.prototype.a = function () {};\n\n return new b();\n }\n\n try {\n testReflectExtension();\n return extendWithReflect;\n } catch (error) {\n return constructor => class extended extends constructor {};\n }\n})();\n\nfunction ClassPropertiesBlessing(constructor) {\n const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n return classes.reduce((properties, classDefinition) => {\n return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n }, {});\n}\n\nfunction propertiesForClassDefinition(key) {\n return {\n [`${key}Class`]: {\n get() {\n const {\n classes\n } = this;\n\n if (classes.has(key)) {\n return classes.get(key);\n } else {\n const attribute = classes.getAttributeName(key);\n throw new Error(`Missing attribute \"${attribute}\"`);\n }\n }\n\n },\n [`${key}Classes`]: {\n get() {\n return this.classes.getAll(key);\n }\n\n },\n [`has${capitalize(key)}Class`]: {\n get() {\n return this.classes.has(key);\n }\n\n }\n };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n return targets.reduce((properties, targetDefinition) => {\n return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n }, {});\n}\n\nfunction propertiesForTargetDefinition(name) {\n return {\n [`${name}Target`]: {\n get() {\n const target = this.targets.find(name);\n\n if (target) {\n return target;\n } else {\n throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n }\n }\n\n },\n [`${name}Targets`]: {\n get() {\n return this.targets.findAll(name);\n }\n\n },\n [`has${capitalize(name)}Target`]: {\n get() {\n return this.targets.has(name);\n }\n\n }\n };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n const propertyDescriptorMap = {\n valueDescriptorMap: {\n get() {\n return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair);\n const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n return Object.assign(result, {\n [attributeName]: valueDescriptor\n });\n }, {});\n }\n\n }\n };\n return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n }, propertyDescriptorMap);\n}\n\nfunction propertiesForValueDefinitionPair(valueDefinitionPair) {\n const definition = parseValueDefinitionPair(valueDefinitionPair);\n const {\n key,\n name,\n reader: read,\n writer: write\n } = definition;\n return {\n [name]: {\n get() {\n const value = this.data.get(key);\n\n if (value !== null) {\n return read(value);\n } else {\n return definition.defaultValue;\n }\n },\n\n set(value) {\n if (value === undefined) {\n this.data.delete(key);\n } else {\n this.data.set(key, write(value));\n }\n }\n\n },\n [`has${capitalize(name)}`]: {\n get() {\n return this.data.has(key) || definition.hasCustomDefaultValue;\n }\n\n }\n };\n}\n\nfunction parseValueDefinitionPair([token, typeDefinition]) {\n return valueDescriptorForTokenAndTypeDefinition(token, typeDefinition);\n}\n\nfunction parseValueTypeConstant(constant) {\n switch (constant) {\n case Array:\n return \"array\";\n\n case Boolean:\n return \"boolean\";\n\n case Number:\n return \"number\";\n\n case Object:\n return \"object\";\n\n case String:\n return \"string\";\n }\n}\n\nfunction parseValueTypeDefault(defaultValue) {\n switch (typeof defaultValue) {\n case \"boolean\":\n return \"boolean\";\n\n case \"number\":\n return \"number\";\n\n case \"string\":\n return \"string\";\n }\n\n if (Array.isArray(defaultValue)) return \"array\";\n if (Object.prototype.toString.call(defaultValue) === \"[object Object]\") return \"object\";\n}\n\nfunction parseValueTypeObject(typeObject) {\n const typeFromObject = parseValueTypeConstant(typeObject.type);\n\n if (typeFromObject) {\n const defaultValueType = parseValueTypeDefault(typeObject.default);\n\n if (typeFromObject !== defaultValueType) {\n throw new Error(`Type \"${typeFromObject}\" must match the type of the default value. Given default value: \"${typeObject.default}\" as \"${defaultValueType}\"`);\n }\n\n return typeFromObject;\n }\n}\n\nfunction parseValueTypeDefinition(typeDefinition) {\n const typeFromObject = parseValueTypeObject(typeDefinition);\n const typeFromDefaultValue = parseValueTypeDefault(typeDefinition);\n const typeFromConstant = parseValueTypeConstant(typeDefinition);\n const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n if (type) return type;\n throw new Error(`Unknown value type \"${typeDefinition}\"`);\n}\n\nfunction defaultValueForDefinition(typeDefinition) {\n const constant = parseValueTypeConstant(typeDefinition);\n if (constant) return defaultValuesByType[constant];\n const defaultValue = typeDefinition.default;\n if (defaultValue !== undefined) return defaultValue;\n return typeDefinition;\n}\n\nfunction valueDescriptorForTokenAndTypeDefinition(token, typeDefinition) {\n const key = `${dasherize(token)}-value`;\n const type = parseValueTypeDefinition(typeDefinition);\n return {\n type,\n key,\n name: camelize(key),\n\n get defaultValue() {\n return defaultValueForDefinition(typeDefinition);\n },\n\n get hasCustomDefaultValue() {\n return parseValueTypeDefault(typeDefinition) !== undefined;\n },\n\n reader: readers[type],\n writer: writers[type] || writers.default\n };\n}\n\nconst defaultValuesByType = {\n get array() {\n return [];\n },\n\n boolean: false,\n number: 0,\n\n get object() {\n return {};\n },\n\n string: \"\"\n};\nconst readers = {\n array(value) {\n const array = JSON.parse(value);\n\n if (!Array.isArray(array)) {\n throw new TypeError(\"Expected array\");\n }\n\n return array;\n },\n\n boolean(value) {\n return !(value == \"0\" || value == \"false\");\n },\n\n number(value) {\n return Number(value);\n },\n\n object(value) {\n const object = JSON.parse(value);\n\n if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n throw new TypeError(\"Expected object\");\n }\n\n return object;\n },\n\n string(value) {\n return value;\n }\n\n};\nconst writers = {\n default: writeString,\n array: writeJSON,\n object: writeJSON\n};\n\nfunction writeJSON(value) {\n return JSON.stringify(value);\n}\n\nfunction writeString(value) {\n return `${value}`;\n}\n\nclass Controller {\n constructor(context) {\n this.context = context;\n }\n\n static get shouldLoad() {\n return true;\n }\n\n get application() {\n return this.context.application;\n }\n\n get scope() {\n return this.context.scope;\n }\n\n get element() {\n return this.scope.element;\n }\n\n get identifier() {\n return this.scope.identifier;\n }\n\n get targets() {\n return this.scope.targets;\n }\n\n get classes() {\n return this.scope.classes;\n }\n\n get data() {\n return this.scope.data;\n }\n\n initialize() {}\n\n connect() {}\n\n disconnect() {}\n\n dispatch(eventName, {\n target = this.element,\n detail = {},\n prefix = this.identifier,\n bubbles = true,\n cancelable = true\n } = {}) {\n const type = prefix ? `${prefix}:${eventName}` : eventName;\n const event = new CustomEvent(type, {\n detail,\n bubbles,\n cancelable\n });\n target.dispatchEvent(event);\n return event;\n }\n\n}\n\nController.blessings = [ClassPropertiesBlessing, TargetPropertiesBlessing, ValuePropertiesBlessing];\nController.targets = [];\nController.values = {};\n\nconst kebabCase = string => string.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\nconst capitalize$1 = string => {\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nconst booleanOptions = ['allowInput', 'altInput', 'animate', 'clickOpens', 'closeOnSelect', 'disableMobile', 'enableSeconds', 'enableTime', 'inline', 'noCalendar', 'shorthandCurrentMonth', 'static', 'time_24hr', 'weekNumbers', 'wrap'];\nconst stringOptions = ['altInputClass', 'conjunction', 'mode', 'nextArrow', 'position', 'prevArrow', 'monthSelectorType'];\nconst numberOptions = ['defaultHour', 'defaultMinute', 'defaultSeconds', 'hourIncrement', 'minuteIncrement', 'showMonths'];\nconst arrayOptions = ['disable', 'enable', 'disableDaysOfWeek', 'enableDaysOfWeek'];\nconst arrayOrStringOptions = ['defaultDate'];\nconst dateOptions = ['maxDate', 'minDate', 'maxTime', 'minTime', 'now'];\nconst dateFormats = ['altFormat', 'ariaDateFormat', 'dateFormat'];\nconst options = {\n string: stringOptions,\n boolean: booleanOptions,\n date: dateOptions,\n array: arrayOptions,\n number: numberOptions,\n arrayOrString: arrayOrStringOptions\n};\n\nconst events = ['change', 'open', 'close', 'monthChange', 'yearChange', 'ready', 'valueUpdate', 'dayCreate'];\n\nconst elements = ['calendarContainer', 'currentYearElement', 'days', 'daysContainer', 'input', 'nextMonthNav', 'monthNav', 'prevMonthNav', 'rContainer', 'selectedDateElem', 'todayDateElem', 'weekdayContainer'];\n\nconst mapping = {\n '%Y': 'Y',\n '%y': 'y',\n '%C': 'Y',\n '%m': 'm',\n '%-m': 'n',\n '%_m': 'n',\n '%B': 'F',\n '%^B': 'F',\n '%b': 'M',\n '%^b': 'M',\n '%h': 'M',\n '%^h': 'M',\n '%d': 'd',\n '%-d': 'j',\n '%e': 'j',\n '%H': 'H',\n '%k': 'H',\n '%I': 'h',\n '%l': 'h',\n '%-l': 'h',\n '%P': 'K',\n '%p': 'K',\n '%M': 'i',\n '%S': 'S',\n '%A': 'l',\n '%a': 'D',\n '%w': 'w'\n};\nconst strftimeRegex = new RegExp(Object.keys(mapping).join('|').replace(new RegExp('\\\\^', 'g'), '\\\\^'), 'g');\nconst convertDateFormat = format => {\n return format.replace(strftimeRegex, match => {\n return mapping[match];\n });\n};\n\nlet StimulusFlatpickr = /*#__PURE__*/function (_Controller) {\n _inherits(StimulusFlatpickr, _Controller);\n\n var _super = _createSuper(StimulusFlatpickr);\n\n function StimulusFlatpickr() {\n _classCallCheck(this, StimulusFlatpickr);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(StimulusFlatpickr, [{\n key: \"initialize\",\n value: function initialize() {\n this.config = {};\n }\n }, {\n key: \"connect\",\n value: function connect() {\n this._initializeEvents();\n\n this._initializeOptions();\n\n this._initializeDateFormats();\n\n this.fp = flatpickr(this.flatpickrElement, _objectSpread2({}, this.config));\n\n this._initializeElements();\n }\n }, {\n key: \"disconnect\",\n value: function disconnect() {\n const value = this.inputTarget.value;\n this.fp.destroy();\n this.inputTarget.value = value;\n }\n }, {\n key: \"_initializeEvents\",\n value: function _initializeEvents() {\n events.forEach(event => {\n if (this[event]) {\n const hook = `on${capitalize$1(event)}`;\n this.config[hook] = this[event].bind(this);\n }\n });\n }\n }, {\n key: \"_initializeOptions\",\n value: function _initializeOptions() {\n Object.keys(options).forEach(optionType => {\n const optionsCamelCase = options[optionType];\n optionsCamelCase.forEach(option => {\n const optionKebab = kebabCase(option);\n\n if (this.data.has(optionKebab)) {\n this.config[option] = this[`_${optionType}`](optionKebab);\n }\n });\n });\n\n this._handleDaysOfWeek();\n }\n }, {\n key: \"_handleDaysOfWeek\",\n value: function _handleDaysOfWeek() {\n if (this.config.disableDaysOfWeek) {\n this.config.disableDaysOfWeek = this._validateDaysOfWeek(this.config.disableDaysOfWeek);\n this.config.disable = [...(this.config.disable || []), this._disable.bind(this)];\n }\n\n if (this.config.enableDaysOfWeek) {\n this.config.enableDaysOfWeek = this._validateDaysOfWeek(this.config.enableDaysOfWeek);\n this.config.enable = [...(this.config.enable || []), this._enable.bind(this)];\n }\n }\n }, {\n key: \"_validateDaysOfWeek\",\n value: function _validateDaysOfWeek(days) {\n if (Array.isArray(days)) {\n return days.map(day => parseInt(day));\n } else {\n console.error('days of week must be a valid array');\n return [];\n }\n }\n }, {\n key: \"_disable\",\n value: function _disable(date) {\n const disabledDays = this.config.disableDaysOfWeek;\n return disabledDays.includes(date.getDay());\n }\n }, {\n key: \"_enable\",\n value: function _enable(date) {\n const enabledDays = this.config.enableDaysOfWeek;\n return enabledDays.includes(date.getDay());\n }\n }, {\n key: \"_initializeDateFormats\",\n value: function _initializeDateFormats() {\n dateFormats.forEach(dateFormat => {\n if (this.data.has(dateFormat)) {\n this.config[dateFormat] = convertDateFormat(this.data.get(dateFormat));\n }\n });\n }\n }, {\n key: \"_initializeElements\",\n value: function _initializeElements() {\n elements.forEach(element => {\n this[`${element}Target`] = this.fp[element];\n });\n }\n }, {\n key: \"_string\",\n value: function _string(option) {\n return this.data.get(option);\n }\n }, {\n key: \"_date\",\n value: function _date(option) {\n return this.data.get(option);\n }\n }, {\n key: \"_boolean\",\n value: function _boolean(option) {\n return !(this.data.get(option) == '0' || this.data.get(option) == 'false');\n }\n }, {\n key: \"_array\",\n value: function _array(option) {\n return JSON.parse(this.data.get(option));\n }\n }, {\n key: \"_number\",\n value: function _number(option) {\n return parseInt(this.data.get(option));\n }\n }, {\n key: \"_arrayOrString\",\n value: function _arrayOrString(option) {\n const val = this.data.get(option);\n\n try {\n return JSON.parse(val);\n } catch (e) {\n return val;\n }\n }\n }, {\n key: \"flatpickrElement\",\n get: function () {\n return this.hasInstanceTarget && this.instanceTarget || this.element;\n }\n }]);\n\n return StimulusFlatpickr;\n}(Controller);\n\n_defineProperty(StimulusFlatpickr, \"targets\", ['instance']);\n\nexport default StimulusFlatpickr;\n//# sourceMappingURL=index.m.js.map\n","/*\n * stimulus-use 0.52.2\n */\nimport { Controller } from \"@hotwired/stimulus\";\n\nconst method = (controller, methodName) => {\n const method = controller[methodName];\n if (typeof method == \"function\") {\n return method;\n } else {\n return (...args) => {};\n }\n};\n\nconst composeEventName = (name, controller, eventPrefix) => {\n let composedName = name;\n if (eventPrefix === true) {\n composedName = `${controller.identifier}:${name}`;\n } else if (typeof eventPrefix === \"string\") {\n composedName = `${eventPrefix}:${name}`;\n }\n return composedName;\n};\n\nconst extendedEvent = (type, event, detail) => {\n const {bubbles: bubbles, cancelable: cancelable, composed: composed} = event || {\n bubbles: true,\n cancelable: true,\n composed: true\n };\n if (event) {\n Object.assign(detail, {\n originalEvent: event\n });\n }\n const customEvent = new CustomEvent(type, {\n bubbles: bubbles,\n cancelable: cancelable,\n composed: composed,\n detail: detail\n });\n return customEvent;\n};\n\nfunction isElementInViewport(el) {\n const rect = el.getBoundingClientRect();\n const windowHeight = window.innerHeight || document.documentElement.clientHeight;\n const windowWidth = window.innerWidth || document.documentElement.clientWidth;\n const vertInView = rect.top <= windowHeight && rect.top + rect.height > 0;\n const horInView = rect.left <= windowWidth && rect.left + rect.width > 0;\n return vertInView && horInView;\n}\n\nfunction camelize(value) {\n return value.replace(/(?:[_-])([a-z0-9])/g, ((_, char) => char.toUpperCase()));\n}\n\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise */ function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nconst defaultOptions$8 = {\n debug: false,\n logger: console,\n dispatchEvent: true,\n eventPrefix: true\n};\n\nclass StimulusUse {\n constructor(controller, options = {}) {\n var _a, _b, _c;\n this.log = (functionName, args) => {\n if (!this.debug) return;\n this.logger.groupCollapsed(`%c${this.controller.identifier} %c#${functionName}`, \"color: #3B82F6\", \"color: unset\");\n this.logger.log(Object.assign({\n controllerId: this.controllerId\n }, args));\n this.logger.groupEnd();\n };\n this.warn = message => {\n this.logger.warn(`%c${this.controller.identifier} %c${message}`, \"color: #3B82F6; font-weight: bold\", \"color: unset\");\n };\n this.dispatch = (eventName, details = {}) => {\n if (this.dispatchEvent) {\n const {event: event} = details, eventDetails = __rest(details, [ \"event\" ]);\n const customEvent = this.extendedEvent(eventName, event || null, eventDetails);\n this.targetElement.dispatchEvent(customEvent);\n this.log(\"dispatchEvent\", Object.assign({\n eventName: customEvent.type\n }, eventDetails));\n }\n };\n this.call = (methodName, args = {}) => {\n const method = this.controller[methodName];\n if (typeof method == \"function\") {\n return method.call(this.controller, args);\n }\n };\n this.extendedEvent = (name, event, detail) => {\n const {bubbles: bubbles, cancelable: cancelable, composed: composed} = event || {\n bubbles: true,\n cancelable: true,\n composed: true\n };\n if (event) {\n Object.assign(detail, {\n originalEvent: event\n });\n }\n const customEvent = new CustomEvent(this.composeEventName(name), {\n bubbles: bubbles,\n cancelable: cancelable,\n composed: composed,\n detail: detail\n });\n return customEvent;\n };\n this.composeEventName = name => {\n let composedName = name;\n if (this.eventPrefix === true) {\n composedName = `${this.controller.identifier}:${name}`;\n } else if (typeof this.eventPrefix === \"string\") {\n composedName = `${this.eventPrefix}:${name}`;\n }\n return composedName;\n };\n this.debug = (_b = (_a = options === null || options === void 0 ? void 0 : options.debug) !== null && _a !== void 0 ? _a : controller.application.stimulusUseDebug) !== null && _b !== void 0 ? _b : defaultOptions$8.debug;\n this.logger = (_c = options === null || options === void 0 ? void 0 : options.logger) !== null && _c !== void 0 ? _c : defaultOptions$8.logger;\n this.controller = controller;\n this.controllerId = controller.element.id || controller.element.dataset.id;\n this.targetElement = (options === null || options === void 0 ? void 0 : options.element) || controller.element;\n const {dispatchEvent: dispatchEvent, eventPrefix: eventPrefix} = Object.assign({}, defaultOptions$8, options);\n Object.assign(this, {\n dispatchEvent: dispatchEvent,\n eventPrefix: eventPrefix\n });\n this.controllerInitialize = controller.initialize.bind(controller);\n this.controllerConnect = controller.connect.bind(controller);\n this.controllerDisconnect = controller.disconnect.bind(controller);\n }\n}\n\nconst defaultOptions$7 = {\n eventPrefix: true,\n bubbles: true,\n cancelable: true\n};\n\nclass UseDispatch extends StimulusUse {\n constructor(controller, options = {}) {\n var _a, _b, _c, _d;\n super(controller, options);\n this.dispatch = (eventName, detail = {}) => {\n const {controller: controller, targetElement: targetElement, eventPrefix: eventPrefix, bubbles: bubbles, cancelable: cancelable, log: log, warn: warn} = this;\n Object.assign(detail, {\n controller: controller\n });\n const eventNameWithPrefix = composeEventName(eventName, this.controller, eventPrefix);\n const event = new CustomEvent(eventNameWithPrefix, {\n detail: detail,\n bubbles: bubbles,\n cancelable: cancelable\n });\n targetElement.dispatchEvent(event);\n warn(\"`useDispatch()` is deprecated. Please use the built-in `this.dispatch()` function from Stimulus. You can find more information on how to upgrade at: https://stimulus-use.github.io/stimulus-use/#/use-dispatch\");\n log(\"dispatch\", {\n eventName: eventNameWithPrefix,\n detail: detail,\n bubbles: bubbles,\n cancelable: cancelable\n });\n return event;\n };\n this.targetElement = (_a = options.element) !== null && _a !== void 0 ? _a : controller.element;\n this.eventPrefix = (_b = options.eventPrefix) !== null && _b !== void 0 ? _b : defaultOptions$7.eventPrefix;\n this.bubbles = (_c = options.bubbles) !== null && _c !== void 0 ? _c : defaultOptions$7.bubbles;\n this.cancelable = (_d = options.cancelable) !== null && _d !== void 0 ? _d : defaultOptions$7.cancelable;\n this.enhanceController();\n }\n enhanceController() {\n Object.assign(this.controller, {\n dispatch: this.dispatch\n });\n }\n}\n\nconst useDispatch = (controller, options = {}) => new UseDispatch(controller, options);\n\nconst defaultOptions$6 = {\n overwriteDispatch: true\n};\n\nconst useApplication = (controller, options = {}) => {\n const {overwriteDispatch: overwriteDispatch} = Object.assign({}, defaultOptions$6, options);\n Object.defineProperty(controller, \"isPreview\", {\n get() {\n return document.documentElement.hasAttribute(\"data-turbolinks-preview\") || document.documentElement.hasAttribute(\"data-turbo-preview\");\n }\n });\n Object.defineProperty(controller, \"isConnected\", {\n get() {\n return !!Array.from(this.context.module.connectedContexts).find((c => c === this.context));\n }\n });\n Object.defineProperty(controller, \"csrfToken\", {\n get() {\n return this.metaValue(\"csrf-token\");\n }\n });\n if (overwriteDispatch) {\n useDispatch(controller, options);\n }\n Object.assign(controller, {\n metaValue(name) {\n const element = document.head.querySelector(`meta[name=\"${name}\"]`);\n return element && element.getAttribute(\"content\");\n }\n });\n};\n\nclass ApplicationController extends Controller {\n constructor(context) {\n super(context);\n this.isPreview = false;\n this.isConnected = false;\n this.csrfToken = \"\";\n useApplication(this, this.options);\n }\n}\n\nconst defaultOptions$5 = {\n events: [ \"click\", \"touchend\" ],\n onlyVisible: true,\n dispatchEvent: true,\n eventPrefix: true\n};\n\nconst useClickOutside = (composableController, options = {}) => {\n const controller = composableController;\n const {onlyVisible: onlyVisible, dispatchEvent: dispatchEvent, events: events, eventPrefix: eventPrefix} = Object.assign({}, defaultOptions$5, options);\n const onEvent = event => {\n const targetElement = (options === null || options === void 0 ? void 0 : options.element) || controller.element;\n if (targetElement.contains(event.target) || !isElementInViewport(targetElement) && onlyVisible) {\n return;\n }\n if (controller.clickOutside) {\n controller.clickOutside(event);\n }\n if (dispatchEvent) {\n const eventName = composeEventName(\"click:outside\", controller, eventPrefix);\n const clickOutsideEvent = extendedEvent(eventName, event, {\n controller: controller\n });\n targetElement.dispatchEvent(clickOutsideEvent);\n }\n };\n const observe = () => {\n events === null || events === void 0 ? void 0 : events.forEach((event => {\n window.addEventListener(event, onEvent, true);\n }));\n };\n const unobserve = () => {\n events === null || events === void 0 ? void 0 : events.forEach((event => {\n window.removeEventListener(event, onEvent, true);\n }));\n };\n const controllerDisconnect = controller.disconnect.bind(controller);\n Object.assign(controller, {\n disconnect() {\n unobserve();\n controllerDisconnect();\n }\n });\n observe();\n return [ observe, unobserve ];\n};\n\nclass ClickOutsideComposableController extends Controller {}\n\nclass ClickOutsideController extends ClickOutsideComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useClickOutside(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nclass DebounceController extends Controller {}\n\nDebounceController.debounces = [];\n\nconst defaultWait$1 = 200;\n\nconst debounce = (fn, wait = defaultWait$1) => {\n let timeoutId = null;\n return function() {\n const args = Array.from(arguments);\n const context = this;\n const params = args.map((arg => arg.params));\n const callback = () => {\n args.forEach(((arg, index) => arg.params = params[index]));\n return fn.apply(context, args);\n };\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(callback, wait);\n };\n};\n\nconst useDebounce = (composableController, options) => {\n const controller = composableController;\n const constructor = controller.constructor;\n constructor.debounces.forEach((func => {\n if (typeof func === \"string\") {\n controller[func] = debounce(controller[func], options === null || options === void 0 ? void 0 : options.wait);\n }\n if (typeof func === \"object\") {\n const {name: name, wait: wait} = func;\n if (!name) return;\n controller[name] = debounce(controller[name], wait || (options === null || options === void 0 ? void 0 : options.wait));\n }\n }));\n};\n\nclass UseHover extends StimulusUse {\n constructor(controller, options = {}) {\n super(controller, options);\n this.observe = () => {\n this.targetElement.addEventListener(\"mouseenter\", this.onEnter);\n this.targetElement.addEventListener(\"mouseleave\", this.onLeave);\n };\n this.unobserve = () => {\n this.targetElement.removeEventListener(\"mouseenter\", this.onEnter);\n this.targetElement.removeEventListener(\"mouseleave\", this.onLeave);\n };\n this.onEnter = event => {\n this.call(\"mouseEnter\", event);\n this.log(\"mouseEnter\", {\n hover: true\n });\n this.dispatch(\"mouseEnter\", {\n hover: false\n });\n };\n this.onLeave = event => {\n this.call(\"mouseLeave\", event);\n this.log(\"mouseLeave\", {\n hover: false\n });\n this.dispatch(\"mouseLeave\", {\n hover: false\n });\n };\n this.controller = controller;\n this.enhanceController();\n this.observe();\n }\n enhanceController() {\n const controllerDisconnect = this.controller.disconnect.bind(this.controller);\n const disconnect = () => {\n this.unobserve();\n controllerDisconnect();\n };\n Object.assign(this.controller, {\n disconnect: disconnect\n });\n }\n}\n\nconst useHover = (composableController, options = {}) => {\n const controller = composableController;\n const observer = new UseHover(controller, options);\n return [ observer.observe, observer.unobserve ];\n};\n\nclass HoverComposableController extends Controller {}\n\nclass HoverController extends HoverComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useHover(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nconst defaultEvents = [ \"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\" ];\n\nconst oneMinute = 6e4;\n\nconst defaultOptions$4 = {\n ms: oneMinute,\n initialState: false,\n events: defaultEvents,\n dispatchEvent: true,\n eventPrefix: true\n};\n\nconst useIdle = (composableController, options = {}) => {\n const controller = composableController;\n const {ms: ms, initialState: initialState, events: events, dispatchEvent: dispatchEvent, eventPrefix: eventPrefix} = Object.assign({}, defaultOptions$4, options);\n let isIdle = initialState;\n let timeout = setTimeout((() => {\n isIdle = true;\n dispatchAway();\n }), ms);\n const dispatchAway = event => {\n const eventName = composeEventName(\"away\", controller, eventPrefix);\n controller.isIdle = true;\n method(controller, \"away\").call(controller, event);\n if (dispatchEvent) {\n const clickOutsideEvent = extendedEvent(eventName, event || null, {\n controller: controller\n });\n controller.element.dispatchEvent(clickOutsideEvent);\n }\n };\n const dispatchBack = event => {\n const eventName = composeEventName(\"back\", controller, eventPrefix);\n controller.isIdle = false;\n method(controller, \"back\").call(controller, event);\n if (dispatchEvent) {\n const clickOutsideEvent = extendedEvent(eventName, event || null, {\n controller: controller\n });\n controller.element.dispatchEvent(clickOutsideEvent);\n }\n };\n const onEvent = event => {\n if (isIdle) dispatchBack(event);\n isIdle = false;\n clearTimeout(timeout);\n timeout = setTimeout((() => {\n isIdle = true;\n dispatchAway(event);\n }), ms);\n };\n const onVisibility = event => {\n if (!document.hidden) onEvent(event);\n };\n if (isIdle) {\n dispatchAway();\n } else {\n dispatchBack();\n }\n const controllerDisconnect = controller.disconnect.bind(controller);\n const observe = () => {\n events.forEach((event => {\n window.addEventListener(event, onEvent);\n }));\n document.addEventListener(\"visibilitychange\", onVisibility);\n };\n const unobserve = () => {\n clearTimeout(timeout);\n events.forEach((event => {\n window.removeEventListener(event, onEvent);\n }));\n document.removeEventListener(\"visibilitychange\", onVisibility);\n };\n Object.assign(controller, {\n disconnect() {\n unobserve();\n controllerDisconnect();\n }\n });\n observe();\n return [ observe, unobserve ];\n};\n\nclass IdleComposableController extends Controller {\n constructor() {\n super(...arguments);\n this.isIdle = false;\n }\n}\n\nclass IdleController extends IdleComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useIdle(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nconst defaultOptions$3 = {\n dispatchEvent: true,\n eventPrefix: true,\n visibleAttribute: \"isVisible\"\n};\n\nconst useIntersection = (composableController, options = {}) => {\n const controller = composableController;\n const {dispatchEvent: dispatchEvent, eventPrefix: eventPrefix, visibleAttribute: visibleAttribute} = Object.assign({}, defaultOptions$3, options);\n const targetElement = (options === null || options === void 0 ? void 0 : options.element) || controller.element;\n if (!controller.intersectionElements) controller.intersectionElements = [];\n controller.intersectionElements.push(targetElement);\n const callback = entries => {\n const [entry] = entries;\n if (entry.isIntersecting) {\n dispatchAppear(entry);\n } else if (targetElement.hasAttribute(visibleAttribute)) {\n dispatchDisappear(entry);\n }\n };\n const observer = new IntersectionObserver(callback, options);\n const dispatchAppear = entry => {\n targetElement.setAttribute(visibleAttribute, \"true\");\n method(controller, \"appear\").call(controller, entry, observer);\n if (dispatchEvent) {\n const eventName = composeEventName(\"appear\", controller, eventPrefix);\n const appearEvent = extendedEvent(eventName, null, {\n controller: controller,\n entry: entry,\n observer: observer\n });\n targetElement.dispatchEvent(appearEvent);\n }\n };\n const dispatchDisappear = entry => {\n targetElement.removeAttribute(visibleAttribute);\n method(controller, \"disappear\").call(controller, entry, observer);\n if (dispatchEvent) {\n const eventName = composeEventName(\"disappear\", controller, eventPrefix);\n const disappearEvent = extendedEvent(eventName, null, {\n controller: controller,\n entry: entry,\n observer: observer\n });\n targetElement.dispatchEvent(disappearEvent);\n }\n };\n const controllerDisconnect = controller.disconnect.bind(controller);\n const disconnect = () => {\n unobserve();\n controllerDisconnect();\n };\n const observe = () => {\n observer.observe(targetElement);\n };\n const unobserve = () => {\n observer.unobserve(targetElement);\n };\n const noneVisible = () => controller.intersectionElements.filter((element => element.hasAttribute(visibleAttribute))).length === 0;\n const oneVisible = () => controller.intersectionElements.filter((element => element.hasAttribute(visibleAttribute))).length === 1;\n const atLeastOneVisible = () => controller.intersectionElements.some((element => element.hasAttribute(visibleAttribute)));\n const allVisible = () => controller.intersectionElements.every((element => element.hasAttribute(visibleAttribute)));\n const isVisible = allVisible;\n Object.assign(controller, {\n isVisible: isVisible,\n noneVisible: noneVisible,\n oneVisible: oneVisible,\n atLeastOneVisible: atLeastOneVisible,\n allVisible: allVisible,\n disconnect: disconnect\n });\n observe();\n return [ observe, unobserve ];\n};\n\nclass IntersectionComposableController extends Controller {}\n\nclass IntersectionController extends IntersectionComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useIntersection(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nconst useLazyLoad = (controller, options) => {\n const callback = entries => {\n const [entry] = entries;\n if (entry.isIntersecting && !controller.isLoaded) {\n handleAppear();\n }\n };\n const handleAppear = entry => {\n const src = controller.data.get(\"src\");\n if (!src) return;\n const imageElement = controller.element;\n controller.isLoading = true;\n method(controller, \"loading\").call(controller, src);\n imageElement.onload = () => {\n handleLoaded(src);\n };\n imageElement.src = src;\n };\n const handleLoaded = src => {\n controller.isLoading = false;\n controller.isLoaded = true;\n method(controller, \"loaded\").call(controller, src);\n };\n const controllerDisconnect = controller.disconnect.bind(controller);\n const observer = new IntersectionObserver(callback, options);\n const observe = () => {\n observer.observe(controller.element);\n };\n const unobserve = () => {\n observer.unobserve(controller.element);\n };\n Object.assign(controller, {\n isVisible: false,\n disconnect() {\n unobserve();\n controllerDisconnect();\n }\n });\n observe();\n return [ observe, unobserve ];\n};\n\nclass LazyLoadComposableController extends Controller {\n constructor() {\n super(...arguments);\n this.isLoading = false;\n this.isLoaded = false;\n }\n}\n\nclass LazyLoadController extends LazyLoadComposableController {\n constructor(context) {\n super(context);\n this.options = {\n rootMargin: \"10%\"\n };\n requestAnimationFrame((() => {\n const [observe, unobserve] = useLazyLoad(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nconst defaultOptions$2 = {\n mediaQueries: {},\n dispatchEvent: true,\n eventPrefix: true,\n debug: false\n};\n\nclass UseMatchMedia extends StimulusUse {\n constructor(controller, options = {}) {\n var _a, _b, _c, _d;\n super(controller, options);\n this.matches = [];\n this.callback = event => {\n const name = Object.keys(this.mediaQueries).find((name => this.mediaQueries[name] === event.media));\n if (!name) return;\n const {media: media, matches: matches} = event;\n this.changed({\n name: name,\n media: media,\n matches: matches,\n event: event\n });\n };\n this.changed = payload => {\n const {name: name} = payload;\n if (payload.event) {\n this.call(camelize(`${name}_changed`), payload);\n this.dispatch(`${name}:changed`, payload);\n this.log(`media query \"${name}\" changed`, payload);\n }\n if (payload.matches) {\n this.call(camelize(`is_${name}`), payload);\n this.dispatch(`is:${name}`, payload);\n } else {\n this.call(camelize(`not_${name}`), payload);\n this.dispatch(`not:${name}`, payload);\n }\n };\n this.observe = () => {\n Object.keys(this.mediaQueries).forEach((name => {\n const media = this.mediaQueries[name];\n const match = window.matchMedia(media);\n match.addListener(this.callback);\n this.matches.push(match);\n this.changed({\n name: name,\n media: media,\n matches: match.matches\n });\n }));\n };\n this.unobserve = () => {\n this.matches.forEach((match => match.removeListener(this.callback)));\n };\n this.controller = controller;\n this.mediaQueries = (_a = options.mediaQueries) !== null && _a !== void 0 ? _a : defaultOptions$2.mediaQueries;\n this.dispatchEvent = (_b = options.dispatchEvent) !== null && _b !== void 0 ? _b : defaultOptions$2.dispatchEvent;\n this.eventPrefix = (_c = options.eventPrefix) !== null && _c !== void 0 ? _c : defaultOptions$2.eventPrefix;\n this.debug = (_d = options.debug) !== null && _d !== void 0 ? _d : defaultOptions$2.debug;\n if (!window.matchMedia) {\n console.error(\"window.matchMedia() is not available\");\n return;\n }\n this.enhanceController();\n this.observe();\n }\n enhanceController() {\n const controllerDisconnect = this.controller.disconnect.bind(this.controller);\n const disconnect = () => {\n this.unobserve();\n controllerDisconnect();\n };\n Object.assign(this.controller, {\n disconnect: disconnect\n });\n }\n}\n\nconst useMatchMedia = (controller, options = {}) => {\n const observer = new UseMatchMedia(controller, options);\n return [ observer.observe, observer.unobserve ];\n};\n\nconst memoize = (controller, name, value) => {\n Object.defineProperty(controller, name, {\n value: value\n });\n return value;\n};\n\nconst useMemo = controller => {\n var _a;\n (_a = controller.constructor.memos) === null || _a === void 0 ? void 0 : _a.forEach((getter => {\n memoize(controller, getter, controller[getter]);\n }));\n};\n\nconst defineMetaGetter = (controller, metaName, suffix) => {\n const getterName = suffix ? `${camelize(metaName)}Meta` : camelize(metaName);\n Object.defineProperty(controller, getterName, {\n get() {\n return typeCast(metaValue(metaName));\n }\n });\n};\n\nfunction metaValue(name) {\n const element = document.head.querySelector(`meta[name=\"${name}\"]`);\n return element && element.getAttribute(\"content\");\n}\n\nfunction typeCast(value) {\n try {\n return JSON.parse(value);\n } catch (o_O) {\n return value;\n }\n}\n\nconst useMeta = (controller, options = {\n suffix: true\n}) => {\n const metaNames = controller.constructor.metaNames;\n const suffix = options.suffix;\n metaNames === null || metaNames === void 0 ? void 0 : metaNames.forEach((metaName => {\n defineMetaGetter(controller, metaName, suffix);\n }));\n Object.defineProperty(controller, \"metas\", {\n get() {\n const result = {};\n metaNames === null || metaNames === void 0 ? void 0 : metaNames.forEach((metaName => {\n const value = typeCast(metaValue(metaName));\n if (value !== undefined && value !== null) {\n result[camelize(metaName)] = value;\n }\n }));\n return result;\n }\n });\n};\n\nclass UseMutation extends StimulusUse {\n constructor(controller, options = {}) {\n super(controller, options);\n this.observe = () => {\n try {\n this.observer.observe(this.targetElement, this.options);\n } catch (error) {\n this.controller.application.handleError(error, \"At a minimum, one of childList, attributes, and/or characterData must be true\", {});\n }\n };\n this.unobserve = () => {\n this.observer.disconnect();\n };\n this.mutation = entries => {\n this.call(\"mutate\", entries);\n this.log(\"mutate\", {\n entries: entries\n });\n this.dispatch(\"mutate\", {\n entries: entries\n });\n };\n this.targetElement = (options === null || options === void 0 ? void 0 : options.element) || controller.element;\n this.controller = controller;\n this.options = options;\n this.observer = new MutationObserver(this.mutation);\n this.enhanceController();\n this.observe();\n }\n enhanceController() {\n const controllerDisconnect = this.controller.disconnect.bind(this.controller);\n const disconnect = () => {\n this.unobserve();\n controllerDisconnect();\n };\n Object.assign(this.controller, {\n disconnect: disconnect\n });\n }\n}\n\nconst useMutation = (controller, options = {}) => {\n const observer = new UseMutation(controller, options);\n return [ observer.observe, observer.unobserve ];\n};\n\nclass MutationComposableController extends Controller {}\n\nclass MutationController extends MutationComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useMutation(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nconst defaultOptions$1 = {\n dispatchEvent: true,\n eventPrefix: true\n};\n\nconst useResize = (composableController, options = {}) => {\n const controller = composableController;\n const {dispatchEvent: dispatchEvent, eventPrefix: eventPrefix} = Object.assign({}, defaultOptions$1, options);\n const targetElement = (options === null || options === void 0 ? void 0 : options.element) || controller.element;\n const callback = entries => {\n const [entry] = entries;\n method(controller, \"resize\").call(controller, entry.contentRect);\n if (dispatchEvent) {\n const eventName = composeEventName(\"resize\", controller, eventPrefix);\n const appearEvent = extendedEvent(eventName, null, {\n controller: controller,\n entry: entry\n });\n targetElement.dispatchEvent(appearEvent);\n }\n };\n const controllerDisconnect = controller.disconnect.bind(controller);\n const observer = new ResizeObserver(callback);\n const observe = () => {\n observer.observe(targetElement);\n };\n const unobserve = () => {\n observer.unobserve(targetElement);\n };\n Object.assign(controller, {\n disconnect() {\n unobserve();\n controllerDisconnect();\n }\n });\n observe();\n return [ observe, unobserve ];\n};\n\nclass ResizeComposableController extends Controller {}\n\nclass ResizeController extends ResizeComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useResize(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nclass UseTargetMutation extends StimulusUse {\n constructor(controller, options = {}) {\n super(controller, options);\n this.observe = () => {\n this.observer.observe(this.targetElement, {\n subtree: true,\n characterData: true,\n childList: true,\n attributes: true,\n attributeOldValue: true,\n attributeFilter: [ this.targetSelector, this.scopedTargetSelector ]\n });\n };\n this.unobserve = () => {\n this.observer.disconnect();\n };\n this.mutation = entries => {\n for (const mutation of entries) {\n switch (mutation.type) {\n case \"attributes\":\n let newValue = mutation.target.getAttribute(mutation.attributeName);\n let oldValue = mutation.oldValue;\n if (mutation.attributeName === this.targetSelector || mutation.attributeName === this.scopedTargetSelector) {\n let oldTargets = this.targetsUsedByThisController(oldValue);\n let newTargets = this.targetsUsedByThisController(newValue);\n let removedTargets = oldTargets.filter((target => !newTargets.includes(target)));\n let addedTargets = newTargets.filter((target => !oldTargets.includes(target)));\n removedTargets.forEach((target => this.targetRemoved(this.stripIdentifierPrefix(target), mutation.target, \"attributeChange\")));\n addedTargets.forEach((target => this.targetAdded(this.stripIdentifierPrefix(target), mutation.target, \"attributeChange\")));\n }\n break;\n\n case \"characterData\":\n let nodule = this.findTargetInAncestry(mutation.target);\n if (nodule == null) {\n return;\n } else {\n let supportedTargets = this.targetsUsedByThisControllerFromNode(nodule);\n supportedTargets.forEach((target => {\n this.targetChanged(this.stripIdentifierPrefix(target), nodule, \"domMutation\");\n }));\n }\n break;\n\n case \"childList\":\n let {addedNodes: addedNodes, removedNodes: removedNodes} = mutation;\n addedNodes.forEach((node => this.processNodeDOMMutation(node, this.targetAdded)));\n removedNodes.forEach((node => this.processNodeDOMMutation(node, this.targetRemoved)));\n break;\n }\n }\n };\n this.controller = controller;\n this.options = options;\n this.targetElement = controller.element;\n this.identifier = controller.scope.identifier;\n this.identifierPrefix = `${this.identifier}.`;\n this.targetSelector = controller.scope.schema.targetAttribute;\n this.scopedTargetSelector = `data-${this.identifier}-target`;\n this.targets = options.targets || controller.constructor.targets;\n this.prefixedTargets = this.targets.map((target => `${this.identifierPrefix}${target}`));\n this.observer = new MutationObserver(this.mutation);\n this.enhanceController();\n this.observe();\n }\n processNodeDOMMutation(node, initialChangeModeAssumption) {\n let nodule = node;\n let change = initialChangeModeAssumption;\n let supportedTargets = [];\n if (nodule.nodeName == \"#text\" || this.targetsUsedByThisControllerFromNode(nodule).length == 0) {\n change = this.targetChanged;\n nodule = this.findTargetInAncestry(node);\n } else {\n supportedTargets = this.targetsUsedByThisControllerFromNode(nodule);\n }\n if (nodule == null) {\n return;\n } else if (supportedTargets.length == 0) {\n supportedTargets = this.targetsUsedByThisControllerFromNode(nodule);\n }\n supportedTargets.forEach((target => {\n change.call(this, this.stripIdentifierPrefix(target), nodule, \"domMutation\");\n }));\n }\n findTargetInAncestry(node) {\n let nodule = node;\n let supportedTargets = [];\n if (nodule.nodeName != \"#text\") {\n supportedTargets = this.targetsUsedByThisControllerFromNode(nodule);\n }\n while (nodule.parentNode !== null && nodule.parentNode != this.targetElement && supportedTargets.length == 0) {\n nodule = nodule.parentNode;\n if (nodule.nodeName !== \"#text\") {\n let supportedTargets = this.targetsUsedByThisControllerFromNode(nodule);\n if (supportedTargets.length > 0) {\n return nodule;\n }\n }\n }\n if (nodule.nodeName == \"#text\") {\n return null;\n }\n if (nodule.parentNode == null) {\n return null;\n }\n if (nodule.parentNode == this.targetElement) {\n if (this.targetsUsedByThisControllerFromNode(nodule).length > 0) {\n return nodule;\n }\n return null;\n }\n return null;\n }\n targetAdded(name, node, trigger) {\n let targetCallback = `${name}TargetAdded`;\n this.controller[targetCallback] && method(this.controller, targetCallback).call(this.controller, node);\n this.warn(\"`[target]TargetAdded` is deprecated. Please use the built-in `[target]TargetConnected()` function from Stimulus.\");\n this.log(\"targetAdded\", {\n target: name,\n node: node,\n trigger: trigger\n });\n }\n targetRemoved(name, node, trigger) {\n let targetCallback = `${name}TargetRemoved`;\n this.controller[targetCallback] && method(this.controller, targetCallback).call(this.controller, node);\n this.warn(\"`[target]TargetRemoved` is deprecated. Please use the built-in `[target]TargetDisconnected()` function from Stimulus.\");\n this.log(\"targetRemoved\", {\n target: name,\n node: node,\n trigger: trigger\n });\n }\n targetChanged(name, node, trigger) {\n let targetCallback = `${name}TargetChanged`;\n this.controller[targetCallback] && method(this.controller, targetCallback).call(this.controller, node);\n this.log(\"targetChanged\", {\n target: name,\n node: node,\n trigger: trigger\n });\n }\n targetsUsedByThisControllerFromNode(node) {\n if (node.nodeName == \"#text\" || node.nodeName == \"#comment\") {\n return [];\n }\n let nodeElement = node;\n return this.targetsUsedByThisController(nodeElement.getAttribute(this.scopedTargetSelector) || nodeElement.getAttribute(this.targetSelector));\n }\n targetsUsedByThisController(targetStr) {\n targetStr = targetStr || \"\";\n let targetsToCheck = this.stripIdentifierPrefix(targetStr).split(\" \");\n return this.targets.filter((n => targetsToCheck.indexOf(n) !== -1));\n }\n stripIdentifierPrefix(target) {\n return target.replace(new RegExp(this.identifierPrefix, \"g\"), \"\");\n }\n enhanceController() {\n const controllerDisconnect = this.controller.disconnect.bind(this.controller);\n const disconnect = () => {\n this.unobserve();\n controllerDisconnect();\n };\n Object.assign(this.controller, {\n disconnect: disconnect\n });\n }\n}\n\nconst useTargetMutation = (composableController, options = {}) => {\n const controller = composableController;\n const observer = new UseTargetMutation(controller, options);\n observer.warn(\"`[target]TargetAdded` and `[target]TargetRemoved` are deprecated. Please use the built-in `[target]TargetConnected()` and `[target]TargetDisconnected()` functions from Stimulus.\");\n return [ observer.observe, observer.unobserve ];\n};\n\nclass TargetMutationComposableController extends Controller {}\n\nclass TargetMutationController extends TargetMutationComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useTargetMutation(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nclass ThrottleController extends Controller {}\n\nThrottleController.throttles = [];\n\nconst defaultWait = 200;\n\nfunction throttle(func, wait = defaultWait) {\n let inThrottle;\n return function() {\n const args = arguments;\n const context = this;\n if (!inThrottle) {\n inThrottle = true;\n func.apply(context, args);\n setTimeout((() => inThrottle = false), wait);\n }\n };\n}\n\nconst useThrottle = (composableController, options = {}) => {\n var _a;\n const controller = composableController;\n const constructor = controller.constructor;\n (_a = constructor.throttles) === null || _a === void 0 ? void 0 : _a.forEach((func => {\n if (typeof func === \"string\") {\n controller[func] = throttle(controller[func], options === null || options === void 0 ? void 0 : options.wait);\n }\n if (typeof func === \"object\") {\n const {name: name, wait: wait} = func;\n if (!name) return;\n controller[name] = throttle(controller[name], wait || (options === null || options === void 0 ? void 0 : options.wait));\n }\n }));\n};\n\nconst alpineNames = {\n enterFromClass: \"enter\",\n enterActiveClass: \"enterStart\",\n enterToClass: \"enterEnd\",\n leaveFromClass: \"leave\",\n leaveActiveClass: \"leaveStart\",\n leaveToClass: \"leaveEnd\"\n};\n\nconst defaultOptions = {\n transitioned: false,\n hiddenClass: \"hidden\",\n preserveOriginalClass: true,\n removeToClasses: true\n};\n\nconst useTransition = (composableController, options = {}) => {\n var _a, _b, _c;\n const controller = composableController;\n const targetName = controller.element.dataset.transitionTarget;\n let targetFromAttribute;\n if (targetName) {\n targetFromAttribute = controller[`${targetName}Target`];\n }\n const targetElement = (options === null || options === void 0 ? void 0 : options.element) || targetFromAttribute || controller.element;\n if (!(targetElement instanceof HTMLElement || targetElement instanceof SVGElement)) return;\n const dataset = targetElement.dataset;\n const leaveAfter = parseInt(dataset.leaveAfter || \"\") || options.leaveAfter || 0;\n const {transitioned: transitioned, hiddenClass: hiddenClass, preserveOriginalClass: preserveOriginalClass, removeToClasses: removeToClasses} = Object.assign({}, defaultOptions, options);\n const controllerEnter = (_a = controller.enter) === null || _a === void 0 ? void 0 : _a.bind(controller);\n const controllerLeave = (_b = controller.leave) === null || _b === void 0 ? void 0 : _b.bind(controller);\n const controllerToggleTransition = (_c = controller.toggleTransition) === null || _c === void 0 ? void 0 : _c.bind(controller);\n async function enter(event) {\n if (controller.transitioned) return;\n controller.transitioned = true;\n controllerEnter && controllerEnter(event);\n const enterFromClasses = getAttribute(\"enterFrom\", options, dataset);\n const enterActiveClasses = getAttribute(\"enterActive\", options, dataset);\n const enterToClasses = getAttribute(\"enterTo\", options, dataset);\n const leaveToClasses = getAttribute(\"leaveTo\", options, dataset);\n if (!!hiddenClass) {\n targetElement.classList.remove(hiddenClass);\n }\n if (!removeToClasses) {\n removeClasses(targetElement, leaveToClasses);\n }\n await transition(targetElement, enterFromClasses, enterActiveClasses, enterToClasses, hiddenClass, preserveOriginalClass, removeToClasses);\n if (leaveAfter > 0) {\n setTimeout((() => {\n leave(event);\n }), leaveAfter);\n }\n }\n async function leave(event) {\n if (!controller.transitioned) return;\n controller.transitioned = false;\n controllerLeave && controllerLeave(event);\n const leaveFromClasses = getAttribute(\"leaveFrom\", options, dataset);\n const leaveActiveClasses = getAttribute(\"leaveActive\", options, dataset);\n const leaveToClasses = getAttribute(\"leaveTo\", options, dataset);\n const enterToClasses = getAttribute(\"enterTo\", options, dataset);\n if (!removeToClasses) {\n removeClasses(targetElement, enterToClasses);\n }\n await transition(targetElement, leaveFromClasses, leaveActiveClasses, leaveToClasses, hiddenClass, preserveOriginalClass, removeToClasses);\n if (!!hiddenClass) {\n targetElement.classList.add(hiddenClass);\n }\n }\n function toggleTransition(event) {\n controllerToggleTransition && controllerToggleTransition(event);\n if (controller.transitioned) {\n leave();\n } else {\n enter();\n }\n }\n async function transition(element, initialClasses, activeClasses, endClasses, hiddenClass, preserveOriginalClass, removeEndClasses) {\n const stashedClasses = [];\n if (preserveOriginalClass) {\n initialClasses.forEach((cls => element.classList.contains(cls) && cls !== hiddenClass && stashedClasses.push(cls)));\n activeClasses.forEach((cls => element.classList.contains(cls) && cls !== hiddenClass && stashedClasses.push(cls)));\n endClasses.forEach((cls => element.classList.contains(cls) && cls !== hiddenClass && stashedClasses.push(cls)));\n }\n addClasses(element, initialClasses);\n removeClasses(element, stashedClasses);\n addClasses(element, activeClasses);\n await nextAnimationFrame();\n removeClasses(element, initialClasses);\n addClasses(element, endClasses);\n await afterTransition(element);\n removeClasses(element, activeClasses);\n if (removeEndClasses) {\n removeClasses(element, endClasses);\n }\n addClasses(element, stashedClasses);\n }\n function initialState() {\n controller.transitioned = transitioned;\n if (transitioned) {\n if (!!hiddenClass) {\n targetElement.classList.remove(hiddenClass);\n }\n enter();\n } else {\n if (!!hiddenClass) {\n targetElement.classList.add(hiddenClass);\n }\n leave();\n }\n }\n function addClasses(element, classes) {\n if (classes.length > 0) {\n element.classList.add(...classes);\n }\n }\n function removeClasses(element, classes) {\n if (classes.length > 0) {\n element.classList.remove(...classes);\n }\n }\n initialState();\n Object.assign(controller, {\n enter: enter,\n leave: leave,\n toggleTransition: toggleTransition\n });\n return [ enter, leave, toggleTransition ];\n};\n\nfunction getAttribute(name, options, dataset) {\n const datasetName = `transition${name[0].toUpperCase()}${name.substr(1)}`;\n const datasetAlpineName = alpineNames[name];\n const classes = options[name] || dataset[datasetName] || dataset[datasetAlpineName] || \" \";\n return isEmpty(classes) ? [] : classes.split(\" \");\n}\n\nasync function afterTransition(element) {\n return new Promise((resolve => {\n const duration = Number(getComputedStyle(element).transitionDuration.split(\",\")[0].replace(\"s\", \"\")) * 1e3;\n setTimeout((() => {\n resolve(duration);\n }), duration);\n }));\n}\n\nasync function nextAnimationFrame() {\n return new Promise((resolve => {\n requestAnimationFrame((() => {\n requestAnimationFrame(resolve);\n }));\n }));\n}\n\nfunction isEmpty(str) {\n return str.length === 0 || !str.trim();\n}\n\nclass TransitionComposableController extends Controller {\n constructor() {\n super(...arguments);\n this.transitioned = false;\n }\n}\n\nclass TransitionController extends TransitionComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n useTransition(this, this.options);\n }));\n }\n}\n\nclass UseVisibility extends StimulusUse {\n constructor(controller, options = {}) {\n super(controller, options);\n this.observe = () => {\n this.controller.isVisible = !document.hidden;\n document.addEventListener(\"visibilitychange\", this.handleVisibilityChange);\n this.handleVisibilityChange();\n };\n this.unobserve = () => {\n document.removeEventListener(\"visibilitychange\", this.handleVisibilityChange);\n };\n this.becomesInvisible = event => {\n this.controller.isVisible = false;\n this.call(\"invisible\", event);\n this.log(\"invisible\", {\n isVisible: false\n });\n this.dispatch(\"invisible\", {\n event: event,\n isVisible: false\n });\n };\n this.becomesVisible = event => {\n this.controller.isVisible = true;\n this.call(\"visible\", event);\n this.log(\"visible\", {\n isVisible: true\n });\n this.dispatch(\"visible\", {\n event: event,\n isVisible: true\n });\n };\n this.handleVisibilityChange = event => {\n if (document.hidden) {\n this.becomesInvisible(event);\n } else {\n this.becomesVisible(event);\n }\n };\n this.controller = controller;\n this.enhanceController();\n this.observe();\n }\n enhanceController() {\n const controllerDisconnect = this.controllerDisconnect;\n const disconnect = () => {\n this.unobserve();\n controllerDisconnect();\n };\n Object.assign(this.controller, {\n disconnect: disconnect\n });\n }\n}\n\nconst useVisibility = (composableController, options = {}) => {\n const controller = composableController;\n const observer = new UseVisibility(controller, options);\n return [ observer.observe, observer.unobserve ];\n};\n\nclass VisibilityComposableController extends Controller {\n constructor() {\n super(...arguments);\n this.isVisible = false;\n }\n}\n\nclass VisibilityController extends VisibilityComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useVisibility(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nclass UseWindowFocus extends StimulusUse {\n constructor(controller, options = {}) {\n super(controller, options);\n this.observe = () => {\n if (document.hasFocus()) {\n this.becomesFocused();\n } else {\n this.becomesUnfocused();\n }\n this.interval = setInterval((() => {\n this.handleWindowFocusChange();\n }), this.intervalDuration);\n };\n this.unobserve = () => {\n clearInterval(this.interval);\n };\n this.becomesUnfocused = event => {\n this.controller.hasFocus = false;\n this.call(\"unfocus\", event);\n this.log(\"unfocus\", {\n hasFocus: false\n });\n this.dispatch(\"unfocus\", {\n event: event,\n hasFocus: false\n });\n };\n this.becomesFocused = event => {\n this.controller.hasFocus = true;\n this.call(\"focus\", event);\n this.log(\"focus\", {\n hasFocus: true\n });\n this.dispatch(\"focus\", {\n event: event,\n hasFocus: true\n });\n };\n this.handleWindowFocusChange = event => {\n if (document.hasFocus() && !this.controller.hasFocus) {\n this.becomesFocused(event);\n } else if (!document.hasFocus() && this.controller.hasFocus) {\n this.becomesUnfocused(event);\n }\n };\n this.controller = controller;\n this.intervalDuration = options.interval || 200;\n this.enhanceController();\n this.observe();\n }\n enhanceController() {\n const controllerDisconnect = this.controllerDisconnect;\n const disconnect = () => {\n this.unobserve();\n controllerDisconnect();\n };\n Object.assign(this.controller, {\n disconnect: disconnect\n });\n }\n}\n\nconst useWindowFocus = (composableController, options = {}) => {\n const controller = composableController;\n const observer = new UseWindowFocus(controller, options);\n return [ observer.observe, observer.unobserve ];\n};\n\nclass WindowFocusComposableController extends Controller {\n constructor() {\n super(...arguments);\n this.hasFocus = false;\n }\n}\n\nclass WindowFocusController extends WindowFocusComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useWindowFocus(this, this.options);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nconst useWindowResize = composableController => {\n const controller = composableController;\n const callback = event => {\n const {innerWidth: innerWidth, innerHeight: innerHeight} = window;\n const payload = {\n height: innerHeight || Infinity,\n width: innerWidth || Infinity,\n event: event\n };\n method(controller, \"windowResize\").call(controller, payload);\n };\n const controllerDisconnect = controller.disconnect.bind(controller);\n const observe = () => {\n window.addEventListener(\"resize\", callback);\n callback();\n };\n const unobserve = () => {\n window.removeEventListener(\"resize\", callback);\n };\n Object.assign(controller, {\n disconnect() {\n unobserve();\n controllerDisconnect();\n }\n });\n observe();\n return [ observe, unobserve ];\n};\n\nclass WindowResizeComposableController extends Controller {}\n\nclass WindowResizeController extends WindowResizeComposableController {\n constructor(context) {\n super(context);\n requestAnimationFrame((() => {\n const [observe, unobserve] = useWindowResize(this);\n Object.assign(this, {\n observe: observe,\n unobserve: unobserve\n });\n }));\n }\n}\n\nfunction useHotkeys() {\n throw \"[stimulus-use] Notice: The import for `useHotkeys()` has been moved from `stimulus-use` to `stimulus-use/hotkeys`. \\nPlease change the import accordingly and add `hotkey-js` as a dependency to your project. \\n\\nFor more information see: https://stimulus-use.github.io/stimulus-use/#/use-hotkeys?id=importing-the-behavior\";\n}\n\nexport { ApplicationController, ClickOutsideController, HoverController, IdleController, IntersectionController, LazyLoadController, MutationController, ResizeController, TargetMutationController, TransitionController, UseHover, UseMutation, UseTargetMutation, UseVisibility, UseWindowFocus, VisibilityController, WindowFocusController, WindowResizeController, debounce, useApplication, useClickOutside, useDebounce, useDispatch, useHotkeys, useHover, useIdle, useIntersection, useLazyLoad, useMatchMedia, useMemo, useMeta, useMutation, useResize, useTargetMutation, useThrottle, useTransition, useVisibility, useWindowFocus, useWindowResize };\n","export async function enter(element, transitionName = null) {\n element.classList.remove('hidden')\n await transition('enter', element, transitionName)\n}\n\nexport async function leave(element, transitionName = null) {\n await transition('leave', element, transitionName)\n element.classList.add('hidden')\n}\n\nexport async function toggle(element, transitionName = null) {\n if (element.classList.contains('hidden')) {\n await enter(element, transitionName)\n } else {\n await leave(element, transitionName)\n }\n}\n\nasync function transition(direction, element, animation) {\n const dataset = element.dataset\n const animationClass = animation ? `${animation}-${direction}` : direction\n let transition = `transition${direction.charAt(0).toUpperCase() + direction.slice(1)}`\n const genesis = dataset[transition] ? dataset[transition].split(\" \") : [animationClass]\n const start = dataset[`${transition}Start`] ? dataset[`${transition}Start`].split(\" \") : [`${animationClass}-start`]\n const end = dataset[`${transition}End`] ? dataset[`${transition}End`].split(\" \") : [`${animationClass}-end`]\n\n addClasses(element, genesis)\n addClasses(element, start)\n await nextFrame()\n removeClasses(element, start)\n addClasses(element, end);\n await afterTransition(element)\n removeClasses(element, end)\n removeClasses(element, genesis)\n}\n\nfunction addClasses(element, classes) {\n element.classList.add(...classes)\n}\n\nfunction removeClasses(element, classes) {\n element.classList.remove(...classes)\n}\n\nfunction nextFrame() {\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n requestAnimationFrame(resolve)\n });\n });\n}\n\nfunction afterTransition(element) {\n return new Promise(resolve => {\n // safari return string with comma separate values\n const computedDuration = getComputedStyle(element).transitionDuration.split(\",\")[0]\n const duration = Number(computedDuration.replace('s', '')) * 1000;\n setTimeout(() => {\n resolve()\n }, duration)\n });\n}","/**!\n * Sortable 1.15.6\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\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 = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.6\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches( /**HTMLElement*/el, /**String*/selector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n return false;\n}\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\nfunction css(el, prop, val) {\n var style = el && el.style;\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n } while (!selfOnly && (el = el.parentNode));\n }\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n return list;\n }\n return [];\n}\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n\n/**\r\n * Returns the \"bounding client rect\" of given element\r\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\r\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\r\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\r\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\r\n * @param {[HTMLElement]} container The parent the element will be placed in\r\n * @return {Object} The boundingClientRect of el, with specified adjustments\r\n */\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode;\n\n // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect();\n\n // Set relative to edges of padding box of container\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n } while (container = container.parentNode);\n }\n }\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n\n/**\r\n * Checks if a side of an element is scrolled past a side of its parents\r\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\r\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\r\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\r\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\r\n */\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n\n /* jshint boss:true */\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n return false;\n}\n\n/**\r\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\r\n * and non-draggable elements\r\n * @param {HTMLElement} el The parent element\r\n * @param {Number} childNum The index of the child\r\n * @param {Object} options Parent Sortable's options\r\n * @return {HTMLElement} The child at index childNum, or null if not found\r\n */\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n currentChild++;\n }\n i++;\n }\n return null;\n}\n\n/**\r\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\r\n * @param {HTMLElement} el Parent element\r\n * @param {selector} selector Any other elements that should be ignored\r\n * @return {HTMLElement} The last child, ignoring ghostEl\r\n */\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n return last || null;\n}\n\n/**\r\n * Returns the index of an element within its parent for a selected set of\r\n * elements\r\n * @param {HTMLElement} el\r\n * @param {selector} selector\r\n * @return {number}\r\n */\nfunction index(el, selector) {\n var index = 0;\n if (!el || !el.parentNode) {\n return -1;\n }\n\n /* jshint boss:true */\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n return index;\n}\n\n/**\r\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\r\n * The value is returned in real pixels.\r\n * @param {HTMLElement} el\r\n * @return {Array} Offsets in the format of [left, top]\r\n */\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n return [offsetLeft, offsetTop];\n}\n\n/**\r\n * Returns the index of the object within the given array\r\n * @param {Array} arr Array that may or may not hold the object\r\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\r\n * @return {Number} The index of the object in the array, or -1\r\n */\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n } while (elem = elem.parentNode);\n return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl) {\n var rect = {};\n Array.from(container.children).forEach(function (child) {\n var _rect$left, _rect$top, _rect$right, _rect$bottom;\n if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;\n var childRect = getRect(child);\n rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n });\n rect.width = rect.right - rect.left;\n rect.height = rect.bottom - rect.top;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n\n // If animating: compensate for current animation\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n target.toRect = toRect;\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&\n // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n }\n\n // if fromRect != toRect: animate\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n if (!time) {\n time = _this.options.animation;\n }\n _this.animate(target, animatingRect, toRect, time);\n }\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\nfunction repaint(target) {\n return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n this.eventCanceled = false;\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return;\n // Fire global events if it exists in this sortable\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n\n // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized;\n\n // Add default options from plugin\n _extends(defaults, initialized.defaults);\n });\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return;\n\n // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n // Support for new CustomEvent feature\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\n ghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n\n _silent = false,\n savedInputChecked = [];\n\n/** @const */\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\n supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return;\n // false when <= IE11\n if (IE11OrLess) {\n return false;\n }\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n }(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n },\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n },\n /**\r\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n * @param {Number} x X position\r\n * @param {Number} y Y position\r\n * @return {HTMLElement} Element of the first found nearest Sortable\r\n */\n _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n },\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n var group = {};\n var originalGroup = options.group;\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n },\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n },\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n };\n\n// #1184 fix - Prevent click event on fallback if dragged but item not changed position\nif (documentExists && !ChromeForAndroid) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n if (nearest) {\n // Create imitation event\n var event = {};\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n nearest[expando]._onDragOver(event);\n }\n }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n this.el = el; // root element\n this.options = options = _extends({}, options);\n\n // Export instance\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n // Disabled on Safari: #1571; Enabled on Safari IOS: #2244\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults);\n\n // Set default options\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n _prepareGroup(options);\n\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n // Setup drag mode\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n }\n\n // Bind events\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n sortables.push(this.el);\n\n // Restore sorting\n options.store && options.store.get && this.sort(options.store.get(this) || []);\n\n // Add animation state manager\n _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {\n if (!evt.cancelable) return;\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n _saveInputCheckedState(el);\n\n // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n if (dragEl) {\n return;\n }\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n }\n\n // cancel dnd if original target is content editable\n if (originalTarget.isContentEditable) {\n return;\n }\n\n // Safari ignores further event handling after mousedown\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n target = closest(target, options.draggable, el, false);\n if (target && target.animated) {\n return;\n }\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n }\n\n // Get the index of the dragged element within its parent\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable);\n\n // Check filter\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n if (filter) {\n preventOnFilter && evt.preventDefault();\n return; // cancel dnd\n }\n }\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n }\n\n // Prepare `dragstart`\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n if (Sortable.eventCanceled) {\n _this._onDrop();\n return;\n }\n // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n _this._disableDelayedDragEvents();\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n }\n\n // Bind the events: dragstart/dragend\n _this._triggerDragStart(evt, touch);\n\n // Drag start event\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n });\n\n // Chosen item\n toggleClass(dragEl, options.chosenClass, true);\n };\n\n // Disable \"draggable\"\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n if (options.supportPointer) {\n on(ownerDocument, 'pointerup', _this._onDrop);\n // Native D&D triggers pointercancel\n !this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);\n } else {\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop);\n }\n\n // Make dragEl draggable (must be before delay for FireFox)\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n pluginEvent('delayStart', this, {\n evt: evt\n });\n\n // Delay is impossible for native DnD in Edge or IE\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n return;\n }\n // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n if (options.supportPointer) {\n on(ownerDocument, 'pointerup', _this._disableDelayedDrag);\n on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);\n } else {\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n }\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {\n var touch = e.touches ? e.touches[0] : e;\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'pointerup', this._disableDelayedDrag);\n off(ownerDocument, 'pointercancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n try {\n if (document.selection) {\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n awaitingDragStarted = false;\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n var options = this.options;\n\n // Apply effect\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost();\n\n // Drag start event\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n _hideGhostForTarget();\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n target = parent; // store last element\n }\n /* jshint boss:true */ while (parent = getParentOrHost(parent));\n }\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n\n // only set the status to dragging, when we are actually dragging\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n this._onDragStart(evt, true);\n }\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options;\n\n // Position absolutely\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl);\n\n // Set transform-origin\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {\n var _this = this;\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n if (Sortable.eventCanceled) {\n this._onDrop();\n return;\n }\n pluginEvent('setupClone', this);\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.removeAttribute(\"id\");\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n this._hideClone();\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n }\n\n // #1143: IFrame support workaround\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n _this._hideClone();\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true);\n\n // Set proper drop events\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n on(document, 'drop', _this);\n\n // #1276 fix:\n css(dragEl, 'transform', 'translateZ(0)');\n }\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n window.getSelection().removeAllRanges();\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver( /**Event*/evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n if (_silent) return;\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n }\n\n // Capture animation state\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n _this.captureAnimationState();\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n }\n\n // Return invocation when dragEl is inserted (or completed)\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n }\n\n // Animation\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n }\n\n // Null lastTarget if it is not inside a previously swapped element\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n }\n\n // no bubbling and not fallback\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n\n // Do not detect for empty insert if already inserted\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n }\n\n // Call when dragEl has been inserted\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n ignoreNextClick = false;\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n if (revert) {\n parentEl = rootEl; // actualization\n capture();\n this._hideClone();\n dragOverEvent('revert');\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n return completed(true);\n }\n var elLastChild = lastChild(el, options.draggable);\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n }\n\n // if there is a last element, it is the target\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n if (target) {\n targetRect = getRect(target);\n }\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n if (elLastChild && elLastChild.nextSibling) {\n // the last draggable element is not the last node\n el.insertBefore(dragEl, elLastChild.nextSibling);\n } else {\n el.appendChild(dragEl);\n }\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n if (firstChild === dragEl) {\n return completed(false);\n }\n target = firstChild;\n targetRect = getRect(target);\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n }\n // If dragEl is already beside target: Do not insert\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n }\n\n // Undo chrome's scroll adjustment (has no effect on other browsers)\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n parentEl = dragEl.parentNode; // actualization\n\n // must be done before animation\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n changed();\n return completed(true);\n }\n }\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'pointercancel', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop( /**Event*/evt) {\n var el = this.el,\n options = this.options;\n\n // Get the index of the dragged element within its parent\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode;\n\n // Get again after plugin event\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n if (Sortable.eventCanceled) {\n this._nulling();\n return;\n }\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n _cancelNextTick(this.cloneId);\n _cancelNextTick(this._dragStartId);\n\n // Unbind events\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n this._offMoveEvents();\n this._offUpEvents();\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n css(dragEl, 'transform', '');\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n _disableDraggable(dragEl);\n dragEl.style['will-change'] = '';\n\n // Remove classes\n // ghostClass is added in dragStarted\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n toggleClass(dragEl, this.options.chosenClass, false);\n\n // Drag stop event\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n // Remove event\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n });\n\n // drag from one list and drop into another\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n });\n\n // Save sorting\n this.save();\n }\n }\n }\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent( /**Event*/evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n break;\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n _globalDragOver(evt);\n }\n break;\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n /**\r\n * Serializes the item into an array of string.\r\n * @returns {String[]}\r\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n for (; i < n; i++) {\n el = children[i];\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n return order;\n },\n /**\r\n * Sorts the elements according to the array.\r\n * @param {String[]} order order of the items\r\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n /**\r\n * Save the current sorting\r\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n /**\r\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n * @param {HTMLElement} el\r\n * @param {String} [selector] default: `options.draggable`\r\n * @returns {HTMLElement|null}\r\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n /**\r\n * Set/get option\r\n * @param {string} name\r\n * @param {*} [value]\r\n * @returns {*}\r\n */\n option: function option(name, value) {\n var options = this.options;\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n /**\r\n * Destroy\r\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n }\n // Remove draggable attributes\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n this._onDrop();\n this._disableDelayedDragEvents();\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n return;\n }\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return;\n\n // show clone at dragEl or original position\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\nfunction _globalDragOver( /**Event*/evt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal;\n // Support for new CustomEvent feature\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n return retVal;\n}\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\nfunction _unsilent() {\n _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n var spacer = 10;\n return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n var spacer = 10;\n return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n invert = invert || invertSwap;\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n return 0;\n}\n\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\r\n * @return {Number} Direction dragEl must be swapped\r\n */\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n while (i--) {\n sum += str.charCodeAt(i);\n }\n return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n}\n\n// Fixed #973:\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n}\n\n// Export utils\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild,\n expando: expando\n};\n\n/**\r\n * Get the Sortable instance of an element\r\n * @param {HTMLElement} element The element\r\n * @return {Sortable|undefined} The instance of Sortable\r\n */\nSortable.get = function (element) {\n return element[expando];\n};\n\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n};\n\n// Export\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n };\n\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt;\n\n // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback);\n\n // Listener for pointer element change\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval();\n // Detect for pointer elem change, emulating native DnD behaviour\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn;\n\n // New scroll root, set scrollEl\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n var layersOut = 0;\n var currentParent = scrollEl;\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n }\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\nfunction Revert() {}\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n this.sortable.animateAll();\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\nfunction Remove() {}\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\nvar OnSpill = [Remove, Revert];\n\nvar lastSwapEl;\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\n multiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\n folding = false,\n // Folding any other time\n dragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n if (!sortable.options.avoidImplicitDeselect) {\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n }\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n avoidImplicitDeselect: false,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n dataTransfer.setData('Text', data);\n }\n };\n }\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n sortable._hideClone();\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n });\n\n // Sort multi-drag elements\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n\n sortable.captureAnimationState();\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n }\n\n // Remove all auxiliary multidrag items from el, if sorting enabled\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n initialFolding = false;\n // If leaving sort:false root, or already folding - Fold to new location\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute);\n\n // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n }\n\n // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n activeSortable._showClone(sortable);\n\n // Unfold animation for clones if showing from hidden\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children;\n\n // Multi-drag selection\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n\n // Modifier activated, select from last to dragEl\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n (function () {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n var filter = options.filter;\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n // Check if element is draggable\n if (!closest(children[i], options.draggable, parentEl, false)) continue;\n // Check if element is filtered\n var filtered = filter && (typeof filter === 'function' ? filter.call(sortable, evt, children[i], sortable) : filter.split(',').some(function (criteria) {\n return closest(children[i], criteria.trim(), parentEl, false);\n }));\n if (filtered) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvent: evt\n });\n }\n })();\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n }\n }\n\n // Multi-drag drop\n if (dragStarted && this.isMultiDrag) {\n folding = false;\n // Do not \"unfold\" after around dragEl if reverted\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect;\n\n // Prepare unfold animation\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n }\n\n // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n multiDragIndex++;\n });\n\n // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n if (update) {\n dispatchSortableEvent('update');\n dispatchSortableEvent('sort');\n }\n }\n }\n\n // Must be done after capturing individual rects (scroll bar)\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n multiDragSortable = toSortable;\n }\n\n // Remove clones if necessary\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return;\n\n // Only deselect if selection is in this sortable\n if (multiDragSortable !== this.sortable) return;\n\n // Only deselect if target is not item in this sortable\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;\n\n // Only deselect if left click\n if (evt && evt.button !== 0) return;\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvent: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\r\n * Selects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be selected\r\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n multiDragSortable = sortable;\n }\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n /**\r\n * Deselects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be deselected\r\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n });\n\n // multiDragElements will already be sorted if folding\n var newIndex;\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n return key;\n }\n }\n });\n}\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n\n/**\r\n * Insert multi-drag clones\r\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\r\n * @param {HTMLElement} rootEl\r\n */\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nexport default Sortable;\nexport { AutoScrollPlugin as AutoScroll, MultiDragPlugin as MultiDrag, OnSpill, Sortable, SwapPlugin as Swap };\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=e||self).Tribute=t()}(this,(function(){\"use strict\";function e(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function t(e,t){for(var n=0;n>>0,r=arguments[1],o=0;o container for the click\");n.selectItemAtIndex(i.getAttribute(\"data-index\"),t),n.hideMenu()}else n.current.element&&!n.current.externalTrigger&&(n.current.externalTrigger=!1,setTimeout((function(){return n.hideMenu()})))}},{key:\"keyup\",value:function(e,t){if(e.inputEvent&&(e.inputEvent=!1),e.updateSelection(this),27!==t.keyCode){if(!e.tribute.allowSpaces&&e.tribute.hasTrailingSpace)return e.tribute.hasTrailingSpace=!1,e.commandEvent=!0,void e.callbacks().space(t,this);if(!e.tribute.isActive)if(e.tribute.autocompleteMode)e.callbacks().triggerChar(t,this,\"\");else{var n=e.getKeyCode(e,this,t);if(isNaN(n)||!n)return;var i=e.tribute.triggers().find((function(e){return e.charCodeAt(0)===n}));void 0!==i&&e.callbacks().triggerChar(t,this,i)}e.tribute.current.mentionText.length=r.current.collection.menuShowMinLength&&r.inputEvent&&r.showMenuFor(n,!0)},enter:function(t,n){e.tribute.isActive&&e.tribute.current.filteredItems&&(t.preventDefault(),t.stopPropagation(),setTimeout((function(){e.tribute.selectItemAtIndex(e.tribute.menuSelected,t),e.tribute.hideMenu()}),0))},escape:function(t,n){e.tribute.isActive&&(t.preventDefault(),t.stopPropagation(),e.tribute.isActive=!1,e.tribute.hideMenu())},tab:function(t,n){e.callbacks().enter(t,n)},space:function(t,n){e.tribute.isActive&&(e.tribute.spaceSelectsMatch?e.callbacks().enter(t,n):e.tribute.allowSpaces||(t.stopPropagation(),setTimeout((function(){e.tribute.hideMenu(),e.tribute.isActive=!1}),0)))},up:function(t,n){if(e.tribute.isActive&&e.tribute.current.filteredItems){t.preventDefault(),t.stopPropagation();var i=e.tribute.current.filteredItems.length,r=e.tribute.menuSelected;i>r&&r>0?(e.tribute.menuSelected--,e.setActiveLi()):0===r&&(e.tribute.menuSelected=i-1,e.setActiveLi(),e.tribute.menu.scrollTop=e.tribute.menu.scrollHeight)}},down:function(t,n){if(e.tribute.isActive&&e.tribute.current.filteredItems){t.preventDefault(),t.stopPropagation();var i=e.tribute.current.filteredItems.length-1,r=e.tribute.menuSelected;i>r?(e.tribute.menuSelected++,e.setActiveLi()):i===r&&(e.tribute.menuSelected=0,e.setActiveLi(),e.tribute.menu.scrollTop=0)}},delete:function(t,n){e.tribute.isActive&&e.tribute.current.mentionText.length<1?e.tribute.hideMenu():e.tribute.isActive&&e.tribute.showMenuFor(n)}}}},{key:\"setActiveLi\",value:function(e){var t=this.tribute.menu.querySelectorAll(\"li\"),n=t.length>>>0;e&&(this.tribute.menuSelected=parseInt(e));for(var i=0;iu.bottom){var l=o.bottom-u.bottom;this.tribute.menu.scrollTop+=l}else if(o.topi.width&&(r.left||r.right),u=window.innerHeight>i.height&&(r.top||r.bottom);(o||u)&&(n.tribute.menu.style.cssText=\"display: none\",n.positionMenuAtCaret(e))}),0)}else this.tribute.menu.style.cssText=\"display: none\"}},{key:\"selectElement\",value:function(e,t,n){var i,r=e;if(t)for(var o=0;o=0&&(t=i.substring(0,r))}}else{var o=this.tribute.current.element;if(o){var u=o.selectionStart;o.value&&u>=0&&(t=o.value.substring(0,u))}}return t}},{key:\"getLastWordInText\",value:function(e){var t=(e=e.replace(/\\u00A0/g,\" \")).split(/\\s+/);return t[t.length-1].trim()}},{key:\"getTriggerInfo\",value:function(e,t,n,i,r){var o,u,l,s=this,a=this.tribute.current;if(this.isContentEditable(a.element)){var c=this.getContentEditableSelectedPath(a);c&&(o=c.selected,u=c.path,l=c.offset)}else o=this.tribute.current.element;var h=this.getTextPrecedingCurrentSelection(),d=this.getLastWordInText(h);if(r)return{mentionPosition:h.length-d.length,mentionText:d,mentionSelectedElement:o,mentionSelectedPath:u,mentionSelectedOffset:l};if(null!=h){var f,m=-1;if(this.tribute.collection.forEach((function(e){var t=e.trigger,i=e.requireLeadingSpace?s.lastIndexWithLeadingSpace(h,t):h.lastIndexOf(t);i>m&&(m=i,f=t,n=e.requireLeadingSpace)})),m>=0&&(0===m||!n||/[\\xA0\\s]/g.test(h.substring(m-1,m)))){var p=h.substring(m+f.length,h.length);f=h.substring(m,m+f.length);var v=p.substring(0,1),g=p.length>0&&(\" \"===v||\" \"===v);t&&(p=p.trim());var b=i?/[^\\S ]/g:/[\\xA0\\s]/g;if(this.tribute.hasTrailingSpace=b.test(p),!g&&(e||!b.test(p)))return{mentionPosition:m,mentionText:p,mentionSelectedElement:o,mentionSelectedPath:u,mentionSelectedOffset:l,mentionTriggerChar:f}}}}},{key:\"lastIndexWithLeadingSpace\",value:function(e,t){for(var n=e.split(\"\").reverse().join(\"\"),i=-1,r=0,o=e.length;r=0;a--)if(t[a]!==n[r-a]){s=!1;break}if(s&&(u||l)){i=e.length-1-r;break}}return i}},{key:\"isContentEditable\",value:function(e){return\"INPUT\"!==e.nodeName&&\"TEXTAREA\"!==e.nodeName}},{key:\"isMenuOffScreen\",value:function(e,t){var n=window.innerWidth,i=window.innerHeight,r=document.documentElement,o=(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0),u=(window.pageYOffset||r.scrollTop)-(r.clientTop||0),l=\"number\"==typeof e.top?e.top:u+i-e.bottom-t.height,s=\"number\"==typeof e.right?e.right:e.left+t.width,a=\"number\"==typeof e.bottom?e.bottom:e.top+t.height,c=\"number\"==typeof e.left?e.left:o+n-e.right-t.width;return{top:lMath.ceil(o+n),bottom:a>Math.ceil(u+i),left:cparseInt(u.height)&&(o.overflowY=\"scroll\")):o.overflow=\"hidden\",r.textContent=e.value.substring(0,t),\"INPUT\"===e.nodeName&&(r.textContent=r.textContent.replace(/\\s/g,\" \"));var l=this.getDocument().createElement(\"span\");l.textContent=e.value.substring(t)||\".\",r.appendChild(l);var s=e.getBoundingClientRect(),a=document.documentElement,c=(window.pageXOffset||a.scrollLeft)-(a.clientLeft||0),h=(window.pageYOffset||a.scrollTop)-(a.clientTop||0),d=0,f=0;this.menuContainerIsBody&&(d=s.top,f=s.left);var m={top:d+h+l.offsetTop+parseInt(u.borderTopWidth)+parseInt(u.fontSize)-e.scrollTop,left:f+c+l.offsetLeft+parseInt(u.borderLeftWidth)},p=window.innerWidth,v=window.innerHeight,g=this.getMenuDimensions(),b=this.isMenuOffScreen(m,g);b.right&&(m.right=p-m.left,m.left=\"auto\");var y=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(b.bottom){var w=y-(v-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);m.bottom=w+(v-s.top-l.offsetTop),m.top=\"auto\"}return(b=this.isMenuOffScreen(m,g)).left&&(m.left=p>g.width?c+p-g.width:c,delete m.right),b.top&&(m.top=v>g.height?h+v-g.height:h,delete m.bottom),this.getDocument().body.removeChild(r),m}},{key:\"getContentEditableCaretPosition\",value:function(e){var t,n=this.getWindowSelection();(t=this.getDocument().createRange()).setStart(n.anchorNode,e),t.setEnd(n.anchorNode,e),t.collapse(!1);var i=t.getBoundingClientRect(),r=document.documentElement,o=(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0),u=(window.pageYOffset||r.scrollTop)-(r.clientTop||0),l={left:i.left+o,top:i.top+i.height+u},s=window.innerWidth,a=window.innerHeight,c=this.getMenuDimensions(),h=this.isMenuOffScreen(l,c);h.right&&(l.left=\"auto\",l.right=s-i.left-o);var d=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(h.bottom){var f=d-(a-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);l.top=\"auto\",l.bottom=f+(a-i.top)}return(h=this.isMenuOffScreen(l,c)).left&&(l.left=s>c.width?o+s-c.width:o,delete l.right),h.top&&(l.top=a>c.height?u+a-c.height:u,delete l.bottom),this.menuContainerIsBody||(l.left=l.left?l.left-this.tribute.menuContainer.offsetLeft:l.left,l.top=l.top?l.top-this.tribute.menuContainer.offsetTop:l.top),l}},{key:\"scrollIntoView\",value:function(e){var t,n=this.menu;if(void 0!==n){for(;void 0===t||0===t.height;)if(0===(t=n.getBoundingClientRect()).height&&(void 0===(n=n.childNodes[0])||!n.getBoundingClientRect))return;var i=t.top,r=i+t.height;if(i<0)window.scrollTo(0,window.pageYOffset+t.top-20);else if(r>window.innerHeight){var o=window.pageYOffset+t.top-20;o-window.pageYOffset>100&&(o=window.pageYOffset+100);var u=window.pageYOffset-(window.innerHeight-r);u>o&&(u=o),window.scrollTo(0,u)}}}},{key:\"menuContainerIsBody\",get:function(){return this.tribute.menuContainer===document.body||!this.tribute.menuContainer}}]),t}(),s=function(){function t(n){e(this,t),this.tribute=n,this.tribute.search=this}return n(t,[{key:\"simpleFilter\",value:function(e,t){var n=this;return t.filter((function(t){return n.test(e,t)}))}},{key:\"test\",value:function(e,t){return null!==this.match(e,t)}},{key:\"match\",value:function(e,t,n){n=n||{};t.length;var i=n.pre||\"\",r=n.post||\"\",o=n.caseSensitive&&t||t.toLowerCase();if(n.skip)return{rendered:t,score:0};e=n.caseSensitive&&e||e.toLowerCase();var u=this.traverse(o,e,0,0,[]);return u?{rendered:this.render(t,u.cache,i,r),score:u.score}:null}},{key:\"traverse\",value:function(e,t,n,i,r){if(t.length===i)return{score:this.calculateScore(r),cache:r.slice()};if(!(e.length===n||t.length-i>e.length-n)){for(var o,u,l=t[i],s=e.indexOf(l,n);s>-1;){if(r.push(s),u=this.traverse(e,t,s+1,i+1,r),r.pop(),!u)return o;(!o||o.score0&&(e[r-1]+1===i?n+=n+1:n=1),t+=n})),t}},{key:\"render\",value:function(e,t,n,i){var r=e.substring(0,t[0]);return t.forEach((function(o,u){r+=n+e[o]+i+e.substring(o+1,t[u+1]?t[u+1]:e.length)})),r}},{key:\"filter\",value:function(e,t,n){var i=this;return n=n||{},t.reduce((function(t,r,o,u){var l=r;n.extract&&((l=n.extract(r))||(l=\"\"));var s=i.match(e,l,n);return null!=s&&(t[t.length]={string:s.rendered,score:s.score,index:o,original:r}),t}),[]).sort((function(e,t){var n=t.score-e.score;return n||e.index-t.index}))}}]),t}();return function(){function t(n){var i,r=this,a=n.values,c=void 0===a?null:a,h=n.iframe,d=void 0===h?null:h,f=n.selectClass,m=void 0===f?\"highlight\":f,p=n.containerClass,v=void 0===p?\"tribute-container\":p,g=n.itemClass,b=void 0===g?\"\":g,y=n.trigger,w=void 0===y?\"@\":y,T=n.autocompleteMode,C=void 0!==T&&T,S=n.selectTemplate,E=void 0===S?null:S,k=n.menuItemTemplate,x=void 0===k?null:k,M=n.lookup,A=void 0===M?\"key\":M,L=n.fillAttr,I=void 0===L?\"value\":L,N=n.collection,O=void 0===N?null:N,D=n.menuContainer,P=void 0===D?null:D,R=n.noMatchTemplate,W=void 0===R?null:R,H=n.requireLeadingSpace,B=void 0===H||H,F=n.allowSpaces,_=void 0!==F&&F,j=n.replaceTextSuffix,Y=void 0===j?null:j,z=n.positionMenu,K=void 0===z||z,q=n.spaceSelectsMatch,U=void 0!==q&&q,X=n.searchOpts,Q=void 0===X?{}:X,V=n.menuItemLimit,G=void 0===V?null:V,J=n.menuShowMinLength,Z=void 0===J?0:J;if(e(this,t),this.autocompleteMode=C,this.menuSelected=0,this.current={},this.inputEvent=!1,this.isActive=!1,this.menuContainer=P,this.allowSpaces=_,this.replaceTextSuffix=Y,this.positionMenu=K,this.hasTrailingSpace=!1,this.spaceSelectsMatch=U,this.autocompleteMode&&(w=\"\",_=!1),c)this.collection=[{trigger:w,iframe:d,selectClass:m,containerClass:v,itemClass:b,selectTemplate:(E||t.defaultSelectTemplate).bind(this),menuItemTemplate:(x||t.defaultMenuItemTemplate).bind(this),noMatchTemplate:(i=W,\"string\"==typeof i?\"\"===i.trim()?null:i:\"function\"==typeof i?i.bind(r):W||function(){return\"
  • No Match Found!
  • \"}.bind(r)),lookup:A,fillAttr:I,values:c,requireLeadingSpace:B,searchOpts:Q,menuItemLimit:G,menuShowMinLength:Z}];else{if(!O)throw new Error(\"[Tribute] No collection specified.\");this.autocompleteMode&&console.warn(\"Tribute in autocomplete mode does not work for collections\"),this.collection=O.map((function(e){return{trigger:e.trigger||w,iframe:e.iframe||d,selectClass:e.selectClass||m,containerClass:e.containerClass||v,itemClass:e.itemClass||b,selectTemplate:(e.selectTemplate||t.defaultSelectTemplate).bind(r),menuItemTemplate:(e.menuItemTemplate||t.defaultMenuItemTemplate).bind(r),noMatchTemplate:function(e){return\"string\"==typeof e?\"\"===e.trim()?null:e:\"function\"==typeof e?e.bind(r):W||function(){return\"
  • No Match Found!
  • \"}.bind(r)}(W),lookup:e.lookup||A,fillAttr:e.fillAttr||I,values:e.values,requireLeadingSpace:e.requireLeadingSpace,searchOpts:e.searchOpts||Q,menuItemLimit:e.menuItemLimit||G,menuShowMinLength:e.menuShowMinLength||Z}}))}new l(this),new o(this),new u(this),new s(this)}return n(t,[{key:\"triggers\",value:function(){return this.collection.map((function(e){return e.trigger}))}},{key:\"attach\",value:function(e){if(!e)throw new Error(\"[Tribute] Must pass in a DOM node or NodeList.\");if(\"undefined\"!=typeof jQuery&&e instanceof jQuery&&(e=e.get()),e.constructor===NodeList||e.constructor===HTMLCollection||e.constructor===Array)for(var t=e.length,n=0;n\",post:n.current.collection.searchOpts.post||\"\",skip:n.current.collection.searchOpts.skip,extract:function(e){if(\"string\"==typeof n.current.collection.lookup)return e[n.current.collection.lookup];if(\"function\"==typeof n.current.collection.lookup)return n.current.collection.lookup(e,n.current.mentionText);throw new Error(\"Invalid lookup attribute, lookup must be string or function.\")}});n.current.collection.menuItemLimit&&(r=r.slice(0,n.current.collection.menuItemLimit)),n.current.filteredItems=r;var o=n.menu.querySelector(\"ul\");if(n.range.positionMenuAtCaret(t),!r.length){var u=new CustomEvent(\"tribute-no-match\",{detail:n.menu});return n.current.element.dispatchEvent(u),void(\"function\"==typeof n.current.collection.noMatchTemplate&&!n.current.collection.noMatchTemplate()||!n.current.collection.noMatchTemplate?n.hideMenu():\"function\"==typeof n.current.collection.noMatchTemplate?o.innerHTML=n.current.collection.noMatchTemplate():o.innerHTML=n.current.collection.noMatchTemplate)}o.innerHTML=\"\";var l=n.range.getDocument().createDocumentFragment();r.forEach((function(e,t){var r=n.range.getDocument().createElement(\"li\");r.setAttribute(\"data-index\",t),r.className=n.current.collection.itemClass,r.addEventListener(\"mousemove\",(function(e){var t=i(n._findLiTarget(e.target),2),r=(t[0],t[1]);0!==e.movementY&&n.events.setActiveLi(r)})),n.menuSelected===t&&r.classList.add(n.current.collection.selectClass),r.innerHTML=n.current.collection.menuItemTemplate(e),l.appendChild(r)})),o.appendChild(l)}};\"function\"==typeof this.current.collection.values?this.current.collection.values(this.current.mentionText,r):r(this.current.collection.values)}}},{key:\"_findLiTarget\",value:function(e){if(!e)return[];var t=e.getAttribute(\"data-index\");return t?[e,t]:this._findLiTarget(e.parentNode)}},{key:\"showMenuForCollection\",value:function(e,t){e!==document.activeElement&&this.placeCaretAtEnd(e),this.current.collection=this.collection[t||0],this.current.externalTrigger=!0,this.current.element=e,e.isContentEditable?this.insertTextAtCursor(this.current.collection.trigger):this.insertAtCaret(e,this.current.collection.trigger),this.showMenuFor(e)}},{key:\"placeCaretAtEnd\",value:function(e){if(e.focus(),void 0!==window.getSelection&&void 0!==document.createRange){var t=document.createRange();t.selectNodeContents(e),t.collapse(!1);var n=window.getSelection();n.removeAllRanges(),n.addRange(t)}else if(void 0!==document.body.createTextRange){var i=document.body.createTextRange();i.moveToElementText(e),i.collapse(!1),i.select()}}},{key:\"insertTextAtCursor\",value:function(e){var t,n;(n=(t=window.getSelection()).getRangeAt(0)).deleteContents();var i=document.createTextNode(e);n.insertNode(i),n.selectNodeContents(i),n.collapse(!1),t.removeAllRanges(),t.addRange(n)}},{key:\"insertAtCaret\",value:function(e,t){var n=e.scrollTop,i=e.selectionStart,r=e.value.substring(0,i),o=e.value.substring(e.selectionEnd,e.value.length);e.value=r+t+o,i+=t.length,e.selectionStart=i,e.selectionEnd=i,e.focus(),e.scrollTop=n}},{key:\"hideMenu\",value:function(){this.menu&&(this.menu.style.cssText=\"display: none;\",this.isActive=!1,this.menuSelected=0,this.current={})}},{key:\"selectItemAtIndex\",value:function(e,t){if(\"number\"==typeof(e=parseInt(e))&&!isNaN(e)){var n=this.current.filteredItems[e],i=this.current.collection.selectTemplate(n);null!==i&&this.replaceText(i,t,n)}}},{key:\"replaceText\",value:function(e,t,n){this.range.replaceTriggerText(e,!0,!0,t,n)}},{key:\"_append\",value:function(e,t,n){if(\"function\"==typeof e.values)throw new Error(\"Unable to append to values, as it is a function.\");e.values=n?t:e.values.concat(t)}},{key:\"append\",value:function(e,t,n){var i=parseInt(e);if(\"number\"!=typeof i)throw new Error(\"please provide an index for the collection to update.\");var r=this.collection[i];this._append(r,t,n)}},{key:\"appendCurrent\",value:function(e,t){if(!this.isActive)throw new Error(\"No active state. Please use append instead and pass an index.\");this._append(this.current.collection,e,t)}},{key:\"detach\",value:function(e){if(!e)throw new Error(\"[Tribute] Must pass in a DOM node or NodeList.\");if(\"undefined\"!=typeof jQuery&&e instanceof jQuery&&(e=e.get()),e.constructor===NodeList||e.constructor===HTMLCollection||e.constructor===Array)for(var t=e.length,n=0;n'+(this.current.collection.trigger+e.original[this.current.collection.fillAttr])+\"\":this.current.collection.trigger+e.original[this.current.collection.fillAttr]}},{key:\"defaultMenuItemTemplate\",value:function(e){return e.string}},{key:\"inputTypes\",value:function(){return[\"TEXTAREA\",\"INPUT\"]}}]),t}()}));\n//# sourceMappingURL=tribute.min.js.map\n","\"use strict\";\nif (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n}\n","/*!\nTurbo 8.0.13\nCopyright © 2025 37signals LLC\n */\n(function(prototype) {\n if (typeof prototype.requestSubmit == \"function\") return;\n prototype.requestSubmit = function(submitter) {\n if (submitter) {\n validateSubmitter(submitter, this);\n submitter.click();\n } else {\n submitter = document.createElement(\"input\");\n submitter.type = \"submit\";\n submitter.hidden = true;\n this.appendChild(submitter);\n submitter.click();\n this.removeChild(submitter);\n }\n };\n function validateSubmitter(submitter, form) {\n submitter instanceof HTMLElement || raise(TypeError, \"parameter 1 is not of type 'HTMLElement'\");\n submitter.type == \"submit\" || raise(TypeError, \"The specified element is not a submit button\");\n submitter.form == form || raise(DOMException, \"The specified element is not owned by this form element\", \"NotFoundError\");\n }\n function raise(errorConstructor, message, name) {\n throw new errorConstructor(\"Failed to execute 'requestSubmit' on 'HTMLFormElement': \" + message + \".\", name);\n }\n})(HTMLFormElement.prototype);\n\nconst submittersByForm = new WeakMap;\n\nfunction findSubmitterFromClickTarget(target) {\n const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n const candidate = element ? element.closest(\"input, button\") : null;\n return candidate?.type == \"submit\" ? candidate : null;\n}\n\nfunction clickCaptured(event) {\n const submitter = findSubmitterFromClickTarget(event.target);\n if (submitter && submitter.form) {\n submittersByForm.set(submitter.form, submitter);\n }\n}\n\n(function() {\n if (\"submitter\" in Event.prototype) return;\n let prototype = window.Event.prototype;\n if (\"SubmitEvent\" in window) {\n const prototypeOfSubmitEvent = window.SubmitEvent.prototype;\n if (/Apple Computer/.test(navigator.vendor) && !(\"submitter\" in prototypeOfSubmitEvent)) {\n prototype = prototypeOfSubmitEvent;\n } else {\n return;\n }\n }\n addEventListener(\"click\", clickCaptured, true);\n Object.defineProperty(prototype, \"submitter\", {\n get() {\n if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n return submittersByForm.get(this.target);\n }\n }\n });\n})();\n\nconst FrameLoadingStyle = {\n eager: \"eager\",\n lazy: \"lazy\"\n};\n\nclass FrameElement extends HTMLElement {\n static delegateConstructor=undefined;\n loaded=Promise.resolve();\n static get observedAttributes() {\n return [ \"disabled\", \"loading\", \"src\" ];\n }\n constructor() {\n super();\n this.delegate = new FrameElement.delegateConstructor(this);\n }\n connectedCallback() {\n this.delegate.connect();\n }\n disconnectedCallback() {\n this.delegate.disconnect();\n }\n reload() {\n return this.delegate.sourceURLReloaded();\n }\n attributeChangedCallback(name) {\n if (name == \"loading\") {\n this.delegate.loadingStyleChanged();\n } else if (name == \"src\") {\n this.delegate.sourceURLChanged();\n } else if (name == \"disabled\") {\n this.delegate.disabledChanged();\n }\n }\n get src() {\n return this.getAttribute(\"src\");\n }\n set src(value) {\n if (value) {\n this.setAttribute(\"src\", value);\n } else {\n this.removeAttribute(\"src\");\n }\n }\n get refresh() {\n return this.getAttribute(\"refresh\");\n }\n set refresh(value) {\n if (value) {\n this.setAttribute(\"refresh\", value);\n } else {\n this.removeAttribute(\"refresh\");\n }\n }\n get shouldReloadWithMorph() {\n return this.src && this.refresh === \"morph\";\n }\n get loading() {\n return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n }\n set loading(value) {\n if (value) {\n this.setAttribute(\"loading\", value);\n } else {\n this.removeAttribute(\"loading\");\n }\n }\n get disabled() {\n return this.hasAttribute(\"disabled\");\n }\n set disabled(value) {\n if (value) {\n this.setAttribute(\"disabled\", \"\");\n } else {\n this.removeAttribute(\"disabled\");\n }\n }\n get autoscroll() {\n return this.hasAttribute(\"autoscroll\");\n }\n set autoscroll(value) {\n if (value) {\n this.setAttribute(\"autoscroll\", \"\");\n } else {\n this.removeAttribute(\"autoscroll\");\n }\n }\n get complete() {\n return !this.delegate.isLoading;\n }\n get isActive() {\n return this.ownerDocument === document && !this.isPreview;\n }\n get isPreview() {\n return this.ownerDocument?.documentElement?.hasAttribute(\"data-turbo-preview\");\n }\n}\n\nfunction frameLoadingStyleFromString(style) {\n switch (style.toLowerCase()) {\n case \"lazy\":\n return FrameLoadingStyle.lazy;\n\n default:\n return FrameLoadingStyle.eager;\n }\n}\n\nconst drive = {\n enabled: true,\n progressBarDelay: 500,\n unvisitableExtensions: new Set([ \".7z\", \".aac\", \".apk\", \".avi\", \".bmp\", \".bz2\", \".css\", \".csv\", \".deb\", \".dmg\", \".doc\", \".docx\", \".exe\", \".gif\", \".gz\", \".heic\", \".heif\", \".ico\", \".iso\", \".jpeg\", \".jpg\", \".js\", \".json\", \".m4a\", \".mkv\", \".mov\", \".mp3\", \".mp4\", \".mpeg\", \".mpg\", \".msi\", \".ogg\", \".ogv\", \".pdf\", \".pkg\", \".png\", \".ppt\", \".pptx\", \".rar\", \".rtf\", \".svg\", \".tar\", \".tif\", \".tiff\", \".txt\", \".wav\", \".webm\", \".webp\", \".wma\", \".wmv\", \".xls\", \".xlsx\", \".xml\", \".zip\" ])\n};\n\nfunction activateScriptElement(element) {\n if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n return element;\n } else {\n const createdScriptElement = document.createElement(\"script\");\n const cspNonce = getCspNonce();\n if (cspNonce) {\n createdScriptElement.nonce = cspNonce;\n }\n createdScriptElement.textContent = element.textContent;\n createdScriptElement.async = false;\n copyElementAttributes(createdScriptElement, element);\n return createdScriptElement;\n }\n}\n\nfunction copyElementAttributes(destinationElement, sourceElement) {\n for (const {name: name, value: value} of sourceElement.attributes) {\n destinationElement.setAttribute(name, value);\n }\n}\n\nfunction createDocumentFragment(html) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content;\n}\n\nfunction dispatch(eventName, {target: target, cancelable: cancelable, detail: detail} = {}) {\n const event = new CustomEvent(eventName, {\n cancelable: cancelable,\n bubbles: true,\n composed: true,\n detail: detail\n });\n if (target && target.isConnected) {\n target.dispatchEvent(event);\n } else {\n document.documentElement.dispatchEvent(event);\n }\n return event;\n}\n\nfunction cancelEvent(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n\nfunction nextRepaint() {\n if (document.visibilityState === \"hidden\") {\n return nextEventLoopTick();\n } else {\n return nextAnimationFrame();\n }\n}\n\nfunction nextAnimationFrame() {\n return new Promise((resolve => requestAnimationFrame((() => resolve()))));\n}\n\nfunction nextEventLoopTick() {\n return new Promise((resolve => setTimeout((() => resolve()), 0)));\n}\n\nfunction nextMicrotask() {\n return Promise.resolve();\n}\n\nfunction parseHTMLDocument(html = \"\") {\n return (new DOMParser).parseFromString(html, \"text/html\");\n}\n\nfunction unindent(strings, ...values) {\n const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n const match = lines[0].match(/^\\s+/);\n const indent = match ? match[0].length : 0;\n return lines.map((line => line.slice(indent))).join(\"\\n\");\n}\n\nfunction interpolate(strings, values) {\n return strings.reduce(((result, string, i) => {\n const value = values[i] == undefined ? \"\" : values[i];\n return result + string + value;\n }), \"\");\n}\n\nfunction uuid() {\n return Array.from({\n length: 36\n }).map(((_, i) => {\n if (i == 8 || i == 13 || i == 18 || i == 23) {\n return \"-\";\n } else if (i == 14) {\n return \"4\";\n } else if (i == 19) {\n return (Math.floor(Math.random() * 4) + 8).toString(16);\n } else {\n return Math.floor(Math.random() * 15).toString(16);\n }\n })).join(\"\");\n}\n\nfunction getAttribute(attributeName, ...elements) {\n for (const value of elements.map((element => element?.getAttribute(attributeName)))) {\n if (typeof value == \"string\") return value;\n }\n return null;\n}\n\nfunction hasAttribute(attributeName, ...elements) {\n return elements.some((element => element && element.hasAttribute(attributeName)));\n}\n\nfunction markAsBusy(...elements) {\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.setAttribute(\"busy\", \"\");\n }\n element.setAttribute(\"aria-busy\", \"true\");\n }\n}\n\nfunction clearBusyState(...elements) {\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.removeAttribute(\"busy\");\n }\n element.removeAttribute(\"aria-busy\");\n }\n}\n\nfunction waitForLoad(element, timeoutInMilliseconds = 2e3) {\n return new Promise((resolve => {\n const onComplete = () => {\n element.removeEventListener(\"error\", onComplete);\n element.removeEventListener(\"load\", onComplete);\n resolve();\n };\n element.addEventListener(\"load\", onComplete, {\n once: true\n });\n element.addEventListener(\"error\", onComplete, {\n once: true\n });\n setTimeout(resolve, timeoutInMilliseconds);\n }));\n}\n\nfunction getHistoryMethodForAction(action) {\n switch (action) {\n case \"replace\":\n return history.replaceState;\n\n case \"advance\":\n case \"restore\":\n return history.pushState;\n }\n}\n\nfunction isAction(action) {\n return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\n\nfunction getVisitAction(...elements) {\n const action = getAttribute(\"data-turbo-action\", ...elements);\n return isAction(action) ? action : null;\n}\n\nfunction getMetaElement(name) {\n return document.querySelector(`meta[name=\"${name}\"]`);\n}\n\nfunction getMetaContent(name) {\n const element = getMetaElement(name);\n return element && element.content;\n}\n\nfunction getCspNonce() {\n const element = getMetaElement(\"csp-nonce\");\n if (element) {\n const {nonce: nonce, content: content} = element;\n return nonce == \"\" ? content : nonce;\n }\n}\n\nfunction setMetaContent(name, content) {\n let element = getMetaElement(name);\n if (!element) {\n element = document.createElement(\"meta\");\n element.setAttribute(\"name\", name);\n document.head.appendChild(element);\n }\n element.setAttribute(\"content\", content);\n return element;\n}\n\nfunction findClosestRecursively(element, selector) {\n if (element instanceof Element) {\n return element.closest(selector) || findClosestRecursively(element.assignedSlot || element.getRootNode()?.host, selector);\n }\n}\n\nfunction elementIsFocusable(element) {\n const inertDisabledOrHidden = \"[inert], :disabled, [hidden], details:not([open]), dialog:not([open])\";\n return !!element && element.closest(inertDisabledOrHidden) == null && typeof element.focus == \"function\";\n}\n\nfunction queryAutofocusableElement(elementOrDocumentFragment) {\n return Array.from(elementOrDocumentFragment.querySelectorAll(\"[autofocus]\")).find(elementIsFocusable);\n}\n\nasync function around(callback, reader) {\n const before = reader();\n callback();\n await nextAnimationFrame();\n const after = reader();\n return [ before, after ];\n}\n\nfunction doesNotTargetIFrame(name) {\n if (name === \"_blank\") {\n return false;\n } else if (name) {\n for (const element of document.getElementsByName(name)) {\n if (element instanceof HTMLIFrameElement) return false;\n }\n return true;\n } else {\n return true;\n }\n}\n\nfunction findLinkFromClickTarget(target) {\n return findClosestRecursively(target, \"a[href]:not([target^=_]):not([download])\");\n}\n\nfunction getLocationForLink(link) {\n return expandURL(link.getAttribute(\"href\") || \"\");\n}\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n const callback = () => fn.apply(this, args);\n clearTimeout(timeoutId);\n timeoutId = setTimeout(callback, delay);\n };\n}\n\nconst submitter = {\n \"aria-disabled\": {\n beforeSubmit: submitter => {\n submitter.setAttribute(\"aria-disabled\", \"true\");\n submitter.addEventListener(\"click\", cancelEvent);\n },\n afterSubmit: submitter => {\n submitter.removeAttribute(\"aria-disabled\");\n submitter.removeEventListener(\"click\", cancelEvent);\n }\n },\n disabled: {\n beforeSubmit: submitter => submitter.disabled = true,\n afterSubmit: submitter => submitter.disabled = false\n }\n};\n\nclass Config {\n #submitter=null;\n constructor(config) {\n Object.assign(this, config);\n }\n get submitter() {\n return this.#submitter;\n }\n set submitter(value) {\n this.#submitter = submitter[value] || value;\n }\n}\n\nconst forms = new Config({\n mode: \"on\",\n submitter: \"disabled\"\n});\n\nconst config = {\n drive: drive,\n forms: forms\n};\n\nfunction expandURL(locatable) {\n return new URL(locatable.toString(), document.baseURI);\n}\n\nfunction getAnchor(url) {\n let anchorMatch;\n if (url.hash) {\n return url.hash.slice(1);\n } else if (anchorMatch = url.href.match(/#(.*)$/)) {\n return anchorMatch[1];\n }\n}\n\nfunction getAction$1(form, submitter) {\n const action = submitter?.getAttribute(\"formaction\") || form.getAttribute(\"action\") || form.action;\n return expandURL(action);\n}\n\nfunction getExtension(url) {\n return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\n\nfunction isPrefixedBy(baseURL, url) {\n const prefix = getPrefix(url);\n return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\n\nfunction locationIsVisitable(location, rootLocation) {\n return isPrefixedBy(location, rootLocation) && !config.drive.unvisitableExtensions.has(getExtension(location));\n}\n\nfunction getRequestURL(url) {\n const anchor = getAnchor(url);\n return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\n\nfunction toCacheKey(url) {\n return getRequestURL(url);\n}\n\nfunction urlsAreEqual(left, right) {\n return expandURL(left).href == expandURL(right).href;\n}\n\nfunction getPathComponents(url) {\n return url.pathname.split(\"/\").slice(1);\n}\n\nfunction getLastPathComponent(url) {\n return getPathComponents(url).slice(-1)[0];\n}\n\nfunction getPrefix(url) {\n return addTrailingSlash(url.origin + url.pathname);\n}\n\nfunction addTrailingSlash(value) {\n return value.endsWith(\"/\") ? value : value + \"/\";\n}\n\nclass FetchResponse {\n constructor(response) {\n this.response = response;\n }\n get succeeded() {\n return this.response.ok;\n }\n get failed() {\n return !this.succeeded;\n }\n get clientError() {\n return this.statusCode >= 400 && this.statusCode <= 499;\n }\n get serverError() {\n return this.statusCode >= 500 && this.statusCode <= 599;\n }\n get redirected() {\n return this.response.redirected;\n }\n get location() {\n return expandURL(this.response.url);\n }\n get isHTML() {\n return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n }\n get statusCode() {\n return this.response.status;\n }\n get contentType() {\n return this.header(\"Content-Type\");\n }\n get responseText() {\n return this.response.clone().text();\n }\n get responseHTML() {\n if (this.isHTML) {\n return this.response.clone().text();\n } else {\n return Promise.resolve(undefined);\n }\n }\n header(name) {\n return this.response.headers.get(name);\n }\n}\n\nclass LimitedSet extends Set {\n constructor(maxSize) {\n super();\n this.maxSize = maxSize;\n }\n add(value) {\n if (this.size >= this.maxSize) {\n const iterator = this.values();\n const oldestValue = iterator.next().value;\n this.delete(oldestValue);\n }\n super.add(value);\n }\n}\n\nconst recentRequests = new LimitedSet(20);\n\nconst nativeFetch = window.fetch;\n\nfunction fetchWithTurboHeaders(url, options = {}) {\n const modifiedHeaders = new Headers(options.headers || {});\n const requestUID = uuid();\n recentRequests.add(requestUID);\n modifiedHeaders.append(\"X-Turbo-Request-Id\", requestUID);\n return nativeFetch(url, {\n ...options,\n headers: modifiedHeaders\n });\n}\n\nfunction fetchMethodFromString(method) {\n switch (method.toLowerCase()) {\n case \"get\":\n return FetchMethod.get;\n\n case \"post\":\n return FetchMethod.post;\n\n case \"put\":\n return FetchMethod.put;\n\n case \"patch\":\n return FetchMethod.patch;\n\n case \"delete\":\n return FetchMethod.delete;\n }\n}\n\nconst FetchMethod = {\n get: \"get\",\n post: \"post\",\n put: \"put\",\n patch: \"patch\",\n delete: \"delete\"\n};\n\nfunction fetchEnctypeFromString(encoding) {\n switch (encoding.toLowerCase()) {\n case FetchEnctype.multipart:\n return FetchEnctype.multipart;\n\n case FetchEnctype.plain:\n return FetchEnctype.plain;\n\n default:\n return FetchEnctype.urlEncoded;\n }\n}\n\nconst FetchEnctype = {\n urlEncoded: \"application/x-www-form-urlencoded\",\n multipart: \"multipart/form-data\",\n plain: \"text/plain\"\n};\n\nclass FetchRequest {\n abortController=new AbortController;\n #resolveRequestPromise=_value => {};\n constructor(delegate, method, location, requestBody = new URLSearchParams, target = null, enctype = FetchEnctype.urlEncoded) {\n const [url, body] = buildResourceAndBody(expandURL(location), method, requestBody, enctype);\n this.delegate = delegate;\n this.url = url;\n this.target = target;\n this.fetchOptions = {\n credentials: \"same-origin\",\n redirect: \"follow\",\n method: method.toUpperCase(),\n headers: {\n ...this.defaultHeaders\n },\n body: body,\n signal: this.abortSignal,\n referrer: this.delegate.referrer?.href\n };\n this.enctype = enctype;\n }\n get method() {\n return this.fetchOptions.method;\n }\n set method(value) {\n const fetchBody = this.isSafe ? this.url.searchParams : this.fetchOptions.body || new FormData;\n const fetchMethod = fetchMethodFromString(value) || FetchMethod.get;\n this.url.search = \"\";\n const [url, body] = buildResourceAndBody(this.url, fetchMethod, fetchBody, this.enctype);\n this.url = url;\n this.fetchOptions.body = body;\n this.fetchOptions.method = fetchMethod.toUpperCase();\n }\n get headers() {\n return this.fetchOptions.headers;\n }\n set headers(value) {\n this.fetchOptions.headers = value;\n }\n get body() {\n if (this.isSafe) {\n return this.url.searchParams;\n } else {\n return this.fetchOptions.body;\n }\n }\n set body(value) {\n this.fetchOptions.body = value;\n }\n get location() {\n return this.url;\n }\n get params() {\n return this.url.searchParams;\n }\n get entries() {\n return this.body ? Array.from(this.body.entries()) : [];\n }\n cancel() {\n this.abortController.abort();\n }\n async perform() {\n const {fetchOptions: fetchOptions} = this;\n this.delegate.prepareRequest(this);\n const event = await this.#allowRequestToBeIntercepted(fetchOptions);\n try {\n this.delegate.requestStarted(this);\n if (event.detail.fetchRequest) {\n this.response = event.detail.fetchRequest.response;\n } else {\n this.response = fetchWithTurboHeaders(this.url.href, fetchOptions);\n }\n const response = await this.response;\n return await this.receive(response);\n } catch (error) {\n if (error.name !== \"AbortError\") {\n if (this.#willDelegateErrorHandling(error)) {\n this.delegate.requestErrored(this, error);\n }\n throw error;\n }\n } finally {\n this.delegate.requestFinished(this);\n }\n }\n async receive(response) {\n const fetchResponse = new FetchResponse(response);\n const event = dispatch(\"turbo:before-fetch-response\", {\n cancelable: true,\n detail: {\n fetchResponse: fetchResponse\n },\n target: this.target\n });\n if (event.defaultPrevented) {\n this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n } else if (fetchResponse.succeeded) {\n this.delegate.requestSucceededWithResponse(this, fetchResponse);\n } else {\n this.delegate.requestFailedWithResponse(this, fetchResponse);\n }\n return fetchResponse;\n }\n get defaultHeaders() {\n return {\n Accept: \"text/html, application/xhtml+xml\"\n };\n }\n get isSafe() {\n return isSafe(this.method);\n }\n get abortSignal() {\n return this.abortController.signal;\n }\n acceptResponseType(mimeType) {\n this.headers[\"Accept\"] = [ mimeType, this.headers[\"Accept\"] ].join(\", \");\n }\n async #allowRequestToBeIntercepted(fetchOptions) {\n const requestInterception = new Promise((resolve => this.#resolveRequestPromise = resolve));\n const event = dispatch(\"turbo:before-fetch-request\", {\n cancelable: true,\n detail: {\n fetchOptions: fetchOptions,\n url: this.url,\n resume: this.#resolveRequestPromise\n },\n target: this.target\n });\n this.url = event.detail.url;\n if (event.defaultPrevented) await requestInterception;\n return event;\n }\n #willDelegateErrorHandling(error) {\n const event = dispatch(\"turbo:fetch-request-error\", {\n target: this.target,\n cancelable: true,\n detail: {\n request: this,\n error: error\n }\n });\n return !event.defaultPrevented;\n }\n}\n\nfunction isSafe(fetchMethod) {\n return fetchMethodFromString(fetchMethod) == FetchMethod.get;\n}\n\nfunction buildResourceAndBody(resource, method, requestBody, enctype) {\n const searchParams = Array.from(requestBody).length > 0 ? new URLSearchParams(entriesExcludingFiles(requestBody)) : resource.searchParams;\n if (isSafe(method)) {\n return [ mergeIntoURLSearchParams(resource, searchParams), null ];\n } else if (enctype == FetchEnctype.urlEncoded) {\n return [ resource, searchParams ];\n } else {\n return [ resource, requestBody ];\n }\n}\n\nfunction entriesExcludingFiles(requestBody) {\n const entries = [];\n for (const [name, value] of requestBody) {\n if (value instanceof File) continue; else entries.push([ name, value ]);\n }\n return entries;\n}\n\nfunction mergeIntoURLSearchParams(url, requestBody) {\n const searchParams = new URLSearchParams(entriesExcludingFiles(requestBody));\n url.search = searchParams.toString();\n return url;\n}\n\nclass AppearanceObserver {\n started=false;\n constructor(delegate, element) {\n this.delegate = delegate;\n this.element = element;\n this.intersectionObserver = new IntersectionObserver(this.intersect);\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.intersectionObserver.observe(this.element);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n this.intersectionObserver.unobserve(this.element);\n }\n }\n intersect=entries => {\n const lastEntry = entries.slice(-1)[0];\n if (lastEntry?.isIntersecting) {\n this.delegate.elementAppearedInViewport(this.element);\n }\n };\n}\n\nclass StreamMessage {\n static contentType=\"text/vnd.turbo-stream.html\";\n static wrap(message) {\n if (typeof message == \"string\") {\n return new this(createDocumentFragment(message));\n } else {\n return message;\n }\n }\n constructor(fragment) {\n this.fragment = importStreamElements(fragment);\n }\n}\n\nfunction importStreamElements(fragment) {\n for (const element of fragment.querySelectorAll(\"turbo-stream\")) {\n const streamElement = document.importNode(element, true);\n for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll(\"script\")) {\n inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));\n }\n element.replaceWith(streamElement);\n }\n return fragment;\n}\n\nconst PREFETCH_DELAY = 100;\n\nclass PrefetchCache {\n #prefetchTimeout=null;\n #prefetched=null;\n get(url) {\n if (this.#prefetched && this.#prefetched.url === url && this.#prefetched.expire > Date.now()) {\n return this.#prefetched.request;\n }\n }\n setLater(url, request, ttl) {\n this.clear();\n this.#prefetchTimeout = setTimeout((() => {\n request.perform();\n this.set(url, request, ttl);\n this.#prefetchTimeout = null;\n }), PREFETCH_DELAY);\n }\n set(url, request, ttl) {\n this.#prefetched = {\n url: url,\n request: request,\n expire: new Date((new Date).getTime() + ttl)\n };\n }\n clear() {\n if (this.#prefetchTimeout) clearTimeout(this.#prefetchTimeout);\n this.#prefetched = null;\n }\n}\n\nconst cacheTtl = 10 * 1e3;\n\nconst prefetchCache = new PrefetchCache;\n\nconst FormSubmissionState = {\n initialized: \"initialized\",\n requesting: \"requesting\",\n waiting: \"waiting\",\n receiving: \"receiving\",\n stopping: \"stopping\",\n stopped: \"stopped\"\n};\n\nclass FormSubmission {\n state=FormSubmissionState.initialized;\n static confirmMethod(message) {\n return Promise.resolve(confirm(message));\n }\n constructor(delegate, formElement, submitter, mustRedirect = false) {\n const method = getMethod(formElement, submitter);\n const action = getAction(getFormAction(formElement, submitter), method);\n const body = buildFormData(formElement, submitter);\n const enctype = getEnctype(formElement, submitter);\n this.delegate = delegate;\n this.formElement = formElement;\n this.submitter = submitter;\n this.fetchRequest = new FetchRequest(this, method, action, body, formElement, enctype);\n this.mustRedirect = mustRedirect;\n }\n get method() {\n return this.fetchRequest.method;\n }\n set method(value) {\n this.fetchRequest.method = value;\n }\n get action() {\n return this.fetchRequest.url.toString();\n }\n set action(value) {\n this.fetchRequest.url = expandURL(value);\n }\n get body() {\n return this.fetchRequest.body;\n }\n get enctype() {\n return this.fetchRequest.enctype;\n }\n get isSafe() {\n return this.fetchRequest.isSafe;\n }\n get location() {\n return this.fetchRequest.url;\n }\n async start() {\n const {initialized: initialized, requesting: requesting} = FormSubmissionState;\n const confirmationMessage = getAttribute(\"data-turbo-confirm\", this.submitter, this.formElement);\n if (typeof confirmationMessage === \"string\") {\n const confirmMethod = typeof config.forms.confirm === \"function\" ? config.forms.confirm : FormSubmission.confirmMethod;\n const answer = await confirmMethod(confirmationMessage, this.formElement, this.submitter);\n if (!answer) {\n return;\n }\n }\n if (this.state == initialized) {\n this.state = requesting;\n return this.fetchRequest.perform();\n }\n }\n stop() {\n const {stopping: stopping, stopped: stopped} = FormSubmissionState;\n if (this.state != stopping && this.state != stopped) {\n this.state = stopping;\n this.fetchRequest.cancel();\n return true;\n }\n }\n prepareRequest(request) {\n if (!request.isSafe) {\n const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n if (token) {\n request.headers[\"X-CSRF-Token\"] = token;\n }\n }\n if (this.requestAcceptsTurboStreamResponse(request)) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n requestStarted(_request) {\n this.state = FormSubmissionState.waiting;\n if (this.submitter) config.forms.submitter.beforeSubmit(this.submitter);\n this.setSubmitsWith();\n markAsBusy(this.formElement);\n dispatch(\"turbo:submit-start\", {\n target: this.formElement,\n detail: {\n formSubmission: this\n }\n });\n this.delegate.formSubmissionStarted(this);\n }\n requestPreventedHandlingResponse(request, response) {\n prefetchCache.clear();\n this.result = {\n success: response.succeeded,\n fetchResponse: response\n };\n }\n requestSucceededWithResponse(request, response) {\n if (response.clientError || response.serverError) {\n this.delegate.formSubmissionFailedWithResponse(this, response);\n return;\n }\n prefetchCache.clear();\n if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n const error = new Error(\"Form responses must redirect to another location\");\n this.delegate.formSubmissionErrored(this, error);\n } else {\n this.state = FormSubmissionState.receiving;\n this.result = {\n success: true,\n fetchResponse: response\n };\n this.delegate.formSubmissionSucceededWithResponse(this, response);\n }\n }\n requestFailedWithResponse(request, response) {\n this.result = {\n success: false,\n fetchResponse: response\n };\n this.delegate.formSubmissionFailedWithResponse(this, response);\n }\n requestErrored(request, error) {\n this.result = {\n success: false,\n error: error\n };\n this.delegate.formSubmissionErrored(this, error);\n }\n requestFinished(_request) {\n this.state = FormSubmissionState.stopped;\n if (this.submitter) config.forms.submitter.afterSubmit(this.submitter);\n this.resetSubmitterText();\n clearBusyState(this.formElement);\n dispatch(\"turbo:submit-end\", {\n target: this.formElement,\n detail: {\n formSubmission: this,\n ...this.result\n }\n });\n this.delegate.formSubmissionFinished(this);\n }\n setSubmitsWith() {\n if (!this.submitter || !this.submitsWith) return;\n if (this.submitter.matches(\"button\")) {\n this.originalSubmitText = this.submitter.innerHTML;\n this.submitter.innerHTML = this.submitsWith;\n } else if (this.submitter.matches(\"input\")) {\n const input = this.submitter;\n this.originalSubmitText = input.value;\n input.value = this.submitsWith;\n }\n }\n resetSubmitterText() {\n if (!this.submitter || !this.originalSubmitText) return;\n if (this.submitter.matches(\"button\")) {\n this.submitter.innerHTML = this.originalSubmitText;\n } else if (this.submitter.matches(\"input\")) {\n const input = this.submitter;\n input.value = this.originalSubmitText;\n }\n }\n requestMustRedirect(request) {\n return !request.isSafe && this.mustRedirect;\n }\n requestAcceptsTurboStreamResponse(request) {\n return !request.isSafe || hasAttribute(\"data-turbo-stream\", this.submitter, this.formElement);\n }\n get submitsWith() {\n return this.submitter?.getAttribute(\"data-turbo-submits-with\");\n }\n}\n\nfunction buildFormData(formElement, submitter) {\n const formData = new FormData(formElement);\n const name = submitter?.getAttribute(\"name\");\n const value = submitter?.getAttribute(\"value\");\n if (name) {\n formData.append(name, value || \"\");\n }\n return formData;\n}\n\nfunction getCookieValue(cookieName) {\n if (cookieName != null) {\n const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n const cookie = cookies.find((cookie => cookie.startsWith(cookieName)));\n if (cookie) {\n const value = cookie.split(\"=\").slice(1).join(\"=\");\n return value ? decodeURIComponent(value) : undefined;\n }\n }\n}\n\nfunction responseSucceededWithoutRedirect(response) {\n return response.statusCode == 200 && !response.redirected;\n}\n\nfunction getFormAction(formElement, submitter) {\n const formElementAction = typeof formElement.action === \"string\" ? formElement.action : null;\n if (submitter?.hasAttribute(\"formaction\")) {\n return submitter.getAttribute(\"formaction\") || \"\";\n } else {\n return formElement.getAttribute(\"action\") || formElementAction || \"\";\n }\n}\n\nfunction getAction(formAction, fetchMethod) {\n const action = expandURL(formAction);\n if (isSafe(fetchMethod)) {\n action.search = \"\";\n }\n return action;\n}\n\nfunction getMethod(formElement, submitter) {\n const method = submitter?.getAttribute(\"formmethod\") || formElement.getAttribute(\"method\") || \"\";\n return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;\n}\n\nfunction getEnctype(formElement, submitter) {\n return fetchEnctypeFromString(submitter?.getAttribute(\"formenctype\") || formElement.enctype);\n}\n\nclass Snapshot {\n constructor(element) {\n this.element = element;\n }\n get activeElement() {\n return this.element.ownerDocument.activeElement;\n }\n get children() {\n return [ ...this.element.children ];\n }\n hasAnchor(anchor) {\n return this.getElementForAnchor(anchor) != null;\n }\n getElementForAnchor(anchor) {\n return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null;\n }\n get isConnected() {\n return this.element.isConnected;\n }\n get firstAutofocusableElement() {\n return queryAutofocusableElement(this.element);\n }\n get permanentElements() {\n return queryPermanentElementsAll(this.element);\n }\n getPermanentElementById(id) {\n return getPermanentElementById(this.element, id);\n }\n getPermanentElementMapForSnapshot(snapshot) {\n const permanentElementMap = {};\n for (const currentPermanentElement of this.permanentElements) {\n const {id: id} = currentPermanentElement;\n const newPermanentElement = snapshot.getPermanentElementById(id);\n if (newPermanentElement) {\n permanentElementMap[id] = [ currentPermanentElement, newPermanentElement ];\n }\n }\n return permanentElementMap;\n }\n}\n\nfunction getPermanentElementById(node, id) {\n return node.querySelector(`#${id}[data-turbo-permanent]`);\n}\n\nfunction queryPermanentElementsAll(node) {\n return node.querySelectorAll(\"[id][data-turbo-permanent]\");\n}\n\nclass FormSubmitObserver {\n started=false;\n constructor(delegate, eventTarget) {\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n start() {\n if (!this.started) {\n this.eventTarget.addEventListener(\"submit\", this.submitCaptured, true);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n this.eventTarget.removeEventListener(\"submit\", this.submitCaptured, true);\n this.started = false;\n }\n }\n submitCaptured=() => {\n this.eventTarget.removeEventListener(\"submit\", this.submitBubbled, false);\n this.eventTarget.addEventListener(\"submit\", this.submitBubbled, false);\n };\n submitBubbled=event => {\n if (!event.defaultPrevented) {\n const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n const submitter = event.submitter || undefined;\n if (form && submissionDoesNotDismissDialog(form, submitter) && submissionDoesNotTargetIFrame(form, submitter) && this.delegate.willSubmitForm(form, submitter)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.delegate.formSubmitted(form, submitter);\n }\n }\n };\n}\n\nfunction submissionDoesNotDismissDialog(form, submitter) {\n const method = submitter?.getAttribute(\"formmethod\") || form.getAttribute(\"method\");\n return method != \"dialog\";\n}\n\nfunction submissionDoesNotTargetIFrame(form, submitter) {\n const target = submitter?.getAttribute(\"formtarget\") || form.getAttribute(\"target\");\n return doesNotTargetIFrame(target);\n}\n\nclass View {\n #resolveRenderPromise=_value => {};\n #resolveInterceptionPromise=_value => {};\n constructor(delegate, element) {\n this.delegate = delegate;\n this.element = element;\n }\n scrollToAnchor(anchor) {\n const element = this.snapshot.getElementForAnchor(anchor);\n if (element) {\n this.scrollToElement(element);\n this.focusElement(element);\n } else {\n this.scrollToPosition({\n x: 0,\n y: 0\n });\n }\n }\n scrollToAnchorFromLocation(location) {\n this.scrollToAnchor(getAnchor(location));\n }\n scrollToElement(element) {\n element.scrollIntoView();\n }\n focusElement(element) {\n if (element instanceof HTMLElement) {\n if (element.hasAttribute(\"tabindex\")) {\n element.focus();\n } else {\n element.setAttribute(\"tabindex\", \"-1\");\n element.focus();\n element.removeAttribute(\"tabindex\");\n }\n }\n }\n scrollToPosition({x: x, y: y}) {\n this.scrollRoot.scrollTo(x, y);\n }\n scrollToTop() {\n this.scrollToPosition({\n x: 0,\n y: 0\n });\n }\n get scrollRoot() {\n return window;\n }\n async render(renderer) {\n const {isPreview: isPreview, shouldRender: shouldRender, willRender: willRender, newSnapshot: snapshot} = renderer;\n const shouldInvalidate = willRender;\n if (shouldRender) {\n try {\n this.renderPromise = new Promise((resolve => this.#resolveRenderPromise = resolve));\n this.renderer = renderer;\n await this.prepareToRenderSnapshot(renderer);\n const renderInterception = new Promise((resolve => this.#resolveInterceptionPromise = resolve));\n const options = {\n resume: this.#resolveInterceptionPromise,\n render: this.renderer.renderElement,\n renderMethod: this.renderer.renderMethod\n };\n const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);\n if (!immediateRender) await renderInterception;\n await this.renderSnapshot(renderer);\n this.delegate.viewRenderedSnapshot(snapshot, isPreview, this.renderer.renderMethod);\n this.delegate.preloadOnLoadLinksForView(this.element);\n this.finishRenderingSnapshot(renderer);\n } finally {\n delete this.renderer;\n this.#resolveRenderPromise(undefined);\n delete this.renderPromise;\n }\n } else if (shouldInvalidate) {\n this.invalidate(renderer.reloadReason);\n }\n }\n invalidate(reason) {\n this.delegate.viewInvalidated(reason);\n }\n async prepareToRenderSnapshot(renderer) {\n this.markAsPreview(renderer.isPreview);\n await renderer.prepareToRender();\n }\n markAsPreview(isPreview) {\n if (isPreview) {\n this.element.setAttribute(\"data-turbo-preview\", \"\");\n } else {\n this.element.removeAttribute(\"data-turbo-preview\");\n }\n }\n markVisitDirection(direction) {\n this.element.setAttribute(\"data-turbo-visit-direction\", direction);\n }\n unmarkVisitDirection() {\n this.element.removeAttribute(\"data-turbo-visit-direction\");\n }\n async renderSnapshot(renderer) {\n await renderer.render();\n }\n finishRenderingSnapshot(renderer) {\n renderer.finishRendering();\n }\n}\n\nclass FrameView extends View {\n missing() {\n this.element.innerHTML = `Content missing`;\n }\n get snapshot() {\n return new Snapshot(this.element);\n }\n}\n\nclass LinkInterceptor {\n constructor(delegate, element) {\n this.delegate = delegate;\n this.element = element;\n }\n start() {\n this.element.addEventListener(\"click\", this.clickBubbled);\n document.addEventListener(\"turbo:click\", this.linkClicked);\n document.addEventListener(\"turbo:before-visit\", this.willVisit);\n }\n stop() {\n this.element.removeEventListener(\"click\", this.clickBubbled);\n document.removeEventListener(\"turbo:click\", this.linkClicked);\n document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n }\n clickBubbled=event => {\n if (this.clickEventIsSignificant(event)) {\n this.clickEvent = event;\n } else {\n delete this.clickEvent;\n }\n };\n linkClicked=event => {\n if (this.clickEvent && this.clickEventIsSignificant(event)) {\n if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {\n this.clickEvent.preventDefault();\n event.preventDefault();\n this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);\n }\n }\n delete this.clickEvent;\n };\n willVisit=_event => {\n delete this.clickEvent;\n };\n clickEventIsSignificant(event) {\n const target = event.composed ? event.target?.parentElement : event.target;\n const element = findLinkFromClickTarget(target) || target;\n return element instanceof Element && element.closest(\"turbo-frame, html\") == this.element;\n }\n}\n\nclass LinkClickObserver {\n started=false;\n constructor(delegate, eventTarget) {\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n start() {\n if (!this.started) {\n this.eventTarget.addEventListener(\"click\", this.clickCaptured, true);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n this.eventTarget.removeEventListener(\"click\", this.clickCaptured, true);\n this.started = false;\n }\n }\n clickCaptured=() => {\n this.eventTarget.removeEventListener(\"click\", this.clickBubbled, false);\n this.eventTarget.addEventListener(\"click\", this.clickBubbled, false);\n };\n clickBubbled=event => {\n if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {\n const target = event.composedPath && event.composedPath()[0] || event.target;\n const link = findLinkFromClickTarget(target);\n if (link && doesNotTargetIFrame(link.target)) {\n const location = getLocationForLink(link);\n if (this.delegate.willFollowLinkToLocation(link, location, event)) {\n event.preventDefault();\n this.delegate.followedLinkToLocation(link, location);\n }\n }\n }\n };\n clickEventIsSignificant(event) {\n return !(event.target && event.target.isContentEditable || event.defaultPrevented || event.which > 1 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);\n }\n}\n\nclass FormLinkClickObserver {\n constructor(delegate, element) {\n this.delegate = delegate;\n this.linkInterceptor = new LinkClickObserver(this, element);\n }\n start() {\n this.linkInterceptor.start();\n }\n stop() {\n this.linkInterceptor.stop();\n }\n canPrefetchRequestToLocation(link, location) {\n return false;\n }\n prefetchAndCacheRequestToLocation(link, location) {\n return;\n }\n willFollowLinkToLocation(link, location, originalEvent) {\n return this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) && (link.hasAttribute(\"data-turbo-method\") || link.hasAttribute(\"data-turbo-stream\"));\n }\n followedLinkToLocation(link, location) {\n const form = document.createElement(\"form\");\n const type = \"hidden\";\n for (const [name, value] of location.searchParams) {\n form.append(Object.assign(document.createElement(\"input\"), {\n type: type,\n name: name,\n value: value\n }));\n }\n const action = Object.assign(location, {\n search: \"\"\n });\n form.setAttribute(\"data-turbo\", \"true\");\n form.setAttribute(\"action\", action.href);\n form.setAttribute(\"hidden\", \"\");\n const method = link.getAttribute(\"data-turbo-method\");\n if (method) form.setAttribute(\"method\", method);\n const turboFrame = link.getAttribute(\"data-turbo-frame\");\n if (turboFrame) form.setAttribute(\"data-turbo-frame\", turboFrame);\n const turboAction = getVisitAction(link);\n if (turboAction) form.setAttribute(\"data-turbo-action\", turboAction);\n const turboConfirm = link.getAttribute(\"data-turbo-confirm\");\n if (turboConfirm) form.setAttribute(\"data-turbo-confirm\", turboConfirm);\n const turboStream = link.hasAttribute(\"data-turbo-stream\");\n if (turboStream) form.setAttribute(\"data-turbo-stream\", \"\");\n this.delegate.submittedFormLinkToLocation(link, location, form);\n document.body.appendChild(form);\n form.addEventListener(\"turbo:submit-end\", (() => form.remove()), {\n once: true\n });\n requestAnimationFrame((() => form.requestSubmit()));\n }\n}\n\nclass Bardo {\n static async preservingPermanentElements(delegate, permanentElementMap, callback) {\n const bardo = new this(delegate, permanentElementMap);\n bardo.enter();\n await callback();\n bardo.leave();\n }\n constructor(delegate, permanentElementMap) {\n this.delegate = delegate;\n this.permanentElementMap = permanentElementMap;\n }\n enter() {\n for (const id in this.permanentElementMap) {\n const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];\n this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);\n this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n }\n }\n leave() {\n for (const id in this.permanentElementMap) {\n const [currentPermanentElement] = this.permanentElementMap[id];\n this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n this.delegate.leavingBardo(currentPermanentElement);\n }\n }\n replaceNewPermanentElementWithPlaceholder(permanentElement) {\n const placeholder = createPlaceholderForPermanentElement(permanentElement);\n permanentElement.replaceWith(placeholder);\n }\n replaceCurrentPermanentElementWithClone(permanentElement) {\n const clone = permanentElement.cloneNode(true);\n permanentElement.replaceWith(clone);\n }\n replacePlaceholderWithPermanentElement(permanentElement) {\n const placeholder = this.getPlaceholderById(permanentElement.id);\n placeholder?.replaceWith(permanentElement);\n }\n getPlaceholderById(id) {\n return this.placeholders.find((element => element.content == id));\n }\n get placeholders() {\n return [ ...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\") ];\n }\n}\n\nfunction createPlaceholderForPermanentElement(permanentElement) {\n const element = document.createElement(\"meta\");\n element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n element.setAttribute(\"content\", permanentElement.id);\n return element;\n}\n\nclass Renderer {\n #activeElement=null;\n static renderElement(currentElement, newElement) {}\n constructor(currentSnapshot, newSnapshot, isPreview, willRender = true) {\n this.currentSnapshot = currentSnapshot;\n this.newSnapshot = newSnapshot;\n this.isPreview = isPreview;\n this.willRender = willRender;\n this.renderElement = this.constructor.renderElement;\n this.promise = new Promise(((resolve, reject) => this.resolvingFunctions = {\n resolve: resolve,\n reject: reject\n }));\n }\n get shouldRender() {\n return true;\n }\n get shouldAutofocus() {\n return true;\n }\n get reloadReason() {\n return;\n }\n prepareToRender() {\n return;\n }\n render() {}\n finishRendering() {\n if (this.resolvingFunctions) {\n this.resolvingFunctions.resolve();\n delete this.resolvingFunctions;\n }\n }\n async preservingPermanentElements(callback) {\n await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);\n }\n focusFirstAutofocusableElement() {\n if (this.shouldAutofocus) {\n const element = this.connectedSnapshot.firstAutofocusableElement;\n if (element) {\n element.focus();\n }\n }\n }\n enteringBardo(currentPermanentElement) {\n if (this.#activeElement) return;\n if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {\n this.#activeElement = this.currentSnapshot.activeElement;\n }\n }\n leavingBardo(currentPermanentElement) {\n if (currentPermanentElement.contains(this.#activeElement) && this.#activeElement instanceof HTMLElement) {\n this.#activeElement.focus();\n this.#activeElement = null;\n }\n }\n get connectedSnapshot() {\n return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n }\n get currentElement() {\n return this.currentSnapshot.element;\n }\n get newElement() {\n return this.newSnapshot.element;\n }\n get permanentElementMap() {\n return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n }\n get renderMethod() {\n return \"replace\";\n }\n}\n\nclass FrameRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n const destinationRange = document.createRange();\n destinationRange.selectNodeContents(currentElement);\n destinationRange.deleteContents();\n const frameElement = newElement;\n const sourceRange = frameElement.ownerDocument?.createRange();\n if (sourceRange) {\n sourceRange.selectNodeContents(frameElement);\n currentElement.appendChild(sourceRange.extractContents());\n }\n }\n constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);\n this.delegate = delegate;\n }\n get shouldRender() {\n return true;\n }\n async render() {\n await nextRepaint();\n this.preservingPermanentElements((() => {\n this.loadFrameElement();\n }));\n this.scrollFrameIntoView();\n await nextRepaint();\n this.focusFirstAutofocusableElement();\n await nextRepaint();\n this.activateScriptElements();\n }\n loadFrameElement() {\n this.delegate.willRenderFrame(this.currentElement, this.newElement);\n this.renderElement(this.currentElement, this.newElement);\n }\n scrollFrameIntoView() {\n if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n const element = this.currentElement.firstElementChild;\n const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n const behavior = readScrollBehavior(this.currentElement.getAttribute(\"data-autoscroll-behavior\"), \"auto\");\n if (element) {\n element.scrollIntoView({\n block: block,\n behavior: behavior\n });\n return true;\n }\n }\n return false;\n }\n activateScriptElements() {\n for (const inertScriptElement of this.newScriptElements) {\n const activatedScriptElement = activateScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n get newScriptElements() {\n return this.currentElement.querySelectorAll(\"script\");\n }\n}\n\nfunction readScrollLogicalPosition(value, defaultValue) {\n if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n return value;\n } else {\n return defaultValue;\n }\n}\n\nfunction readScrollBehavior(value, defaultValue) {\n if (value == \"auto\" || value == \"smooth\") {\n return value;\n } else {\n return defaultValue;\n }\n}\n\nvar Idiomorph = function() {\n const noOp = () => {};\n const defaults = {\n morphStyle: \"outerHTML\",\n callbacks: {\n beforeNodeAdded: noOp,\n afterNodeAdded: noOp,\n beforeNodeMorphed: noOp,\n afterNodeMorphed: noOp,\n beforeNodeRemoved: noOp,\n afterNodeRemoved: noOp,\n beforeAttributeUpdated: noOp\n },\n head: {\n style: \"merge\",\n shouldPreserve: elt => elt.getAttribute(\"im-preserve\") === \"true\",\n shouldReAppend: elt => elt.getAttribute(\"im-re-append\") === \"true\",\n shouldRemove: noOp,\n afterHeadMorphed: noOp\n },\n restoreFocus: true\n };\n function morph(oldNode, newContent, config = {}) {\n oldNode = normalizeElement(oldNode);\n const newNode = normalizeParent(newContent);\n const ctx = createMorphContext(oldNode, newNode, config);\n const morphedNodes = saveAndRestoreFocus(ctx, (() => withHeadBlocking(ctx, oldNode, newNode, (ctx => {\n if (ctx.morphStyle === \"innerHTML\") {\n morphChildren(ctx, oldNode, newNode);\n return Array.from(oldNode.childNodes);\n } else {\n return morphOuterHTML(ctx, oldNode, newNode);\n }\n }))));\n ctx.pantry.remove();\n return morphedNodes;\n }\n function morphOuterHTML(ctx, oldNode, newNode) {\n const oldParent = normalizeParent(oldNode);\n let childNodes = Array.from(oldParent.childNodes);\n const index = childNodes.indexOf(oldNode);\n const rightMargin = childNodes.length - (index + 1);\n morphChildren(ctx, oldParent, newNode, oldNode, oldNode.nextSibling);\n childNodes = Array.from(oldParent.childNodes);\n return childNodes.slice(index, childNodes.length - rightMargin);\n }\n function saveAndRestoreFocus(ctx, fn) {\n if (!ctx.config.restoreFocus) return fn();\n let activeElement = document.activeElement;\n if (!(activeElement instanceof HTMLInputElement || activeElement instanceof HTMLTextAreaElement)) {\n return fn();\n }\n const {id: activeElementId, selectionStart: selectionStart, selectionEnd: selectionEnd} = activeElement;\n const results = fn();\n if (activeElementId && activeElementId !== document.activeElement?.id) {\n activeElement = ctx.target.querySelector(`#${activeElementId}`);\n activeElement?.focus();\n }\n if (activeElement && !activeElement.selectionEnd && selectionEnd) {\n activeElement.setSelectionRange(selectionStart, selectionEnd);\n }\n return results;\n }\n const morphChildren = function() {\n function morphChildren(ctx, oldParent, newParent, insertionPoint = null, endPoint = null) {\n if (oldParent instanceof HTMLTemplateElement && newParent instanceof HTMLTemplateElement) {\n oldParent = oldParent.content;\n newParent = newParent.content;\n }\n insertionPoint ||= oldParent.firstChild;\n for (const newChild of newParent.childNodes) {\n if (insertionPoint && insertionPoint != endPoint) {\n const bestMatch = findBestMatch(ctx, newChild, insertionPoint, endPoint);\n if (bestMatch) {\n if (bestMatch !== insertionPoint) {\n removeNodesBetween(ctx, insertionPoint, bestMatch);\n }\n morphNode(bestMatch, newChild, ctx);\n insertionPoint = bestMatch.nextSibling;\n continue;\n }\n }\n if (newChild instanceof Element && ctx.persistentIds.has(newChild.id)) {\n const movedChild = moveBeforeById(oldParent, newChild.id, insertionPoint, ctx);\n morphNode(movedChild, newChild, ctx);\n insertionPoint = movedChild.nextSibling;\n continue;\n }\n const insertedNode = createNode(oldParent, newChild, insertionPoint, ctx);\n if (insertedNode) {\n insertionPoint = insertedNode.nextSibling;\n }\n }\n while (insertionPoint && insertionPoint != endPoint) {\n const tempNode = insertionPoint;\n insertionPoint = insertionPoint.nextSibling;\n removeNode(ctx, tempNode);\n }\n }\n function createNode(oldParent, newChild, insertionPoint, ctx) {\n if (ctx.callbacks.beforeNodeAdded(newChild) === false) return null;\n if (ctx.idMap.has(newChild)) {\n const newEmptyChild = document.createElement(newChild.tagName);\n oldParent.insertBefore(newEmptyChild, insertionPoint);\n morphNode(newEmptyChild, newChild, ctx);\n ctx.callbacks.afterNodeAdded(newEmptyChild);\n return newEmptyChild;\n } else {\n const newClonedChild = document.importNode(newChild, true);\n oldParent.insertBefore(newClonedChild, insertionPoint);\n ctx.callbacks.afterNodeAdded(newClonedChild);\n return newClonedChild;\n }\n }\n const findBestMatch = function() {\n function findBestMatch(ctx, node, startPoint, endPoint) {\n let softMatch = null;\n let nextSibling = node.nextSibling;\n let siblingSoftMatchCount = 0;\n let cursor = startPoint;\n while (cursor && cursor != endPoint) {\n if (isSoftMatch(cursor, node)) {\n if (isIdSetMatch(ctx, cursor, node)) {\n return cursor;\n }\n if (softMatch === null) {\n if (!ctx.idMap.has(cursor)) {\n softMatch = cursor;\n }\n }\n }\n if (softMatch === null && nextSibling && isSoftMatch(cursor, nextSibling)) {\n siblingSoftMatchCount++;\n nextSibling = nextSibling.nextSibling;\n if (siblingSoftMatchCount >= 2) {\n softMatch = undefined;\n }\n }\n if (cursor.contains(document.activeElement)) break;\n cursor = cursor.nextSibling;\n }\n return softMatch || null;\n }\n function isIdSetMatch(ctx, oldNode, newNode) {\n let oldSet = ctx.idMap.get(oldNode);\n let newSet = ctx.idMap.get(newNode);\n if (!newSet || !oldSet) return false;\n for (const id of oldSet) {\n if (newSet.has(id)) {\n return true;\n }\n }\n return false;\n }\n function isSoftMatch(oldNode, newNode) {\n const oldElt = oldNode;\n const newElt = newNode;\n return oldElt.nodeType === newElt.nodeType && oldElt.tagName === newElt.tagName && (!oldElt.id || oldElt.id === newElt.id);\n }\n return findBestMatch;\n }();\n function removeNode(ctx, node) {\n if (ctx.idMap.has(node)) {\n moveBefore(ctx.pantry, node, null);\n } else {\n if (ctx.callbacks.beforeNodeRemoved(node) === false) return;\n node.parentNode?.removeChild(node);\n ctx.callbacks.afterNodeRemoved(node);\n }\n }\n function removeNodesBetween(ctx, startInclusive, endExclusive) {\n let cursor = startInclusive;\n while (cursor && cursor !== endExclusive) {\n let tempNode = cursor;\n cursor = cursor.nextSibling;\n removeNode(ctx, tempNode);\n }\n return cursor;\n }\n function moveBeforeById(parentNode, id, after, ctx) {\n const target = ctx.target.querySelector(`#${id}`) || ctx.pantry.querySelector(`#${id}`);\n removeElementFromAncestorsIdMaps(target, ctx);\n moveBefore(parentNode, target, after);\n return target;\n }\n function removeElementFromAncestorsIdMaps(element, ctx) {\n const id = element.id;\n while (element = element.parentNode) {\n let idSet = ctx.idMap.get(element);\n if (idSet) {\n idSet.delete(id);\n if (!idSet.size) {\n ctx.idMap.delete(element);\n }\n }\n }\n }\n function moveBefore(parentNode, element, after) {\n if (parentNode.moveBefore) {\n try {\n parentNode.moveBefore(element, after);\n } catch (e) {\n parentNode.insertBefore(element, after);\n }\n } else {\n parentNode.insertBefore(element, after);\n }\n }\n return morphChildren;\n }();\n const morphNode = function() {\n function morphNode(oldNode, newContent, ctx) {\n if (ctx.ignoreActive && oldNode === document.activeElement) {\n return null;\n }\n if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false) {\n return oldNode;\n }\n if (oldNode instanceof HTMLHeadElement && ctx.head.ignore) ; else if (oldNode instanceof HTMLHeadElement && ctx.head.style !== \"morph\") {\n handleHeadElement(oldNode, newContent, ctx);\n } else {\n morphAttributes(oldNode, newContent, ctx);\n if (!ignoreValueOfActiveElement(oldNode, ctx)) {\n morphChildren(ctx, oldNode, newContent);\n }\n }\n ctx.callbacks.afterNodeMorphed(oldNode, newContent);\n return oldNode;\n }\n function morphAttributes(oldNode, newNode, ctx) {\n let type = newNode.nodeType;\n if (type === 1) {\n const oldElt = oldNode;\n const newElt = newNode;\n const oldAttributes = oldElt.attributes;\n const newAttributes = newElt.attributes;\n for (const newAttribute of newAttributes) {\n if (ignoreAttribute(newAttribute.name, oldElt, \"update\", ctx)) {\n continue;\n }\n if (oldElt.getAttribute(newAttribute.name) !== newAttribute.value) {\n oldElt.setAttribute(newAttribute.name, newAttribute.value);\n }\n }\n for (let i = oldAttributes.length - 1; 0 <= i; i--) {\n const oldAttribute = oldAttributes[i];\n if (!oldAttribute) continue;\n if (!newElt.hasAttribute(oldAttribute.name)) {\n if (ignoreAttribute(oldAttribute.name, oldElt, \"remove\", ctx)) {\n continue;\n }\n oldElt.removeAttribute(oldAttribute.name);\n }\n }\n if (!ignoreValueOfActiveElement(oldElt, ctx)) {\n syncInputValue(oldElt, newElt, ctx);\n }\n }\n if (type === 8 || type === 3) {\n if (oldNode.nodeValue !== newNode.nodeValue) {\n oldNode.nodeValue = newNode.nodeValue;\n }\n }\n }\n function syncInputValue(oldElement, newElement, ctx) {\n if (oldElement instanceof HTMLInputElement && newElement instanceof HTMLInputElement && newElement.type !== \"file\") {\n let newValue = newElement.value;\n let oldValue = oldElement.value;\n syncBooleanAttribute(oldElement, newElement, \"checked\", ctx);\n syncBooleanAttribute(oldElement, newElement, \"disabled\", ctx);\n if (!newElement.hasAttribute(\"value\")) {\n if (!ignoreAttribute(\"value\", oldElement, \"remove\", ctx)) {\n oldElement.value = \"\";\n oldElement.removeAttribute(\"value\");\n }\n } else if (oldValue !== newValue) {\n if (!ignoreAttribute(\"value\", oldElement, \"update\", ctx)) {\n oldElement.setAttribute(\"value\", newValue);\n oldElement.value = newValue;\n }\n }\n } else if (oldElement instanceof HTMLOptionElement && newElement instanceof HTMLOptionElement) {\n syncBooleanAttribute(oldElement, newElement, \"selected\", ctx);\n } else if (oldElement instanceof HTMLTextAreaElement && newElement instanceof HTMLTextAreaElement) {\n let newValue = newElement.value;\n let oldValue = oldElement.value;\n if (ignoreAttribute(\"value\", oldElement, \"update\", ctx)) {\n return;\n }\n if (newValue !== oldValue) {\n oldElement.value = newValue;\n }\n if (oldElement.firstChild && oldElement.firstChild.nodeValue !== newValue) {\n oldElement.firstChild.nodeValue = newValue;\n }\n }\n }\n function syncBooleanAttribute(oldElement, newElement, attributeName, ctx) {\n const newLiveValue = newElement[attributeName], oldLiveValue = oldElement[attributeName];\n if (newLiveValue !== oldLiveValue) {\n const ignoreUpdate = ignoreAttribute(attributeName, oldElement, \"update\", ctx);\n if (!ignoreUpdate) {\n oldElement[attributeName] = newElement[attributeName];\n }\n if (newLiveValue) {\n if (!ignoreUpdate) {\n oldElement.setAttribute(attributeName, \"\");\n }\n } else {\n if (!ignoreAttribute(attributeName, oldElement, \"remove\", ctx)) {\n oldElement.removeAttribute(attributeName);\n }\n }\n }\n }\n function ignoreAttribute(attr, element, updateType, ctx) {\n if (attr === \"value\" && ctx.ignoreActiveValue && element === document.activeElement) {\n return true;\n }\n return ctx.callbacks.beforeAttributeUpdated(attr, element, updateType) === false;\n }\n function ignoreValueOfActiveElement(possibleActiveElement, ctx) {\n return !!ctx.ignoreActiveValue && possibleActiveElement === document.activeElement && possibleActiveElement !== document.body;\n }\n return morphNode;\n }();\n function withHeadBlocking(ctx, oldNode, newNode, callback) {\n if (ctx.head.block) {\n const oldHead = oldNode.querySelector(\"head\");\n const newHead = newNode.querySelector(\"head\");\n if (oldHead && newHead) {\n const promises = handleHeadElement(oldHead, newHead, ctx);\n return Promise.all(promises).then((() => {\n const newCtx = Object.assign(ctx, {\n head: {\n block: false,\n ignore: true\n }\n });\n return callback(newCtx);\n }));\n }\n }\n return callback(ctx);\n }\n function handleHeadElement(oldHead, newHead, ctx) {\n let added = [];\n let removed = [];\n let preserved = [];\n let nodesToAppend = [];\n let srcToNewHeadNodes = new Map;\n for (const newHeadChild of newHead.children) {\n srcToNewHeadNodes.set(newHeadChild.outerHTML, newHeadChild);\n }\n for (const currentHeadElt of oldHead.children) {\n let inNewContent = srcToNewHeadNodes.has(currentHeadElt.outerHTML);\n let isReAppended = ctx.head.shouldReAppend(currentHeadElt);\n let isPreserved = ctx.head.shouldPreserve(currentHeadElt);\n if (inNewContent || isPreserved) {\n if (isReAppended) {\n removed.push(currentHeadElt);\n } else {\n srcToNewHeadNodes.delete(currentHeadElt.outerHTML);\n preserved.push(currentHeadElt);\n }\n } else {\n if (ctx.head.style === \"append\") {\n if (isReAppended) {\n removed.push(currentHeadElt);\n nodesToAppend.push(currentHeadElt);\n }\n } else {\n if (ctx.head.shouldRemove(currentHeadElt) !== false) {\n removed.push(currentHeadElt);\n }\n }\n }\n }\n nodesToAppend.push(...srcToNewHeadNodes.values());\n let promises = [];\n for (const newNode of nodesToAppend) {\n let newElt = document.createRange().createContextualFragment(newNode.outerHTML).firstChild;\n if (ctx.callbacks.beforeNodeAdded(newElt) !== false) {\n if (\"href\" in newElt && newElt.href || \"src\" in newElt && newElt.src) {\n let resolve;\n let promise = new Promise((function(_resolve) {\n resolve = _resolve;\n }));\n newElt.addEventListener(\"load\", (function() {\n resolve();\n }));\n promises.push(promise);\n }\n oldHead.appendChild(newElt);\n ctx.callbacks.afterNodeAdded(newElt);\n added.push(newElt);\n }\n }\n for (const removedElement of removed) {\n if (ctx.callbacks.beforeNodeRemoved(removedElement) !== false) {\n oldHead.removeChild(removedElement);\n ctx.callbacks.afterNodeRemoved(removedElement);\n }\n }\n ctx.head.afterHeadMorphed(oldHead, {\n added: added,\n kept: preserved,\n removed: removed\n });\n return promises;\n }\n const createMorphContext = function() {\n function createMorphContext(oldNode, newContent, config) {\n const {persistentIds: persistentIds, idMap: idMap} = createIdMaps(oldNode, newContent);\n const mergedConfig = mergeDefaults(config);\n const morphStyle = mergedConfig.morphStyle || \"outerHTML\";\n if (![ \"innerHTML\", \"outerHTML\" ].includes(morphStyle)) {\n throw `Do not understand how to morph style ${morphStyle}`;\n }\n return {\n target: oldNode,\n newContent: newContent,\n config: mergedConfig,\n morphStyle: morphStyle,\n ignoreActive: mergedConfig.ignoreActive,\n ignoreActiveValue: mergedConfig.ignoreActiveValue,\n restoreFocus: mergedConfig.restoreFocus,\n idMap: idMap,\n persistentIds: persistentIds,\n pantry: createPantry(),\n callbacks: mergedConfig.callbacks,\n head: mergedConfig.head\n };\n }\n function mergeDefaults(config) {\n let finalConfig = Object.assign({}, defaults);\n Object.assign(finalConfig, config);\n finalConfig.callbacks = Object.assign({}, defaults.callbacks, config.callbacks);\n finalConfig.head = Object.assign({}, defaults.head, config.head);\n return finalConfig;\n }\n function createPantry() {\n const pantry = document.createElement(\"div\");\n pantry.hidden = true;\n document.body.insertAdjacentElement(\"afterend\", pantry);\n return pantry;\n }\n function findIdElements(root) {\n let elements = Array.from(root.querySelectorAll(\"[id]\"));\n if (root.id) {\n elements.push(root);\n }\n return elements;\n }\n function populateIdMapWithTree(idMap, persistentIds, root, elements) {\n for (const elt of elements) {\n if (persistentIds.has(elt.id)) {\n let current = elt;\n while (current) {\n let idSet = idMap.get(current);\n if (idSet == null) {\n idSet = new Set;\n idMap.set(current, idSet);\n }\n idSet.add(elt.id);\n if (current === root) break;\n current = current.parentElement;\n }\n }\n }\n }\n function createIdMaps(oldContent, newContent) {\n const oldIdElements = findIdElements(oldContent);\n const newIdElements = findIdElements(newContent);\n const persistentIds = createPersistentIds(oldIdElements, newIdElements);\n let idMap = new Map;\n populateIdMapWithTree(idMap, persistentIds, oldContent, oldIdElements);\n const newRoot = newContent.__idiomorphRoot || newContent;\n populateIdMapWithTree(idMap, persistentIds, newRoot, newIdElements);\n return {\n persistentIds: persistentIds,\n idMap: idMap\n };\n }\n function createPersistentIds(oldIdElements, newIdElements) {\n let duplicateIds = new Set;\n let oldIdTagNameMap = new Map;\n for (const {id: id, tagName: tagName} of oldIdElements) {\n if (oldIdTagNameMap.has(id)) {\n duplicateIds.add(id);\n } else {\n oldIdTagNameMap.set(id, tagName);\n }\n }\n let persistentIds = new Set;\n for (const {id: id, tagName: tagName} of newIdElements) {\n if (persistentIds.has(id)) {\n duplicateIds.add(id);\n } else if (oldIdTagNameMap.get(id) === tagName) {\n persistentIds.add(id);\n }\n }\n for (const id of duplicateIds) {\n persistentIds.delete(id);\n }\n return persistentIds;\n }\n return createMorphContext;\n }();\n const {normalizeElement: normalizeElement, normalizeParent: normalizeParent} = function() {\n const generatedByIdiomorph = new WeakSet;\n function normalizeElement(content) {\n if (content instanceof Document) {\n return content.documentElement;\n } else {\n return content;\n }\n }\n function normalizeParent(newContent) {\n if (newContent == null) {\n return document.createElement(\"div\");\n } else if (typeof newContent === \"string\") {\n return normalizeParent(parseContent(newContent));\n } else if (generatedByIdiomorph.has(newContent)) {\n return newContent;\n } else if (newContent instanceof Node) {\n if (newContent.parentNode) {\n return createDuckTypedParent(newContent);\n } else {\n const dummyParent = document.createElement(\"div\");\n dummyParent.append(newContent);\n return dummyParent;\n }\n } else {\n const dummyParent = document.createElement(\"div\");\n for (const elt of [ ...newContent ]) {\n dummyParent.append(elt);\n }\n return dummyParent;\n }\n }\n function createDuckTypedParent(newContent) {\n return {\n childNodes: [ newContent ],\n querySelectorAll: s => {\n const elements = newContent.querySelectorAll(s);\n return newContent.matches(s) ? [ newContent, ...elements ] : elements;\n },\n insertBefore: (n, r) => newContent.parentNode.insertBefore(n, r),\n moveBefore: (n, r) => newContent.parentNode.moveBefore(n, r),\n get __idiomorphRoot() {\n return newContent;\n }\n };\n }\n function parseContent(newContent) {\n let parser = new DOMParser;\n let contentWithSvgsRemoved = newContent.replace(/]*>|>)([\\s\\S]*?)<\\/svg>/gim, \"\");\n if (contentWithSvgsRemoved.match(/<\\/html>/) || contentWithSvgsRemoved.match(/<\\/head>/) || contentWithSvgsRemoved.match(/<\\/body>/)) {\n let content = parser.parseFromString(newContent, \"text/html\");\n if (contentWithSvgsRemoved.match(/<\\/html>/)) {\n generatedByIdiomorph.add(content);\n return content;\n } else {\n let htmlElement = content.firstChild;\n if (htmlElement) {\n generatedByIdiomorph.add(htmlElement);\n }\n return htmlElement;\n }\n } else {\n let responseDoc = parser.parseFromString(\"\", \"text/html\");\n let content = responseDoc.body.querySelector(\"template\").content;\n generatedByIdiomorph.add(content);\n return content;\n }\n }\n return {\n normalizeElement: normalizeElement,\n normalizeParent: normalizeParent\n };\n }();\n return {\n morph: morph,\n defaults: defaults\n };\n}();\n\nfunction morphElements(currentElement, newElement, {callbacks: callbacks, ...options} = {}) {\n Idiomorph.morph(currentElement, newElement, {\n ...options,\n callbacks: new DefaultIdiomorphCallbacks(callbacks)\n });\n}\n\nfunction morphChildren(currentElement, newElement) {\n morphElements(currentElement, newElement.childNodes, {\n morphStyle: \"innerHTML\"\n });\n}\n\nclass DefaultIdiomorphCallbacks {\n #beforeNodeMorphed;\n constructor({beforeNodeMorphed: beforeNodeMorphed} = {}) {\n this.#beforeNodeMorphed = beforeNodeMorphed || (() => true);\n }\n beforeNodeAdded=node => !(node.id && node.hasAttribute(\"data-turbo-permanent\") && document.getElementById(node.id));\n beforeNodeMorphed=(currentElement, newElement) => {\n if (currentElement instanceof Element) {\n if (!currentElement.hasAttribute(\"data-turbo-permanent\") && this.#beforeNodeMorphed(currentElement, newElement)) {\n const event = dispatch(\"turbo:before-morph-element\", {\n cancelable: true,\n target: currentElement,\n detail: {\n currentElement: currentElement,\n newElement: newElement\n }\n });\n return !event.defaultPrevented;\n } else {\n return false;\n }\n }\n };\n beforeAttributeUpdated=(attributeName, target, mutationType) => {\n const event = dispatch(\"turbo:before-morph-attribute\", {\n cancelable: true,\n target: target,\n detail: {\n attributeName: attributeName,\n mutationType: mutationType\n }\n });\n return !event.defaultPrevented;\n };\n beforeNodeRemoved=node => this.beforeNodeMorphed(node);\n afterNodeMorphed=(currentElement, newElement) => {\n if (currentElement instanceof Element) {\n dispatch(\"turbo:morph-element\", {\n target: currentElement,\n detail: {\n currentElement: currentElement,\n newElement: newElement\n }\n });\n }\n };\n}\n\nclass MorphingFrameRenderer extends FrameRenderer {\n static renderElement(currentElement, newElement) {\n dispatch(\"turbo:before-frame-morph\", {\n target: currentElement,\n detail: {\n currentElement: currentElement,\n newElement: newElement\n }\n });\n morphChildren(currentElement, newElement);\n }\n async preservingPermanentElements(callback) {\n return await callback();\n }\n}\n\nclass ProgressBar {\n static animationDuration=300;\n static get defaultCSS() {\n return unindent`\n .turbo-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 2147483647;\n transition:\n width ${ProgressBar.animationDuration}ms ease-out,\n opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n transform: translate3d(0, 0, 0);\n }\n `;\n }\n hiding=false;\n value=0;\n visible=false;\n constructor() {\n this.stylesheetElement = this.createStylesheetElement();\n this.progressElement = this.createProgressElement();\n this.installStylesheetElement();\n this.setValue(0);\n }\n show() {\n if (!this.visible) {\n this.visible = true;\n this.installProgressElement();\n this.startTrickling();\n }\n }\n hide() {\n if (this.visible && !this.hiding) {\n this.hiding = true;\n this.fadeProgressElement((() => {\n this.uninstallProgressElement();\n this.stopTrickling();\n this.visible = false;\n this.hiding = false;\n }));\n }\n }\n setValue(value) {\n this.value = value;\n this.refresh();\n }\n installStylesheetElement() {\n document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n }\n installProgressElement() {\n this.progressElement.style.width = \"0\";\n this.progressElement.style.opacity = \"1\";\n document.documentElement.insertBefore(this.progressElement, document.body);\n this.refresh();\n }\n fadeProgressElement(callback) {\n this.progressElement.style.opacity = \"0\";\n setTimeout(callback, ProgressBar.animationDuration * 1.5);\n }\n uninstallProgressElement() {\n if (this.progressElement.parentNode) {\n document.documentElement.removeChild(this.progressElement);\n }\n }\n startTrickling() {\n if (!this.trickleInterval) {\n this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n }\n }\n stopTrickling() {\n window.clearInterval(this.trickleInterval);\n delete this.trickleInterval;\n }\n trickle=() => {\n this.setValue(this.value + Math.random() / 100);\n };\n refresh() {\n requestAnimationFrame((() => {\n this.progressElement.style.width = `${10 + this.value * 90}%`;\n }));\n }\n createStylesheetElement() {\n const element = document.createElement(\"style\");\n element.type = \"text/css\";\n element.textContent = ProgressBar.defaultCSS;\n const cspNonce = getCspNonce();\n if (cspNonce) {\n element.nonce = cspNonce;\n }\n return element;\n }\n createProgressElement() {\n const element = document.createElement(\"div\");\n element.className = \"turbo-progress-bar\";\n return element;\n }\n}\n\nclass HeadSnapshot extends Snapshot {\n detailsByOuterHTML=this.children.filter((element => !elementIsNoscript(element))).map((element => elementWithoutNonce(element))).reduce(((result, element) => {\n const {outerHTML: outerHTML} = element;\n const details = outerHTML in result ? result[outerHTML] : {\n type: elementType(element),\n tracked: elementIsTracked(element),\n elements: []\n };\n return {\n ...result,\n [outerHTML]: {\n ...details,\n elements: [ ...details.elements, element ]\n }\n };\n }), {});\n get trackedElementSignature() {\n return Object.keys(this.detailsByOuterHTML).filter((outerHTML => this.detailsByOuterHTML[outerHTML].tracked)).join(\"\");\n }\n getScriptElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n }\n getStylesheetElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n }\n getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n return Object.keys(this.detailsByOuterHTML).filter((outerHTML => !(outerHTML in snapshot.detailsByOuterHTML))).map((outerHTML => this.detailsByOuterHTML[outerHTML])).filter((({type: type}) => type == matchedType)).map((({elements: [element]}) => element));\n }\n get provisionalElements() {\n return Object.keys(this.detailsByOuterHTML).reduce(((result, outerHTML) => {\n const {type: type, tracked: tracked, elements: elements} = this.detailsByOuterHTML[outerHTML];\n if (type == null && !tracked) {\n return [ ...result, ...elements ];\n } else if (elements.length > 1) {\n return [ ...result, ...elements.slice(1) ];\n } else {\n return result;\n }\n }), []);\n }\n getMetaValue(name) {\n const element = this.findMetaElementByName(name);\n return element ? element.getAttribute(\"content\") : null;\n }\n findMetaElementByName(name) {\n return Object.keys(this.detailsByOuterHTML).reduce(((result, outerHTML) => {\n const {elements: [element]} = this.detailsByOuterHTML[outerHTML];\n return elementIsMetaElementWithName(element, name) ? element : result;\n }), undefined | undefined);\n }\n}\n\nfunction elementType(element) {\n if (elementIsScript(element)) {\n return \"script\";\n } else if (elementIsStylesheet(element)) {\n return \"stylesheet\";\n }\n}\n\nfunction elementIsTracked(element) {\n return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\n\nfunction elementIsScript(element) {\n const tagName = element.localName;\n return tagName == \"script\";\n}\n\nfunction elementIsNoscript(element) {\n const tagName = element.localName;\n return tagName == \"noscript\";\n}\n\nfunction elementIsStylesheet(element) {\n const tagName = element.localName;\n return tagName == \"style\" || tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\";\n}\n\nfunction elementIsMetaElementWithName(element, name) {\n const tagName = element.localName;\n return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\n\nfunction elementWithoutNonce(element) {\n if (element.hasAttribute(\"nonce\")) {\n element.setAttribute(\"nonce\", \"\");\n }\n return element;\n}\n\nclass PageSnapshot extends Snapshot {\n static fromHTMLString(html = \"\") {\n return this.fromDocument(parseHTMLDocument(html));\n }\n static fromElement(element) {\n return this.fromDocument(element.ownerDocument);\n }\n static fromDocument({documentElement: documentElement, body: body, head: head}) {\n return new this(documentElement, body, new HeadSnapshot(head));\n }\n constructor(documentElement, body, headSnapshot) {\n super(body);\n this.documentElement = documentElement;\n this.headSnapshot = headSnapshot;\n }\n clone() {\n const clonedElement = this.element.cloneNode(true);\n const selectElements = this.element.querySelectorAll(\"select\");\n const clonedSelectElements = clonedElement.querySelectorAll(\"select\");\n for (const [index, source] of selectElements.entries()) {\n const clone = clonedSelectElements[index];\n for (const option of clone.selectedOptions) option.selected = false;\n for (const option of source.selectedOptions) clone.options[option.index].selected = true;\n }\n for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type=\"password\"]')) {\n clonedPasswordInput.value = \"\";\n }\n return new PageSnapshot(this.documentElement, clonedElement, this.headSnapshot);\n }\n get lang() {\n return this.documentElement.getAttribute(\"lang\");\n }\n get headElement() {\n return this.headSnapshot.element;\n }\n get rootLocation() {\n const root = this.getSetting(\"root\") ?? \"/\";\n return expandURL(root);\n }\n get cacheControlValue() {\n return this.getSetting(\"cache-control\");\n }\n get isPreviewable() {\n return this.cacheControlValue != \"no-preview\";\n }\n get isCacheable() {\n return this.cacheControlValue != \"no-cache\";\n }\n get isVisitable() {\n return this.getSetting(\"visit-control\") != \"reload\";\n }\n get prefersViewTransitions() {\n return this.headSnapshot.getMetaValue(\"view-transition\") === \"same-origin\";\n }\n get shouldMorphPage() {\n return this.getSetting(\"refresh-method\") === \"morph\";\n }\n get shouldPreserveScrollPosition() {\n return this.getSetting(\"refresh-scroll\") === \"preserve\";\n }\n getSetting(name) {\n return this.headSnapshot.getMetaValue(`turbo-${name}`);\n }\n}\n\nclass ViewTransitioner {\n #viewTransitionStarted=false;\n #lastOperation=Promise.resolve();\n renderChange(useViewTransition, render) {\n if (useViewTransition && this.viewTransitionsAvailable && !this.#viewTransitionStarted) {\n this.#viewTransitionStarted = true;\n this.#lastOperation = this.#lastOperation.then((async () => {\n await document.startViewTransition(render).finished;\n }));\n } else {\n this.#lastOperation = this.#lastOperation.then(render);\n }\n return this.#lastOperation;\n }\n get viewTransitionsAvailable() {\n return document.startViewTransition;\n }\n}\n\nconst defaultOptions = {\n action: \"advance\",\n historyChanged: false,\n visitCachedSnapshot: () => {},\n willRender: true,\n updateHistory: true,\n shouldCacheSnapshot: true,\n acceptsStreamResponse: false\n};\n\nconst TimingMetric = {\n visitStart: \"visitStart\",\n requestStart: \"requestStart\",\n requestEnd: \"requestEnd\",\n visitEnd: \"visitEnd\"\n};\n\nconst VisitState = {\n initialized: \"initialized\",\n started: \"started\",\n canceled: \"canceled\",\n failed: \"failed\",\n completed: \"completed\"\n};\n\nconst SystemStatusCode = {\n networkFailure: 0,\n timeoutFailure: -1,\n contentTypeMismatch: -2\n};\n\nconst Direction = {\n advance: \"forward\",\n restore: \"back\",\n replace: \"none\"\n};\n\nclass Visit {\n identifier=uuid();\n timingMetrics={};\n followedRedirect=false;\n historyChanged=false;\n scrolled=false;\n shouldCacheSnapshot=true;\n acceptsStreamResponse=false;\n snapshotCached=false;\n state=VisitState.initialized;\n viewTransitioner=new ViewTransitioner;\n constructor(delegate, location, restorationIdentifier, options = {}) {\n this.delegate = delegate;\n this.location = location;\n this.restorationIdentifier = restorationIdentifier || uuid();\n const {action: action, historyChanged: historyChanged, referrer: referrer, snapshot: snapshot, snapshotHTML: snapshotHTML, response: response, visitCachedSnapshot: visitCachedSnapshot, willRender: willRender, updateHistory: updateHistory, shouldCacheSnapshot: shouldCacheSnapshot, acceptsStreamResponse: acceptsStreamResponse, direction: direction} = {\n ...defaultOptions,\n ...options\n };\n this.action = action;\n this.historyChanged = historyChanged;\n this.referrer = referrer;\n this.snapshot = snapshot;\n this.snapshotHTML = snapshotHTML;\n this.response = response;\n this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);\n this.isPageRefresh = this.view.isPageRefresh(this);\n this.visitCachedSnapshot = visitCachedSnapshot;\n this.willRender = willRender;\n this.updateHistory = updateHistory;\n this.scrolled = !willRender;\n this.shouldCacheSnapshot = shouldCacheSnapshot;\n this.acceptsStreamResponse = acceptsStreamResponse;\n this.direction = direction || Direction[action];\n }\n get adapter() {\n return this.delegate.adapter;\n }\n get view() {\n return this.delegate.view;\n }\n get history() {\n return this.delegate.history;\n }\n get restorationData() {\n return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n }\n get silent() {\n return this.isSamePage;\n }\n start() {\n if (this.state == VisitState.initialized) {\n this.recordTimingMetric(TimingMetric.visitStart);\n this.state = VisitState.started;\n this.adapter.visitStarted(this);\n this.delegate.visitStarted(this);\n }\n }\n cancel() {\n if (this.state == VisitState.started) {\n if (this.request) {\n this.request.cancel();\n }\n this.cancelRender();\n this.state = VisitState.canceled;\n }\n }\n complete() {\n if (this.state == VisitState.started) {\n this.recordTimingMetric(TimingMetric.visitEnd);\n this.adapter.visitCompleted(this);\n this.state = VisitState.completed;\n this.followRedirect();\n if (!this.followedRedirect) {\n this.delegate.visitCompleted(this);\n }\n }\n }\n fail() {\n if (this.state == VisitState.started) {\n this.state = VisitState.failed;\n this.adapter.visitFailed(this);\n this.delegate.visitCompleted(this);\n }\n }\n changeHistory() {\n if (!this.historyChanged && this.updateHistory) {\n const actionForHistory = this.location.href === this.referrer?.href ? \"replace\" : this.action;\n const method = getHistoryMethodForAction(actionForHistory);\n this.history.update(method, this.location, this.restorationIdentifier);\n this.historyChanged = true;\n }\n }\n issueRequest() {\n if (this.hasPreloadedResponse()) {\n this.simulateRequest();\n } else if (this.shouldIssueRequest() && !this.request) {\n this.request = new FetchRequest(this, FetchMethod.get, this.location);\n this.request.perform();\n }\n }\n simulateRequest() {\n if (this.response) {\n this.startRequest();\n this.recordResponse();\n this.finishRequest();\n }\n }\n startRequest() {\n this.recordTimingMetric(TimingMetric.requestStart);\n this.adapter.visitRequestStarted(this);\n }\n recordResponse(response = this.response) {\n this.response = response;\n if (response) {\n const {statusCode: statusCode} = response;\n if (isSuccessful(statusCode)) {\n this.adapter.visitRequestCompleted(this);\n } else {\n this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n }\n }\n }\n finishRequest() {\n this.recordTimingMetric(TimingMetric.requestEnd);\n this.adapter.visitRequestFinished(this);\n }\n loadResponse() {\n if (this.response) {\n const {statusCode: statusCode, responseHTML: responseHTML} = this.response;\n this.render((async () => {\n if (this.shouldCacheSnapshot) this.cacheSnapshot();\n if (this.view.renderPromise) await this.view.renderPromise;\n if (isSuccessful(statusCode) && responseHTML != null) {\n const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n await this.renderPageSnapshot(snapshot, false);\n this.adapter.visitRendered(this);\n this.complete();\n } else {\n await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);\n this.adapter.visitRendered(this);\n this.fail();\n }\n }));\n }\n }\n getCachedSnapshot() {\n const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n if (this.action == \"restore\" || snapshot.isPreviewable) {\n return snapshot;\n }\n }\n }\n getPreloadedSnapshot() {\n if (this.snapshotHTML) {\n return PageSnapshot.fromHTMLString(this.snapshotHTML);\n }\n }\n hasCachedSnapshot() {\n return this.getCachedSnapshot() != null;\n }\n loadCachedSnapshot() {\n const snapshot = this.getCachedSnapshot();\n if (snapshot) {\n const isPreview = this.shouldIssueRequest();\n this.render((async () => {\n this.cacheSnapshot();\n if (this.isSamePage || this.isPageRefresh) {\n this.adapter.visitRendered(this);\n } else {\n if (this.view.renderPromise) await this.view.renderPromise;\n await this.renderPageSnapshot(snapshot, isPreview);\n this.adapter.visitRendered(this);\n if (!isPreview) {\n this.complete();\n }\n }\n }));\n }\n }\n followRedirect() {\n if (this.redirectedToLocation && !this.followedRedirect && this.response?.redirected) {\n this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n action: \"replace\",\n response: this.response,\n shouldCacheSnapshot: false,\n willRender: false\n });\n this.followedRedirect = true;\n }\n }\n goToSamePageAnchor() {\n if (this.isSamePage) {\n this.render((async () => {\n this.cacheSnapshot();\n this.performScroll();\n this.changeHistory();\n this.adapter.visitRendered(this);\n }));\n }\n }\n prepareRequest(request) {\n if (this.acceptsStreamResponse) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n requestStarted() {\n this.startRequest();\n }\n requestPreventedHandlingResponse(_request, _response) {}\n async requestSucceededWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const {redirected: redirected, statusCode: statusCode} = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected: redirected\n });\n } else {\n this.redirectedToLocation = response.redirected ? response.location : undefined;\n this.recordResponse({\n statusCode: statusCode,\n responseHTML: responseHTML,\n redirected: redirected\n });\n }\n }\n async requestFailedWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const {redirected: redirected, statusCode: statusCode} = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected: redirected\n });\n } else {\n this.recordResponse({\n statusCode: statusCode,\n responseHTML: responseHTML,\n redirected: redirected\n });\n }\n }\n requestErrored(_request, _error) {\n this.recordResponse({\n statusCode: SystemStatusCode.networkFailure,\n redirected: false\n });\n }\n requestFinished() {\n this.finishRequest();\n }\n performScroll() {\n if (!this.scrolled && !this.view.forceReloaded && !this.view.shouldPreserveScrollPosition(this)) {\n if (this.action == \"restore\") {\n this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n } else {\n this.scrollToAnchor() || this.view.scrollToTop();\n }\n if (this.isSamePage) {\n this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n }\n this.scrolled = true;\n }\n }\n scrollToRestoredPosition() {\n const {scrollPosition: scrollPosition} = this.restorationData;\n if (scrollPosition) {\n this.view.scrollToPosition(scrollPosition);\n return true;\n }\n }\n scrollToAnchor() {\n const anchor = getAnchor(this.location);\n if (anchor != null) {\n this.view.scrollToAnchor(anchor);\n return true;\n }\n }\n recordTimingMetric(metric) {\n this.timingMetrics[metric] = (new Date).getTime();\n }\n getTimingMetrics() {\n return {\n ...this.timingMetrics\n };\n }\n hasPreloadedResponse() {\n return typeof this.response == \"object\";\n }\n shouldIssueRequest() {\n if (this.isSamePage) {\n return false;\n } else if (this.action == \"restore\") {\n return !this.hasCachedSnapshot();\n } else {\n return this.willRender;\n }\n }\n cacheSnapshot() {\n if (!this.snapshotCached) {\n this.view.cacheSnapshot(this.snapshot).then((snapshot => snapshot && this.visitCachedSnapshot(snapshot)));\n this.snapshotCached = true;\n }\n }\n async render(callback) {\n this.cancelRender();\n await new Promise((resolve => {\n this.frame = document.visibilityState === \"hidden\" ? setTimeout((() => resolve()), 0) : requestAnimationFrame((() => resolve()));\n }));\n await callback();\n delete this.frame;\n }\n async renderPageSnapshot(snapshot, isPreview) {\n await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(snapshot), (async () => {\n await this.view.renderPage(snapshot, isPreview, this.willRender, this);\n this.performScroll();\n }));\n }\n cancelRender() {\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n delete this.frame;\n }\n }\n}\n\nfunction isSuccessful(statusCode) {\n return statusCode >= 200 && statusCode < 300;\n}\n\nclass BrowserAdapter {\n progressBar=new ProgressBar;\n constructor(session) {\n this.session = session;\n }\n visitProposedToLocation(location, options) {\n if (locationIsVisitable(location, this.navigator.rootLocation)) {\n this.navigator.startVisit(location, options?.restorationIdentifier || uuid(), options);\n } else {\n window.location.href = location.toString();\n }\n }\n visitStarted(visit) {\n this.location = visit.location;\n visit.loadCachedSnapshot();\n visit.issueRequest();\n visit.goToSamePageAnchor();\n }\n visitRequestStarted(visit) {\n this.progressBar.setValue(0);\n if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n this.showVisitProgressBarAfterDelay();\n } else {\n this.showProgressBar();\n }\n }\n visitRequestCompleted(visit) {\n visit.loadResponse();\n }\n visitRequestFailedWithStatusCode(visit, statusCode) {\n switch (statusCode) {\n case SystemStatusCode.networkFailure:\n case SystemStatusCode.timeoutFailure:\n case SystemStatusCode.contentTypeMismatch:\n return this.reload({\n reason: \"request_failed\",\n context: {\n statusCode: statusCode\n }\n });\n\n default:\n return visit.loadResponse();\n }\n }\n visitRequestFinished(_visit) {}\n visitCompleted(_visit) {\n this.progressBar.setValue(1);\n this.hideVisitProgressBar();\n }\n pageInvalidated(reason) {\n this.reload(reason);\n }\n visitFailed(_visit) {\n this.progressBar.setValue(1);\n this.hideVisitProgressBar();\n }\n visitRendered(_visit) {}\n linkPrefetchingIsEnabledForLocation(location) {\n return true;\n }\n formSubmissionStarted(_formSubmission) {\n this.progressBar.setValue(0);\n this.showFormProgressBarAfterDelay();\n }\n formSubmissionFinished(_formSubmission) {\n this.progressBar.setValue(1);\n this.hideFormProgressBar();\n }\n showVisitProgressBarAfterDelay() {\n this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n hideVisitProgressBar() {\n this.progressBar.hide();\n if (this.visitProgressBarTimeout != null) {\n window.clearTimeout(this.visitProgressBarTimeout);\n delete this.visitProgressBarTimeout;\n }\n }\n showFormProgressBarAfterDelay() {\n if (this.formProgressBarTimeout == null) {\n this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n }\n hideFormProgressBar() {\n this.progressBar.hide();\n if (this.formProgressBarTimeout != null) {\n window.clearTimeout(this.formProgressBarTimeout);\n delete this.formProgressBarTimeout;\n }\n }\n showProgressBar=() => {\n this.progressBar.show();\n };\n reload(reason) {\n dispatch(\"turbo:reload\", {\n detail: reason\n });\n window.location.href = this.location?.toString() || window.location.href;\n }\n get navigator() {\n return this.session.navigator;\n }\n}\n\nclass CacheObserver {\n selector=\"[data-turbo-temporary]\";\n deprecatedSelector=\"[data-turbo-cache=false]\";\n started=false;\n start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n }\n }\n removeTemporaryElements=_event => {\n for (const element of this.temporaryElements) {\n element.remove();\n }\n };\n get temporaryElements() {\n return [ ...document.querySelectorAll(this.selector), ...this.temporaryElementsWithDeprecation ];\n }\n get temporaryElementsWithDeprecation() {\n const elements = document.querySelectorAll(this.deprecatedSelector);\n if (elements.length) {\n console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`);\n }\n return [ ...elements ];\n }\n}\n\nclass FrameRedirector {\n constructor(session, element) {\n this.session = session;\n this.element = element;\n this.linkInterceptor = new LinkInterceptor(this, element);\n this.formSubmitObserver = new FormSubmitObserver(this, element);\n }\n start() {\n this.linkInterceptor.start();\n this.formSubmitObserver.start();\n }\n stop() {\n this.linkInterceptor.stop();\n this.formSubmitObserver.stop();\n }\n shouldInterceptLinkClick(element, _location, _event) {\n return this.#shouldRedirect(element);\n }\n linkClickIntercepted(element, url, event) {\n const frame = this.#findFrameElement(element);\n if (frame) {\n frame.delegate.linkClickIntercepted(element, url, event);\n }\n }\n willSubmitForm(element, submitter) {\n return element.closest(\"turbo-frame\") == null && this.#shouldSubmit(element, submitter) && this.#shouldRedirect(element, submitter);\n }\n formSubmitted(element, submitter) {\n const frame = this.#findFrameElement(element, submitter);\n if (frame) {\n frame.delegate.formSubmitted(element, submitter);\n }\n }\n #shouldSubmit(form, submitter) {\n const action = getAction$1(form, submitter);\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const rootLocation = expandURL(meta?.content ?? \"/\");\n return this.#shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);\n }\n #shouldRedirect(element, submitter) {\n const isNavigatable = element instanceof HTMLFormElement ? this.session.submissionIsNavigatable(element, submitter) : this.session.elementIsNavigatable(element);\n if (isNavigatable) {\n const frame = this.#findFrameElement(element, submitter);\n return frame ? frame != element.closest(\"turbo-frame\") : false;\n } else {\n return false;\n }\n }\n #findFrameElement(element, submitter) {\n const id = submitter?.getAttribute(\"data-turbo-frame\") || element.getAttribute(\"data-turbo-frame\");\n if (id && id != \"_top\") {\n const frame = this.element.querySelector(`#${id}:not([disabled])`);\n if (frame instanceof FrameElement) {\n return frame;\n }\n }\n }\n}\n\nclass History {\n location;\n restorationIdentifier=uuid();\n restorationData={};\n started=false;\n pageLoaded=false;\n currentIndex=0;\n constructor(delegate) {\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"popstate\", this.onPopState, false);\n addEventListener(\"load\", this.onPageLoad, false);\n this.currentIndex = history.state?.turbo?.restorationIndex || 0;\n this.started = true;\n this.replace(new URL(window.location.href));\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"popstate\", this.onPopState, false);\n removeEventListener(\"load\", this.onPageLoad, false);\n this.started = false;\n }\n }\n push(location, restorationIdentifier) {\n this.update(history.pushState, location, restorationIdentifier);\n }\n replace(location, restorationIdentifier) {\n this.update(history.replaceState, location, restorationIdentifier);\n }\n update(method, location, restorationIdentifier = uuid()) {\n if (method === history.pushState) ++this.currentIndex;\n const state = {\n turbo: {\n restorationIdentifier: restorationIdentifier,\n restorationIndex: this.currentIndex\n }\n };\n method.call(history, state, \"\", location.href);\n this.location = location;\n this.restorationIdentifier = restorationIdentifier;\n }\n getRestorationDataForIdentifier(restorationIdentifier) {\n return this.restorationData[restorationIdentifier] || {};\n }\n updateRestorationData(additionalData) {\n const {restorationIdentifier: restorationIdentifier} = this;\n const restorationData = this.restorationData[restorationIdentifier];\n this.restorationData[restorationIdentifier] = {\n ...restorationData,\n ...additionalData\n };\n }\n assumeControlOfScrollRestoration() {\n if (!this.previousScrollRestoration) {\n this.previousScrollRestoration = history.scrollRestoration ?? \"auto\";\n history.scrollRestoration = \"manual\";\n }\n }\n relinquishControlOfScrollRestoration() {\n if (this.previousScrollRestoration) {\n history.scrollRestoration = this.previousScrollRestoration;\n delete this.previousScrollRestoration;\n }\n }\n onPopState=event => {\n if (this.shouldHandlePopState()) {\n const {turbo: turbo} = event.state || {};\n if (turbo) {\n this.location = new URL(window.location.href);\n const {restorationIdentifier: restorationIdentifier, restorationIndex: restorationIndex} = turbo;\n this.restorationIdentifier = restorationIdentifier;\n const direction = restorationIndex > this.currentIndex ? \"forward\" : \"back\";\n this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location, restorationIdentifier, direction);\n this.currentIndex = restorationIndex;\n }\n }\n };\n onPageLoad=async _event => {\n await nextMicrotask();\n this.pageLoaded = true;\n };\n shouldHandlePopState() {\n return this.pageIsLoaded();\n }\n pageIsLoaded() {\n return this.pageLoaded || document.readyState == \"complete\";\n }\n}\n\nclass LinkPrefetchObserver {\n started=false;\n #prefetchedLink=null;\n constructor(delegate, eventTarget) {\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n start() {\n if (this.started) return;\n if (this.eventTarget.readyState === \"loading\") {\n this.eventTarget.addEventListener(\"DOMContentLoaded\", this.#enable, {\n once: true\n });\n } else {\n this.#enable();\n }\n }\n stop() {\n if (!this.started) return;\n this.eventTarget.removeEventListener(\"mouseenter\", this.#tryToPrefetchRequest, {\n capture: true,\n passive: true\n });\n this.eventTarget.removeEventListener(\"mouseleave\", this.#cancelRequestIfObsolete, {\n capture: true,\n passive: true\n });\n this.eventTarget.removeEventListener(\"turbo:before-fetch-request\", this.#tryToUsePrefetchedRequest, true);\n this.started = false;\n }\n #enable=() => {\n this.eventTarget.addEventListener(\"mouseenter\", this.#tryToPrefetchRequest, {\n capture: true,\n passive: true\n });\n this.eventTarget.addEventListener(\"mouseleave\", this.#cancelRequestIfObsolete, {\n capture: true,\n passive: true\n });\n this.eventTarget.addEventListener(\"turbo:before-fetch-request\", this.#tryToUsePrefetchedRequest, true);\n this.started = true;\n };\n #tryToPrefetchRequest=event => {\n if (getMetaContent(\"turbo-prefetch\") === \"false\") return;\n const target = event.target;\n const isLink = target.matches && target.matches(\"a[href]:not([target^=_]):not([download])\");\n if (isLink && this.#isPrefetchable(target)) {\n const link = target;\n const location = getLocationForLink(link);\n if (this.delegate.canPrefetchRequestToLocation(link, location)) {\n this.#prefetchedLink = link;\n const fetchRequest = new FetchRequest(this, FetchMethod.get, location, new URLSearchParams, target);\n prefetchCache.setLater(location.toString(), fetchRequest, this.#cacheTtl);\n }\n }\n };\n #cancelRequestIfObsolete=event => {\n if (event.target === this.#prefetchedLink) this.#cancelPrefetchRequest();\n };\n #cancelPrefetchRequest=() => {\n prefetchCache.clear();\n this.#prefetchedLink = null;\n };\n #tryToUsePrefetchedRequest=event => {\n if (event.target.tagName !== \"FORM\" && event.detail.fetchOptions.method === \"GET\") {\n const cached = prefetchCache.get(event.detail.url.toString());\n if (cached) {\n event.detail.fetchRequest = cached;\n }\n prefetchCache.clear();\n }\n };\n prepareRequest(request) {\n const link = request.target;\n request.headers[\"X-Sec-Purpose\"] = \"prefetch\";\n const turboFrame = link.closest(\"turbo-frame\");\n const turboFrameTarget = link.getAttribute(\"data-turbo-frame\") || turboFrame?.getAttribute(\"target\") || turboFrame?.id;\n if (turboFrameTarget && turboFrameTarget !== \"_top\") {\n request.headers[\"Turbo-Frame\"] = turboFrameTarget;\n }\n }\n requestSucceededWithResponse() {}\n requestStarted(fetchRequest) {}\n requestErrored(fetchRequest) {}\n requestFinished(fetchRequest) {}\n requestPreventedHandlingResponse(fetchRequest, fetchResponse) {}\n requestFailedWithResponse(fetchRequest, fetchResponse) {}\n get #cacheTtl() {\n return Number(getMetaContent(\"turbo-prefetch-cache-time\")) || cacheTtl;\n }\n #isPrefetchable(link) {\n const href = link.getAttribute(\"href\");\n if (!href) return false;\n if (unfetchableLink(link)) return false;\n if (linkToTheSamePage(link)) return false;\n if (linkOptsOut(link)) return false;\n if (nonSafeLink(link)) return false;\n if (eventPrevented(link)) return false;\n return true;\n }\n}\n\nconst unfetchableLink = link => link.origin !== document.location.origin || ![ \"http:\", \"https:\" ].includes(link.protocol) || link.hasAttribute(\"target\");\n\nconst linkToTheSamePage = link => link.pathname + link.search === document.location.pathname + document.location.search || link.href.startsWith(\"#\");\n\nconst linkOptsOut = link => {\n if (link.getAttribute(\"data-turbo-prefetch\") === \"false\") return true;\n if (link.getAttribute(\"data-turbo\") === \"false\") return true;\n const turboPrefetchParent = findClosestRecursively(link, \"[data-turbo-prefetch]\");\n if (turboPrefetchParent && turboPrefetchParent.getAttribute(\"data-turbo-prefetch\") === \"false\") return true;\n return false;\n};\n\nconst nonSafeLink = link => {\n const turboMethod = link.getAttribute(\"data-turbo-method\");\n if (turboMethod && turboMethod.toLowerCase() !== \"get\") return true;\n if (isUJS(link)) return true;\n if (link.hasAttribute(\"data-turbo-confirm\")) return true;\n if (link.hasAttribute(\"data-turbo-stream\")) return true;\n return false;\n};\n\nconst isUJS = link => link.hasAttribute(\"data-remote\") || link.hasAttribute(\"data-behavior\") || link.hasAttribute(\"data-confirm\") || link.hasAttribute(\"data-method\");\n\nconst eventPrevented = link => {\n const event = dispatch(\"turbo:before-prefetch\", {\n target: link,\n cancelable: true\n });\n return event.defaultPrevented;\n};\n\nclass Navigator {\n constructor(delegate) {\n this.delegate = delegate;\n }\n proposeVisit(location, options = {}) {\n if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n this.delegate.visitProposedToLocation(location, options);\n }\n }\n startVisit(locatable, restorationIdentifier, options = {}) {\n this.stop();\n this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, {\n referrer: this.location,\n ...options\n });\n this.currentVisit.start();\n }\n submitForm(form, submitter) {\n this.stop();\n this.formSubmission = new FormSubmission(this, form, submitter, true);\n this.formSubmission.start();\n }\n stop() {\n if (this.formSubmission) {\n this.formSubmission.stop();\n delete this.formSubmission;\n }\n if (this.currentVisit) {\n this.currentVisit.cancel();\n delete this.currentVisit;\n }\n }\n get adapter() {\n return this.delegate.adapter;\n }\n get view() {\n return this.delegate.view;\n }\n get rootLocation() {\n return this.view.snapshot.rootLocation;\n }\n get history() {\n return this.delegate.history;\n }\n formSubmissionStarted(formSubmission) {\n if (typeof this.adapter.formSubmissionStarted === \"function\") {\n this.adapter.formSubmissionStarted(formSubmission);\n }\n }\n async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n if (formSubmission == this.formSubmission) {\n const responseHTML = await fetchResponse.responseHTML;\n if (responseHTML) {\n const shouldCacheSnapshot = formSubmission.isSafe;\n if (!shouldCacheSnapshot) {\n this.view.clearSnapshotCache();\n }\n const {statusCode: statusCode, redirected: redirected} = fetchResponse;\n const action = this.#getActionForFormSubmission(formSubmission, fetchResponse);\n const visitOptions = {\n action: action,\n shouldCacheSnapshot: shouldCacheSnapshot,\n response: {\n statusCode: statusCode,\n responseHTML: responseHTML,\n redirected: redirected\n }\n };\n this.proposeVisit(fetchResponse.location, visitOptions);\n }\n }\n }\n async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n const responseHTML = await fetchResponse.responseHTML;\n if (responseHTML) {\n const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n if (fetchResponse.serverError) {\n await this.view.renderError(snapshot, this.currentVisit);\n } else {\n await this.view.renderPage(snapshot, false, true, this.currentVisit);\n }\n if (!snapshot.shouldPreserveScrollPosition) {\n this.view.scrollToTop();\n }\n this.view.clearSnapshotCache();\n }\n }\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n formSubmissionFinished(formSubmission) {\n if (typeof this.adapter.formSubmissionFinished === \"function\") {\n this.adapter.formSubmissionFinished(formSubmission);\n }\n }\n linkPrefetchingIsEnabledForLocation(location) {\n if (typeof this.adapter.linkPrefetchingIsEnabledForLocation === \"function\") {\n return this.adapter.linkPrefetchingIsEnabledForLocation(location);\n }\n return true;\n }\n visitStarted(visit) {\n this.delegate.visitStarted(visit);\n }\n visitCompleted(visit) {\n this.delegate.visitCompleted(visit);\n delete this.currentVisit;\n }\n locationWithActionIsSamePage(location, action) {\n const anchor = getAnchor(location);\n const currentAnchor = getAnchor(this.view.lastRenderedLocation);\n const isRestorationToTop = action === \"restore\" && typeof anchor === \"undefined\";\n return action !== \"replace\" && getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) && (isRestorationToTop || anchor != null && anchor !== currentAnchor);\n }\n visitScrolledToSamePageLocation(oldURL, newURL) {\n this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n }\n get location() {\n return this.history.location;\n }\n get restorationIdentifier() {\n return this.history.restorationIdentifier;\n }\n #getActionForFormSubmission(formSubmission, fetchResponse) {\n const {submitter: submitter, formElement: formElement} = formSubmission;\n return getVisitAction(submitter, formElement) || this.#getDefaultAction(fetchResponse);\n }\n #getDefaultAction(fetchResponse) {\n const sameLocationRedirect = fetchResponse.redirected && fetchResponse.location.href === this.location?.href;\n return sameLocationRedirect ? \"replace\" : \"advance\";\n }\n}\n\nconst PageStage = {\n initial: 0,\n loading: 1,\n interactive: 2,\n complete: 3\n};\n\nclass PageObserver {\n stage=PageStage.initial;\n started=false;\n constructor(delegate) {\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n if (this.stage == PageStage.initial) {\n this.stage = PageStage.loading;\n }\n document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n addEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n removeEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = false;\n }\n }\n interpretReadyState=() => {\n const {readyState: readyState} = this;\n if (readyState == \"interactive\") {\n this.pageIsInteractive();\n } else if (readyState == \"complete\") {\n this.pageIsComplete();\n }\n };\n pageIsInteractive() {\n if (this.stage == PageStage.loading) {\n this.stage = PageStage.interactive;\n this.delegate.pageBecameInteractive();\n }\n }\n pageIsComplete() {\n this.pageIsInteractive();\n if (this.stage == PageStage.interactive) {\n this.stage = PageStage.complete;\n this.delegate.pageLoaded();\n }\n }\n pageWillUnload=() => {\n this.delegate.pageWillUnload();\n };\n get readyState() {\n return document.readyState;\n }\n}\n\nclass ScrollObserver {\n started=false;\n constructor(delegate) {\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"scroll\", this.onScroll, false);\n this.onScroll();\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"scroll\", this.onScroll, false);\n this.started = false;\n }\n }\n onScroll=() => {\n this.updatePosition({\n x: window.pageXOffset,\n y: window.pageYOffset\n });\n };\n updatePosition(position) {\n this.delegate.scrollPositionChanged(position);\n }\n}\n\nclass StreamMessageRenderer {\n render({fragment: fragment}) {\n Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), (() => {\n withAutofocusFromFragment(fragment, (() => {\n withPreservedFocus((() => {\n document.documentElement.appendChild(fragment);\n }));\n }));\n }));\n }\n enteringBardo(currentPermanentElement, newPermanentElement) {\n newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));\n }\n leavingBardo() {}\n}\n\nfunction getPermanentElementMapForFragment(fragment) {\n const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);\n const permanentElementMap = {};\n for (const permanentElementInDocument of permanentElementsInDocument) {\n const {id: id} = permanentElementInDocument;\n for (const streamElement of fragment.querySelectorAll(\"turbo-stream\")) {\n const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);\n if (elementInStream) {\n permanentElementMap[id] = [ permanentElementInDocument, elementInStream ];\n }\n }\n }\n return permanentElementMap;\n}\n\nasync function withAutofocusFromFragment(fragment, callback) {\n const generatedID = `turbo-stream-autofocus-${uuid()}`;\n const turboStreams = fragment.querySelectorAll(\"turbo-stream\");\n const elementWithAutofocus = firstAutofocusableElementInStreams(turboStreams);\n let willAutofocusId = null;\n if (elementWithAutofocus) {\n if (elementWithAutofocus.id) {\n willAutofocusId = elementWithAutofocus.id;\n } else {\n willAutofocusId = generatedID;\n }\n elementWithAutofocus.id = willAutofocusId;\n }\n callback();\n await nextRepaint();\n const hasNoActiveElement = document.activeElement == null || document.activeElement == document.body;\n if (hasNoActiveElement && willAutofocusId) {\n const elementToAutofocus = document.getElementById(willAutofocusId);\n if (elementIsFocusable(elementToAutofocus)) {\n elementToAutofocus.focus();\n }\n if (elementToAutofocus && elementToAutofocus.id == generatedID) {\n elementToAutofocus.removeAttribute(\"id\");\n }\n }\n}\n\nasync function withPreservedFocus(callback) {\n const [activeElementBeforeRender, activeElementAfterRender] = await around(callback, (() => document.activeElement));\n const restoreFocusTo = activeElementBeforeRender && activeElementBeforeRender.id;\n if (restoreFocusTo) {\n const elementToFocus = document.getElementById(restoreFocusTo);\n if (elementIsFocusable(elementToFocus) && elementToFocus != activeElementAfterRender) {\n elementToFocus.focus();\n }\n }\n}\n\nfunction firstAutofocusableElementInStreams(nodeListOfStreamElements) {\n for (const streamElement of nodeListOfStreamElements) {\n const elementWithAutofocus = queryAutofocusableElement(streamElement.templateElement.content);\n if (elementWithAutofocus) return elementWithAutofocus;\n }\n return null;\n}\n\nclass StreamObserver {\n sources=new Set;\n #started=false;\n constructor(delegate) {\n this.delegate = delegate;\n }\n start() {\n if (!this.#started) {\n this.#started = true;\n addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n stop() {\n if (this.#started) {\n this.#started = false;\n removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n connectStreamSource(source) {\n if (!this.streamSourceIsConnected(source)) {\n this.sources.add(source);\n source.addEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n disconnectStreamSource(source) {\n if (this.streamSourceIsConnected(source)) {\n this.sources.delete(source);\n source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n streamSourceIsConnected(source) {\n return this.sources.has(source);\n }\n inspectFetchResponse=event => {\n const response = fetchResponseFromEvent(event);\n if (response && fetchResponseIsStream(response)) {\n event.preventDefault();\n this.receiveMessageResponse(response);\n }\n };\n receiveMessageEvent=event => {\n if (this.#started && typeof event.data == \"string\") {\n this.receiveMessageHTML(event.data);\n }\n };\n async receiveMessageResponse(response) {\n const html = await response.responseHTML;\n if (html) {\n this.receiveMessageHTML(html);\n }\n }\n receiveMessageHTML(html) {\n this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));\n }\n}\n\nfunction fetchResponseFromEvent(event) {\n const fetchResponse = event.detail?.fetchResponse;\n if (fetchResponse instanceof FetchResponse) {\n return fetchResponse;\n }\n}\n\nfunction fetchResponseIsStream(response) {\n const contentType = response.contentType ?? \"\";\n return contentType.startsWith(StreamMessage.contentType);\n}\n\nclass ErrorRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n const {documentElement: documentElement, body: body} = document;\n documentElement.replaceChild(newElement, body);\n }\n async render() {\n this.replaceHeadAndBody();\n this.activateScriptElements();\n }\n replaceHeadAndBody() {\n const {documentElement: documentElement, head: head} = document;\n documentElement.replaceChild(this.newHead, head);\n this.renderElement(this.currentElement, this.newElement);\n }\n activateScriptElements() {\n for (const replaceableElement of this.scriptElements) {\n const parentNode = replaceableElement.parentNode;\n if (parentNode) {\n const element = activateScriptElement(replaceableElement);\n parentNode.replaceChild(element, replaceableElement);\n }\n }\n }\n get newHead() {\n return this.newSnapshot.headSnapshot.element;\n }\n get scriptElements() {\n return document.documentElement.querySelectorAll(\"script\");\n }\n}\n\nclass PageRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n if (document.body && newElement instanceof HTMLBodyElement) {\n document.body.replaceWith(newElement);\n } else {\n document.documentElement.appendChild(newElement);\n }\n }\n get shouldRender() {\n return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n }\n get reloadReason() {\n if (!this.newSnapshot.isVisitable) {\n return {\n reason: \"turbo_visit_control_is_reload\"\n };\n }\n if (!this.trackedElementsAreIdentical) {\n return {\n reason: \"tracked_element_mismatch\"\n };\n }\n }\n async prepareToRender() {\n this.#setLanguage();\n await this.mergeHead();\n }\n async render() {\n if (this.willRender) {\n await this.replaceBody();\n }\n }\n finishRendering() {\n super.finishRendering();\n if (!this.isPreview) {\n this.focusFirstAutofocusableElement();\n }\n }\n get currentHeadSnapshot() {\n return this.currentSnapshot.headSnapshot;\n }\n get newHeadSnapshot() {\n return this.newSnapshot.headSnapshot;\n }\n get newElement() {\n return this.newSnapshot.element;\n }\n #setLanguage() {\n const {documentElement: documentElement} = this.currentSnapshot;\n const {lang: lang} = this.newSnapshot;\n if (lang) {\n documentElement.setAttribute(\"lang\", lang);\n } else {\n documentElement.removeAttribute(\"lang\");\n }\n }\n async mergeHead() {\n const mergedHeadElements = this.mergeProvisionalElements();\n const newStylesheetElements = this.copyNewHeadStylesheetElements();\n this.copyNewHeadScriptElements();\n await mergedHeadElements;\n await newStylesheetElements;\n if (this.willRender) {\n this.removeUnusedDynamicStylesheetElements();\n }\n }\n async replaceBody() {\n await this.preservingPermanentElements((async () => {\n this.activateNewBody();\n await this.assignNewBody();\n }));\n }\n get trackedElementsAreIdentical() {\n return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n }\n async copyNewHeadStylesheetElements() {\n const loadingElements = [];\n for (const element of this.newHeadStylesheetElements) {\n loadingElements.push(waitForLoad(element));\n document.head.appendChild(element);\n }\n await Promise.all(loadingElements);\n }\n copyNewHeadScriptElements() {\n for (const element of this.newHeadScriptElements) {\n document.head.appendChild(activateScriptElement(element));\n }\n }\n removeUnusedDynamicStylesheetElements() {\n for (const element of this.unusedDynamicStylesheetElements) {\n document.head.removeChild(element);\n }\n }\n async mergeProvisionalElements() {\n const newHeadElements = [ ...this.newHeadProvisionalElements ];\n for (const element of this.currentHeadProvisionalElements) {\n if (!this.isCurrentElementInElementList(element, newHeadElements)) {\n document.head.removeChild(element);\n }\n }\n for (const element of newHeadElements) {\n document.head.appendChild(element);\n }\n }\n isCurrentElementInElementList(element, elementList) {\n for (const [index, newElement] of elementList.entries()) {\n if (element.tagName == \"TITLE\") {\n if (newElement.tagName != \"TITLE\") {\n continue;\n }\n if (element.innerHTML == newElement.innerHTML) {\n elementList.splice(index, 1);\n return true;\n }\n }\n if (newElement.isEqualNode(element)) {\n elementList.splice(index, 1);\n return true;\n }\n }\n return false;\n }\n removeCurrentHeadProvisionalElements() {\n for (const element of this.currentHeadProvisionalElements) {\n document.head.removeChild(element);\n }\n }\n copyNewHeadProvisionalElements() {\n for (const element of this.newHeadProvisionalElements) {\n document.head.appendChild(element);\n }\n }\n activateNewBody() {\n document.adoptNode(this.newElement);\n this.activateNewBodyScriptElements();\n }\n activateNewBodyScriptElements() {\n for (const inertScriptElement of this.newBodyScriptElements) {\n const activatedScriptElement = activateScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n async assignNewBody() {\n await this.renderElement(this.currentElement, this.newElement);\n }\n get unusedDynamicStylesheetElements() {\n return this.oldHeadStylesheetElements.filter((element => element.getAttribute(\"data-turbo-track\") === \"dynamic\"));\n }\n get oldHeadStylesheetElements() {\n return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot);\n }\n get newHeadStylesheetElements() {\n return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n get newHeadScriptElements() {\n return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n get currentHeadProvisionalElements() {\n return this.currentHeadSnapshot.provisionalElements;\n }\n get newHeadProvisionalElements() {\n return this.newHeadSnapshot.provisionalElements;\n }\n get newBodyScriptElements() {\n return this.newElement.querySelectorAll(\"script\");\n }\n}\n\nclass MorphingPageRenderer extends PageRenderer {\n static renderElement(currentElement, newElement) {\n morphElements(currentElement, newElement, {\n callbacks: {\n beforeNodeMorphed: element => !canRefreshFrame(element)\n }\n });\n for (const frame of currentElement.querySelectorAll(\"turbo-frame\")) {\n if (canRefreshFrame(frame)) frame.reload();\n }\n dispatch(\"turbo:morph\", {\n detail: {\n currentElement: currentElement,\n newElement: newElement\n }\n });\n }\n async preservingPermanentElements(callback) {\n return await callback();\n }\n get renderMethod() {\n return \"morph\";\n }\n get shouldAutofocus() {\n return false;\n }\n}\n\nfunction canRefreshFrame(frame) {\n return frame instanceof FrameElement && frame.src && frame.refresh === \"morph\" && !frame.closest(\"[data-turbo-permanent]\");\n}\n\nclass SnapshotCache {\n keys=[];\n snapshots={};\n constructor(size) {\n this.size = size;\n }\n has(location) {\n return toCacheKey(location) in this.snapshots;\n }\n get(location) {\n if (this.has(location)) {\n const snapshot = this.read(location);\n this.touch(location);\n return snapshot;\n }\n }\n put(location, snapshot) {\n this.write(location, snapshot);\n this.touch(location);\n return snapshot;\n }\n clear() {\n this.snapshots = {};\n }\n read(location) {\n return this.snapshots[toCacheKey(location)];\n }\n write(location, snapshot) {\n this.snapshots[toCacheKey(location)] = snapshot;\n }\n touch(location) {\n const key = toCacheKey(location);\n const index = this.keys.indexOf(key);\n if (index > -1) this.keys.splice(index, 1);\n this.keys.unshift(key);\n this.trim();\n }\n trim() {\n for (const key of this.keys.splice(this.size)) {\n delete this.snapshots[key];\n }\n }\n}\n\nclass PageView extends View {\n snapshotCache=new SnapshotCache(10);\n lastRenderedLocation=new URL(location.href);\n forceReloaded=false;\n shouldTransitionTo(newSnapshot) {\n return this.snapshot.prefersViewTransitions && newSnapshot.prefersViewTransitions;\n }\n renderPage(snapshot, isPreview = false, willRender = true, visit) {\n const shouldMorphPage = this.isPageRefresh(visit) && this.snapshot.shouldMorphPage;\n const rendererClass = shouldMorphPage ? MorphingPageRenderer : PageRenderer;\n const renderer = new rendererClass(this.snapshot, snapshot, isPreview, willRender);\n if (!renderer.shouldRender) {\n this.forceReloaded = true;\n } else {\n visit?.changeHistory();\n }\n return this.render(renderer);\n }\n renderError(snapshot, visit) {\n visit?.changeHistory();\n const renderer = new ErrorRenderer(this.snapshot, snapshot, false);\n return this.render(renderer);\n }\n clearSnapshotCache() {\n this.snapshotCache.clear();\n }\n async cacheSnapshot(snapshot = this.snapshot) {\n if (snapshot.isCacheable) {\n this.delegate.viewWillCacheSnapshot();\n const {lastRenderedLocation: location} = this;\n await nextEventLoopTick();\n const cachedSnapshot = snapshot.clone();\n this.snapshotCache.put(location, cachedSnapshot);\n return cachedSnapshot;\n }\n }\n getCachedSnapshotForLocation(location) {\n return this.snapshotCache.get(location);\n }\n isPageRefresh(visit) {\n return !visit || this.lastRenderedLocation.pathname === visit.location.pathname && visit.action === \"replace\";\n }\n shouldPreserveScrollPosition(visit) {\n return this.isPageRefresh(visit) && this.snapshot.shouldPreserveScrollPosition;\n }\n get snapshot() {\n return PageSnapshot.fromElement(this.element);\n }\n}\n\nclass Preloader {\n selector=\"a[data-turbo-preload]\";\n constructor(delegate, snapshotCache) {\n this.delegate = delegate;\n this.snapshotCache = snapshotCache;\n }\n start() {\n if (document.readyState === \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", this.#preloadAll);\n } else {\n this.preloadOnLoadLinksForView(document.body);\n }\n }\n stop() {\n document.removeEventListener(\"DOMContentLoaded\", this.#preloadAll);\n }\n preloadOnLoadLinksForView(element) {\n for (const link of element.querySelectorAll(this.selector)) {\n if (this.delegate.shouldPreloadLink(link)) {\n this.preloadURL(link);\n }\n }\n }\n async preloadURL(link) {\n const location = new URL(link.href);\n if (this.snapshotCache.has(location)) {\n return;\n }\n const fetchRequest = new FetchRequest(this, FetchMethod.get, location, new URLSearchParams, link);\n await fetchRequest.perform();\n }\n prepareRequest(fetchRequest) {\n fetchRequest.headers[\"X-Sec-Purpose\"] = \"prefetch\";\n }\n async requestSucceededWithResponse(fetchRequest, fetchResponse) {\n try {\n const responseHTML = await fetchResponse.responseHTML;\n const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n this.snapshotCache.put(fetchRequest.url, snapshot);\n } catch (_) {}\n }\n requestStarted(fetchRequest) {}\n requestErrored(fetchRequest) {}\n requestFinished(fetchRequest) {}\n requestPreventedHandlingResponse(fetchRequest, fetchResponse) {}\n requestFailedWithResponse(fetchRequest, fetchResponse) {}\n #preloadAll=() => {\n this.preloadOnLoadLinksForView(document.body);\n };\n}\n\nclass Cache {\n constructor(session) {\n this.session = session;\n }\n clear() {\n this.session.clearCache();\n }\n resetCacheControl() {\n this.#setCacheControl(\"\");\n }\n exemptPageFromCache() {\n this.#setCacheControl(\"no-cache\");\n }\n exemptPageFromPreview() {\n this.#setCacheControl(\"no-preview\");\n }\n #setCacheControl(value) {\n setMetaContent(\"turbo-cache-control\", value);\n }\n}\n\nclass Session {\n navigator=new Navigator(this);\n history=new History(this);\n view=new PageView(this, document.documentElement);\n adapter=new BrowserAdapter(this);\n pageObserver=new PageObserver(this);\n cacheObserver=new CacheObserver;\n linkPrefetchObserver=new LinkPrefetchObserver(this, document);\n linkClickObserver=new LinkClickObserver(this, window);\n formSubmitObserver=new FormSubmitObserver(this, document);\n scrollObserver=new ScrollObserver(this);\n streamObserver=new StreamObserver(this);\n formLinkClickObserver=new FormLinkClickObserver(this, document.documentElement);\n frameRedirector=new FrameRedirector(this, document.documentElement);\n streamMessageRenderer=new StreamMessageRenderer;\n cache=new Cache(this);\n enabled=true;\n started=false;\n #pageRefreshDebouncePeriod=150;\n constructor(recentRequests) {\n this.recentRequests = recentRequests;\n this.preloader = new Preloader(this, this.view.snapshotCache);\n this.debouncedRefresh = this.refresh;\n this.pageRefreshDebouncePeriod = this.pageRefreshDebouncePeriod;\n }\n start() {\n if (!this.started) {\n this.pageObserver.start();\n this.cacheObserver.start();\n this.linkPrefetchObserver.start();\n this.formLinkClickObserver.start();\n this.linkClickObserver.start();\n this.formSubmitObserver.start();\n this.scrollObserver.start();\n this.streamObserver.start();\n this.frameRedirector.start();\n this.history.start();\n this.preloader.start();\n this.started = true;\n this.enabled = true;\n }\n }\n disable() {\n this.enabled = false;\n }\n stop() {\n if (this.started) {\n this.pageObserver.stop();\n this.cacheObserver.stop();\n this.linkPrefetchObserver.stop();\n this.formLinkClickObserver.stop();\n this.linkClickObserver.stop();\n this.formSubmitObserver.stop();\n this.scrollObserver.stop();\n this.streamObserver.stop();\n this.frameRedirector.stop();\n this.history.stop();\n this.preloader.stop();\n this.started = false;\n }\n }\n registerAdapter(adapter) {\n this.adapter = adapter;\n }\n visit(location, options = {}) {\n const frameElement = options.frame ? document.getElementById(options.frame) : null;\n if (frameElement instanceof FrameElement) {\n const action = options.action || getVisitAction(frameElement);\n frameElement.delegate.proposeVisitIfNavigatedWithAction(frameElement, action);\n frameElement.src = location.toString();\n } else {\n this.navigator.proposeVisit(expandURL(location), options);\n }\n }\n refresh(url, requestId) {\n const isRecentRequest = requestId && this.recentRequests.has(requestId);\n const isCurrentUrl = url === document.baseURI;\n if (!isRecentRequest && !this.navigator.currentVisit && isCurrentUrl) {\n this.visit(url, {\n action: \"replace\",\n shouldCacheSnapshot: false\n });\n }\n }\n connectStreamSource(source) {\n this.streamObserver.connectStreamSource(source);\n }\n disconnectStreamSource(source) {\n this.streamObserver.disconnectStreamSource(source);\n }\n renderStreamMessage(message) {\n this.streamMessageRenderer.render(StreamMessage.wrap(message));\n }\n clearCache() {\n this.view.clearSnapshotCache();\n }\n setProgressBarDelay(delay) {\n console.warn(\"Please replace `session.setProgressBarDelay(delay)` with `session.progressBarDelay = delay`. The function is deprecated and will be removed in a future version of Turbo.`\");\n this.progressBarDelay = delay;\n }\n set progressBarDelay(delay) {\n config.drive.progressBarDelay = delay;\n }\n get progressBarDelay() {\n return config.drive.progressBarDelay;\n }\n set drive(value) {\n config.drive.enabled = value;\n }\n get drive() {\n return config.drive.enabled;\n }\n set formMode(value) {\n config.forms.mode = value;\n }\n get formMode() {\n return config.forms.mode;\n }\n get location() {\n return this.history.location;\n }\n get restorationIdentifier() {\n return this.history.restorationIdentifier;\n }\n get pageRefreshDebouncePeriod() {\n return this.#pageRefreshDebouncePeriod;\n }\n set pageRefreshDebouncePeriod(value) {\n this.refresh = debounce(this.debouncedRefresh.bind(this), value);\n this.#pageRefreshDebouncePeriod = value;\n }\n shouldPreloadLink(element) {\n const isUnsafe = element.hasAttribute(\"data-turbo-method\");\n const isStream = element.hasAttribute(\"data-turbo-stream\");\n const frameTarget = element.getAttribute(\"data-turbo-frame\");\n const frame = frameTarget == \"_top\" ? null : document.getElementById(frameTarget) || findClosestRecursively(element, \"turbo-frame:not([disabled])\");\n if (isUnsafe || isStream || frame instanceof FrameElement) {\n return false;\n } else {\n const location = new URL(element.href);\n return this.elementIsNavigatable(element) && locationIsVisitable(location, this.snapshot.rootLocation);\n }\n }\n historyPoppedToLocationWithRestorationIdentifierAndDirection(location, restorationIdentifier, direction) {\n if (this.enabled) {\n this.navigator.startVisit(location, restorationIdentifier, {\n action: \"restore\",\n historyChanged: true,\n direction: direction\n });\n } else {\n this.adapter.pageInvalidated({\n reason: \"turbo_disabled\"\n });\n }\n }\n scrollPositionChanged(position) {\n this.history.updateRestorationData({\n scrollPosition: position\n });\n }\n willSubmitFormLinkToLocation(link, location) {\n return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation);\n }\n submittedFormLinkToLocation() {}\n canPrefetchRequestToLocation(link, location) {\n return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation) && this.navigator.linkPrefetchingIsEnabledForLocation(location);\n }\n willFollowLinkToLocation(link, location, event) {\n return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation) && this.applicationAllowsFollowingLinkToLocation(link, location, event);\n }\n followedLinkToLocation(link, location) {\n const action = this.getActionForLink(link);\n const acceptsStreamResponse = link.hasAttribute(\"data-turbo-stream\");\n this.visit(location.href, {\n action: action,\n acceptsStreamResponse: acceptsStreamResponse\n });\n }\n allowsVisitingLocationWithAction(location, action) {\n return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n }\n visitProposedToLocation(location, options) {\n extendURLWithDeprecatedProperties(location);\n this.adapter.visitProposedToLocation(location, options);\n }\n visitStarted(visit) {\n if (!visit.acceptsStreamResponse) {\n markAsBusy(document.documentElement);\n this.view.markVisitDirection(visit.direction);\n }\n extendURLWithDeprecatedProperties(visit.location);\n if (!visit.silent) {\n this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n }\n }\n visitCompleted(visit) {\n this.view.unmarkVisitDirection();\n clearBusyState(document.documentElement);\n this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n }\n locationWithActionIsSamePage(location, action) {\n return this.navigator.locationWithActionIsSamePage(location, action);\n }\n visitScrolledToSamePageLocation(oldURL, newURL) {\n this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n }\n willSubmitForm(form, submitter) {\n const action = getAction$1(form, submitter);\n return this.submissionIsNavigatable(form, submitter) && locationIsVisitable(expandURL(action), this.snapshot.rootLocation);\n }\n formSubmitted(form, submitter) {\n this.navigator.submitForm(form, submitter);\n }\n pageBecameInteractive() {\n this.view.lastRenderedLocation = this.location;\n this.notifyApplicationAfterPageLoad();\n }\n pageLoaded() {\n this.history.assumeControlOfScrollRestoration();\n }\n pageWillUnload() {\n this.history.relinquishControlOfScrollRestoration();\n }\n receivedMessageFromStream(message) {\n this.renderStreamMessage(message);\n }\n viewWillCacheSnapshot() {\n if (!this.navigator.currentVisit?.silent) {\n this.notifyApplicationBeforeCachingSnapshot();\n }\n }\n allowsImmediateRender({element: element}, options) {\n const event = this.notifyApplicationBeforeRender(element, options);\n const {defaultPrevented: defaultPrevented, detail: {render: render}} = event;\n if (this.view.renderer && render) {\n this.view.renderer.renderElement = render;\n }\n return !defaultPrevented;\n }\n viewRenderedSnapshot(_snapshot, _isPreview, renderMethod) {\n this.view.lastRenderedLocation = this.history.location;\n this.notifyApplicationAfterRender(renderMethod);\n }\n preloadOnLoadLinksForView(element) {\n this.preloader.preloadOnLoadLinksForView(element);\n }\n viewInvalidated(reason) {\n this.adapter.pageInvalidated(reason);\n }\n frameLoaded(frame) {\n this.notifyApplicationAfterFrameLoad(frame);\n }\n frameRendered(fetchResponse, frame) {\n this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n }\n applicationAllowsFollowingLinkToLocation(link, location, ev) {\n const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);\n return !event.defaultPrevented;\n }\n applicationAllowsVisitingLocation(location) {\n const event = this.notifyApplicationBeforeVisitingLocation(location);\n return !event.defaultPrevented;\n }\n notifyApplicationAfterClickingLinkToLocation(link, location, event) {\n return dispatch(\"turbo:click\", {\n target: link,\n detail: {\n url: location.href,\n originalEvent: event\n },\n cancelable: true\n });\n }\n notifyApplicationBeforeVisitingLocation(location) {\n return dispatch(\"turbo:before-visit\", {\n detail: {\n url: location.href\n },\n cancelable: true\n });\n }\n notifyApplicationAfterVisitingLocation(location, action) {\n return dispatch(\"turbo:visit\", {\n detail: {\n url: location.href,\n action: action\n }\n });\n }\n notifyApplicationBeforeCachingSnapshot() {\n return dispatch(\"turbo:before-cache\");\n }\n notifyApplicationBeforeRender(newBody, options) {\n return dispatch(\"turbo:before-render\", {\n detail: {\n newBody: newBody,\n ...options\n },\n cancelable: true\n });\n }\n notifyApplicationAfterRender(renderMethod) {\n return dispatch(\"turbo:render\", {\n detail: {\n renderMethod: renderMethod\n }\n });\n }\n notifyApplicationAfterPageLoad(timing = {}) {\n return dispatch(\"turbo:load\", {\n detail: {\n url: this.location.href,\n timing: timing\n }\n });\n }\n notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n dispatchEvent(new HashChangeEvent(\"hashchange\", {\n oldURL: oldURL.toString(),\n newURL: newURL.toString()\n }));\n }\n notifyApplicationAfterFrameLoad(frame) {\n return dispatch(\"turbo:frame-load\", {\n target: frame\n });\n }\n notifyApplicationAfterFrameRender(fetchResponse, frame) {\n return dispatch(\"turbo:frame-render\", {\n detail: {\n fetchResponse: fetchResponse\n },\n target: frame,\n cancelable: true\n });\n }\n submissionIsNavigatable(form, submitter) {\n if (config.forms.mode == \"off\") {\n return false;\n } else {\n const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;\n if (config.forms.mode == \"optin\") {\n return submitterIsNavigatable && form.closest('[data-turbo=\"true\"]') != null;\n } else {\n return submitterIsNavigatable && this.elementIsNavigatable(form);\n }\n }\n }\n elementIsNavigatable(element) {\n const container = findClosestRecursively(element, \"[data-turbo]\");\n const withinFrame = findClosestRecursively(element, \"turbo-frame\");\n if (config.drive.enabled || withinFrame) {\n if (container) {\n return container.getAttribute(\"data-turbo\") != \"false\";\n } else {\n return true;\n }\n } else {\n if (container) {\n return container.getAttribute(\"data-turbo\") == \"true\";\n } else {\n return false;\n }\n }\n }\n getActionForLink(link) {\n return getVisitAction(link) || \"advance\";\n }\n get snapshot() {\n return this.view.snapshot;\n }\n}\n\nfunction extendURLWithDeprecatedProperties(url) {\n Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\n\nconst deprecatedLocationPropertyDescriptors = {\n absoluteURL: {\n get() {\n return this.toString();\n }\n }\n};\n\nconst session = new Session(recentRequests);\n\nconst {cache: cache, navigator: navigator$1} = session;\n\nfunction start() {\n session.start();\n}\n\nfunction registerAdapter(adapter) {\n session.registerAdapter(adapter);\n}\n\nfunction visit(location, options) {\n session.visit(location, options);\n}\n\nfunction connectStreamSource(source) {\n session.connectStreamSource(source);\n}\n\nfunction disconnectStreamSource(source) {\n session.disconnectStreamSource(source);\n}\n\nfunction renderStreamMessage(message) {\n session.renderStreamMessage(message);\n}\n\nfunction clearCache() {\n console.warn(\"Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`\");\n session.clearCache();\n}\n\nfunction setProgressBarDelay(delay) {\n console.warn(\"Please replace `Turbo.setProgressBarDelay(delay)` with `Turbo.config.drive.progressBarDelay = delay`. The top-level function is deprecated and will be removed in a future version of Turbo.`\");\n config.drive.progressBarDelay = delay;\n}\n\nfunction setConfirmMethod(confirmMethod) {\n console.warn(\"Please replace `Turbo.setConfirmMethod(confirmMethod)` with `Turbo.config.forms.confirm = confirmMethod`. The top-level function is deprecated and will be removed in a future version of Turbo.`\");\n config.forms.confirm = confirmMethod;\n}\n\nfunction setFormMode(mode) {\n console.warn(\"Please replace `Turbo.setFormMode(mode)` with `Turbo.config.forms.mode = mode`. The top-level function is deprecated and will be removed in a future version of Turbo.`\");\n config.forms.mode = mode;\n}\n\nvar Turbo = Object.freeze({\n __proto__: null,\n navigator: navigator$1,\n session: session,\n cache: cache,\n PageRenderer: PageRenderer,\n PageSnapshot: PageSnapshot,\n FrameRenderer: FrameRenderer,\n fetch: fetchWithTurboHeaders,\n config: config,\n start: start,\n registerAdapter: registerAdapter,\n visit: visit,\n connectStreamSource: connectStreamSource,\n disconnectStreamSource: disconnectStreamSource,\n renderStreamMessage: renderStreamMessage,\n clearCache: clearCache,\n setProgressBarDelay: setProgressBarDelay,\n setConfirmMethod: setConfirmMethod,\n setFormMode: setFormMode\n});\n\nclass TurboFrameMissingError extends Error {}\n\nclass FrameController {\n fetchResponseLoaded=_fetchResponse => Promise.resolve();\n #currentFetchRequest=null;\n #resolveVisitPromise=() => {};\n #connected=false;\n #hasBeenLoaded=false;\n #ignoredAttributes=new Set;\n #shouldMorphFrame=false;\n action=null;\n constructor(element) {\n this.element = element;\n this.view = new FrameView(this, this.element);\n this.appearanceObserver = new AppearanceObserver(this, this.element);\n this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);\n this.linkInterceptor = new LinkInterceptor(this, this.element);\n this.restorationIdentifier = uuid();\n this.formSubmitObserver = new FormSubmitObserver(this, this.element);\n }\n connect() {\n if (!this.#connected) {\n this.#connected = true;\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n } else {\n this.#loadSourceURL();\n }\n this.formLinkClickObserver.start();\n this.linkInterceptor.start();\n this.formSubmitObserver.start();\n }\n }\n disconnect() {\n if (this.#connected) {\n this.#connected = false;\n this.appearanceObserver.stop();\n this.formLinkClickObserver.stop();\n this.linkInterceptor.stop();\n this.formSubmitObserver.stop();\n }\n }\n disabledChanged() {\n if (this.loadingStyle == FrameLoadingStyle.eager) {\n this.#loadSourceURL();\n }\n }\n sourceURLChanged() {\n if (this.#isIgnoringChangesTo(\"src\")) return;\n if (this.element.isConnected) {\n this.complete = false;\n }\n if (this.loadingStyle == FrameLoadingStyle.eager || this.#hasBeenLoaded) {\n this.#loadSourceURL();\n }\n }\n sourceURLReloaded() {\n const {refresh: refresh, src: src} = this.element;\n this.#shouldMorphFrame = src && refresh === \"morph\";\n this.element.removeAttribute(\"complete\");\n this.element.src = null;\n this.element.src = src;\n return this.element.loaded;\n }\n loadingStyleChanged() {\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n } else {\n this.appearanceObserver.stop();\n this.#loadSourceURL();\n }\n }\n async #loadSourceURL() {\n if (this.enabled && this.isActive && !this.complete && this.sourceURL) {\n this.element.loaded = this.#visit(expandURL(this.sourceURL));\n this.appearanceObserver.stop();\n await this.element.loaded;\n this.#hasBeenLoaded = true;\n }\n }\n async loadResponse(fetchResponse) {\n if (fetchResponse.redirected || fetchResponse.succeeded && fetchResponse.isHTML) {\n this.sourceURL = fetchResponse.response.url;\n }\n try {\n const html = await fetchResponse.responseHTML;\n if (html) {\n const document = parseHTMLDocument(html);\n const pageSnapshot = PageSnapshot.fromDocument(document);\n if (pageSnapshot.isVisitable) {\n await this.#loadFrameResponse(fetchResponse, document);\n } else {\n await this.#handleUnvisitableFrameResponse(fetchResponse);\n }\n }\n } finally {\n this.#shouldMorphFrame = false;\n this.fetchResponseLoaded = () => Promise.resolve();\n }\n }\n elementAppearedInViewport(element) {\n this.proposeVisitIfNavigatedWithAction(element, getVisitAction(element));\n this.#loadSourceURL();\n }\n willSubmitFormLinkToLocation(link) {\n return this.#shouldInterceptNavigation(link);\n }\n submittedFormLinkToLocation(link, _location, form) {\n const frame = this.#findFrameElement(link);\n if (frame) form.setAttribute(\"data-turbo-frame\", frame.id);\n }\n shouldInterceptLinkClick(element, _location, _event) {\n return this.#shouldInterceptNavigation(element);\n }\n linkClickIntercepted(element, location) {\n this.#navigateFrame(element, location);\n }\n willSubmitForm(element, submitter) {\n return element.closest(\"turbo-frame\") == this.element && this.#shouldInterceptNavigation(element, submitter);\n }\n formSubmitted(element, submitter) {\n if (this.formSubmission) {\n this.formSubmission.stop();\n }\n this.formSubmission = new FormSubmission(this, element, submitter);\n const {fetchRequest: fetchRequest} = this.formSubmission;\n this.prepareRequest(fetchRequest);\n this.formSubmission.start();\n }\n prepareRequest(request) {\n request.headers[\"Turbo-Frame\"] = this.id;\n if (this.currentNavigationElement?.hasAttribute(\"data-turbo-stream\")) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n requestStarted(_request) {\n markAsBusy(this.element);\n }\n requestPreventedHandlingResponse(_request, _response) {\n this.#resolveVisitPromise();\n }\n async requestSucceededWithResponse(request, response) {\n await this.loadResponse(response);\n this.#resolveVisitPromise();\n }\n async requestFailedWithResponse(request, response) {\n await this.loadResponse(response);\n this.#resolveVisitPromise();\n }\n requestErrored(request, error) {\n console.error(error);\n this.#resolveVisitPromise();\n }\n requestFinished(_request) {\n clearBusyState(this.element);\n }\n formSubmissionStarted({formElement: formElement}) {\n markAsBusy(formElement, this.#findFrameElement(formElement));\n }\n formSubmissionSucceededWithResponse(formSubmission, response) {\n const frame = this.#findFrameElement(formSubmission.formElement, formSubmission.submitter);\n frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(formSubmission.submitter, formSubmission.formElement, frame));\n frame.delegate.loadResponse(response);\n if (!formSubmission.isSafe) {\n session.clearCache();\n }\n }\n formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n this.element.delegate.loadResponse(fetchResponse);\n session.clearCache();\n }\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n formSubmissionFinished({formElement: formElement}) {\n clearBusyState(formElement, this.#findFrameElement(formElement));\n }\n allowsImmediateRender({element: newFrame}, options) {\n const event = dispatch(\"turbo:before-frame-render\", {\n target: this.element,\n detail: {\n newFrame: newFrame,\n ...options\n },\n cancelable: true\n });\n const {defaultPrevented: defaultPrevented, detail: {render: render}} = event;\n if (this.view.renderer && render) {\n this.view.renderer.renderElement = render;\n }\n return !defaultPrevented;\n }\n viewRenderedSnapshot(_snapshot, _isPreview, _renderMethod) {}\n preloadOnLoadLinksForView(element) {\n session.preloadOnLoadLinksForView(element);\n }\n viewInvalidated() {}\n willRenderFrame(currentElement, _newElement) {\n this.previousFrameElement = currentElement.cloneNode(true);\n }\n visitCachedSnapshot=({element: element}) => {\n const frame = element.querySelector(\"#\" + this.element.id);\n if (frame && this.previousFrameElement) {\n frame.replaceChildren(...this.previousFrameElement.children);\n }\n delete this.previousFrameElement;\n };\n async #loadFrameResponse(fetchResponse, document) {\n const newFrameElement = await this.extractForeignFrameElement(document.body);\n const rendererClass = this.#shouldMorphFrame ? MorphingFrameRenderer : FrameRenderer;\n if (newFrameElement) {\n const snapshot = new Snapshot(newFrameElement);\n const renderer = new rendererClass(this, this.view.snapshot, snapshot, false, false);\n if (this.view.renderPromise) await this.view.renderPromise;\n this.changeHistory();\n await this.view.render(renderer);\n this.complete = true;\n session.frameRendered(fetchResponse, this.element);\n session.frameLoaded(this.element);\n await this.fetchResponseLoaded(fetchResponse);\n } else if (this.#willHandleFrameMissingFromResponse(fetchResponse)) {\n this.#handleFrameMissingFromResponse(fetchResponse);\n }\n }\n async #visit(url) {\n const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams, this.element);\n this.#currentFetchRequest?.cancel();\n this.#currentFetchRequest = request;\n return new Promise((resolve => {\n this.#resolveVisitPromise = () => {\n this.#resolveVisitPromise = () => {};\n this.#currentFetchRequest = null;\n resolve();\n };\n request.perform();\n }));\n }\n #navigateFrame(element, url, submitter) {\n const frame = this.#findFrameElement(element, submitter);\n frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(submitter, element, frame));\n this.#withCurrentNavigationElement(element, (() => {\n frame.src = url;\n }));\n }\n proposeVisitIfNavigatedWithAction(frame, action = null) {\n this.action = action;\n if (this.action) {\n const pageSnapshot = PageSnapshot.fromElement(frame).clone();\n const {visitCachedSnapshot: visitCachedSnapshot} = frame.delegate;\n frame.delegate.fetchResponseLoaded = async fetchResponse => {\n if (frame.src) {\n const {statusCode: statusCode, redirected: redirected} = fetchResponse;\n const responseHTML = await fetchResponse.responseHTML;\n const response = {\n statusCode: statusCode,\n redirected: redirected,\n responseHTML: responseHTML\n };\n const options = {\n response: response,\n visitCachedSnapshot: visitCachedSnapshot,\n willRender: false,\n updateHistory: false,\n restorationIdentifier: this.restorationIdentifier,\n snapshot: pageSnapshot\n };\n if (this.action) options.action = this.action;\n session.visit(frame.src, options);\n }\n };\n }\n }\n changeHistory() {\n if (this.action) {\n const method = getHistoryMethodForAction(this.action);\n session.history.update(method, expandURL(this.element.src || \"\"), this.restorationIdentifier);\n }\n }\n async #handleUnvisitableFrameResponse(fetchResponse) {\n console.warn(`The response (${fetchResponse.statusCode}) from is performing a full page visit due to turbo-visit-control.`);\n await this.#visitResponse(fetchResponse.response);\n }\n #willHandleFrameMissingFromResponse(fetchResponse) {\n this.element.setAttribute(\"complete\", \"\");\n const response = fetchResponse.response;\n const visit = async (url, options) => {\n if (url instanceof Response) {\n this.#visitResponse(url);\n } else {\n session.visit(url, options);\n }\n };\n const event = dispatch(\"turbo:frame-missing\", {\n target: this.element,\n detail: {\n response: response,\n visit: visit\n },\n cancelable: true\n });\n return !event.defaultPrevented;\n }\n #handleFrameMissingFromResponse(fetchResponse) {\n this.view.missing();\n this.#throwFrameMissingError(fetchResponse);\n }\n #throwFrameMissingError(fetchResponse) {\n const message = `The response (${fetchResponse.statusCode}) did not contain the expected and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;\n throw new TurboFrameMissingError(message);\n }\n async #visitResponse(response) {\n const wrapped = new FetchResponse(response);\n const responseHTML = await wrapped.responseHTML;\n const {location: location, redirected: redirected, statusCode: statusCode} = wrapped;\n return session.visit(location, {\n response: {\n redirected: redirected,\n statusCode: statusCode,\n responseHTML: responseHTML\n }\n });\n }\n #findFrameElement(element, submitter) {\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n return getFrameElementById(id) ?? this.element;\n }\n async extractForeignFrameElement(container) {\n let element;\n const id = CSS.escape(this.id);\n try {\n element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);\n if (element) {\n return element;\n }\n element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);\n if (element) {\n await element.loaded;\n return await this.extractForeignFrameElement(element);\n }\n } catch (error) {\n console.error(error);\n return new FrameElement;\n }\n return null;\n }\n #formActionIsVisitable(form, submitter) {\n const action = getAction$1(form, submitter);\n return locationIsVisitable(expandURL(action), this.rootLocation);\n }\n #shouldInterceptNavigation(element, submitter) {\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n if (element instanceof HTMLFormElement && !this.#formActionIsVisitable(element, submitter)) {\n return false;\n }\n if (!this.enabled || id == \"_top\") {\n return false;\n }\n if (id) {\n const frameElement = getFrameElementById(id);\n if (frameElement) {\n return !frameElement.disabled;\n }\n }\n if (!session.elementIsNavigatable(element)) {\n return false;\n }\n if (submitter && !session.elementIsNavigatable(submitter)) {\n return false;\n }\n return true;\n }\n get id() {\n return this.element.id;\n }\n get enabled() {\n return !this.element.disabled;\n }\n get sourceURL() {\n if (this.element.src) {\n return this.element.src;\n }\n }\n set sourceURL(sourceURL) {\n this.#ignoringChangesToAttribute(\"src\", (() => {\n this.element.src = sourceURL ?? null;\n }));\n }\n get loadingStyle() {\n return this.element.loading;\n }\n get isLoading() {\n return this.formSubmission !== undefined || this.#resolveVisitPromise() !== undefined;\n }\n get complete() {\n return this.element.hasAttribute(\"complete\");\n }\n set complete(value) {\n if (value) {\n this.element.setAttribute(\"complete\", \"\");\n } else {\n this.element.removeAttribute(\"complete\");\n }\n }\n get isActive() {\n return this.element.isActive && this.#connected;\n }\n get rootLocation() {\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const root = meta?.content ?? \"/\";\n return expandURL(root);\n }\n #isIgnoringChangesTo(attributeName) {\n return this.#ignoredAttributes.has(attributeName);\n }\n #ignoringChangesToAttribute(attributeName, callback) {\n this.#ignoredAttributes.add(attributeName);\n callback();\n this.#ignoredAttributes.delete(attributeName);\n }\n #withCurrentNavigationElement(element, callback) {\n this.currentNavigationElement = element;\n callback();\n delete this.currentNavigationElement;\n }\n}\n\nfunction getFrameElementById(id) {\n if (id != null) {\n const element = document.getElementById(id);\n if (element instanceof FrameElement) {\n return element;\n }\n }\n}\n\nfunction activateElement(element, currentURL) {\n if (element) {\n const src = element.getAttribute(\"src\");\n if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n throw new Error(`Matching element has a source URL which references itself`);\n }\n if (element.ownerDocument !== document) {\n element = document.importNode(element, true);\n }\n if (element instanceof FrameElement) {\n element.connectedCallback();\n element.disconnectedCallback();\n return element;\n }\n }\n}\n\nconst StreamActions = {\n after() {\n this.targetElements.forEach((e => e.parentElement?.insertBefore(this.templateContent, e.nextSibling)));\n },\n append() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach((e => e.append(this.templateContent)));\n },\n before() {\n this.targetElements.forEach((e => e.parentElement?.insertBefore(this.templateContent, e)));\n },\n prepend() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach((e => e.prepend(this.templateContent)));\n },\n remove() {\n this.targetElements.forEach((e => e.remove()));\n },\n replace() {\n const method = this.getAttribute(\"method\");\n this.targetElements.forEach((targetElement => {\n if (method === \"morph\") {\n morphElements(targetElement, this.templateContent);\n } else {\n targetElement.replaceWith(this.templateContent);\n }\n }));\n },\n update() {\n const method = this.getAttribute(\"method\");\n this.targetElements.forEach((targetElement => {\n if (method === \"morph\") {\n morphChildren(targetElement, this.templateContent);\n } else {\n targetElement.innerHTML = \"\";\n targetElement.append(this.templateContent);\n }\n }));\n },\n refresh() {\n session.refresh(this.baseURI, this.requestId);\n }\n};\n\nclass StreamElement extends HTMLElement {\n static async renderElement(newElement) {\n await newElement.performAction();\n }\n async connectedCallback() {\n try {\n await this.render();\n } catch (error) {\n console.error(error);\n } finally {\n this.disconnect();\n }\n }\n async render() {\n return this.renderPromise ??= (async () => {\n const event = this.beforeRenderEvent;\n if (this.dispatchEvent(event)) {\n await nextRepaint();\n await event.detail.render(this);\n }\n })();\n }\n disconnect() {\n try {\n this.remove();\n } catch {}\n }\n removeDuplicateTargetChildren() {\n this.duplicateChildren.forEach((c => c.remove()));\n }\n get duplicateChildren() {\n const existingChildren = this.targetElements.flatMap((e => [ ...e.children ])).filter((c => !!c.getAttribute(\"id\")));\n const newChildrenIds = [ ...this.templateContent?.children || [] ].filter((c => !!c.getAttribute(\"id\"))).map((c => c.getAttribute(\"id\")));\n return existingChildren.filter((c => newChildrenIds.includes(c.getAttribute(\"id\"))));\n }\n get performAction() {\n if (this.action) {\n const actionFunction = StreamActions[this.action];\n if (actionFunction) {\n return actionFunction;\n }\n this.#raise(\"unknown action\");\n }\n this.#raise(\"action attribute is missing\");\n }\n get targetElements() {\n if (this.target) {\n return this.targetElementsById;\n } else if (this.targets) {\n return this.targetElementsByQuery;\n } else {\n this.#raise(\"target or targets attribute is missing\");\n }\n }\n get templateContent() {\n return this.templateElement.content.cloneNode(true);\n }\n get templateElement() {\n if (this.firstElementChild === null) {\n const template = this.ownerDocument.createElement(\"template\");\n this.appendChild(template);\n return template;\n } else if (this.firstElementChild instanceof HTMLTemplateElement) {\n return this.firstElementChild;\n }\n this.#raise(\"first child element must be a